QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
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. | |
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. | |
void | readXml (const QDomElement &elem) |
Reads the collection state from an XML element. | |
QList< QgsStringReplacement > | replacements () const |
Returns the list of string replacements in this collection. | |
void | setReplacements (const QList< QgsStringReplacement > &replacements) |
Sets the list of string replacements in this collection. | |
void | writeXml (QDomElement &elem, QDomDocument &doc) const |
Writes the collection state to an XML element. | |
A collection of string replacements (specified using QgsStringReplacement objects).
Definition at line 113 of file qgsstringutils.h.
|
inline |
Constructor for QgsStringReplacementCollection.
replacements | initial list of string replacements |
Definition at line 122 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 792 of file qgsstringutils.cpp.
void QgsStringReplacementCollection::readXml | ( | const QDomElement & | elem | ) |
Reads the collection state from an XML element.
elem | DOM element |
Definition at line 817 of file qgsstringutils.cpp.
|
inline |
Returns the list of string replacements in this collection.
Definition at line 130 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 138 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 802 of file qgsstringutils.cpp.