mirror of
https://github.com/qgis/QGIS.git
synced 2025-03-10 00:13:55 -04:00
120 lines
3.3 KiB
Plaintext
120 lines
3.3 KiB
Plaintext
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsstoredexpressionmanager.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
%ModuleHeaderCode
|
|
#include <qgsstoredexpressionmanager.h>
|
|
%End
|
|
|
|
|
|
struct QgsStoredExpression
|
|
{
|
|
|
|
QUuid id;
|
|
QString name;
|
|
QString expression;
|
|
};
|
|
|
|
class QgsStoredExpressionManager : QObject
|
|
{
|
|
|
|
%TypeHeaderCode
|
|
#include "qgsstoredexpressionmanager.h"
|
|
%End
|
|
public:
|
|
|
|
enum Mode
|
|
{
|
|
FilterExpression
|
|
};
|
|
|
|
QgsStoredExpressionManager( Mode mode = FilterExpression );
|
|
|
|
QUuid addStoredExpression( const QString &name, const QString &expression, const QString &tag = QString() );
|
|
%Docstring
|
|
Adds an expression to the list
|
|
|
|
:param name: optional name of the expression
|
|
:param expression: the expression content
|
|
:param tag: some content, maybe scope where to be shown
|
|
|
|
:return: generated id as QUuid
|
|
%End
|
|
|
|
void removeStoredExpression( const QUuid &id, const QString &tag = QString() );
|
|
%Docstring
|
|
Removes an expression to the list
|
|
|
|
:param id: id of the expression as identification
|
|
:param tag: some content, maybe scope where to be shown
|
|
%End
|
|
|
|
void addStoredExpressions( QList< QgsStoredExpression > storedExpressions, const QString &tag = QString() );
|
|
%Docstring
|
|
Appends a list of expressions to the existing list
|
|
|
|
:param storedExpressions: list of expressions and the optional name
|
|
:param tag: some content, maybe scope where to be shown
|
|
%End
|
|
|
|
QList< QgsStoredExpression > storedExpressions( const QString &tag = QString() );
|
|
%Docstring
|
|
Returns the list of named expressions
|
|
|
|
:param tag: some content, maybe scope where to be shown
|
|
%End
|
|
|
|
|
|
QgsStoredExpression storedExpression( const QUuid &id, const QString &tag = QString() );
|
|
%Docstring
|
|
Returns an expression according to the id
|
|
|
|
:param id: id of the expression as identification
|
|
:param tag: some content, maybe scope where to be shown
|
|
%End
|
|
|
|
QgsStoredExpression findStoredExpressionByExpression( const QString &expression, const QString &tag = QString() );
|
|
%Docstring
|
|
Returns an expression according to the expression text
|
|
|
|
:param expression: id of the expression as identification
|
|
:param tag: some content, maybe scope where to be shown
|
|
%End
|
|
|
|
void clearStoredExpressions();
|
|
%Docstring
|
|
clears list of stored expressions
|
|
%End
|
|
|
|
bool writeXml( QDomNode &layer_node ) const;
|
|
%Docstring
|
|
Writes the stored expressions out in XML format
|
|
%End
|
|
|
|
bool readXml( const QDomNode &layer_node );
|
|
%Docstring
|
|
Reads the stored expressions in in XML format
|
|
%End
|
|
|
|
signals:
|
|
|
|
public slots:
|
|
|
|
};
|
|
|
|
/************************************************************************
|
|
* This file has been generated automatically from *
|
|
* *
|
|
* src/core/qgsstoredexpressionmanager.h *
|
|
* *
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
************************************************************************/
|