158 bool hasMixedSelectionNumericFormat();
171 Q_DECL_DEPRECATED QColor selectionForegroundColor()
SIP_DEPRECATED;
182 QColor selectionBackgroundColor();
192 Qt::Alignment selectionHorizontalAlignment();
202 Qt::Alignment selectionVerticalAlignment();
229 double selectionRowHeight();
237 double selectionColumnWidth();
243 double tableRowHeight(
int row );
249 double tableColumnWidth(
int column );
259 void setTableRowHeight(
int row,
double height );
269 void setTableColumnWidth(
int column,
double width );
276 QList<int> rowsAssociatedWithSelection();
283 QList<int> columnsAssociatedWithSelection();
290 QVariantList tableHeaders()
const;
295 bool isHeaderCellSelected()
const;
302 bool canMergeSelection()
const;
309 bool canSplitSelection()
const;
318 void insertRowsBelow();
325 void insertRowsAbove();
332 void insertColumnsBefore();
339 void insertColumnsAfter();
353 void deleteColumns();
360 void expandRowSelection();
367 void expandColumnSelection();
372 void clearSelectedCells();
382 Q_DECL_DEPRECATED
void setSelectionForegroundColor(
const QColor &color )
SIP_DEPRECATED;
390 void setSelectionBackgroundColor(
const QColor &color );
400 void setSelectionHorizontalAlignment( Qt::Alignment alignment );
410 void setSelectionVerticalAlignment( Qt::Alignment alignment );
417 void setSelectionCellProperty(
const QgsProperty &property );
431 void setSelectionRowHeight(
double height );
438 void setSelectionColumnWidth(
double height );
443 void setIncludeTableHeader(
bool included );
450 void setTableHeaders(
const QVariantList &headers );
458 void mergeSelectedCells();
466 void splitSelectedCells();
469 void keyPressEvent( QKeyEvent *event )
override;
485 void updateNumericFormatForIndex(
const QModelIndex &index );
491 PresetBackgroundColorRole = Qt::UserRole + 1,
501 void updateHeaders();
503 bool collectConsecutiveRowRange(
const QModelIndexList &list,
int &minRow,
int &maxRow )
const;
504 bool collectConsecutiveColumnRange(
const QModelIndexList &list,
int &minColumn,
int &maxColumn )
const;
505 QList<int> collectUniqueRows(
const QModelIndexList &list )
const;
506 QList<int> collectUniqueColumns(
const QModelIndexList &list )
const;
507 bool isRectangularSelection(
const QModelIndexList &list )
const;
508 bool hasMergedCells(
const QModelIndexList &list )
const;
510 int mBlockSignals = 0;
511 QHash<QTableWidgetItem *, QgsNumericFormat *> mNumericFormats;
512 QMenu *mHeaderMenu =
nullptr;
513 QMenu *mCellMenu =
nullptr;
514 bool mIncludeHeader =
false;
515 bool mFirstSet =
true;
517 friend class QgsTableEditorDelegate;