QgsExpressionFieldBuffer class
Buffers information about expression fields for a vector layer.
Contents
Constructors, destructors, conversion operators
- QgsExpressionFieldBuffer() defaulted
- Constructor for QgsExpressionFieldBuffer.
Public functions
- void addExpression(const QString& exp, const QgsField& fld)
- Add an expression to the buffer.
- void readXml(const QDomNode& layer_node)
- Reads expressions from project file.
- void removeExpression(int index)
- Remove an expression from the buffer.
- void renameExpression(int index, const QString& name)
- Renames an expression field at a given index.
- void updateExpression(int index, const QString& exp)
- Changes the expression at a given index.
- void updateFields(QgsFields& flds)
- Adds fields with the expressions buffered in this object to a QgsFields object.
- void writeXml(QDomNode& layer_node, QDomDocument& document) const
- Saves expressions to xml under the layer node.
Function documentation
void QgsExpressionFieldBuffer:: addExpression(const QString& exp,
const QgsField& fld)
Add an expression to the buffer.
| Parameters | |
|---|---|
| exp | expression to add |
| fld | field to add |
void QgsExpressionFieldBuffer:: removeExpression(int index)
Remove an expression from the buffer.
| Parameters | |
|---|---|
| index | index of expression to remove |
void QgsExpressionFieldBuffer:: renameExpression(int index,
const QString& name)
Renames an expression field at a given index.
| Parameters | |
|---|---|
| index | The index of the expression to change |
| name | New name for field |
void QgsExpressionFieldBuffer:: updateExpression(int index,
const QString& exp)
Changes the expression at a given index.
| Parameters | |
|---|---|
| index | The index of the expression to change |
| exp | The new expression to set |
void QgsExpressionFieldBuffer:: updateFields(QgsFields& flds)
Adds fields with the expressions buffered in this object to a QgsFields object.
| Parameters | |
|---|---|
| flds | The fields to be updated |