15 #ifndef QGSATTRIBUTEEDITORMODEL_H
16 #define QGSATTRIBUTEEDITORMODEL_H
20 #include <QSortFilterProxyModel>
22 #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;
87 void setInjectNull(
bool injectNull );
104 bool setDisplayExpression(
const QString &expression );
110 QString parserErrorString();
112 QString displayExpression()
const;
113 bool featureByIndex(
const QModelIndex &index,
QgsFeature &feat );
119 QgsFeatureId idxToFid(
const QModelIndex &index )
const;
127 QModelIndex mapToSource(
const QModelIndex &proxyIndex )
const override;
128 QModelIndex mapFromSource(
const QModelIndex &sourceIndex )
const override;
130 virtual QModelIndex mapToMaster(
const QModelIndex &proxyIndex )
const;
131 virtual QModelIndex mapFromMaster(
const QModelIndex &sourceIndex )
const;
133 virtual QItemSelection mapSelectionFromMaster(
const QItemSelection &selection )
const;
134 virtual QItemSelection mapSelectionToMaster(
const QItemSelection &selection )
const;
136 QModelIndex parent(
const QModelIndex &child )
const override;
137 int columnCount(
const QModelIndex &parent = QModelIndex() )
const override;
138 int rowCount(
const QModelIndex &parent = QModelIndex() )
const override;
148 bool sortByDisplayExpression()
const;
158 void setSortByDisplayExpression(
bool sortByDisplayExpression, Qt::SortOrder order = Qt::AscendingOrder );
167 Q_DECL_DEPRECATED
void onBeginRemoveRows(
const QModelIndex &parent,
int first,
int last );
174 Q_DECL_DEPRECATED
void onEndRemoveRows(
const QModelIndex &parent,
int first,
int last );
181 Q_DECL_DEPRECATED
void onBeginInsertRows(
const QModelIndex &parent,
int first,
int last );
188 Q_DECL_DEPRECATED
void onEndInsertRows(
const QModelIndex &parent,
int first,
int last );
192 void conditionalStylesChanged();
197 QString mParserErrorString;
198 bool mInjectNull =
false;
200 mutable QMap< QgsFeatureId, QList<QgsConditionalStyle> > mRowStylesMap;
201 bool mSortByDisplayExpression =
false;
202 QPointer< QgsVectorLayer > mSourceLayer;
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...
Class for parsing and evaluation of expressions (formerly called "search strings").
virtual QModelIndex fidToIndex(QgsFeatureId fid)=0
The feature class encapsulates a single feature including its unique ID, geometry and a list of field...
This class caches features of a given QgsVectorLayer.
qint64 QgsFeatureId
64 bit feature ids negative numbers are used for uncommitted/newly added features
Q_DECLARE_METATYPE(QgsMeshTimeSettings)
FeatureInfo()=default
Constructor for FeatureInfo.