QGIS API Documentation
3.12.1-București (121cc00ff0)
|
Allows for filtering QgsComposerAttributeTable columns by columns which are sorted or unsorted. More...
#include <qgslayoutattributeselectiondialog.h>
Public Types | |
enum | ColumnFilterType { ShowSortedColumns, ShowUnsortedColumns } |
Controls whether the proxy model shows sorted or unsorted columns. More... | |
Public Member Functions | |
QgsLayoutTableSortColumnsProxyModel (QgsLayoutItemAttributeTable *table, ColumnFilterType filterType, QObject *parent=nullptr) | |
Constructor for QgsLayoutTableSortColumnsProxyModel. More... | |
int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
QgsLayoutTableColumn * | columnFromIndex (const QModelIndex &index) const |
Returns the QgsLayoutTableColumn corresponding to an index in the proxy model. More... | |
QgsLayoutTableColumn * | columnFromRow (int row) |
Returns the QgsLayoutTableColumn corresponding to a row in the proxy model. More... | |
QgsLayoutTableColumn * | columnFromSourceIndex (const QModelIndex &sourceIndex) const |
Returns the QgsLayoutTableColumn corresponding to an index from the source QgsLayoutItemAttributeTableColumnModel model. More... | |
QVariant | data (const QModelIndex &index, int role) const override |
Qt::ItemFlags | flags (const QModelIndex &index) const override |
QVariant | headerData (int section, Qt::Orientation orientation, int role=Qt::DisplayRole) const override |
bool | lessThan (const QModelIndex &left, const QModelIndex &right) const override |
void | resetFilter () |
Invalidates the current filter used by the proxy model. More... | |
bool | setData (const QModelIndex &index, const QVariant &value, int role=Qt::EditRole) override |
Protected Member Functions | |
bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const override |
Allows for filtering QgsComposerAttributeTable columns by columns which are sorted or unsorted.
Definition at line 144 of file qgslayoutattributeselectiondialog.h.
Controls whether the proxy model shows sorted or unsorted columns.
Enumerator | |
---|---|
ShowSortedColumns | Show only sorted columns. |
ShowUnsortedColumns | Show only unsorted columns. |
Definition at line 153 of file qgslayoutattributeselectiondialog.h.
QgsLayoutTableSortColumnsProxyModel::QgsLayoutTableSortColumnsProxyModel | ( | QgsLayoutItemAttributeTable * | table, |
ColumnFilterType | filterType, | ||
QObject * | parent = nullptr |
||
) |
Constructor for QgsLayoutTableSortColumnsProxyModel.
table | QgsLayoutItemAttributeTable the model is attached to |
filterType | filter for columns, controls whether sorted or unsorted columns are shown |
parent | optional parent |
Definition at line 456 of file qgslayoutattributeselectiondialog.cpp.
|
override |
Definition at line 517 of file qgslayoutattributeselectiondialog.cpp.
QgsLayoutTableColumn * QgsLayoutTableSortColumnsProxyModel::columnFromIndex | ( | const QModelIndex & | index | ) | const |
Returns the QgsLayoutTableColumn corresponding to an index in the proxy model.
Definition at line 487 of file qgslayoutattributeselectiondialog.cpp.
QgsLayoutTableColumn * QgsLayoutTableSortColumnsProxyModel::columnFromRow | ( | int | row | ) |
Returns the QgsLayoutTableColumn corresponding to a row in the proxy model.
Definition at line 636 of file qgslayoutattributeselectiondialog.cpp.
QgsLayoutTableColumn * QgsLayoutTableSortColumnsProxyModel::columnFromSourceIndex | ( | const QModelIndex & | sourceIndex | ) | const |
Returns the QgsLayoutTableColumn corresponding to an index from the source QgsLayoutItemAttributeTableColumnModel model.
Definition at line 494 of file qgslayoutattributeselectiondialog.cpp.
|
override |
Definition at line 523 of file qgslayoutattributeselectiondialog.cpp.
|
overrideprotected |
Definition at line 464 of file qgslayoutattributeselectiondialog.cpp.
|
override |
Definition at line 597 of file qgslayoutattributeselectiondialog.cpp.
|
override |
Definition at line 563 of file qgslayoutattributeselectiondialog.cpp.
|
override |
Definition at line 502 of file qgslayoutattributeselectiondialog.cpp.
void QgsLayoutTableSortColumnsProxyModel::resetFilter | ( | ) |
Invalidates the current filter used by the proxy model.
Definition at line 642 of file qgslayoutattributeselectiondialog.cpp.
|
override |
Definition at line 610 of file qgslayoutattributeselectiondialog.cpp.