QGIS API Documentation 3.41.0-Master (45a0abf3bec)
|
Project property value node, contains a QgsProjectPropertyKey's value. More...
#include <qgsprojectproperty.h>
Public Member Functions | |
QgsProjectPropertyValue ()=default | |
QgsProjectPropertyValue (const QVariant &value) | |
Constructor for QgsProjectPropertyValue, initialized to a specified value. | |
void | dump (int tabs=0) const override |
Dumps out the keys and values. | |
bool | isKey () const override |
Returns true if the property is a QgsProjectPropertyKey. | |
bool | isLeaf () const override |
Returns true if property is a leaf node. | |
bool | isValue () const override |
Returns true if the property is a QgsProjectPropertyValue. | |
bool | readXml (const QDomNode &keyNode) override |
Restores the property hierarchy from a specified DOM node. | |
QVariant | value () const override |
Returns the node's value. | |
bool | writeXml (const QString &nodeName, QDomElement &element, QDomDocument &document) override |
Writes the property hierarchy to a specified DOM element. | |
Public Member Functions inherited from QgsProjectProperty | |
QgsProjectProperty () | |
virtual | ~QgsProjectProperty ()=default |
Project property value node, contains a QgsProjectPropertyKey's value.
Definition at line 126 of file qgsprojectproperty.h.
|
default |
|
inline |
Constructor for QgsProjectPropertyValue, initialized to a specified value.
Definition at line 135 of file qgsprojectproperty.h.
|
overridevirtual |
Dumps out the keys and values.
tabs | is number of tabs to print; used for pretty-printing hierarchy |
Implements QgsProjectProperty.
Definition at line 30 of file qgsprojectproperty.cpp.
|
inlineoverridevirtual |
Returns true
if the property is a QgsProjectPropertyKey.
Implements QgsProjectProperty.
Definition at line 139 of file qgsprojectproperty.h.
|
inlineoverridevirtual |
Returns true
if property is a leaf node.
A leaf node is a key node that has either no value or only a single value. A non-leaf node would be a key node with key sub-nodes.
This is used for entryList() and subkeyList() implementation.
Implements QgsProjectProperty.
Definition at line 144 of file qgsprojectproperty.h.
|
inlineoverridevirtual |
Returns true
if the property is a QgsProjectPropertyValue.
Implements QgsProjectProperty.
Definition at line 140 of file qgsprojectproperty.h.
|
overridevirtual |
Restores the property hierarchy from a specified DOM node.
Used for restoring properties from project file
Implements QgsProjectProperty.
Definition at line 54 of file qgsprojectproperty.cpp.
|
inlineoverridevirtual |
Returns the node's value.
For QgsProjectPropertyValue nodes, this is straightforward – just return the embedded QVariant, _value. For QgsProjectPropertyKey, this means returning the QgsProjectPropertyValue _value that is keyed by its name, if it exists; i.e., QgsProjectPropertyKey "foo" will return the property value mapped to its name, "foo", in its QHash of QProperties.
Implements QgsProjectProperty.
Definition at line 141 of file qgsprojectproperty.h.
|
overridevirtual |
Writes the property hierarchy to a specified DOM element.
Used for saving properties to project file.
nodeName | the tag name associated with this element |
element | the parent (or encompassing) property element |
document | the overall project file Dom document |
Implements QgsProjectProperty.
Definition at line 235 of file qgsprojectproperty.cpp.