QGIS API Documentation
3.6.0-Noosa (5873452)
|
#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() More... | |
Q_DECL_DEPRECATED void | onBeginRemoveRows (const QModelIndex &parent, int first, int last) |
Does nothing except for calling beginRemoveRows() More... | |
Q_DECL_DEPRECATED void | onEndInsertRows (const QModelIndex &parent, int first, int last) |
Does nothing except for calling endInsertRows() More... | |
Q_DECL_DEPRECATED void | onEndRemoveRows (const QModelIndex &parent, int first, int last) |
Does nothing except for calling endRemoveRows() More... | |
Public Member Functions | |
QgsFeatureListModel (QgsAttributeTableFilterModel *sourceModel, QObject *parent=nullptr) | |
Constructor for QgsFeatureListModel. More... | |
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. More... | |
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. More... | |
bool | injectNull () |
Returns the current state of null value injection. More... | |
QgsVectorLayerCache * | layerCache () |
Returns the vector layer cache which is being used to populate the model. More... | |
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. More... | |
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. More... | |
void | setSortByDisplayExpression (bool sortByDisplayExpression) |
Sort this model by its display expression. More... | |
virtual void | setSourceModel (QgsAttributeTableFilterModel *sourceModel) |
bool | sortByDisplayExpression () const |
Sort this model by its display expression. More... | |
Public Member Functions inherited from QgsFeatureModel | |
virtual | ~QgsFeatureModel ()=default |
Definition at line 38 of file qgsfeaturelistmodel.h.
Enumerator | |
---|---|
FeatureInfoRole | |
FeatureRole |
Definition at line 59 of file qgsfeaturelistmodel.h.
|
explicit |
Constructor for QgsFeatureListModel.
Definition at line 26 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 383 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 55 of file qgsfeaturelistmodel.cpp.
QString QgsFeatureListModel::displayExpression | ( | ) | const |
Definition at line 232 of file qgsfeaturelistmodel.cpp.
bool QgsFeatureListModel::featureByIndex | ( | const QModelIndex & | index, |
QgsFeature & | feat | ||
) |
Definition at line 237 of file qgsfeaturelistmodel.cpp.
QModelIndex QgsFeatureListModel::fidToIdx | ( | QgsFeatureId | fid | ) | const |
Returns the model index corresponding to a feature ID.
Definition at line 50 of file qgsfeaturelistmodel.cpp.
|
overridevirtual |
Implements QgsFeatureModel.
Definition at line 398 of file qgsfeaturelistmodel.cpp.
QModelIndexList QgsFeatureListModel::fidToIndexList | ( | QgsFeatureId | fid | ) |
Definition at line 403 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 169 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 45 of file qgsfeaturelistmodel.cpp.
bool QgsFeatureListModel::injectNull | ( | ) |
Returns the current state of null value injection.
Definition at line 194 of file qgsfeaturelistmodel.cpp.
QgsVectorLayerCache * QgsFeatureListModel::layerCache | ( | ) |
Returns the vector layer cache which is being used to populate the model.
Definition at line 40 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 306 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 360 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 327 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 332 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 286 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 339 of file qgsfeaturelistmodel.cpp.
QgsAttributeTableModel * QgsFeatureListModel::masterModel | ( | ) |
Definition at line 199 of file qgsfeaturelistmodel.cpp.
|
slot |
Does nothing except for calling beginInsertRows()
Definition at line 255 of file qgsfeaturelistmodel.cpp.
|
slot |
Does nothing except for calling beginRemoveRows()
Definition at line 242 of file qgsfeaturelistmodel.cpp.
|
slot |
Does nothing except for calling endInsertRows()
Definition at line 260 of file qgsfeaturelistmodel.cpp.
|
slot |
Does nothing except for calling endRemoveRows()
Definition at line 247 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 377 of file qgsfeaturelistmodel.cpp.
QString QgsFeatureListModel::parserErrorString | ( | ) |
Returns a detailed message about errors while parsing a QgsExpression.
Definition at line 227 of file qgsfeaturelistmodel.cpp.
|
override |
Definition at line 389 of file qgsfeaturelistmodel.cpp.
bool QgsFeatureListModel::setDisplayExpression | ( | const QString & | expression | ) |
expression | A QgsExpression compatible string. |
Definition at line 204 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 |
Definition at line 181 of file qgsfeaturelistmodel.cpp.
void QgsFeatureListModel::setSortByDisplayExpression | ( | bool | sortByDisplayExpression | ) |
Sort this model by its display expression.
Definition at line 273 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 32 of file qgsfeaturelistmodel.cpp.
bool QgsFeatureListModel::sortByDisplayExpression | ( | ) | const |
Sort this model by its display expression.
Definition at line 268 of file qgsfeaturelistmodel.cpp.