|
QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
|
#include <qgsfeaturelistmodel.h>

Classes | |
| struct | FeatureInfo |
Public Types | |
| enum | Role { FeatureInfoRole = 0x1000 , FeatureRole } |
Public Slots | |
| Q_DECL_DEPRECATED void | onBeginInsertRows (const QModelIndex &parent, int first, int last) |
| Does nothing except for calling beginInsertRows() | |
| Q_DECL_DEPRECATED void | onBeginRemoveRows (const QModelIndex &parent, int first, int last) |
| Does nothing except for calling beginRemoveRows() | |
| Q_DECL_DEPRECATED void | onEndInsertRows (const QModelIndex &parent, int first, int last) |
| Does nothing except for calling endInsertRows() | |
| Q_DECL_DEPRECATED void | onEndRemoveRows (const QModelIndex &parent, int first, int last) |
| Does nothing except for calling endRemoveRows() | |
Public Member Functions | |
| QgsFeatureListModel (QgsAttributeTableFilterModel *sourceModel, QObject *parent=nullptr) | |
| Constructor for QgsFeatureListModel. | |
| int | columnCount (const QModelIndex &parent=QModelIndex()) const override |
| QVariant | data (const QModelIndex &index, int role) const override |
| QString | displayExpression () const |
| bool | featureByIndex (const QModelIndex &index, QgsFeature &feat) |
| QModelIndex | fidToIdx (QgsFeatureId fid) const |
| Returns the model index corresponding to a feature ID. | |
| QModelIndex | fidToIndex (QgsFeatureId fid) override |
| QModelIndexList | fidToIndexList (QgsFeatureId fid) |
| Qt::ItemFlags | flags (const QModelIndex &index) const override |
| QgsFeatureId | idxToFid (const QModelIndex &index) const |
| Returns the feature ID corresponding to an index from the model. | |
| bool | injectNull () |
| Returns the current state of null value injection. | |
| QgsVectorLayerCache * | layerCache () |
| Returns the vector layer cache which is being used to populate the model. | |
| virtual QModelIndex | mapFromMaster (const QModelIndex &sourceIndex) const |
| QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const override |
| virtual QItemSelection | mapSelectionFromMaster (const QItemSelection &selection) const |
| virtual QItemSelection | mapSelectionToMaster (const QItemSelection &selection) const |
| virtual QModelIndex | mapToMaster (const QModelIndex &proxyIndex) const |
| QModelIndex | mapToSource (const QModelIndex &proxyIndex) const override |
| QgsAttributeTableModel * | masterModel () |
| QModelIndex | parent (const QModelIndex &child) const override |
| QString | parserErrorString () |
| Returns a detailed message about errors while parsing a QgsExpression. | |
| int | rowCount (const QModelIndex &parent=QModelIndex()) const override |
| bool | setDisplayExpression (const QString &expression) |
| void | setInjectNull (bool injectNull) |
If true is specified, a NULL value will be injected. | |
| void | setSortByDisplayExpression (bool sortByDisplayExpression, Qt::SortOrder order=Qt::AscendingOrder) |
| Sort this model by its display expression. | |
| virtual void | setSourceModel (QgsAttributeTableFilterModel *sourceModel) |
| bool | sortByDisplayExpression () const |
| Sort this model by its display expression. | |
Public Member Functions inherited from QgsFeatureModel | |
| virtual | ~QgsFeatureModel ()=default |
Definition at line 39 of file qgsfeaturelistmodel.h.
| Enumerator | |
|---|---|
| FeatureInfoRole | |
| FeatureRole | |
Definition at line 60 of file qgsfeaturelistmodel.h.
|
explicit |
Constructor for QgsFeatureListModel.
Definition at line 27 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 395 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 61 of file qgsfeaturelistmodel.cpp.
| QString QgsFeatureListModel::displayExpression | ( | ) | const |
Definition at line 238 of file qgsfeaturelistmodel.cpp.
| bool QgsFeatureListModel::featureByIndex | ( | const QModelIndex & | index, |
| QgsFeature & | feat | ||
| ) |
Definition at line 243 of file qgsfeaturelistmodel.cpp.
| QModelIndex QgsFeatureListModel::fidToIdx | ( | QgsFeatureId | fid | ) | const |
Returns the model index corresponding to a feature ID.
Definition at line 56 of file qgsfeaturelistmodel.cpp.
|
overridevirtual |
Implements QgsFeatureModel.
Definition at line 410 of file qgsfeaturelistmodel.cpp.
| QModelIndexList QgsFeatureListModel::fidToIndexList | ( | QgsFeatureId | fid | ) |
Definition at line 415 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 175 of file qgsfeaturelistmodel.cpp.
| QgsFeatureId QgsFeatureListModel::idxToFid | ( | const QModelIndex & | index | ) | const |
Returns the feature ID corresponding to an index from the model.
Definition at line 51 of file qgsfeaturelistmodel.cpp.
| bool QgsFeatureListModel::injectNull | ( | ) |
Returns the current state of null value injection.
Definition at line 200 of file qgsfeaturelistmodel.cpp.
| QgsVectorLayerCache * QgsFeatureListModel::layerCache | ( | ) |
Returns the vector layer cache which is being used to populate the model.
Definition at line 46 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 318 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 372 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 339 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 344 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 298 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 351 of file qgsfeaturelistmodel.cpp.
| QgsAttributeTableModel * QgsFeatureListModel::masterModel | ( | ) |
Definition at line 205 of file qgsfeaturelistmodel.cpp.
|
slot |
Does nothing except for calling beginInsertRows()
Definition at line 261 of file qgsfeaturelistmodel.cpp.
|
slot |
Does nothing except for calling beginRemoveRows()
Definition at line 248 of file qgsfeaturelistmodel.cpp.
|
slot |
Does nothing except for calling endInsertRows()
Definition at line 266 of file qgsfeaturelistmodel.cpp.
|
slot |
Does nothing except for calling endRemoveRows()
Definition at line 253 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 389 of file qgsfeaturelistmodel.cpp.
| QString QgsFeatureListModel::parserErrorString | ( | ) |
Returns a detailed message about errors while parsing a QgsExpression.
Definition at line 233 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 401 of file qgsfeaturelistmodel.cpp.
| bool QgsFeatureListModel::setDisplayExpression | ( | const QString & | expression | ) |
| expression | A QgsExpression compatible string. |
true if the expression could be set, false if there was a parse error. If it fails, the old expression will still be applied. Call parserErrorString() for a meaningful error message. Definition at line 210 of file qgsfeaturelistmodel.cpp.
| void QgsFeatureListModel::setInjectNull | ( | bool | injectNull | ) |
If true is specified, a NULL value will be injected.
| injectNull | state of null value injection |
true, the sort by display expression cannot be used Definition at line 187 of file qgsfeaturelistmodel.cpp.
| void QgsFeatureListModel::setSortByDisplayExpression | ( | bool | sortByDisplayExpression, |
| Qt::SortOrder | order = Qt::AscendingOrder |
||
| ) |
Sort this model by its display expression.
Definition at line 285 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 33 of file qgsfeaturelistmodel.cpp.
| bool QgsFeatureListModel::sortByDisplayExpression | ( | ) | const |
Sort this model by its display expression.
Definition at line 280 of file qgsfeaturelistmodel.cpp.