Public Member Functions |
| QgsPropertyKey (const QString &name="") |
virtual | ~QgsPropertyKey () |
QVariant | value () const |
| if this key has a value, it will be stored by its name in its properties
|
QgsPropertyKey * | addKey (const QString &keyName) |
| add the given property key
|
void | removeKey (const QString &keyName) |
| remove the given key
|
QgsPropertyValue * | setValue (const QString &name, const QVariant &value) |
| set the value associated with this key
|
QgsPropertyValue * | setValue (const QVariant &value) |
| set the value associated with this key
|
void | dump (int tabs=0) const |
| dumps out the keys and values
|
bool | readXML (QDomNode &keyNode) |
| restores property hierarchy to given Dom node
|
bool | writeXML (const QString &nodeName, QDomElement &element, QDomDocument &document) |
| Property keys will always create a Dom element for itself and then recursively call writeXML for any constituent properties.
|
int | count () const |
| how many elements are contained within this one?
|
bool | isEmpty () const |
| Does this property not have any subkeys or values?
|
virtual bool | isKey () const |
| returns true if is a QgsPropertyKey
|
virtual bool | isValue () const |
| returns true if is a QgsPropertyValue
|
void | entryList (QStringList &entries) const |
| return keys that do not contain other keys
|
void | subkeyList (QStringList &entries) const |
| return keys that contain other keys
|
bool | isLeaf () const |
| returns true if a leaf node
|
virtual void | clear () |
| reset the QgsProperty key to prestine state
|
virtual void | clearKeys () |
| delete any sub-nodes
|
QgsProperty * | find (QString &propertyName) |
|
const QString & | name () const |
| every key has a name
|
QString & | name () |
| 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.