1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148
|
/************************************************************************
* This file has been generated automatically from *
* *
* src/core/qgsstoredexpressionmanager.h *
* *
* Do not edit manually ! Edit header and run scripts/sipify.py again *
************************************************************************/
%ModuleHeaderCode
#include <qgsstoredexpressionmanager.h>
%End
class QgsStoredExpression
{
%Docstring(signature="appended")
Stored expression containing name, content (expression text) and a
category tag.
.. versionadded:: 3.10
%End
%TypeHeaderCode
#include "qgsstoredexpressionmanager.h"
%End
public:
enum Category /BaseType=IntEnum/
{
FilterExpression,
DefaultValueExpression,
All
};
QString id;
QString name;
QString expression;
Category tag;
};
class QgsStoredExpressionManager : QObject
{
%Docstring(signature="appended")
Manages stored expressions regarding creation, modification and storing
in the project
.. versionadded:: 3.10
%End
%TypeHeaderCode
#include "qgsstoredexpressionmanager.h"
%End
public:
QgsStoredExpressionManager();
QString addStoredExpression( const QString &name, const QString &expression, const QgsStoredExpression::Category &tag = QgsStoredExpression::Category::FilterExpression );
%Docstring
Adds an expression to the list
:param name: optional name of the expression
:param expression: expression text
:param tag: category of the expression use case - default
FilterExpression
:return: generated id
%End
void removeStoredExpression( const QString &id );
%Docstring
Removes an expression to the list
:param id: id of the expression as identification
%End
void updateStoredExpression( const QString &id, const QString &name, const QString &expression, const QgsStoredExpression::Category &tag );
%Docstring
Updates an expression by ``id``.
:param id: id of the expression as identification
:param name: new name of the expression
:param expression: new expression text
:param tag: new category of the expression use case
%End
void addStoredExpressions( const QList< QgsStoredExpression > &storedExpressions );
%Docstring
Appends a list of expressions to the existing list
:param storedExpressions: list of expressions and the optional name
%End
QList< QgsStoredExpression > storedExpressions( const QgsStoredExpression::Category &tag = QgsStoredExpression::Category::All );
%Docstring
Returns the list of named expressions
:param tag: category of the expression use case - default all
%End
QgsStoredExpression storedExpression( const QString &id ) const;
%Docstring
Returns an expression according to the ``id``
:param id: id of the expression as identification
%End
QgsStoredExpression findStoredExpressionByExpression( const QString &expression, const QgsStoredExpression::Category &tag = QgsStoredExpression::Category::All ) const;
%Docstring
Returns an expression according to the ``expression`` text
:param expression: id of the expression as identification
:param tag: category of the expression use case - default all
%End
void clearStoredExpressions();
%Docstring
Clears list of stored expressions
%End
bool writeXml( QDomNode &layerNode ) const;
%Docstring
Writes the stored expressions out in XML format
%End
bool readXml( const QDomNode &layerNode );
%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.py again *
************************************************************************/
|