QGIS API Documentation  2.11.0-Master
Classes | Public Types | Public Member Functions | List of all members
QgsExpressionFieldBuffer Class Reference

Buffers information about expression fields for a vector layer. More...

#include <qgsexpressionfieldbuffer.h>

Classes

struct  ExpressionField
 

Public Types

typedef struct QgsExpressionFieldBuffer::ExpressionField ExpressionField
 

Public Member Functions

 QgsExpressionFieldBuffer ()
 
void addExpression (const QString &exp, const QgsField &fld)
 Add an expression to the buffer. More...
 
const QList< ExpressionField > & expressions () const
 
void readXml (const QDomNode &layer_node)
 Reads expressions from project file. More...
 
void removeExpression (int index)
 Remove an expression from the buffer. More...
 
void updateExpression (int index, const QString &exp)
 Changes the expression at a given index. More...
 
void updateFields (QgsFields &flds)
 Adds fields with the expressions buffered in this object to a QgsFields object. More...
 
void writeXml (QDomNode &layer_node, QDomDocument &document) const
 Saves expressions to xml under the layer node. More...
 

Detailed Description

Buffers information about expression fields for a vector layer.

Note
added in 2.6

Definition at line 32 of file qgsexpressionfieldbuffer.h.

Member Typedef Documentation

Constructor & Destructor Documentation

QgsExpressionFieldBuffer::QgsExpressionFieldBuffer ( )

Definition at line 22 of file qgsexpressionfieldbuffer.cpp.

Member Function Documentation

void QgsExpressionFieldBuffer::addExpression ( const QString exp,
const QgsField fld 
)

Add an expression to the buffer.

Parameters
expexpression to add
fldfield to add

Definition at line 26 of file qgsexpressionfieldbuffer.cpp.

const QList<ExpressionField>& QgsExpressionFieldBuffer::expressions ( ) const
inline

Definition at line 88 of file qgsexpressionfieldbuffer.h.

void QgsExpressionFieldBuffer::readXml ( const QDomNode layer_node)

Reads expressions from project file.

Definition at line 62 of file qgsexpressionfieldbuffer.cpp.

void QgsExpressionFieldBuffer::removeExpression ( int  index)

Remove an expression from the buffer.

Parameters
indexindex of expression to remove

Definition at line 31 of file qgsexpressionfieldbuffer.cpp.

void QgsExpressionFieldBuffer::updateExpression ( int  index,
const QString exp 
)

Changes the expression at a given index.

Parameters
indexThe index of the expression to change
expThe new expression to set
Note
added in 2.9

Definition at line 36 of file qgsexpressionfieldbuffer.cpp.

void QgsExpressionFieldBuffer::updateFields ( QgsFields flds)

Adds fields with the expressions buffered in this object to a QgsFields object.

Parameters
fldsThe fields to be updated

Definition at line 88 of file qgsexpressionfieldbuffer.cpp.

void QgsExpressionFieldBuffer::writeXml ( QDomNode layer_node,
QDomDocument document 
) const

Saves expressions to xml under the layer node.

Definition at line 41 of file qgsexpressionfieldbuffer.cpp.


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