QGIS API Documentation 3.32.0-Lima (311a8cb8a6)
|
A collection of string replacements (specified using QgsStringReplacement objects). More...
#include <qgsstringutils.h>
Public Member Functions | |
QgsStringReplacementCollection (const QList< QgsStringReplacement > &replacements=QList< QgsStringReplacement >()) | |
Constructor for QgsStringReplacementCollection. More... | |
QString | process (const QString &input) const |
Processes a given input string, applying any valid replacements which should be made using QgsStringReplacement objects contained by this collection. More... | |
void | readXml (const QDomElement &elem) |
Reads the collection state from an XML element. More... | |
QList< QgsStringReplacement > | replacements () const |
Returns the list of string replacements in this collection. More... | |
void | setReplacements (const QList< QgsStringReplacement > &replacements) |
Sets the list of string replacements in this collection. More... | |
void | writeXml (QDomElement &elem, QDomDocument &doc) const |
Writes the collection state to an XML element. More... | |
A collection of string replacements (specified using QgsStringReplacement objects).
Definition at line 115 of file qgsstringutils.h.
|
inline |
Constructor for QgsStringReplacementCollection.
replacements | initial list of string replacements |
Definition at line 124 of file qgsstringutils.h.
QString QgsStringReplacementCollection::process | ( | const QString & | input | ) | const |
Processes a given input string, applying any valid replacements which should be made using QgsStringReplacement objects contained by this collection.
Replacements are made in order of the QgsStringReplacement objects contained in the collection.
input | input string |
Definition at line 802 of file qgsstringutils.cpp.
void QgsStringReplacementCollection::readXml | ( | const QDomElement & | elem | ) |
Reads the collection state from an XML element.
elem | DOM element |
Definition at line 827 of file qgsstringutils.cpp.
|
inline |
Returns the list of string replacements in this collection.
Definition at line 132 of file qgsstringutils.h.
|
inline |
Sets the list of string replacements in this collection.
replacements | list of string replacements to apply. Replacements are applied in the order they are specified here. |
Definition at line 140 of file qgsstringutils.h.
void QgsStringReplacementCollection::writeXml | ( | QDomElement & | elem, |
QDomDocument & | doc | ||
) | const |
Writes the collection state to an XML element.
elem | target DOM element |
doc | DOM document |
Definition at line 812 of file qgsstringutils.cpp.