QGIS API Documentation 3.41.0-Master (af5edcb665c)
|
Buffers information about expression fields for a vector layer. More...
#include <qgsexpressionfieldbuffer.h>
Classes | |
struct | ExpressionField |
Public Member Functions | |
QgsExpressionFieldBuffer ()=default | |
void | addExpression (const QString &exp, const QgsField &fld) |
Add an expression to the buffer. | |
QList< QgsExpressionFieldBuffer::ExpressionField > | expressions () const |
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) const |
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. | |
Buffers information about expression fields for a vector layer.
Definition at line 34 of file qgsexpressionfieldbuffer.h.
|
default |
void QgsExpressionFieldBuffer::addExpression | ( | const QString & | exp, |
const QgsField & | fld | ||
) |
Add an expression to the buffer.
exp | expression to add |
fld | field to add |
Definition at line 23 of file qgsexpressionfieldbuffer.cpp.
|
inline |
Definition at line 100 of file qgsexpressionfieldbuffer.h.
void QgsExpressionFieldBuffer::readXml | ( | const QDomNode & | layer_node | ) |
Reads expressions from project file.
Definition at line 66 of file qgsexpressionfieldbuffer.cpp.
void QgsExpressionFieldBuffer::removeExpression | ( | int | index | ) |
Remove an expression from the buffer.
index | index of expression to remove |
Definition at line 28 of file qgsexpressionfieldbuffer.cpp.
void QgsExpressionFieldBuffer::renameExpression | ( | int | index, |
const QString & | name | ||
) |
Renames an expression field at a given index.
index | The index of the expression to change |
name | New name for field |
Definition at line 33 of file qgsexpressionfieldbuffer.cpp.
void QgsExpressionFieldBuffer::updateExpression | ( | int | index, |
const QString & | exp | ||
) |
Changes the expression at a given index.
index | The index of the expression to change |
exp | The new expression to set |
Definition at line 38 of file qgsexpressionfieldbuffer.cpp.
void QgsExpressionFieldBuffer::updateFields | ( | QgsFields & | flds | ) | const |
Adds fields with the expressions buffered in this object to a QgsFields object.
flds | The fields to be updated |
Definition at line 93 of file qgsexpressionfieldbuffer.cpp.
void QgsExpressionFieldBuffer::writeXml | ( | QDomNode & | layer_node, |
QDomDocument & | document | ||
) | const |
Saves expressions to xml under the layer node.
Definition at line 43 of file qgsexpressionfieldbuffer.cpp.