15 #ifndef QGSATTRIBUTEEDITORMODEL_H 16 #define QGSATTRIBUTEEDITORMODEL_H 20 #include <QSortFilterProxyModel> 22 #include <QItemSelectionModel> 56 bool isEdited =
false;
61 FeatureInfoRole = 0x1000,
77 QVariant data(
const QModelIndex &index,
int role )
const override;
78 Qt::ItemFlags flags(
const QModelIndex &index )
const override;
85 void setInjectNull(
bool injectNull );
102 bool setDisplayExpression(
const QString &expression );
108 QString parserErrorString();
110 QString displayExpression()
const;
111 bool featureByIndex(
const QModelIndex &index,
QgsFeature &feat );
117 QgsFeatureId idxToFid(
const QModelIndex &index )
const;
125 QModelIndex mapToSource(
const QModelIndex &proxyIndex )
const override;
126 QModelIndex mapFromSource(
const QModelIndex &sourceIndex )
const override;
128 virtual QModelIndex mapToMaster(
const QModelIndex &proxyIndex )
const;
129 virtual QModelIndex mapFromMaster(
const QModelIndex &sourceIndex )
const;
131 virtual QItemSelection mapSelectionFromMaster(
const QItemSelection &selection )
const;
132 virtual QItemSelection mapSelectionToMaster(
const QItemSelection &selection )
const;
134 QModelIndex parent(
const QModelIndex &child )
const override;
135 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
136 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
146 bool sortByDisplayExpression()
const;
156 void setSortByDisplayExpression(
bool sortByDisplayExpression );
165 Q_DECL_DEPRECATED
void onBeginRemoveRows(
const QModelIndex &parent,
int first,
int last );
172 Q_DECL_DEPRECATED
void onEndRemoveRows(
const QModelIndex &parent,
int first,
int last );
179 Q_DECL_DEPRECATED
void onBeginInsertRows(
const QModelIndex &parent,
int first,
int last );
186 Q_DECL_DEPRECATED
void onEndInsertRows(
const QModelIndex &parent,
int first,
int last );
191 QString mParserErrorString;
192 bool mInjectNull =
false;
194 mutable QMap< QgsFeatureId, QList<QgsConditionalStyle> > mRowStylesMap;
195 bool mSortByDisplayExpression =
false;
200 #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...
Expression contexts are used to encapsulate the parameters around which a QgsExpression should be eva...
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
This class caches features of a given QgsVectorLayer.