MeVisLab Scripting Reference
|
Public Slots | |
bool | isInventorField () |
bool | isMLField () |
Scripting access. | |
| |
QString | getType () const |
QString | getName () const |
virtual QString | stringValue () |
virtual void | setStringValue (const QString &) |
virtual QString | persistentStringValue () |
virtual void | setPersistentStringValue (const QString &value) |
QString | truncatedStringValue (int maxChars=80) |
virtual QString | stringValueForProfiling () |
virtual void | touch () |
MLABFieldOwner * | owner () |
MLABField * | connectedField () |
MLABField * | inputField () |
bool | isConnected () |
bool | isConnectedToFieldInSameNetwork () |
int | outputCount () |
MLABField * | outputField (int index) |
QList< MLABField * > | outputFields () |
bool | connectFrom (MLABField *field) |
void | disconnect () |
void | disconnectOutputs () |
void | disconnectAll () |
bool | connectFromUndoable (MLABField *field) |
void | disconnectUndoable () |
void | disconnectOutputsUndoable () |
void | disconnectAllUndoable () |
virtual bool | isConnectionPossible (MLABField *field) |
bool | isConnectionInSameNetworkPossible (MLABField *field) |
bool | isInSameNetwork (MLABField *field) |
virtual QString | toolTipInfo () |
void | setPriority (int aPriority) |
int | priority () |
void | setProxy (bool flag) |
bool | isProxy () |
void | setComment (const QString &comment) |
QString | comment () |
void | setTitle (const QString &title) |
QString | title () |
QString | fullName () const |
bool | isHidden () |
void | setHidden (bool flag) |
bool | isIgnored () |
void | setIgnored (bool flag) |
bool | isFilePath () |
void | setIsFilePath (bool flag) |
bool | isInterfaceField () |
bool | isParameterField () |
bool | isInput () |
bool | isOutput () |
bool | isInOut () |
QString | infoString () |
bool | isPersistent () const |
bool | isEditable () const |
bool | triggersLoading () const |
void | setTriggersLoading (bool flag) |
Base class of all Fields in MLAB.
The MLABField is used standalone by macro modules and to wrap Inventor or ML Fields. A field normally has a MLABFieldOwner, which is an MLABModule in the current implementation. To get a field of a module, use the field() method of MLABModule. There are common stringValue() and setStringValue() methods in this base class and specialized set/get methods in the derived class.
The name of the field is given in the 'name' property:
or alternatively
The fields data type can be read by using the 'type' property.
or alternatively
The data type is generated from the fields C++ class name by stripping of the prefix 'MLAB' and the trailing 'Field', e.g., getType() of an MLABBoolField returns Bool.
All fields that have a value, implement a 'value' property, which can be accessed via Scripting for read/write access.
Read access:
Write access:
The 'value' property is always of the typical type of the field, thus a string field returns a string, while an int field returns an integer. Type conversion is done automatically by QT.
Field datatypes include:
|
slot |
Returns the comment string.
|
slot |
Returns the input connection of this field (connected field, NULL if none), alias for inputField().
In this case, this field is the destination of a connection.
|
slot |
Connects to given field (if already connected, automatically disconnects old connection) and returns whether this operation was successful.
|
slot |
Connects/disconnects undoable.
|
slot |
Disconnects input.
|
slot |
Disconnects the input and all output fields.
|
slot |
Disconnects all outputs.
|
slot |
Returns the full name for debugging. This is the name of the owner (if existing) with the name of the field.
|
inlineslot |
Returns the name of the field. You can also use the name property.
|
inlineslot |
Returns the data type of the field by stripping of the prefix 'MLAB' and the trailing 'Field' of the fields C++ class name, e.g., getType() of an MLABBoolField returns Bool. See Detailed Description above for the available field types.
|
slot |
Returns an info string (for printing).
|
slot |
Returns the input connection of this field (connected field, NULL if none), alias for connectedField().
In this case, this field is the destination of a connection.
|
slot |
Returns whether the field has an input connection.
|
slot |
Returns whether the field is connected to another field in the same network.
Returns true
if connected to at least one field in the same network.
|
slot |
Returns whether a connection between the fields is possible using isConnectionPossible() and if the fields are in the same network.
|
virtualslot |
Returns whether a connection between the fields is possible (taking into account the input/output type and not regarding the networks the fields are in).
NOTE: even if this method tries to be accurate, it may return true
and connectFrom is still not possible. This is due to the fact that not all Inventor fields can be connected with each other and this can only be detected if trying to connect the fields.
|
inlineslot |
Returns whether the field is editable in the GUI (can be overridden in self-defined panels).
|
slot |
Returns whether this field is a file path (only applicable for string fields).
|
slot |
Returns whether the field is hidden.
|
slot |
Returns whether this field is ignored. This is only used with Inventor fields.
|
inlineslot |
Returns whether this field is marked as an input/output (parameter) field.
|
inlineslot |
Returns whether this field is marked as an input field.
Mark field as input only, as output only, or as InOut: a newly created field is InOut. mainly these flags are used to avoid wrong drag/drop connections!
|
slot |
Returns whether the field is in the same network as the given field
.
|
inlineslot |
Returns whether this is a macro module's interface field.
|
slot |
Returns whether this is an Inventor field.
|
slot |
Returns whether this is an ML field.
|
inlineslot |
Returns whether this field is marked as an output field.
|
inlineslot |
Returns whether this is a parameter field.
|
inlineslot |
Returns whether the field is persistent, i.e., if its values is saved together with the module.
|
inlineslot |
Returns whether a field is a used as a proxy on a macro module's interface.
|
slot |
Returns the number of connected fields where this field is the source.
|
slot |
Returns the output field at the given index
; the number of available fields is given via outputCount().
|
slot |
Returns the list of fields that are connected from this field.
|
slot |
Returns the owner of the field (may be NULL).
|
virtualslot |
Returns the value of the field as a string value for persistence in network files.
(Default implementation returns stringValue().)
Reimplemented in MLABStringField.
|
slot |
Returns the priority.
|
slot |
Sets a comment string for the field.
|
slot |
Sets the hidden state of this field.
|
slot |
Sets the ignore flag, which only has an effect on Inventor fields.
|
slot |
Sets whether this field contains a file path (only applicable for string fields).
|
virtualslot |
Sets the value of the field from the persistent string value in a network file.
(Default implementation uses setStringValue().)
Reimplemented in MLABStringField.
|
slot |
Sets a priority, currently only used for inventor field callbacks.
|
inlineslot |
Sets whether a field is used as a proxy on a macro module's interface.
|
inlinevirtualslot |
Sets the value of the field as a string value.
Reimplemented in MLABVector6Field, MLABVector4Field, MLABVector3Field, MLABVector2Field, MLABStringField, MLABOtherField, MLABMatrixField, MLABIntVector6Field, MLABIntVector3Field, MLABIntVector2Field, MLABIntegerField, MLABFloatField, MLABEnumField, MLABDoubleField, MLABBoolField, MLABTriggerField, MLABSoPathField, MLABSoNodeField, MLABMLBaseField, and MLABImageField.
|
slot |
Sets a default GUI title
.
|
inlineslot |
Sets whether this field triggers full loading of a lazy loading module if touched.
|
virtualslot |
Returns the value of the field as a string value.
Reimplemented in MLABTriggerField, MLABSoPathField, MLABSoNodeField, and MLABMLBaseField.
|
virtualslot |
Returns the string value used for profiling, default returns the string value.
NOTE: be careful on how you re-implement this method in subclasses, since we do not want the profiling to cause side effects, e.g., changing the state of an ML image.
Reimplemented in MLABTriggerField, MLABSoPathField, MLABSoNodeField, MLABMLBaseField, and MLABImageField.
|
slot |
Returns the default GUI title.
|
virtualslot |
Returns an info string for the tool tip.
|
virtualslot |
Forces a notify to all observers without changing the value of the field.
Reimplemented in MLABMLBaseField, and MLABImageField.
|
inlineslot |
Returns whether this field triggers full loading of a lazy loading module if touched.
|
slot |
Truncates the string value. It truncates the stringValue() if it is longer than the given number of chars and appends "...".