|
QGIS API Documentation 3.36.0-Maidenhead (09951dc0acf)
|
Manages stored expressions regarding creation, modification and storing in the project. More...
#include <qgsstoredexpressionmanager.h>

Public Member Functions | |
| QgsStoredExpressionManager ()=default | |
| Constructor for QgsStoredExpressionManager. | |
| QString | addStoredExpression (const QString &name, const QString &expression, const QgsStoredExpression::Category &tag=QgsStoredExpression::Category::FilterExpression) |
| Adds an expression to the list. | |
| void | addStoredExpressions (const QList< QgsStoredExpression > &storedExpressions) |
| Appends a list of expressions to the existing list. | |
| void | clearStoredExpressions () |
| Clears list of stored expressions. | |
| QgsStoredExpression | findStoredExpressionByExpression (const QString &expression, const QgsStoredExpression::Category &tag=QgsStoredExpression::Category::All) const |
| Returns an expression according to the expression text. | |
| bool | readXml (const QDomNode &layerNode) |
| Reads the stored expressions in in XML format. | |
| void | removeStoredExpression (const QString &id) |
| Removes an expression to the list. | |
| QgsStoredExpression | storedExpression (const QString &id) const |
| Returns an expression according to the id. | |
| QList< QgsStoredExpression > | storedExpressions (const QgsStoredExpression::Category &tag=QgsStoredExpression::Category::All) |
| Returns the list of named expressions. | |
| void | updateStoredExpression (const QString &id, const QString &name, const QString &expression, const QgsStoredExpression::Category &tag) |
| Updates an expression by id. | |
| bool | writeXml (QDomNode &layerNode) const |
| Writes the stored expressions out in XML format. | |
Manages stored expressions regarding creation, modification and storing in the project.
Definition at line 95 of file qgsstoredexpressionmanager.h.
|
default |
Constructor for QgsStoredExpressionManager.
| QString QgsStoredExpressionManager::addStoredExpression | ( | const QString & | name, |
| const QString & | expression, | ||
| const QgsStoredExpression::Category & | tag = QgsStoredExpression::Category::FilterExpression |
||
| ) |
Adds an expression to the list.
| name | optional name of the expression |
| expression | expression text |
| tag | category of the expression use case - default FilterExpression |
Definition at line 24 of file qgsstoredexpressionmanager.cpp.
| void QgsStoredExpressionManager::addStoredExpressions | ( | const QList< QgsStoredExpression > & | storedExpressions | ) |
Appends a list of expressions to the existing list.
| storedExpressions | list of expressions and the optional name |
Definition at line 67 of file qgsstoredexpressionmanager.cpp.
| void QgsStoredExpressionManager::clearStoredExpressions | ( | ) |
Clears list of stored expressions.
Definition at line 110 of file qgsstoredexpressionmanager.cpp.
| QgsStoredExpression QgsStoredExpressionManager::findStoredExpressionByExpression | ( | const QString & | expression, |
| const QgsStoredExpression::Category & | tag = QgsStoredExpression::Category::All |
||
| ) | const |
Returns an expression according to the expression text.
| expression | id of the expression as identification |
| tag | category of the expression use case - default all |
Definition at line 98 of file qgsstoredexpressionmanager.cpp.
| bool QgsStoredExpressionManager::readXml | ( | const QDomNode & | layerNode | ) |
Reads the stored expressions in in XML format.
Definition at line 132 of file qgsstoredexpressionmanager.cpp.
| void QgsStoredExpressionManager::removeStoredExpression | ( | const QString & | id | ) |
Removes an expression to the list.
| id | id of the expression as identification |
Definition at line 33 of file qgsstoredexpressionmanager.cpp.
| QgsStoredExpression QgsStoredExpressionManager::storedExpression | ( | const QString & | id | ) | const |
Returns an expression according to the id.
| id | id of the expression as identification |
Definition at line 86 of file qgsstoredexpressionmanager.cpp.
| QList< QgsStoredExpression > QgsStoredExpressionManager::storedExpressions | ( | const QgsStoredExpression::Category & | tag = QgsStoredExpression::Category::All | ) |
Returns the list of named expressions.
| tag | category of the expression use case - default all |
Definition at line 72 of file qgsstoredexpressionmanager.cpp.
| void QgsStoredExpressionManager::updateStoredExpression | ( | const QString & | id, |
| const QString & | name, | ||
| const QString & | expression, | ||
| const QgsStoredExpression::Category & | tag | ||
| ) |
Updates an expression by id.
| id | id of the expression as identification |
| name | new name of the expression |
| expression | new expression text |
| tag | new category of the expression use case |
Definition at line 48 of file qgsstoredexpressionmanager.cpp.
| bool QgsStoredExpressionManager::writeXml | ( | QDomNode & | layerNode | ) | const |
Writes the stored expressions out in XML format.
Definition at line 115 of file qgsstoredexpressionmanager.cpp.