QGIS API Documentation  2.0.1-Dufour
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
QgsDataDefined Class Reference

A container class for data source field mapping or expression. More...

#include <qgsdatadefined.h>

Collaboration diagram for QgsDataDefined:
Collaboration graph
[legend]

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
QgsExpressionexpression ()
QStringList referencedColumns (QgsVectorLayer *layer)
QString field () const
void setField (const QString &field)
QMap< QString, QString > toMap ()

Private Attributes

QgsExpressionmExpression
bool mActive
bool mUseExpression
QString mExpressionString
QString mField
QMap< QString, QVariant > mExpressionParams
bool mExpressionPrepared
QStringList mExprRefColmuns

Detailed Description

A container class for data source field mapping or expression.

Note
added in QGIS 1.9

Definition at line 32 of file qgsdatadefined.h.

Constructor & Destructor Documentation

QgsDataDefined::QgsDataDefined ( bool  active = false,
bool  useexpr = false,
const QString &  expr = QString(),
const QString &  field = QString() 
)

Construct a new data defined object.

Parameters
activeWhether the current data defined is active
useexprWhether to use expression instead of field
exprExpression string
fieldField 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.

Member Function Documentation

QgsExpression* QgsDataDefined::expression ( )
inline

Definition at line 68 of file qgsdatadefined.h.

Referenced by QgsPalLayerSettings::dataDefinedValue().

bool QgsDataDefined::expressionIsPrepared ( ) const
inline

Definition at line 66 of file qgsdatadefined.h.

Referenced by QgsPalLayerSettings::dataDefinedValue().

QMap<QString, QVariant> QgsDataDefined::expressionParams ( ) const
inline

Definition at line 60 of file qgsdatadefined.h.

QString QgsDataDefined::expressionString ( ) const
inline
QString QgsDataDefined::field ( ) const
inline
void QgsDataDefined::insertExpressionParam ( QString  key,
QVariant  param 
)

Definition at line 103 of file qgsdatadefined.cpp.

References mExpressionParams.

bool QgsDataDefined::isActive ( ) const
inline
bool QgsDataDefined::prepareExpression ( QgsVectorLayer layer)
QStringList QgsDataDefined::referencedColumns ( QgsVectorLayer layer)
void QgsDataDefined::setActive ( bool  active)
inline

Definition at line 51 of file qgsdatadefined.h.

Referenced by QgsPalLayerSettings::setDataDefinedProperty().

void QgsDataDefined::setExpressionParams ( QMap< QString, QVariant >  params)
inline

Definition at line 62 of file qgsdatadefined.h.

Referenced by QgsPalLabeling::prepareLayer().

void QgsDataDefined::setExpressionString ( const QString &  expr)
inline

Definition at line 57 of file qgsdatadefined.h.

Referenced by QgsPalLayerSettings::setDataDefinedProperty().

void QgsDataDefined::setField ( const QString &  field)
inline

Definition at line 72 of file qgsdatadefined.h.

Referenced by QgsPalLayerSettings::setDataDefinedProperty().

void QgsDataDefined::setUseExpression ( bool  use)
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.

bool QgsDataDefined::useExpression ( ) const
inline

Member Data Documentation

bool QgsDataDefined::mActive
private

Definition at line 80 of file qgsdatadefined.h.

Referenced by toMap().

QgsExpression* QgsDataDefined::mExpression
private
QMap<QString, QVariant> QgsDataDefined::mExpressionParams
private

Definition at line 85 of file qgsdatadefined.h.

Referenced by insertExpressionParam(), prepareExpression(), and ~QgsDataDefined().

bool QgsDataDefined::mExpressionPrepared
private

Definition at line 86 of file qgsdatadefined.h.

Referenced by prepareExpression(), QgsDataDefined(), and referencedColumns().

QString QgsDataDefined::mExpressionString
private

Definition at line 82 of file qgsdatadefined.h.

Referenced by prepareExpression(), and toMap().

QStringList QgsDataDefined::mExprRefColmuns
private

Definition at line 87 of file qgsdatadefined.h.

Referenced by prepareExpression(), and referencedColumns().

QString QgsDataDefined::mField
private

Definition at line 83 of file qgsdatadefined.h.

Referenced by referencedColumns(), and toMap().

bool QgsDataDefined::mUseExpression
private

Definition at line 81 of file qgsdatadefined.h.

Referenced by prepareExpression(), referencedColumns(), and toMap().


The documentation for this class was generated from the following files: