Public Slots | |
Scripting access | |
| void | append (MLABTree *child) |
| MLABTree * | append (const QString &name, const QString &value) |
| MLABTree * | child (int i) |
| QString | childValue (const QString &name) |
| int | count () |
| MLABTree * | findChild (const QString &name) |
| MLABTree * | findChildren (const QString &name) |
| MLABTree * | findChildrenRecursive (const QString &name) |
| MLABTree * | get (QString propertyName, QVariant defaultVal=QVariant()) |
| QVariantList | getAll (QString propertyName) |
| QStringList | getAllChildNames () |
| bool | getBoolValue () |
| float | getFloatValue () |
| int | getIntValue () |
| int | getLine () |
| QStringList | getListValue () |
| QString | getName () |
| QRect | getRectValue () |
| int | getScaledIntValue (float scaleFactor) |
| QSize | getSizeValue () |
| unsigned long | getUlongValue () |
| QString | getValue () |
| int | getValueLine () |
| QString | getValueResolveEscapes () |
| void | insert (int idx, MLABTree *child) |
| MLABTree * | insert (int idx, const QString &name, const QString &value) |
| void | printError (const QString &msg) |
| void | printWarning (const QString &msg) |
| bool | remove (MLABTree *child) |
| void | setBoolValue (bool val) |
| void | setFloatValue (float val) |
| void | setIntValue (int val) |
| void | setListValue (QStringList val) |
| void | setName (const QString &name) |
| void | setRectValue (QRect val) |
| void | setSizeValue (QSize val) |
| void | setUlongValue (unsigned long val) |
| void | setValue (const QString &value) |
| QString | toString () |
| void MLABTree::append | ( | MLABTree * | child | ) | [slot] |
appends a given tree child
| MLABTree* MLABTree::append | ( | const QString & | name, | |
| const QString & | value | |||
| ) | [slot] |
appends a new tree child
| MLABTree* MLABTree::child | ( | int | i | ) | [slot] |
returns child at index i
| QString MLABTree::childValue | ( | const QString & | name | ) | [slot] |
searches for the direct child with name and returns the first encountered child's value or an empty string (search is case insensitive)
| int MLABTree::count | ( | ) | [slot] |
returns count of direct children (non-recursive)
| MLABTree* MLABTree::findChild | ( | const QString & | name | ) | [slot] |
searches for the direct child with name and returns the first encountered child or NULL (search is case insensitive)
| MLABTree* MLABTree::findChildren | ( | const QString & | name | ) | [slot] |
searches for the direct children with name and returns a tree which contains the found children (search is case insensitive)
| MLABTree* MLABTree::findChildrenRecursive | ( | const QString & | name | ) | [slot] |
searches for the children with name recursively and returns a tree which contains the found children (search is case insensitive)
| MLABTree* MLABTree::get | ( | QString | propertyName, | |
| QVariant | defaultVal = QVariant() | |||
| ) | [slot] |
get property by name.
One can use dot-notation to access children. Return first child with name propertyName.split(".")[-1] Return defaultVal if not found Example: get("Interface.Inputs.Field")
| QVariantList MLABTree::getAll | ( | QString | propertyName | ) | [slot] |
get all properties by name.
One can use dot-notation to access children. Return all children with name propertyName.split(".")[-1] Return defaultVal if not found
| QStringList MLABTree::getAllChildNames | ( | ) | [slot] |
get names of all child tree node
| bool MLABTree::getBoolValue | ( | ) | [slot] |
return if the value is true or false (yes/true/1)
| float MLABTree::getFloatValue | ( | ) | [slot] |
return the value as float
| int MLABTree::getIntValue | ( | ) | [slot] |
return the value as integer
| int MLABTree::getLine | ( | ) | [slot] |
Get the line of the file, where this tag was defined.
| QStringList MLABTree::getListValue | ( | ) | [slot] |
get/set value as a list A string value is separated at ',' e.g.
: a value of "1, 4, 3, 44" would be returned as ("1", "4", "3", "44")
| QString MLABTree::getName | ( | ) | [slot] |
get name of the tree node
| QRect MLABTree::getRectValue | ( | ) | [slot] |
get/set qrect value of this tree (by parsing the value string) A rect as a string value looks like this: "100 100 20 40" (x y w h)
| int MLABTree::getScaledIntValue | ( | float | scaleFactor | ) | [slot] |
return the value as scaled integer
| QSize MLABTree::getSizeValue | ( | ) | [slot] |
get/set qsize value of this tree (by parsing the value string) A size as a string value looks like this: "100 100" (w h)
| unsigned long MLABTree::getUlongValue | ( | ) | [slot] |
return the value as unsigned long
| QString MLABTree::getValue | ( | ) | [slot] |
get value of the tree node
| int MLABTree::getValueLine | ( | ) | [slot] |
Get the line of the file, where this tags value was defined.
| QString MLABTree::getValueResolveEscapes | ( | ) | [slot] |
Get Value of this tree with resolved escape-sequences.
Get Value of this tree with resolved escape-sequences
| void MLABTree::insert | ( | int | idx, | |
| MLABTree * | child | |||
| ) | [slot] |
inserts a given tree child
| MLABTree* MLABTree::insert | ( | int | idx, | |
| const QString & | name, | |||
| const QString & | value | |||
| ) | [slot] |
inserts a new tree child at the given position (i must be between 0 and count()-1)
| void MLABTree::printError | ( | const QString & | msg | ) | [slot] |
prints an error to the console for this tree
| void MLABTree::printWarning | ( | const QString & | msg | ) | [slot] |
prints a warning to the console for this tree
| bool MLABTree::remove | ( | MLABTree * | child | ) | [slot] |
remove a given tree child
| void MLABTree::setName | ( | const QString & | name | ) | [slot] |
sets the name of the tree, be careful, since it affects all trees which reference this tree
| void MLABTree::setValue | ( | const QString & | value | ) | [slot] |
sets the name of the tree, be careful, since it affects all trees which reference this tree
| QString MLABTree::toString | ( | ) | [inline, slot] |
get MDL string with whole recursive tree (excluding the root item on which this method is called)
1.5.8