17 #ifndef QGSATTRIBUTETABLEMODEL_H 18 #define QGSATTRIBUTETABLEMODEL_H 20 #include <QAbstractTableModel> 21 #include <QModelIndex> 54 SortRole = Qt::UserRole + 1,
86 QVariant headerData(
int section, Qt::Orientation orientation,
int role = Qt::DisplayRole )
const override;
141 int fieldIdx(
int col )
const;
146 int fieldCol(
int idx )
const;
174 void executeAction(
int action,
const QModelIndex &idx )
const;
194 void prefetchColumnData(
int column );
202 void prefetchSortData(
const QString& expression );
207 QString sortCacheExpression()
const;
244 int extraColumns()
const;
250 void setExtraColumns(
int extraColumns );
257 virtual void loadLayer();
263 void fieldConditionalStyleChanged(
const QString& fieldName );
272 void progress(
int i,
bool &cancel );
279 virtual void updatedFields();
286 virtual void editCommandEnded();
291 virtual void attributeDeleted(
int idx );
312 virtual void featureAdded(
QgsFeatureId fid,
bool resettingModel =
false );
317 virtual void layerDeleted();
339 virtual void loadAttributes();
368 QRect mChangedCellBounds;
Class for parsing and evaluation of expressions (formerly called "search strings").
QgsVectorLayer * layer() const
Returns the layer this model uses as backend.
virtual int rowCount(const QModelIndex &parent) const=0
QgsAttributeList mAttributes
QHash< int, QgsFeatureId > mRowIdMap
Get the field index of this column.
This class contains context information for attribute editor widgets.
The feature class encapsulates a single feature including its id, geometry and a list of field/values...
A model backed by a QgsVectorLayerCache which is able to provide feature/attribute information to a Q...
Map canvas is a class for displaying all GIS data types on a canvas.
void resetModel()
Resets the model.
QgsVectorLayerCache * mLayerCache
Get the feature id of the feature in this row.
QVector< QgsEditorWidgetFactory * > mWidgetFactories
QgsExpressionContext mExpressionContext
void setEditorContext(const QgsAttributeEditorContext &context)
Sets the context in which this table is shown.
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
This class wraps a request for features to a vector layer (or directly its vector data provider)...
QgsVectorLayerCache * layerCache() const
Returns the layer cache this model uses as backend.
QVector< QgsEditorWidgetConfig > mWidgetConfigs
QHash< QgsFeatureId, int > mIdRowMap
virtual QVariant data(const QModelIndex &index, int role) const=0
This class caches features of a given QgsVectorLayer.
virtual bool removeRows(int row, int count, const QModelIndex &parent)
QVector< QVariant > mAttributeWidgetCaches
virtual int columnCount(const QModelIndex &parent) const=0
virtual bool setData(const QModelIndex &index, const QVariant &value, int role)
const QgsAttributeEditorContext & editorContext() const
Returns the context in which this table is shown.
virtual Qt::ItemFlags flags(const QModelIndex &index) const
Represents a vector layer which manages a vector based data sets.
An action which can run on map layers.
QHash< int, QList< QgsConditionalStyle > > mRowStylesMap