QGIS API Documentation  2.8.2-Wien
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
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=0)
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
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.
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const override
bool setDisplayExpression (const QString expression)
virtual void setSourceModel (QgsAttributeTableFilterModel *sourceModel)

Detailed Description

Definition at line 17 of file qgsfeaturelistmodel.h.

Member Enumeration Documentation

Enumerator:
FeatureInfoRole 
FeatureRole 

Definition at line 34 of file qgsfeaturelistmodel.h.

Constructor & Destructor Documentation

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

Definition at line 10 of file qgsfeaturelistmodel.cpp.

QgsFeatureListModel::~QgsFeatureListModel ( )
virtual

Definition at line 17 of file qgsfeaturelistmodel.cpp.

Member Function Documentation

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

Definition at line 235 of file qgsfeaturelistmodel.cpp.

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

Definition at line 54 of file qgsfeaturelistmodel.cpp.

QString QgsFeatureListModel::displayExpression ( ) const

Definition at line 143 of file qgsfeaturelistmodel.cpp.

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

Definition at line 148 of file qgsfeaturelistmodel.cpp.

QModelIndex QgsFeatureListModel::fidToIdx ( const QgsFeatureId  fid) const

Definition at line 49 of file qgsfeaturelistmodel.cpp.

QModelIndex QgsFeatureListModel::fidToIndex ( QgsFeatureId  fid)
overridevirtual

Implements QgsFeatureModel.

Definition at line 247 of file qgsfeaturelistmodel.cpp.

QModelIndexList QgsFeatureListModel::fidToIndexList ( QgsFeatureId  fid)

Definition at line 252 of file qgsfeaturelistmodel.cpp.

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

Definition at line 106 of file qgsfeaturelistmodel.cpp.

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

Definition at line 44 of file qgsfeaturelistmodel.cpp.

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

Definition at line 223 of file qgsfeaturelistmodel.cpp.

QgsVectorLayerCache * QgsFeatureListModel::layerCache ( )

Definition at line 39 of file qgsfeaturelistmodel.cpp.

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

Definition at line 187 of file qgsfeaturelistmodel.cpp.

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

Definition at line 215 of file qgsfeaturelistmodel.cpp.

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

Definition at line 195 of file qgsfeaturelistmodel.cpp.

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

Definition at line 200 of file qgsfeaturelistmodel.cpp.

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

Definition at line 179 of file qgsfeaturelistmodel.cpp.

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

Definition at line 207 of file qgsfeaturelistmodel.cpp.

QgsAttributeTableModel * QgsFeatureListModel::masterModel ( )

Definition at line 111 of file qgsfeaturelistmodel.cpp.

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

Definition at line 166 of file qgsfeaturelistmodel.cpp.

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

Definition at line 153 of file qgsfeaturelistmodel.cpp.

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

Definition at line 171 of file qgsfeaturelistmodel.cpp.

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

Definition at line 158 of file qgsfeaturelistmodel.cpp.

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

Definition at line 229 of file qgsfeaturelistmodel.cpp.

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 138 of file qgsfeaturelistmodel.cpp.

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

Definition at line 241 of file qgsfeaturelistmodel.cpp.

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 116 of file qgsfeaturelistmodel.cpp.

void QgsFeatureListModel::setSourceModel ( QgsAttributeTableFilterModel sourceModel)
virtual

Definition at line 22 of file qgsfeaturelistmodel.cpp.


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