18 #ifndef QGSSTOREDEXPRESSIONMANAGER_H 19 #define QGSSTOREDEXPRESSIONMANAGER_H 21 #include "qgis_core.h" 51 FilterExpression = 1 << 0,
52 DefaultValueExpression = 1 << 1,
53 All = FilterExpression | DefaultValueExpression
71 : id( QUuid::createUuid().toString() ),
73 expression( expression ),
112 QString addStoredExpression(
const QString &name,
const QString &expression,
const QgsStoredExpression::Category &tag = QgsStoredExpression::Category::FilterExpression );
119 void removeStoredExpression(
const QString &
id );
136 void addStoredExpressions(
const QList< QgsStoredExpression > &storedExpressions );
162 void clearStoredExpressions();
165 bool writeXml( QDomNode &layerNode )
const;
168 bool readXml(
const QDomNode &layerNode );
175 QList< QgsStoredExpression > mStoredExpressions;
178 #endif // QGSSTOREDEXPRESSIONMANAGER_H Category
Categories of use cases FilterExpression for stored expressions to filter attribute table DefaultValu...
Category tag
category of the expression use case
QString id
generated uuid used for identification
QString expression
expression text
QString name
descriptive name of the expression
QgsStoredExpression(QString name, QString expression, Category tag=Category::FilterExpression)
Create a new QgsStoredExpression with a generated uuid as id.
Stored expression containing name, content (expression text) and a category tag.
Manages stored expressions regarding creation, modification and storing in the project.