15 #ifndef QGSATTRIBUTEEDITORMODEL_H 16 #define QGSATTRIBUTEEDITORMODEL_H 21 #include <QSortFilterProxyModel> 23 #include <QItemSelectionModel> 57 bool isEdited =
false;
62 FeatureInfoRole = 0x1000,
78 QVariant data(
const QModelIndex &index,
int role )
const override;
79 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
86 void setInjectNull(
bool injectNull );
103 bool setDisplayExpression(
const QString &expression );
109 QString parserErrorString();
111 QString displayExpression()
const;
112 bool featureByIndex(
const QModelIndex &index,
QgsFeature &feat );
118 QgsFeatureId idxToFid(
const QModelIndex &index )
const;
126 QModelIndex mapToSource(
const QModelIndex &proxyIndex )
const override;
127 QModelIndex mapFromSource(
const QModelIndex &sourceIndex )
const override;
129 virtual QModelIndex mapToMaster(
const QModelIndex &proxyIndex )
const;
130 virtual QModelIndex mapFromMaster(
const QModelIndex &sourceIndex )
const;
132 virtual QItemSelection mapSelectionFromMaster(
const QItemSelection &selection )
const;
133 virtual QItemSelection mapSelectionToMaster(
const QItemSelection &selection )
const;
135 QModelIndex parent(
const QModelIndex &child )
const override;
136 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
137 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
147 bool sortByDisplayExpression()
const;
157 void setSortByDisplayExpression(
bool sortByDisplayExpression );
166 Q_DECL_DEPRECATED
void onBeginRemoveRows(
const QModelIndex &parent,
int first,
int last );
173 Q_DECL_DEPRECATED
void onEndRemoveRows(
const QModelIndex &parent,
int first,
int last );
180 Q_DECL_DEPRECATED
void onBeginInsertRows(
const QModelIndex &parent,
int first,
int last );
187 Q_DECL_DEPRECATED
void onEndInsertRows(
const QModelIndex &parent,
int first,
int last );
192 QString mParserErrorString;
193 bool mInjectNull =
false;
195 mutable QMap< QgsFeatureId, QList<QgsConditionalStyle> > mRowStylesMap;
196 bool mSortByDisplayExpression =
false;
201 #endif // QGSATTRIBUTEEDITORMODEL_H Class for parsing and evaluation of expressions (formerly called "search strings").
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...
Q_DECLARE_METATYPE(QModelIndex)
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
This class caches features of a given QgsVectorLayer.