18#ifndef QGSSTOREDEXPRESSIONMANAGER_H
19#define QGSSTOREDEXPRESSIONMANAGER_H
51 FilterExpression = 1 << 0,
52 DefaultValueExpression = 1 << 1,
53 All = FilterExpression | DefaultValueExpression
71 : id( QUuid::createUuid().toString() ),
73 expression( expression ),
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;
Manages stored expressions regarding creation, modification and storing in the project.
QgsStoredExpressionManager()=default
Constructor for QgsStoredExpressionManager.
Stored expression containing name, content (expression text) and a category tag.
QgsStoredExpression()=default
Constructor for QgsStoredExpression.
QString expression
expression text
Category
Categories of use cases FilterExpression for stored expressions to filter attribute table DefaultValu...
@ FilterExpression
Expressions to filter features.
QgsStoredExpression(QString name, QString expression, Category tag=Category::FilterExpression)
Create a new QgsStoredExpression with a generated uuid as id.
QString id
generated uuid used for identification
QString name
descriptive name of the expression