2017-05-14 09:48:41 +02:00
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsobjectcustomproperties.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
class QgsObjectCustomProperties
|
|
|
|
{
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML
|
|
|
|
in \verbatim <customproperties> \endverbatim element.
|
2017-05-14 09:48:41 +02:00
|
|
|
|
|
|
|
.. versionadded:: 2.4
|
|
|
|
%End
|
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
%TypeHeaderCode
|
2017-05-14 09:48:41 +02:00
|
|
|
#include "qgsobjectcustomproperties.h"
|
2016-01-04 22:51:18 +11:00
|
|
|
%End
|
|
|
|
public:
|
2017-09-11 21:43:15 +10:00
|
|
|
|
2016-01-04 22:51:18 +11:00
|
|
|
QgsObjectCustomProperties();
|
2017-09-11 21:43:15 +10:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Constructor for QgsObjectCustomProperties.
|
2017-09-11 21:43:15 +10:00
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
|
|
|
QStringList keys() const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns list of stored keys
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void setValue( const QString &key, const QVariant &value );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Add an entry to the store. If the entry with the keys exists already, it will be overwritten
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
QVariant value( const QString &key, const QVariant &defaultValue = QVariant() ) const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2018-05-25 13:54:27 +10:00
|
|
|
Returns value for the given key. If the key is not stored, default value will be used
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void remove( const QString &key );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Remove a key (entry) from the store
|
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void readXml( const QDomNode &parentNode, const QString &keyStartsWith = QString() );
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
2017-12-15 10:36:55 -04:00
|
|
|
Read store contents from XML
|
2017-12-15 21:36:08 -04:00
|
|
|
|
2017-12-15 10:36:55 -04:00
|
|
|
:param parentNode: node to read from
|
|
|
|
:param keyStartsWith: reads only properties starting with the specified string (or all if the string is empty)
|
2017-05-14 09:48:41 +02:00
|
|
|
%End
|
2016-01-04 22:51:18 +11:00
|
|
|
|
2017-05-01 16:42:33 +02:00
|
|
|
void writeXml( QDomNode &parentNode, QDomDocument &doc ) const;
|
2017-05-14 09:48:41 +02:00
|
|
|
%Docstring
|
|
|
|
Write store contents to XML
|
|
|
|
%End
|
|
|
|
|
|
|
|
|
|
|
|
protected:
|
2016-01-04 22:51:18 +11:00
|
|
|
|
|
|
|
};
|
2017-05-14 09:48:41 +02:00
|
|
|
|
|
|
|
/************************************************************************
|
|
|
|
* This file has been generated automatically from *
|
|
|
|
* *
|
|
|
|
* src/core/qgsobjectcustomproperties.h *
|
|
|
|
* *
|
|
|
|
* Do not edit manually ! Edit header and run scripts/sipify.pl again *
|
|
|
|
************************************************************************/
|