QGIS API Documentation  2.99.0-Master (37c43df)
Public Member Functions | List of all members
QgsPropertyValue Class Reference

QgsPropertyValue node. More...

#include <qgsprojectproperty.h>

Inheritance diagram for QgsPropertyValue:
Inheritance graph
[legend]

Public Member Functions

 QgsPropertyValue ()
 
 QgsPropertyValue (const QVariant &value)
 
virtual ~QgsPropertyValue ()
 
int count () const
 
void dump (int tabs=0) const override
 Dumps out the keys and values. More...
 
void entryList (QStringList &keyName, QStringList &entries) const
 Return keys that do not contain other keys Since QgsPropertyValue isn't a key, don't do anything. More...
 
virtual bool isKey () const override
 Returns true if is a QgsPropertyKey. More...
 
bool isLeaf () const override
 Returns true if is a leaf node. More...
 
virtual bool isValue () const override
 Returns true if is a QgsPropertyValue. More...
 
bool readXml (QDomNode &keyNode) override
 restores property hierarchy to given Dom node More...
 
QVariant value () const override
 Return the node's value. More...
 
bool writeXml (const QString &nodeName, QDomElement &element, QDomDocument &document) override
 keyElement created by parent QgsPropertyKey More...
 
- Public Member Functions inherited from QgsProperty
 QgsProperty ()
 
virtual ~QgsProperty ()
 

Detailed Description

QgsPropertyValue node.

Contains a QgsPropertyKey's value

Definition at line 115 of file qgsprojectproperty.h.

Constructor & Destructor Documentation

§ QgsPropertyValue() [1/2]

QgsPropertyValue::QgsPropertyValue ( )
inline

Definition at line 118 of file qgsprojectproperty.h.

§ QgsPropertyValue() [2/2]

QgsPropertyValue::QgsPropertyValue ( const QVariant &  value)
inline

Definition at line 120 of file qgsprojectproperty.h.

§ ~QgsPropertyValue()

QgsPropertyValue::~QgsPropertyValue ( )
virtual

Definition at line 32 of file qgsprojectproperty.cpp.

Member Function Documentation

§ count()

int QgsPropertyValue::count ( ) const
inline

Definition at line 149 of file qgsprojectproperty.h.

§ dump()

void QgsPropertyValue::dump ( int  tabs = 0) const
overridevirtual

Dumps out the keys and values.

Parameters
tabsis number of tabs to print; used for pretty-printing hierarchy

Implements QgsProperty.

Definition at line 36 of file qgsprojectproperty.cpp.

§ entryList()

void QgsPropertyValue::entryList ( QStringList &  keyName,
QStringList &  entries 
) const
inline

Return keys that do not contain other keys Since QgsPropertyValue isn't a key, don't do anything.

Definition at line 154 of file qgsprojectproperty.h.

§ isKey()

virtual bool QgsPropertyValue::isKey ( ) const
inlineoverridevirtual

Returns true if is a QgsPropertyKey.

Implements QgsProperty.

Definition at line 127 of file qgsprojectproperty.h.

§ isLeaf()

bool QgsPropertyValue::isLeaf ( ) const
inlineoverridevirtual

Returns true if is a leaf node.

Note
I suppose, in a way, value nodes can also be qualified as leaf nodes even though we're only counting key nodes.

Implements QgsProperty.

Definition at line 139 of file qgsprojectproperty.h.

§ isValue()

virtual bool QgsPropertyValue::isValue ( ) const
inlineoverridevirtual

Returns true if is a QgsPropertyValue.

Implements QgsProperty.

Definition at line 130 of file qgsprojectproperty.h.

§ readXml()

bool QgsPropertyValue::readXml ( QDomNode &  keyNode)
overridevirtual

restores property hierarchy to given Dom node

Used for restoring properties from project file

Implements QgsProperty.

Definition at line 57 of file qgsprojectproperty.cpp.

§ value()

QVariant QgsPropertyValue::value ( ) const
inlineoverridevirtual

Return the node's value.

For QgsPropertyValue nodes, this is straightforward – just return the embedded QVariant, _value. For QgsPropertyKey, this means returning the QgsPropertyValue _value that is keyed by its name, if it exists; i.e., QgsPropertyKey "foo" will return the property value mapped to its name, "foo", in its QHash of QProperties.

Implements QgsProperty.

Definition at line 132 of file qgsprojectproperty.h.

§ writeXml()

bool QgsPropertyValue::writeXml ( const QString &  nodeName,
QDomElement &  element,
QDomDocument &  document 
)
overridevirtual

keyElement created by parent QgsPropertyKey

Implements QgsProperty.

Definition at line 238 of file qgsprojectproperty.cpp.


The documentation for this class was generated from the following files: