QGIS/python/core/qgsexpressionfieldbuffer.sip

104 lines
2.8 KiB
Plaintext
Raw Normal View History

2017-05-14 09:48:41 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsexpressionfieldbuffer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/
2015-06-11 19:16:55 +02:00
class QgsExpressionFieldBuffer
{
2017-05-14 09:48:41 +02:00
%Docstring
Buffers information about expression fields for a vector layer.
.. versionadded:: 2.6
%End
2015-06-11 19:16:55 +02:00
%TypeHeaderCode
2017-05-14 09:48:41 +02:00
#include "qgsexpressionfieldbuffer.h"
2015-06-11 19:16:55 +02:00
%End
public:
2017-05-14 09:48:41 +02:00
struct ExpressionField
2015-06-11 19:16:55 +02:00
{
ExpressionField( const QString &exp, const QgsField &fld );
2017-05-14 09:48:41 +02:00
QgsExpression cachedExpression;
QgsField field;
2015-06-11 19:16:55 +02:00
};
QgsExpressionFieldBuffer();
2017-09-11 21:43:15 +10:00
%Docstring
Constructor for QgsExpressionFieldBuffer.
%End
2015-06-11 19:16:55 +02:00
void addExpression( const QString &exp, const QgsField &fld );
2017-05-14 09:48:41 +02:00
%Docstring
Add an expression to the buffer
\param exp expression to add
\param fld field to add
%End
2015-06-11 19:16:55 +02:00
void removeExpression( int index );
2017-05-14 09:48:41 +02:00
%Docstring
Remove an expression from the buffer
\param index index of expression to remove
%End
2015-06-11 19:16:55 +02:00
void renameExpression( int index, const QString &name );
2017-05-14 09:48:41 +02:00
%Docstring
Renames an expression field at a given index
\param index The index of the expression to change
\param name New name for field
.. versionadded:: 3.0
%End
void updateExpression( int index, const QString &exp );
2017-05-14 09:48:41 +02:00
%Docstring
Changes the expression at a given index
\param index The index of the expression to change
\param exp The new expression to set
.. versionadded:: 2.9
%End
2015-06-11 19:16:55 +02:00
void writeXml( QDomNode &layer_node, QDomDocument &document ) const;
2017-05-14 09:48:41 +02:00
%Docstring
Saves expressions to xml under the layer node
%End
2015-06-11 19:16:55 +02:00
void readXml( const QDomNode &layer_node );
2017-05-14 09:48:41 +02:00
%Docstring
Reads expressions from project file
%End
2015-06-11 19:16:55 +02:00
void updateFields( QgsFields &flds );
2017-05-14 09:48:41 +02:00
%Docstring
Adds fields with the expressions buffered in this object to a QgsFields object
\param flds The fields to be updated
%End
2017-05-14 10:50:30 +02:00
QList<QgsExpressionFieldBuffer::ExpressionField> expressions() const;
2017-05-14 09:48:41 +02:00
%Docstring
2017-05-14 10:50:30 +02:00
:rtype: list of QgsExpressionFieldBuffer.ExpressionField
2017-05-14 09:48:41 +02:00
%End
2015-06-11 19:16:55 +02:00
};
2017-05-14 09:48:41 +02:00
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsexpressionfieldbuffer.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
************************************************************************/