QGIS API Documentation
2.0.1-Dufour
|
A container class for data source field mapping or expression. More...
#include <qgsdatadefined.h>
Public Member Functions | |
QgsDataDefined (bool active=false, bool useexpr=false, const QString &expr=QString(), const QString &field=QString()) | |
Construct a new data defined object. | |
~QgsDataDefined () | |
bool | isActive () const |
void | setActive (bool active) |
bool | useExpression () const |
void | setUseExpression (bool use) |
QString | expressionString () const |
void | setExpressionString (const QString &expr) |
QMap< QString, QVariant > | expressionParams () const |
void | setExpressionParams (QMap< QString, QVariant > params) |
void | insertExpressionParam (QString key, QVariant param) |
bool | prepareExpression (QgsVectorLayer *layer) |
bool | expressionIsPrepared () const |
QgsExpression * | expression () |
QStringList | referencedColumns (QgsVectorLayer *layer) |
QString | field () const |
void | setField (const QString &field) |
QMap< QString, QString > | toMap () |
Private Attributes | |
QgsExpression * | mExpression |
bool | mActive |
bool | mUseExpression |
QString | mExpressionString |
QString | mField |
QMap< QString, QVariant > | mExpressionParams |
bool | mExpressionPrepared |
QStringList | mExprRefColmuns |
A container class for data source field mapping or expression.
Definition at line 32 of file qgsdatadefined.h.
QgsDataDefined::QgsDataDefined | ( | bool | active = false , |
bool | useexpr = false , |
||
const QString & | expr = QString() , |
||
const QString & | field = QString() |
||
) |
Construct a new data defined object.
active | Whether the current data defined is active |
useexpr | Whether to use expression instead of field |
expr | Expression string |
field | Field name string |
Definition at line 23 of file qgsdatadefined.cpp.
References mExpression, and mExpressionPrepared.
QgsDataDefined::~QgsDataDefined | ( | ) |
Definition at line 36 of file qgsdatadefined.cpp.
References mExpression, and mExpressionParams.
|
inline |
Definition at line 68 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::dataDefinedValue().
|
inline |
Definition at line 66 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::dataDefinedValue().
|
inline |
Definition at line 60 of file qgsdatadefined.h.
|
inline |
Definition at line 56 of file qgsdatadefined.h.
Referenced by QgsDataDefinedButton::init(), and QgsPalLayerSettings::writeDataDefinedPropertyMap().
|
inline |
Definition at line 71 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::dataDefinedValue(), QgsDataDefinedButton::init(), and QgsPalLayerSettings::writeDataDefinedPropertyMap().
void QgsDataDefined::insertExpressionParam | ( | QString | key, |
QVariant | param | ||
) |
Definition at line 103 of file qgsdatadefined.cpp.
References mExpressionParams.
|
inline |
Definition at line 50 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::dataDefinedValue(), QgsDataDefinedButton::init(), QgsPalLabeling::prepareLayer(), and QgsPalLayerSettings::writeDataDefinedPropertyMap().
bool QgsDataDefined::prepareExpression | ( | QgsVectorLayer * | layer | ) |
Definition at line 42 of file qgsdatadefined.cpp.
References QgsExpression::evalErrorString(), QgsExpression::hasEvalError(), QgsExpression::hasParserError(), mExpression, mExpressionParams, mExpressionPrepared, mExpressionString, mExprRefColmuns, mUseExpression, QgsExpression::parserErrorString(), QgsVectorLayer::pendingFields(), QgsExpression::prepare(), QgsDebugMsg, QgsExpression::referencedColumns(), and QgsExpression::setScale().
Referenced by referencedColumns().
QStringList QgsDataDefined::referencedColumns | ( | QgsVectorLayer * | layer | ) |
Definition at line 81 of file qgsdatadefined.cpp.
References mExpression, mExpressionPrepared, mExprRefColmuns, mField, mUseExpression, and prepareExpression().
Referenced by QgsPalLabeling::prepareLayer().
|
inline |
Definition at line 51 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::setDataDefinedProperty().
|
inline |
Definition at line 62 of file qgsdatadefined.h.
Referenced by QgsPalLabeling::prepareLayer().
|
inline |
Definition at line 57 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::setDataDefinedProperty().
|
inline |
Definition at line 72 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::setDataDefinedProperty().
|
inline |
Definition at line 54 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::setDataDefinedProperty().
QMap< QString, QString > QgsDataDefined::toMap | ( | ) |
Definition at line 108 of file qgsdatadefined.cpp.
References mActive, mExpressionString, mField, and mUseExpression.
|
inline |
Definition at line 53 of file qgsdatadefined.h.
Referenced by QgsPalLayerSettings::dataDefinedValue(), QgsDataDefinedButton::init(), and QgsPalLayerSettings::writeDataDefinedPropertyMap().
|
private |
Definition at line 80 of file qgsdatadefined.h.
Referenced by toMap().
|
private |
Definition at line 78 of file qgsdatadefined.h.
Referenced by prepareExpression(), QgsDataDefined(), referencedColumns(), and ~QgsDataDefined().
|
private |
Definition at line 85 of file qgsdatadefined.h.
Referenced by insertExpressionParam(), prepareExpression(), and ~QgsDataDefined().
|
private |
Definition at line 86 of file qgsdatadefined.h.
Referenced by prepareExpression(), QgsDataDefined(), and referencedColumns().
|
private |
Definition at line 82 of file qgsdatadefined.h.
Referenced by prepareExpression(), and toMap().
|
private |
Definition at line 87 of file qgsdatadefined.h.
Referenced by prepareExpression(), and referencedColumns().
|
private |
Definition at line 83 of file qgsdatadefined.h.
Referenced by referencedColumns(), and toMap().
|
private |
Definition at line 81 of file qgsdatadefined.h.
Referenced by prepareExpression(), referencedColumns(), and toMap().