MeVisLab Scripting Reference
|
#include <mlabScriptWrappers.h>
Inherits QObject.
Inherited by MLABMLITree.
Public Slots | |
Scripting access | |
| |
int | getLine () |
int | getValueLine () |
QString | getFileName () |
int | count () |
MLABTree * | child (int i) |
QStringList | getAllChildNames () |
MLABTree * | get (QString propertyName, QVariant defaultVal=QVariant()) |
QList< MLABTree * > | getAll (const QString &propertyName) |
QStringList | getAllValues (const QString &propertyName, char separator=0) |
QString | getName () |
void | setName (const QString &name) |
QString | getValue () |
void | setValue (const QString &value) |
QStringList | getListValue () |
QRect | getRectValue () |
QSize | getSizeValue () |
bool | getBoolValue () |
int | getIntValue () |
int | getScaledIntValue (float scaleFactor) |
float | getFloatValue () |
unsigned long | getUlongValue () |
QString | getValueResolveEscapes () |
MLABTree * | findChild (const QString &name) |
MLABTree * | findChildren (const QString &name) |
QString | childValue (const QString &name) |
MLABTree * | findChildrenRecursive (const QString &name) |
MLABTree * | append (const QString &name, const QString &value) |
MLABTree * | insert (int idx, const QString &name, const QString &value) |
void | append (MLABTree *child) |
void | insert (int idx, MLABTree *child) |
bool | remove (MLABTree *child) |
MLABTree * | deepCopy () const |
void | printError (const QString &msg) |
void | printWarning (const QString &msg) |
QString | toString () |
MLAB Tree element of parsed MDL files.
MLAB Tree element of parsed MDL files. The items can be created with MLAB::newTree() and can be loaded/saved via MLAB::readTreeFromFile(),MLAB::readTreeFromString() and MLAB::writeTreeToFile(), MLAB::writeTreeToString().
|
slot |
Appends a new tree child.
|
slot |
Appends a given tree child.
|
slot |
Returns the child at index i.
|
slot |
Searches for the direct child with name
and returns the first encountered child's value or an empty string (search is case insensitive).
|
slot |
Returns count of direct children (non-recursive).
|
slot |
Create a deep copy of the tree.
|
slot |
Searches for the direct child with name
and returns the first encountered child or NULL (search is case insensitive).
|
slot |
Searches for the direct children with name
and returns a tree which contains the found children (search is case insensitive).
|
slot |
Searches for the children with name
recursively and returns a tree which contains the found children (search is case insensitive).
|
slot |
Returns a property by name.
Dot-notation can be used to access children. Returns first child with name propertyName.split(".")[-1]. Returns defaultVal if not found. Example: get("Interface.Inputs.Field")
|
slot |
Returns all properties by name.
Dot-notation can be used to access children. Returns all children with name propertyName.split(".")[-1]. Returns defaultVal if not found.
|
slot |
Returns a list of names of all child tree node.
|
slot |
Convenience function, returns the values of the tree nodes returned by getAll.
If separator is given, values are split against this separator first. If separator is a whitespace character, empty values are removed.
|
slot |
Returns whether the value is true or false (yes/true/1).
|
slot |
Returns the file name of the MDL file where this tag was defined.
|
slot |
Returns the value as float.
|
slot |
Returns the value as integer.
|
slot |
Returns the line of the file where this tag was defined.
|
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")
|
slot |
Returns the name of the tree node.
|
slot |
get/set rect 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)
|
slot |
Returns the value as scaled integer.
|
slot |
Get/set size value of this tree (by parsing the value string).
A size as a string value looks like this: "100 100" (w h)
|
slot |
Returns the value as unsigned long.
|
slot |
Returns the value of the tree node.
|
slot |
Returns the line of the file where this tags value was defined.
|
slot |
Returns the value of this tree with resolved escape-sequences.
|
slot |
Inserts a new tree child at the given position (i must be between 0 and count()-1).
|
slot |
Inserts a given tree child.
|
slot |
Prints an error to the console for this tree.
|
slot |
Prints a warning to the console for this tree.
|
slot |
Removes a given tree child.
|
slot |
Sets the name of the tree. Be careful, since it affects all trees which reference this tree.
|
slot |
Sets the value of the tree. Be careful, since it affects all trees which reference this tree.
|
inlineslot |
Returns an MDL string with the whole recursive tree (excluding the root item on which this method is called).