QGIS/python/core/qgsobjectcustomproperties.sip
Nyall Dawson 881074b194 Boost coverage of SIP bindings
Now all classes and members are either exposed to bindings or marked
as "not available in Python bindings" in the docs.

Drop test thresholds to 0. Now it should be much easier to determine
what missing members have been added which are causing test
failures.
2016-01-05 11:16:15 +11:00

38 lines
1.2 KiB
Plaintext

/**
* Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML
* in \verbatim <customproperties> \endverbatim element.
*
* \note added in 2.4
*/
class QgsObjectCustomProperties
{
%TypeHeaderCode
#include <qgsobjectcustomproperties.h>
%End
public:
QgsObjectCustomProperties();
//! Return list of stored keys
QStringList keys() const;
//! Add an entry to the store. If the entry with the keys exists already, it will be overwritten
void setValue( const QString& key, const QVariant& value );
//! Return value for the given key. If the key is not stored, default value will be used
QVariant value( const QString& key, const QVariant& defaultValue = QVariant() ) const;
//! Remove a key (entry) from the store
void remove( const QString& key );
/** Read store contents from XML
@param parentNode node to read from
@param keyStartsWith reads only properties starting with the specified string (or all if the string is empty)
*/
void readXml( const QDomNode& parentNode, const QString& keyStartsWith = QString() );
/** Write store contents to XML */
void writeXml( QDomNode& parentNode, QDomDocument& doc ) const;
};