QGIS API Documentation
3.14.0-Pi (9f7028fd23)
|
#include <qgsxmlutils.h>
Static Public Member Functions | |
template<class T > | |
static T | readFlagAttribute (const QDomElement &element, const QString &attributeName, T defaultValue) |
Read a flag value from an attribute of the element. More... | |
static QgsUnitTypes::DistanceUnit | readMapUnits (const QDomElement &element) |
Decodes a distance unit from a DOM element. More... | |
static QgsRectangle | readRectangle (const QDomElement &element) |
static QVariant | readVariant (const QDomElement &element) |
Read a QVariant from a QDomElement. More... | |
static QDomElement | writeMapUnits (QgsUnitTypes::DistanceUnit units, QDomDocument &doc) |
Encodes a distance unit to a DOM element. More... | |
static QDomElement | writeRectangle (const QgsRectangle &rect, QDomDocument &doc) |
static QDomElement | writeVariant (const QVariant &value, QDomDocument &doc) |
Write a QVariant to a QDomElement. More... | |
Assorted helper methods for reading and writing chunks of XML
Definition at line 35 of file qgsxmlutils.h.
|
inlinestatic |
Read a flag value from an attribute of the element.
element | the element to read the attribute from |
attributeName | the attribute name |
defaultValue | the default value as a flag |
Definition at line 92 of file qgsxmlutils.h.
|
static |
Decodes a distance unit from a DOM element.
element | DOM element to decode |
Definition at line 26 of file qgsxmlutils.cpp.
|
static |
Definition at line 39 of file qgsxmlutils.cpp.
|
static |
Read a QVariant from a QDomElement.
Definition at line 251 of file qgsxmlutils.cpp.
|
static |
Encodes a distance unit to a DOM element.
units | units to encode |
doc | DOM document |
Definition at line 69 of file qgsxmlutils.cpp.
|
static |
Definition at line 81 of file qgsxmlutils.cpp.
|
static |
Write a QVariant to a QDomElement.
Supported types are
Definition at line 106 of file qgsxmlutils.cpp.