Quantum GIS API Documentation
1.7.4
|
QgsPropertyValue node. More...
#include <qgsprojectproperty.h>
Public Member Functions | |
QgsPropertyValue () | |
QgsPropertyValue (QVariant const &value) | |
virtual | ~QgsPropertyValue () |
virtual bool | isKey () const |
returns true if is a QgsPropertyKey | |
virtual bool | isValue () const |
returns true if is a QgsPropertyValue | |
QVariant | value () const |
return the node's value | |
bool | isLeaf () const |
returns true if is a leaf node | |
void | dump (size_t tabs=0) const |
dumps out the keys and values | |
bool | readXML (QDomNode &keyNode) |
restores property hierarchy to given Dom node | |
bool | writeXML (QString const &nodeName, QDomElement &element, QDomDocument &document) |
keyElement created by parent QgsPropertyKey | |
size_t | count () const |
void | entryList (QStringList &keyName, QStringList &entries) const |
return keys that do not contain other keys | |
Private Attributes | |
QVariant | value_ |
We use QVariant as it's very handy to keep multiple types and provides type conversions. |
QgsPropertyValue node.
Contains a QgsPropertyKey's value
Definition at line 120 of file qgsprojectproperty.h.
QgsPropertyValue::QgsPropertyValue | ( | ) | [inline] |
Definition at line 123 of file qgsprojectproperty.h.
QgsPropertyValue::QgsPropertyValue | ( | QVariant const & | value | ) | [inline] |
Definition at line 126 of file qgsprojectproperty.h.
virtual QgsPropertyValue::~QgsPropertyValue | ( | ) | [inline, virtual] |
Definition at line 130 of file qgsprojectproperty.h.
size_t QgsPropertyValue::count | ( | ) | const [inline] |
Definition at line 160 of file qgsprojectproperty.h.
void QgsPropertyValue::dump | ( | size_t | tabs = 0 | ) | const [virtual] |
dumps out the keys and values
tabs | is number of tabs to print; used for pretty-printing hierarchy |
Implements QgsProperty.
Definition at line 27 of file qgsprojectproperty.cpp.
References QgsDebugMsg, and value_.
Referenced by QgsPropertyKey::dump().
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 168 of file qgsprojectproperty.h.
virtual bool QgsPropertyValue::isKey | ( | ) | const [inline, virtual] |
returns true if is a QgsPropertyKey
Implements QgsProperty.
Definition at line 134 of file qgsprojectproperty.h.
bool QgsPropertyValue::isLeaf | ( | ) | const [inline, virtual] |
returns true if is a leaf node
Implements QgsProperty.
Definition at line 149 of file qgsprojectproperty.h.
virtual bool QgsPropertyValue::isValue | ( | ) | const [inline, virtual] |
returns true if is a QgsPropertyValue
Implements QgsProperty.
Definition at line 138 of file qgsprojectproperty.h.
bool QgsPropertyValue::readXML | ( | QDomNode & | keyNode | ) | [virtual] |
restores property hierarchy to given Dom node
Used for restoring properties from project file
Implements QgsProperty.
Definition at line 49 of file qgsprojectproperty.cpp.
References QgsDebugMsg, and value_.
QVariant QgsPropertyValue::value | ( | ) | const [inline, 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.
Implements QgsProperty.
Definition at line 141 of file qgsprojectproperty.h.
Referenced by QgsPropertyKey::dump().
bool QgsPropertyValue::writeXML | ( | QString const & | nodeName, |
QDomElement & | element, | ||
QDomDocument & | document | ||
) | [virtual] |
keyElement created by parent QgsPropertyKey
Implements QgsProperty.
Definition at line 230 of file qgsprojectproperty.cpp.
References value_.
Referenced by QgsProjectFileTransform::transform1100to1200().
QVariant QgsPropertyValue::value_ [private] |
We use QVariant as it's very handy to keep multiple types and provides type conversions.
Definition at line 176 of file qgsprojectproperty.h.
Referenced by dump(), readXML(), and writeXML().