QGIS API Documentation
2.0.1-Dufour
|
#include <qgsfeaturelistmodel.h>
Classes | |
struct | FeatureInfo |
Public Slots | |
void | onBeginRemoveRows (const QModelIndex &parent, int first, int last) |
void | onEndRemoveRows (const QModelIndex &parent, int first, int last) |
void | onBeginInsertRows (const QModelIndex &parent, int first, int last) |
void | onEndInsertRows (const QModelIndex &parent, int first, int last) |
Public Member Functions | |
QgsFeatureListModel (QgsAttributeTableFilterModel *sourceModel, QObject *parent=NULL) | |
virtual | ~QgsFeatureListModel () |
virtual void | setSourceModel (QgsAttributeTableFilterModel *sourceModel) |
QgsVectorLayerCache * | layerCache () |
virtual QVariant | data (const QModelIndex &index, int role) const |
virtual Qt::ItemFlags | flags (const QModelIndex &index) const |
QgsAttributeTableModel * | masterModel () |
bool | setDisplayExpression (const QString expression) |
QString | parserErrorString () |
Returns a detailed message about errors while parsing a QgsExpression. | |
const QString & | displayExpression () const |
bool | featureByIndex (const QModelIndex &index, QgsFeature &feat) |
QgsFeatureId | idxToFid (const QModelIndex &index) const |
QModelIndex | fidToIdx (const QgsFeatureId fid) const |
virtual QModelIndex | mapToSource (const QModelIndex &proxyIndex) const |
virtual QModelIndex | mapFromSource (const QModelIndex &sourceIndex) const |
virtual QModelIndex | mapToMaster (const QModelIndex &proxyIndex) const |
virtual QModelIndex | mapFromMaster (const QModelIndex &sourceIndex) const |
virtual QItemSelection | mapSelectionFromMaster (const QItemSelection &selection) const |
virtual QItemSelection | mapSelectionToMaster (const QItemSelection &selection) const |
virtual QModelIndex | index (int row, int column, const QModelIndex &parent=QModelIndex()) const |
virtual QModelIndex | parent (const QModelIndex &child) const |
virtual int | columnCount (const QModelIndex &parent=QModelIndex()) const |
virtual int | rowCount (const QModelIndex &parent=QModelIndex()) const |
QModelIndex | fidToIndex (QgsFeatureId fid) |
QModelIndexList | fidToIndexList (QgsFeatureId fid) |
Private Attributes | |
QgsExpression * | mExpression |
QgsAttributeTableFilterModel * | mFilterModel |
QString | mParserErrorString |
Definition at line 17 of file qgsfeaturelistmodel.h.
|
explicit |
Definition at line 10 of file qgsfeaturelistmodel.cpp.
References mExpression, and setSourceModel().
|
virtual |
Definition at line 17 of file qgsfeaturelistmodel.cpp.
References mExpression.
|
virtual |
Definition at line 227 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 54 of file qgsfeaturelistmodel.cpp.
References QgsVectorLayerEditBuffer::addedFeatures(), QgsVectorLayerEditBuffer::changedAttributeValues(), QgsVectorLayer::editBuffer(), QgsExpression::evaluate(), QgsVectorLayerCache::featureAtId(), QgsFeature::id(), idxToFid(), QgsFeatureListModel::FeatureInfo::isEdited, QgsFeatureListModel::FeatureInfo::isNew, QgsAttributeTableFilterModel::layer(), QgsAttributeTableFilterModel::layerCache(), mapToSource(), mExpression, mFilterModel, and QgsVectorLayer::pendingFields().
const QString & QgsFeatureListModel::displayExpression | ( | ) | const |
Definition at line 135 of file qgsfeaturelistmodel.cpp.
References QgsExpression::expression(), and mExpression.
Referenced by QgsFeatureListView::displayExpression().
bool QgsFeatureListModel::featureByIndex | ( | const QModelIndex & | index, |
QgsFeature & | feat | ||
) |
Definition at line 140 of file qgsfeaturelistmodel.cpp.
References QgsVectorLayerCache::featureAtId(), idxToFid(), QgsAttributeTableFilterModel::layerCache(), and mFilterModel.
Referenced by QgsFeatureListView::editSelectionChanged().
QModelIndex QgsFeatureListModel::fidToIdx | ( | const QgsFeatureId | fid | ) | const |
Definition at line 49 of file qgsfeaturelistmodel.cpp.
References QgsAttributeTableModel::idToIndex(), QgsAttributeTableFilterModel::mapFromMaster(), QgsAttributeTableFilterModel::masterModel(), and mFilterModel.
Referenced by QgsFeatureListView::setEditSelection().
|
virtual |
Implements QgsFeatureModel.
Definition at line 239 of file qgsfeaturelistmodel.cpp.
References mapFromMaster(), and masterModel().
Referenced by fidToIndexList().
QModelIndexList QgsFeatureListModel::fidToIndexList | ( | QgsFeatureId | fid | ) |
Definition at line 244 of file qgsfeaturelistmodel.cpp.
References fidToIndex().
|
virtual |
Definition at line 98 of file qgsfeaturelistmodel.cpp.
References mapToSource().
QgsFeatureId QgsFeatureListModel::idxToFid | ( | const QModelIndex & | index | ) | const |
Definition at line 44 of file qgsfeaturelistmodel.cpp.
References mapToMaster(), QgsAttributeTableFilterModel::masterModel(), mFilterModel, and QgsAttributeTableModel::rowToId().
Referenced by data(), and featureByIndex().
|
virtual |
Definition at line 215 of file qgsfeaturelistmodel.cpp.
Referenced by QgsFeatureListView::keyPressEvent(), QgsFeatureListView::selectAll(), and setDisplayExpression().
QgsVectorLayerCache * QgsFeatureListModel::layerCache | ( | ) |
Definition at line 39 of file qgsfeaturelistmodel.cpp.
References QgsAttributeTableFilterModel::layerCache(), and mFilterModel.
Referenced by QgsFeatureListView::layerCache(), and QgsFeatureListView::setModel().
|
virtual |
Definition at line 179 of file qgsfeaturelistmodel.cpp.
References QgsAttributeTableFilterModel::mapFromMaster(), and mFilterModel.
Referenced by QgsFeatureListView::editSelectionChanged(), fidToIndex(), and QgsFeatureListView::keyPressEvent().
|
virtual |
Definition at line 207 of file qgsfeaturelistmodel.cpp.
|
virtual |
Definition at line 187 of file qgsfeaturelistmodel.cpp.
References mFilterModel.
Referenced by QgsFeatureListView::editSelectionChanged().
|
virtual |
Definition at line 192 of file qgsfeaturelistmodel.cpp.
References mFilterModel.
|
virtual |
Definition at line 171 of file qgsfeaturelistmodel.cpp.
References QgsAttributeTableFilterModel::mapToMaster(), and mFilterModel.
Referenced by idxToFid(), QgsFeatureListView::keyPressEvent(), QgsFeatureListView::mouseMoveEvent(), QgsFeatureListView::mousePressEvent(), QgsFeatureListViewDelegate::paint(), and QgsFeatureListView::setEditSelection().
|
virtual |
Definition at line 199 of file qgsfeaturelistmodel.cpp.
QgsAttributeTableModel * QgsFeatureListModel::masterModel | ( | ) |
Definition at line 103 of file qgsfeaturelistmodel.cpp.
References QgsAttributeTableFilterModel::masterModel(), and mFilterModel.
Referenced by fidToIndex(), and QgsFeatureListView::setModel().
|
slot |
Definition at line 158 of file qgsfeaturelistmodel.cpp.
Referenced by setSourceModel().
|
slot |
Definition at line 145 of file qgsfeaturelistmodel.cpp.
Referenced by setSourceModel().
|
slot |
Definition at line 163 of file qgsfeaturelistmodel.cpp.
Referenced by setSourceModel().
|
slot |
Definition at line 150 of file qgsfeaturelistmodel.cpp.
Referenced by setSourceModel().
|
virtual |
Definition at line 221 of file qgsfeaturelistmodel.cpp.
QString QgsFeatureListModel::parserErrorString | ( | ) |
Returns a detailed message about errors while parsing a QgsExpression.
Definition at line 130 of file qgsfeaturelistmodel.cpp.
References mParserErrorString.
Referenced by QgsFeatureListView::parserErrorString().
|
virtual |
Definition at line 233 of file qgsfeaturelistmodel.cpp.
Referenced by QgsFeatureListView::selectAll(), and setDisplayExpression().
bool QgsFeatureListModel::setDisplayExpression | ( | const QString | expression | ) |
expression | A QgsExpression compatible string. |
Definition at line 108 of file qgsfeaturelistmodel.cpp.
References QgsVectorLayer::dataProvider(), QgsVectorDataProvider::fields(), QgsExpression::hasParserError(), index(), QgsAttributeTableFilterModel::layer(), mExpression, mFilterModel, mParserErrorString, QgsExpression::parserErrorString(), QgsExpression::prepare(), and rowCount().
Referenced by QgsFeatureListView::setDisplayExpression().
|
virtual |
Definition at line 22 of file qgsfeaturelistmodel.cpp.
References mFilterModel, onBeginInsertRows(), onBeginRemoveRows(), onEndInsertRows(), and onEndRemoveRows().
Referenced by QgsFeatureListModel().
|
private |
Definition at line 89 of file qgsfeaturelistmodel.h.
Referenced by data(), displayExpression(), QgsFeatureListModel(), setDisplayExpression(), and ~QgsFeatureListModel().
|
private |
Definition at line 90 of file qgsfeaturelistmodel.h.
Referenced by data(), featureByIndex(), fidToIdx(), idxToFid(), layerCache(), mapFromMaster(), mapSelectionFromMaster(), mapSelectionToMaster(), mapToMaster(), masterModel(), setDisplayExpression(), and setSourceModel().
|
private |
Definition at line 91 of file qgsfeaturelistmodel.h.
Referenced by parserErrorString(), and setDisplayExpression().