QGIS API Documentation  2.99.0-Master (6a61179)
Classes | Public Types | Public Slots | Public Member Functions | List of all members
QgsFeatureListModel Class Reference

#include <qgsfeaturelistmodel.h>

Inheritance diagram for QgsFeatureListModel:
Inheritance graph
[legend]

Classes

struct  FeatureInfo
 

Public Types

enum  Role { FeatureInfoRole = Qt::UserRole, FeatureRole }
 

Public Slots

void onBeginInsertRows (const QModelIndex &parent, int first, int last)
 
void onBeginRemoveRows (const QModelIndex &parent, int first, int last)
 
void onEndInsertRows (const QModelIndex &parent, int first, int last)
 
void onEndRemoveRows (const QModelIndex &parent, int first, int last)
 

Public Member Functions

 QgsFeatureListModel (QgsAttributeTableFilterModel *sourceModel, QObject *parent=nullptr)
 
virtual ~QgsFeatureListModel ()
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const override
 
virtual QVariant data (const QModelIndex &index, int role) const override
 
QString displayExpression () const
 
bool featureByIndex (const QModelIndex &index, QgsFeature &feat)
 
QModelIndex fidToIdx (const QgsFeatureId fid) const
 
QModelIndex fidToIndex (QgsFeatureId fid) override
 
QModelIndexList fidToIndexList (QgsFeatureId fid)
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const override
 
QgsFeatureId idxToFid (const QModelIndex &index) const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const override
 
bool injectNull ()
 Returns the current state of null value injection. More...
 
QgsVectorLayerCachelayerCache ()
 
virtual QModelIndex mapFromMaster (const QModelIndex &sourceIndex) const
 
virtual 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
 
virtual QModelIndex mapToSource (const QModelIndex &proxyIndex) const override
 
QgsAttributeTableModelmasterModel ()
 
virtual QModelIndex parent (const QModelIndex &child) const override
 
QString parserErrorString ()
 Returns a detailed message about errors while parsing a QgsExpression. More...
 
virtual 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...
 
virtual void setSourceModel (QgsAttributeTableFilterModel *sourceModel)
 
- Public Member Functions inherited from QgsFeatureModel
virtual ~QgsFeatureModel ()
 

Detailed Description

Definition at line 34 of file qgsfeaturelistmodel.h.

Member Enumeration Documentation

§ Role

Enumerator
FeatureInfoRole 
FeatureRole 

Definition at line 51 of file qgsfeaturelistmodel.h.

Constructor & Destructor Documentation

§ QgsFeatureListModel()

QgsFeatureListModel::QgsFeatureListModel ( QgsAttributeTableFilterModel sourceModel,
QObject *  parent = nullptr 
)
explicit

Definition at line 25 of file qgsfeaturelistmodel.cpp.

§ ~QgsFeatureListModel()

QgsFeatureListModel::~QgsFeatureListModel ( )
virtual

Definition at line 33 of file qgsfeaturelistmodel.cpp.

Member Function Documentation

§ columnCount()

int QgsFeatureListModel::columnCount ( const QModelIndex &  parent = QModelIndex()) const
overridevirtual

Definition at line 303 of file qgsfeaturelistmodel.cpp.

§ data()

QVariant QgsFeatureListModel::data ( const QModelIndex &  index,
int  role 
) const
overridevirtual

Definition at line 70 of file qgsfeaturelistmodel.cpp.

§ displayExpression()

QString QgsFeatureListModel::displayExpression ( ) const

Definition at line 204 of file qgsfeaturelistmodel.cpp.

§ featureByIndex()

bool QgsFeatureListModel::featureByIndex ( const QModelIndex &  index,
QgsFeature feat 
)

Definition at line 209 of file qgsfeaturelistmodel.cpp.

§ fidToIdx()

QModelIndex QgsFeatureListModel::fidToIdx ( const QgsFeatureId  fid) const

Definition at line 65 of file qgsfeaturelistmodel.cpp.

§ fidToIndex()

QModelIndex QgsFeatureListModel::fidToIndex ( QgsFeatureId  fid)
overridevirtual

Implements QgsFeatureModel.

Definition at line 318 of file qgsfeaturelistmodel.cpp.

§ fidToIndexList()

QModelIndexList QgsFeatureListModel::fidToIndexList ( QgsFeatureId  fid)

Definition at line 323 of file qgsfeaturelistmodel.cpp.

§ flags()

Qt::ItemFlags QgsFeatureListModel::flags ( const QModelIndex &  index) const
overridevirtual

Definition at line 142 of file qgsfeaturelistmodel.cpp.

§ idxToFid()

