QGIS API Documentation  2.7.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules 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=NULL)
 
virtual ~QgsFeatureListModel ()
 
virtual int columnCount (const QModelIndex &parent=QModelIndex()) const
 
virtual QVariant data (const QModelIndex &index, int role) const
 
QString displayExpression () const
 
bool featureByIndex (const QModelIndex &index, QgsFeature &feat)
 
QModelIndex fidToIdx (const QgsFeatureId fid) const
 
QModelIndex fidToIndex (QgsFeatureId fid)
 
QModelIndexList fidToIndexList (QgsFeatureId fid)
 
virtual Qt::ItemFlags flags (const QModelIndex &index) const
 
QgsFeatureId idxToFid (const QModelIndex &index) const
 
virtual QModelIndex index (int row, int column, const QModelIndex &parent=QModelIndex()) const
 
QgsVectorLayerCachelayerCache ()
 
virtual QModelIndex mapFromMaster (const QModelIndex &sourceIndex) const
 
virtual QModelIndex mapFromSource (const QModelIndex &sourceIndex) const
 
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
 
QgsAttributeTableModelmasterModel ()
 
virtual QModelIndex parent (const QModelIndex &child) const
 
QString parserErrorString ()
 Returns a detailed message about errors while parsing a QgsExpression. More...
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const
 
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 = NULL 
)
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
virtual

Definition at line 235 of file qgsfeaturelistmodel.cpp.

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

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)
virtual

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
virtual

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
virtual

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
virtual

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
virtual

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
virtual

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
virtual

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: