21 #include <QStringList> 62 if ( pIt.
key().startsWith( keyStartsWith ) )
69 for ( ; sIt != keysToRemove.
constEnd(); ++sIt )
81 for (
int i = 0; i < nodes.
size(); i++ )
102 itemElement = itemElement.nextSiblingElement(
"value" ) )
104 list << itemElement.text();
118 for (
int i = 0; i < propertyList.
size(); ++i )
129 if ( it.value().canConvert<
QString>() )
131 propElement.
setAttribute(
"value", it.value().toString() );
QDomNodeList elementsByTagName(const QString &tagname) const
QDomNode appendChild(const QDomNode &newChild)
void readXml(const QDomNode &parentNode, const QString &keyStartsWith=QString())
Read store contents from XML.
void push_back(const T &value)
QString attribute(const QString &name, const QString &defValue) const
const_iterator constBegin() const
QVariant value(const QString &key, const QVariant &defaultValue=QVariant()) const
Return value for the given key. If the key is not stored, default value will be used.
void writeXml(QDomNode &parentNode, QDomDocument &doc) const
Write store contents to XML.
QDomNodeList childNodes() const
void remove(const QString &key)
Remove a key (entry) from the store.
QDomElement toElement() const
QList< Key > keys() const
QMap< QString, QVariant > mMap
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.
bool hasAttribute(const QString &name) const
void setAttribute(const QString &name, const QString &value)
const_iterator constEnd() const
bool startsWith(const QString &s, Qt::CaseSensitivity cs) const
QStringList keys() const
Return list of stored keys.
QDomText createTextNode(const QString &value)
QDomNode removeChild(const QDomNode &oldChild)
QDomNode namedItem(const QString &name) const
const Key key(const T &value) const
QDomElement firstChildElement(const QString &tagName) const
QgsObjectCustomProperties()
const_iterator constEnd() const
QDomElement createElement(const QString &tagName)
const_iterator constBegin() const
QDomNode at(int index) const
const T value(const Key &key) const
int remove(const Key &key)