QGIS API Documentation
3.22.4-Białowieża (ce8e65e95e)
|
Manages stored expressions regarding creation, modification and storing in the project. More...
#include <qgsstoredexpressionmanager.h>
Public Member Functions | |
QgsStoredExpressionManager ()=default | |
Constructor for QgsStoredExpressionManager. More... | |
QString | addStoredExpression (const QString &name, const QString &expression, const QgsStoredExpression::Category &tag=QgsStoredExpression::Category::FilterExpression) |
Adds an expression to the list. More... | |
void | addStoredExpressions (const QList< QgsStoredExpression > &storedExpressions) |
Appends a list of expressions to the existing list. More... | |
void | clearStoredExpressions () |
Clears list of stored expressions. More... | |
QgsStoredExpression | findStoredExpressionByExpression (const QString &expression, const QgsStoredExpression::Category &tag=QgsStoredExpression::Category::All) const |
Returns an expression according to the expression text. More... | |
bool | readXml (const QDomNode &layerNode) |
Reads the stored expressions in in XML format. More... | |
void | removeStoredExpression (const QString &id) |
Removes an expression to the list. More... | |
QgsStoredExpression | storedExpression (const QString &id) const |
Returns an expression according to the id. More... | |
QList< QgsStoredExpression > | storedExpressions (const QgsStoredExpression::Category &tag=QgsStoredExpression::Category::All) |
Returns the list of named expressions. More... | |
void | updateStoredExpression (const QString &id, const QString &name, const QString &expression, const QgsStoredExpression::Category &tag) |
Updates an expression by id. More... | |
bool | writeXml (QDomNode &layerNode) const |
Writes the stored expressions out in XML format. More... | |
Manages stored expressions regarding creation, modification and storing in the project.
Definition at line 93 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.