QGIS API Documentation
3.41.0-Master (3440c17df1d)
Loading...
Searching...
No Matches
src
core
qgsobjectcustomproperties.h
Go to the documentation of this file.
1
/***************************************************************************
2
qgsobjectcustomproperties.h
3
-------------------
4
begin : April 2014
5
copyright : (C) 2014 by Martin Dobias
6
email : wonder.sk at gmail dot com
7
***************************************************************************/
8
9
/***************************************************************************
10
* *
11
* This program is free software; you can redistribute it and/or modify *
12
* it under the terms of the GNU General Public License as published by *
13
* the Free Software Foundation; either version 2 of the License, or *
14
* (at your option) any later version. *
15
* *
16
***************************************************************************/
17
18
#ifndef QGSOBJECTCUSTOMPROPERTIES_H
19
#define QGSOBJECTCUSTOMPROPERTIES_H
20
21
#include <QMap>
22
#include <QVariant>
23
#include "qgis_core.h"
24
25
class
QDomDocument;
26
class
QDomNode;
27
34
class
CORE_EXPORT
QgsObjectCustomProperties
35
{
36
public
:
37
38
QgsObjectCustomProperties
() =
default
;
39
43
QStringList keys()
const
;
44
50
void
setValue(
const
QString &key,
const
QVariant &value );
51
57
QVariant value(
const
QString &key,
const
QVariant &defaultValue = QVariant() )
const
;
58
62
void
remove(
const
QString &key );
63
69
bool
contains(
const
QString &key )
const
;
70
78
void
readXml(
const
QDomNode &parentNode,
const
QString &keyStartsWith = QString() );
79
85
void
writeXml( QDomNode &parentNode, QDomDocument &doc )
const
;
86
87
protected
:
88
QMap<QString, QVariant>
mMap
;
89
90
};
91
92
#endif
// QGSOBJECTCUSTOMPROPERTIES_H
QgsObjectCustomProperties
Simple key-value store (keys = strings, values = variants) that supports loading/saving to/from XML i...
Definition
qgsobjectcustomproperties.h:35
QgsObjectCustomProperties::QgsObjectCustomProperties
QgsObjectCustomProperties()=default
QgsObjectCustomProperties::mMap
QMap< QString, QVariant > mMap
Definition
qgsobjectcustomproperties.h:88
Generated on Sat Nov 23 2024 09:26:05 for QGIS API Documentation by
1.9.8