QGIS API Documentation
3.8.0-Zanzibar (11aff65)
|
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 112 of file qgsstringutils.h.
|
inline |
Constructor for QgsStringReplacementCollection.
replacements | initial list of string replacements |
Definition at line 121 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 563 of file qgsstringutils.cpp.
void QgsStringReplacementCollection::readXml | ( | const QDomElement & | elem | ) |
Reads the collection state from an XML element.
elem | DOM element |
Definition at line 590 of file qgsstringutils.cpp.
|
inline |
Returns the list of string replacements in this collection.
Definition at line 129 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 137 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 574 of file qgsstringutils.cpp.