17 #ifndef QGSATTRIBUTETABLEFILTERMODEL_H 18 #define QGSATTRIBUTETABLEFILTERMODEL_H 20 #include <QSortFilterProxyModel> 21 #include <QModelIndex> 57 ColumnTypeActionButton
95 void setSelectedOnTop(
bool selectedOnTop );
102 bool selectedOnTop();
110 virtual void setFilteredFeatures(
const QgsFeatureIds& ids );
182 virtual void sort(
int column, Qt::SortOrder order = Qt::AscendingOrder )
override;
191 void sort(
QString expression, Qt::SortOrder order = Qt::AscendingOrder );
196 QString sortExpression()
const;
203 QVariant headerData(
int section, Qt::Orientation orientation,
int role )
const override;
209 int actionColumnIndex()
const;
226 void sortColumnChanged(
int column, Qt::SortOrder order );
241 void generateListOfVisibleFeatures();
254 void extentsChanged();
257 void selectionChanged();
258 void onColumnsChanged();
269 int mapColumnToSource(
int column )
const;
271 friend class TestQgsAttributeTable;
virtual bool lessThan(const QModelIndex &left, const QModelIndex &right) const
QgsVectorLayer * layer() const
Returns the layer this filter acts on.
QgsAttributeTableModel * masterModel() const
Returns the table model this filter is using.
virtual Qt::ItemFlags flags(const QModelIndex &index) const
virtual void sort(int column, Qt::SortOrder order)
QModelIndex mapFromMaster(const QModelIndex &sourceIndex) const
virtual void setSourceModel(QAbstractItemModel *sourceModel)
Role
The additional roles defined by this filter model.
A model backed by a QgsVectorLayerCache which is able to provide feature/attribute information to a Q...
Show only visible features (depends on the map canvas)
Map canvas is a class for displaying all GIS data types on a canvas.
virtual QModelIndex fidToIndex(QgsFeatureId fid)=0
Show only selected features.
FilterMode filterMode()
The current filterModel.
FilterMode
The filter mode defines how the rows should be filtered.
virtual int columnCount(const QModelIndex &parent) const
This column shows a field.
This class caches features of a given QgsVectorLayer.
Show only features whose ids are on the filter list. {.
Start further roles starting from this role.
virtual bool filterAcceptsRow(int source_row, const QModelIndex &source_parent) const
virtual QModelIndex mapToSource(const QModelIndex &proxyIndex) const
virtual QModelIndex mapFromSource(const QModelIndex &sourceIndex) const
QgsMapCanvas * mapCanvas() const
Returns the map canvas.
ColumnType
The type of a column.
This is a container for configuration of the attribute table.
Represents a vector layer which manages a vector based data sets.
virtual QVariant data(const QModelIndex &index, int role) const
QgsVectorLayerCache * layerCache() const
Returns the layerCache this filter acts on.
QModelIndex mapToMaster(const QModelIndex &proxyIndex) const