#include <qgsprojectproperty.h>

Public Member Functions | |
| QgsProperty () | |
| virtual | ~QgsProperty () |
| virtual void | dump (size_t tabs=0) const =0 |
| dumps out the keys and values | |
| virtual bool | isKey () const =0 |
| returns true if is a QgsPropertyKey | |
| virtual bool | isValue () const =0 |
| returns true if is a QgsPropertyValue | |
| virtual bool | isLeaf () const =0 |
| returns true if a leaf node | |
| virtual bool | readXML (QDomNode &keyNode)=0 |
| restores property hierarchy to given Dom node | |
| virtual bool | writeXML (QString const &nodeName, QDomElement &element, QDomDocument &document)=0 |
| adds property hierarchy to given Dom element | |
| virtual QVariant | value () const =0 |
| return the node's value | |
Each sub-class is either a QgsPropertyKey or QgsPropertyValue. QgsPropertyKeys can contain either QgsPropertyKeys or QgsPropertyValues, thus describing an hierarchy. QgsPropertyValues are always graph leaves.
Definition at line 48 of file qgsprojectproperty.h.
| QgsProperty::QgsProperty | ( | ) | [inline] |
Definition at line 52 of file qgsprojectproperty.h.
| virtual QgsProperty::~QgsProperty | ( | ) | [inline, virtual] |
Definition at line 55 of file qgsprojectproperty.h.
| virtual void QgsProperty::dump | ( | size_t | tabs = 0 |
) | const [pure virtual] |
dumps out the keys and values
| tabs | is number of tabs to print; used for pretty-printing hierarchy |
Implemented in QgsPropertyValue, and QgsPropertyKey.
| virtual bool QgsProperty::isKey | ( | ) | const [pure virtual] |
returns true if is a QgsPropertyKey
Implemented in QgsPropertyValue, and QgsPropertyKey.
Referenced by findKey_().
| virtual bool QgsProperty::isValue | ( | ) | const [pure virtual] |
returns true if is a QgsPropertyValue
Implemented in QgsPropertyValue, and QgsPropertyKey.
Referenced by findKey_().
| virtual bool QgsProperty::isLeaf | ( | ) | const [pure virtual] |
returns true if a leaf node
A leaf node is a key node that has either no value or a single value. A non-leaf node would be a key node with key sub-nodes.
This is used for entryList() and subkeyList() implementation.
Implemented in QgsPropertyValue, and QgsPropertyKey.
| virtual bool QgsProperty::readXML | ( | QDomNode & | keyNode | ) | [pure virtual] |
restores property hierarchy to given Dom node
Used for restoring properties from project file
Implemented in QgsPropertyValue, and QgsPropertyKey.
| virtual bool QgsProperty::writeXML | ( | QString const & | nodeName, | |
| QDomElement & | element, | |||
| QDomDocument & | document | |||
| ) | [pure virtual] |
adds property hierarchy to given 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 |
Implemented in QgsPropertyValue, and QgsPropertyKey.
| virtual QVariant QgsProperty::value | ( | ) | const [pure virtual] |
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.
Implemented in QgsPropertyValue, and QgsPropertyKey.
Referenced by QgsPropertyKey::value().
1.5.6