QGIS API Documentation
2.4.0-Chugiak
|
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer. More...
#include <qgsfieldproxymodel.h>
Public Types | |
enum | Filter { String = 1, Int = 2, LongLong = 4, Double = 8, Numeric = Int | LongLong | Double, Date = 16, All = Numeric | Date | String } |
Public Member Functions | |
QgsFieldProxyModel (QObject *parent=0) | |
QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model. More... | |
QgsFieldModel * | sourceFieldModel () |
sourceFieldModel returns the QgsFieldModel used in this QSortFilterProxyModel More... | |
QgsFieldProxyModel * | setFilters (Filters filters) |
setFilters set flags that affect how fields are filtered More... | |
const Filters & | filters () const |
bool | filterAcceptsRow (int source_row, const QModelIndex &source_parent) const |
bool | lessThan (const QModelIndex &left, const QModelIndex &right) const |
Private Attributes | |
Filters | mFilters |
QgsFieldModel * | mModel |
The QgsFieldProxyModel class provides an easy to use model to display the list of fields of a layer.
Definition at line 27 of file qgsfieldproxymodel.h.
Enumerator | |
---|---|
String | |
Int | |
LongLong | |
Double | |
Numeric | |
Date | |
All |
Definition at line 33 of file qgsfieldproxymodel.h.
|
explicit |
QgsFieldProxModel creates a proxy model with a QgsFieldModel as source model.
It can be used to filter the fields based on their types.
Definition at line 20 of file qgsfieldproxymodel.cpp.
References mModel.
bool QgsFieldProxyModel::filterAcceptsRow | ( | int | source_row, |
const QModelIndex & | source_parent | ||
) | const |
|
inline |
Definition at line 60 of file qgsfieldproxymodel.h.
Referenced by QgsFieldComboBox::filters(), and setFilters().
bool QgsFieldProxyModel::lessThan | ( | const QModelIndex & | left, |
const QModelIndex & | right | ||
) | const |
Definition at line 61 of file qgsfieldproxymodel.cpp.
References QgsFieldModel::FieldIndexRole.
QgsFieldProxyModel * QgsFieldProxyModel::setFilters | ( | Filters | filters | ) |
setFilters set flags that affect how fields are filtered
filters | are Filter flags |
Definition at line 28 of file qgsfieldproxymodel.cpp.
References filters(), and mFilters.
Referenced by QgsFieldComboBox::setFilters(), and QgsFieldExpressionWidget::setFilters().
|
inline |
sourceFieldModel returns the QgsFieldModel used in this QSortFilterProxyModel
Definition at line 52 of file qgsfieldproxymodel.h.
Referenced by QgsFieldExpressionWidget::expressionEditingFinished(), QgsFieldExpressionWidget::isExpression(), QgsFieldComboBox::layer(), QgsFieldExpressionWidget::layer(), QgsFieldExpressionWidget::QgsFieldExpressionWidget(), QgsFieldComboBox::setField(), QgsFieldExpressionWidget::setField(), QgsFieldComboBox::setLayer(), and QgsFieldExpressionWidget::setLayer().
|
private |
Definition at line 63 of file qgsfieldproxymodel.h.
Referenced by filterAcceptsRow(), and setFilters().
|
private |
Definition at line 64 of file qgsfieldproxymodel.h.
Referenced by QgsFieldProxyModel().