QGIS API Documentation
2.18.21-Las Palmas (9fba24a)
|
QgsPropertyKey node. More...
#include <qgsprojectproperty.h>
Public Member Functions | |
QgsPropertyKey (const QString &name="") | |
virtual | ~QgsPropertyKey () |
QgsPropertyKey * | addKey (const QString &keyName) |
add the given property key More... | |
virtual void | clear () |
reset the QgsProperty key to prestine state More... | |
virtual void | clearKeys () |
delete any sub-nodes More... | |
int | count () const |
how many elements are contained within this one? More... | |
void | dump (int tabs=0) const override |
Dumps out the keys and values. More... | |
void | entryList (QStringList &entries) const |
return keys that do not contain other keys More... | |
QgsProperty * | find (QString &propertyName) |
bool | isEmpty () const |
Does this property not have any subkeys or values? More... | |
virtual bool | isKey () const override |
Returns true if is a QgsPropertyKey. More... | |
bool | isLeaf () const override |
Returns true if a leaf node A leaf node is a key node that has either no value or a single value. 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... | |
void | removeKey (const QString &keyName) |
remove the given key More... | |
QgsPropertyValue * | setValue (const QString &name, const QVariant &value) |
Set the value associated with this key. More... | |
QgsPropertyValue * | setValue (const QVariant &value) |
Set the value associated with this key. More... | |
void | subkeyList (QStringList &entries) const |
return keys that contain other keys More... | |
QVariant | value () const override |
If this key has a value, it will be stored by its name in its properties. More... | |
bool | writeXML (const QString &nodeName, QDomElement &element, QDomDocument &document) override |
Property keys will always create a Dom element for itself and then recursively call writeXML for any constituent properties. More... | |
QString | name () const |
every key has a name More... | |
QString & | name () |
Public Member Functions inherited from QgsProperty | |
QgsProperty () | |
virtual | ~QgsProperty () |
QgsPropertyKey node.
Can, itself, contain QgsPropertyKeys and QgsPropertyValues.
The internal QHash, mProperties, maps key names to their respective QgsPropertyValue or next QgsPropertyKey in the key name sequence. The key with the current name should contain its QgsPropertyValue.
E.g., given the key sequence "/foo/bar", "foo" will have a corresponding QgsPropertyKey with a name "foo". It will contain an element in its mProperties that maps to "bar", which is another QgsPropertyKey. The "bar" QgsPropertyKey will, in turn, have an element that maps to itself, i.e. "bar", that will contain a QgsPropertyValue.
Definition at line 185 of file qgsprojectproperty.h.
QgsPropertyKey::QgsPropertyKey | ( | const QString & | name = "" | ) |
Definition at line 279 of file qgsprojectproperty.cpp.
|
virtual |
Definition at line 283 of file qgsprojectproperty.cpp.
|
inline |
add the given property key
Definition at line 207 of file qgsprojectproperty.h.
|
inlinevirtual |
reset the QgsProperty key to prestine state
Definition at line 276 of file qgsprojectproperty.h.
|
inlinevirtual |
delete any sub-nodes
Definition at line 283 of file qgsprojectproperty.h.
|
inline |
how many elements are contained within this one?
Definition at line 252 of file qgsprojectproperty.h.
|
overridevirtual |
Dumps out the keys and values.
tabs | is number of tabs to print; used for pretty-printing hierarchy |
Implements QgsProperty.
Definition at line 302 of file qgsprojectproperty.cpp.
void QgsPropertyKey::entryList | ( | QStringList & | entries | ) | const |
return keys that do not contain other keys
Return keys that do not contain other keys.
Definition at line 437 of file qgsprojectproperty.cpp.
|
inline |
Definition at line 289 of file qgsprojectproperty.h.
|
inline |
Does this property not have any subkeys or values?
Definition at line 255 of file qgsprojectproperty.h.
|
inlineoverridevirtual |
Returns true if is a QgsPropertyKey.
Implements QgsProperty.
Definition at line 258 of file qgsprojectproperty.h.
|
overridevirtual |
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.
Implements QgsProperty.
Definition at line 468 of file qgsprojectproperty.cpp.
|
inlineoverridevirtual |
Returns true if is a QgsPropertyValue.
Implements QgsProperty.
Definition at line 261 of file qgsprojectproperty.h.
|
inline |
every key has a name
Definition at line 194 of file qgsprojectproperty.h.
|
inline |
Definition at line 196 of file qgsprojectproperty.h.
|
overridevirtual |
restores property hierarchy to given Dom node
Used for restoring properties from project file
Implements QgsProperty.
Definition at line 361 of file qgsprojectproperty.cpp.
|
inline |
remove the given key
Definition at line 217 of file qgsprojectproperty.h.
|
inline |
Set the value associated with this key.
name | is the key name |
value | is the value to set |
Definition at line 227 of file qgsprojectproperty.h.
|
inline |
Set the value associated with this key.
Definition at line 240 of file qgsprojectproperty.h.
void QgsPropertyKey::subkeyList | ( | QStringList & | entries | ) | const |
return keys that contain other keys
Definition at line 453 of file qgsprojectproperty.cpp.
|
overridevirtual |
If this key has a value, it will be stored by its name in its properties.
Implements QgsProperty.
Definition at line 288 of file qgsprojectproperty.cpp.
|
overridevirtual |
Property keys will always create a Dom element for itself and then recursively call writeXML for any constituent properties.
Implements QgsProperty.
Definition at line 408 of file qgsprojectproperty.cpp.