The QgsFieldModel class is a model to display the list of fields of a layer in widgets.
More...
#include <qgsfieldmodel.h>
Detailed Description
The QgsFieldModel class is a model to display the list of fields of a layer in widgets.
If allowed, expressions might be added to the end of the model. It can be associated with a QgsMapLayerModel to dynamically display a layer and its fields.
- Note
- added in 2.3
Definition at line 31 of file qgsfieldmodel.h.
Member Enumeration Documentation
- Enumerator:
FieldNameRole |
|
FieldIndexRole |
|
ExpressionRole |
|
IsExpressionRole |
|
ExpressionValidityRole |
|
FieldTypeRole |
|
Definition at line 35 of file qgsfieldmodel.h.
Constructor & Destructor Documentation
QgsFieldModel::QgsFieldModel |
( |
QObject * |
parent = 0 | ) |
|
|
explicit |
Member Function Documentation
bool QgsFieldModel::allowExpression |
( |
| ) |
|
|
inline |
int QgsFieldModel::columnCount |
( |
const QModelIndex & |
parent | ) |
const |
|
override |
QVariant QgsFieldModel::data |
( |
const QModelIndex & |
index, |
|
|
int |
role |
|
) |
| const |
|
override |
QModelIndex QgsFieldModel::index |
( |
int |
row, |
|
|
int |
column, |
|
|
const QModelIndex & |
parent = QModelIndex() |
|
) |
| const |
|
override |
QModelIndex QgsFieldModel::indexFromName |
( |
const QString & |
fieldName | ) |
|
return the index corresponding to a given fieldName
Definition at line 31 of file qgsfieldmodel.cpp.
bool QgsFieldModel::isField |
( |
const QString & |
expression | ) |
|
QModelIndex QgsFieldModel::parent |
( |
const QModelIndex & |
child | ) |
const |
|
override |
void QgsFieldModel::removeExpression |
( |
| ) |
|
int QgsFieldModel::rowCount |
( |
const QModelIndex & |
parent = QModelIndex() | ) |
const |
|
override |
void QgsFieldModel::setAllowExpression |
( |
bool |
allowExpression | ) |
|
void QgsFieldModel::setExpression |
( |
const QString & |
expression | ) |
|
setExpression sets a single expression to be added after the fields at the end of the model
Definition at line 186 of file qgsfieldmodel.cpp.
void QgsFieldModel::updateModel |
( |
| ) |
|
|
protectedvirtualslot |
Member Data Documentation
bool QgsFieldModel::mAllowExpression |
|
protected |
QList<QString> QgsFieldModel::mExpression |
|
protected |
The documentation for this class was generated from the following files: