QGIS API Documentation  2.5.0-Master
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Public Member Functions | List of all members
QgsDataDefined Class Reference

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. More...
 
 ~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 ()
 

Detailed Description

A container class for data source field mapping or expression.

Note
added in QGIS 1.9

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
QgsDataDefined::~QgsDataDefined ( )

Member Function Documentation

QgsExpression* QgsDataDefined::expression ( )
inline
bool QgsDataDefined::expressionIsPrepared ( ) const
inline
QMap<QString, QVariant> QgsDataDefined::expressionParams ( ) const
inline
QString QgsDataDefined::expressionString ( ) const
inline
QString QgsDataDefined::field ( ) const
inline
void QgsDataDefined::insertExpressionParam ( QString  key,
QVariant  param 
)
bool QgsDataDefined::isActive ( ) const
inline
bool QgsDataDefined::prepareExpression ( QgsVectorLayer layer)
QStringList QgsDataDefined::referencedColumns ( QgsVectorLayer layer)
void QgsDataDefined::setActive ( bool  active)
inline
void QgsDataDefined::setExpressionParams ( QMap< QString, QVariant >  params)
inline
void QgsDataDefined::setExpressionString ( const QString &  expr)
void QgsDataDefined::setField ( const QString &  field)
inline
void QgsDataDefined::setUseExpression ( bool  use)
inline
QMap< QString, QString > QgsDataDefined::toMap ( )
bool QgsDataDefined::useExpression ( ) const
inline

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