QgsFeatureId QgsFeatureListModel::idxToFid ( const QModelIndex &  index) const

Definition at line 60 of file qgsfeaturelistmodel.cpp.

§ index()

QModelIndex QgsFeatureListModel::index ( int  row,
int  column,
const QModelIndex &  parent = QModelIndex() 
) const
overridevirtual

Definition at line 290 of file qgsfeaturelistmodel.cpp.

§ injectNull()

bool QgsFeatureListModel::injectNull ( )

Returns the current state of null value injection.

Returns
If a NULL value is added
Note
added in 2.9

Definition at line 164 of file qgsfeaturelistmodel.cpp.

§ layerCache()

QgsVectorLayerCache * QgsFeatureListModel::layerCache ( )

Definition at line 55 of file qgsfeaturelistmodel.cpp.

§ mapFromMaster()

QModelIndex QgsFeatureListModel::mapFromMaster ( const QModelIndex &  sourceIndex) const
virtual

Definition at line 250 of file qgsfeaturelistmodel.cpp.

§ mapFromSource()

QModelIndex QgsFeatureListModel::mapFromSource ( const QModelIndex &  sourceIndex) const
overridevirtual

Definition at line 282 of file qgsfeaturelistmodel.cpp.

§ mapSelectionFromMaster()

QItemSelection QgsFeatureListModel::mapSelectionFromMaster ( const QItemSelection &  selection) const
virtual

Definition at line 260 of file qgsfeaturelistmodel.cpp.

§ mapSelectionToMaster()

QItemSelection QgsFeatureListModel::mapSelectionToMaster ( const QItemSelection &  selection) const
virtual

Definition at line 265 of file qgsfeaturelistmodel.cpp.

§ mapToMaster()

QModelIndex QgsFeatureListModel::mapToMaster ( const QModelIndex &  proxyIndex) const
virtual

Definition at line 240 of file qgsfeaturelistmodel.cpp.

§ mapToSource()

QModelIndex QgsFeatureListModel::mapToSource ( const QModelIndex &  proxyIndex) const
overridevirtual

Definition at line 272 of file qgsfeaturelistmodel.cpp.

§ masterModel()

QgsAttributeTableModel * QgsFeatureListModel::masterModel ( )

Definition at line 169 of file qgsfeaturelistmodel.cpp.

§ onBeginInsertRows

void QgsFeatureListModel::onBeginInsertRows ( const QModelIndex &  parent,
int  first,
int  last 
)
slot

Definition at line 227 of file qgsfeaturelistmodel.cpp.

§ onBeginRemoveRows

void QgsFeatureListModel::onBeginRemoveRows ( const QModelIndex &  parent,
int  first,
int  last 
)
slot

Definition at line 214 of file qgsfeaturelistmodel.cpp.

§ onEndInsertRows

void QgsFeatureListModel::onEndInsertRows ( const QModelIndex &  parent,
int  first,
int  last 
)
slot

Definition at line 232 of file qgsfeaturelistmodel.cpp.

§ onEndRemoveRows

void QgsFeatureListModel::onEndRemoveRows ( const QModelIndex &  parent,
int  first,
int  last 
)
slot

Definition at line 219 of file qgsfeaturelistmodel.cpp.

§ parent()

QModelIndex QgsFeatureListModel::parent ( const QModelIndex &  child) const
overridevirtual

Definition at line 297 of file qgsfeaturelistmodel.cpp.

§ parserErrorString()

QString QgsFeatureListModel::parserErrorString ( )

Returns a detailed message about errors while parsing a QgsExpression.

Returns
A message containg information about the parser error.

Definition at line 199 of file qgsfeaturelistmodel.cpp.

§ rowCount()

int QgsFeatureListModel::rowCount ( const QModelIndex &  parent = QModelIndex()) const
overridevirtual

Definition at line 309 of file qgsfeaturelistmodel.cpp.

§ setDisplayExpression()

bool QgsFeatureListModel::setDisplayExpression ( const QString &  expression)
Parameters
expressionA QgsExpression compatible string.
Returns
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 174 of file qgsfeaturelistmodel.cpp.

§ setInjectNull()

void QgsFeatureListModel::setInjectNull ( bool  injectNull)

If true is specified, a NULL value will be injected.

Parameters
injectNullstate of null value injection
Note
added in 2.9

Definition at line 154 of file qgsfeaturelistmodel.cpp.

§ setSourceModel()

void QgsFeatureListModel::setSourceModel ( QgsAttributeTableFilterModel sourceModel)
virtual

Definition at line 38 of file qgsfeaturelistmodel.cpp.


The documentation for this class was generated from the following files: