MeVisLab Scripting Reference
|
Inherits QObject.
Inherited by MLABBoolField, MLABEngineOutputField, MLABEnumField, MLABImageField, MLABMatrixField, MLABMLBaseField, MLABNumberField, MLABSoNodeField, MLABStringField, MLABTriggerField, and MLABVectorField.
Public Slots | |
bool | isInventorField () |
bool | isMLField () |
Scripting access. | |
QString | getType () const |
QString | getName () const |
virtual QString | stringValue () |
virtual void | setStringValue (const QString &) |
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 | 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 a 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 class name of the field can be read by using the "type" property:
or alternatively
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 types 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 type of the field (e.g., String, Integer, Float).
|
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 when trying to connect the fields.
Reimplemented in MLABEngineOutputField.
|
inlineslot |
Returns whether the field is editable in the GUI (can be overridden in self-defined panels).
|
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).
|
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 a priority, used for displayWindowsNow (use 0 for immediate GUI update).
|
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 MLABMatrixField, MLABMLBaseField, MLABVector2Field, MLABVector3Field, MLABImageField, MLABVector4Field, MLABIntVector3Field, MLABIntVector2Field, MLABEnumField, MLABVector6Field, MLABBoolField, MLABIntVector6Field, MLABSoNodeField, MLABStringField, MLABIntegerField, MLABDoubleField, MLABFloatField, and MLABTriggerField.
Referenced by MLABEnumField::setValue().
|
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 MLABMLBaseField, MLABSoNodeField, MLABEngineOutputField, and MLABTriggerField.
|
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 don't want the profiling to cause side effects, e.g. changing the state of an ML image.
Reimplemented in MLABImageField, MLABMLBaseField, MLABSoNodeField, and MLABTriggerField.
|
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 MLABImageField, and MLABMLBaseField.
|
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 "...".