|
QGIS API Documentation
3.4.15-Madeira (e83d02e274)
|
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML in. More...
#include <qgsobjectcustomproperties.h>
Public Member Functions | |
| QgsObjectCustomProperties ()=default | |
| Constructor for QgsObjectCustomProperties. More... | |
| QStringList | keys () const |
| Returns list of stored keys. More... | |
| void | readXml (const QDomNode &parentNode, const QString &keyStartsWith=QString()) |
| Read store contents from XML. More... | |
| void | remove (const QString &key) |
| Remove a key (entry) from the store. More... | |
| void | setValue (const QString &key, const QVariant &value) |
| Add an entry to the store. If the entry with the keys exists already, it will be overwritten. More... | |
| QVariant | value (const QString &key, const QVariant &defaultValue=QVariant()) const |
| Returns value for the given key. If the key is not stored, default value will be used. More... | |
| void | writeXml (QDomNode &parentNode, QDomDocument &doc) const |
| Write store contents to XML. More... | |
Protected Attributes | |
| QMap< QString, QVariant > | mMap |
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML in.
<customproperties>
element.
Definition at line 35 of file qgsobjectcustomproperties.h.
|
default |
Constructor for QgsObjectCustomProperties.
| QStringList QgsObjectCustomProperties::keys | ( | ) | const |
Returns list of stored keys.
Definition at line 24 of file qgsobjectcustomproperties.cpp.
| void QgsObjectCustomProperties::readXml | ( | const QDomNode & | parentNode, |
| const QString & | keyStartsWith = QString() |
||
| ) |
Read store contents from XML.
| parentNode | node to read from |
| keyStartsWith | reads only properties starting with the specified string (or all if the string is empty) |
Definition at line 45 of file qgsobjectcustomproperties.cpp.
| void QgsObjectCustomProperties::remove | ( | const QString & | key | ) |
Remove a key (entry) from the store.
Definition at line 39 of file qgsobjectcustomproperties.cpp.
| void QgsObjectCustomProperties::setValue | ( | const QString & | key, |
| const QVariant & | value | ||
| ) |
Add an entry to the store. If the entry with the keys exists already, it will be overwritten.
Definition at line 29 of file qgsobjectcustomproperties.cpp.
| QVariant QgsObjectCustomProperties::value | ( | const QString & | key, |
| const QVariant & | defaultValue = QVariant() |
||
| ) | const |
Returns value for the given key. If the key is not stored, default value will be used.
Definition at line 34 of file qgsobjectcustomproperties.cpp.
| void QgsObjectCustomProperties::writeXml | ( | QDomNode & | parentNode, |
| QDomDocument & | doc | ||
| ) | const |
Write store contents to XML.
Definition at line 110 of file qgsobjectcustomproperties.cpp.
|
protected |
Definition at line 69 of file qgsobjectcustomproperties.h.
1.8.11