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;
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, Qt::SortOrder order = Qt::AscendingOrder );
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 );
191 void conditionalStylesChanged();
196 QString mParserErrorString;
197 bool mInjectNull =
false;
199 mutable QMap< QgsFeatureId, QList<QgsConditionalStyle> > mRowStylesMap;
200 bool mSortByDisplayExpression =
false;
201 QPointer< QgsVectorLayer > mSourceLayer;
206 #endif // QGSATTRIBUTEEDITORMODEL_H