MeVisLab Scripting Reference
|
Public Slots | |
Scripting access. | |
| |
void | adjustSize () |
virtual void | setEnabled (bool flag) |
virtual void | setVisible (bool flag) |
virtual bool | isVisible () |
virtual void | setFocus () |
virtual bool | hasFocus () |
virtual void | setToolTip (const QString &string) |
virtual void | setWhatsThis (const QString &string) |
void | displayWhatsThis () |
void | displayWhatsThis (const QString &text) |
virtual void | setTitle (const QString &) |
QWidget * | widget () |
QLayout * | layout () |
virtual QString | windowHandle () |
virtual bool | createScreenshot (const QString &filename, bool grabFromScreen=true, bool scaleToLowRes=false) |
bool | isReloadable () const |
void | reload (MLABTree *tree) |
QString | createGlobalScreenshot () |
QString | applicationName () |
QSize | size () |
int | width () |
int | height () |
int | minWidth () |
int | minHeight () |
int | maxWidth () |
int | maxHeight () |
virtual void | setMinWidth (int s) |
virtual void | setMinHeight (int s) |
void | setMaxWidth (int s) |
void | setMaxHeight (int s) |
QSize | sizeHint () |
QSize | minSize () |
QSize | maxSize () |
void | setMinSize (QSize size) |
void | setMaxSize (QSize size) |
void | updateLayout () |
int | windowID () |
MLABWidgetControl * | control (const QString &name) |
float | scaleFactor () |
MLABModule * | module () |
QString | getType () |
QString | getName () |
bool | acceptDrops () |
void | setAcceptDrops (bool flag) |
void | raiseWidget () |
void | setStyleSheetFromString (const QString &styleSheetText) |
void | setStyleSheetFromFile (const QString &styleSheetFileName) |
MLABTree * | tree () |
void | updateMaxSize () |
bool | expandX () |
bool | expandY () |
MLABTreePtr | getDefaultTagValues () const |
virtual bool | hasUncommittedChanges () const |
virtual void | applyUncommittedChanges () |
virtual void | revertUncommittedChanges () |
MLABField * | field () const |
Friends | |
class | MLABWindowControl |
Base class for controls in MLAB.
This base class offers a number of methods that can be called from scripting to change its state.
|
inlineslot |
Returns whether the control accepts drops.
|
slot |
Adjusts the widget size according to its size hint.
|
slot |
Returns the name of the application macro this module is in.
|
inlinevirtualslot |
Applies uncommitted changes.
Reimplemented in MLABTextViewControl.
|
slot |
Returns a named control in the context of this control.
|
slot |
Creates a global screenshot which goes to the screenshot gallery.
If successful, it also creates a thumb nail and returns the file name.
|
virtualslot |
Creates a snapshot in the given filename with the specified format.
The area that is grabbed will not contain the mouse cursor, but any other windows that are in front of this control will also be grabbed. This method is also able to grab Open Inventor viewers with their current OpenGL image.
the format is read from the given extension, available formats are:
".tif",".tiff" (TIFF RGB)
Example:
Reimplemented in MLABInventorViewerControl.
|
slot |
Shows the Whats This text for the control (using the MDL whatsThis tag).
|
slot |
Displays the given richtext on this control.
|
inlineslot |
Returns whether the control should expand horizontally.
|
inlineslot |
Returns whether the control should expand vertically.
|
inlineslot |
Returns the field edited/displayed by this control.
|
slot |
Returns a tree containing default tag values which have not been specified.
Tags that do not have a simple default value or string tags are excluded.
|
inlineslot |
Returns the name of the control which has been set via "name" or "instanceName" tag.
|
inlineslot |
Returns the type of the control, e.g., "MLABLabelControl" for a label.
|
inlinevirtualslot |
Returns whether this control has the keyboard focus.
|
inlinevirtualslot |
Returns true if this control has uncommitted changes (currently only applies to TextView control)
Reimplemented in MLABTextViewControl.
|
inlineslot |
Returns the height of the widget.
|
inlineslot |
Returns whether this control can be reloaded with a new tree.
This is used by the GUI editor to partly update panels.
|
virtualslot |
Returns whether this control is visible.
|
inlineslot |
Returns the layout of the main QWidget of this control (this widget may be different depending on tags used in the control).
|
inlineslot |
Returns the maximum height of the widget.
|
inlineslot |
Returns the maximum size of the widget.
|
inlineslot |
Returns the maximum width of the widget.
|
inlineslot |
Returns the minimum height of the widget.
|
inlineslot |
Returns the minimum size of the widget.
|
inlineslot |
Returns the minimum width of the widget.
|
inlineslot |
Returns the module associated with this GUI element.
|
slot |
Raises the underlying widget (can not be called raise because raise() is a keyword in Python).
|
slot |
Reloads this control with the new tree if isReloadable() returns true.
|
inlinevirtualslot |
Reverts uncommitted changes; this mainly exists to prevent a second request dialog opening on closing if changes were discarded in the shouldCloseCommand.
Reimplemented in MLABTextViewControl.
|
inlineslot |
Returns the GUI scale factor for this widget.
|
inlineslot |
Sets whether the control accepts drops.
|
virtualslot |
Enables/disables the control.
|
inlinevirtualslot |
Sets the keyboard focus.
|
inlineslot |
Sets the maximum height of the widget.
|
inlineslot |
Sets the maximum size of the widget.
References size().
|
inlineslot |
Sets the maximum width of the widget.
|
inlinevirtualslot |
Sets the minimum height of the widget.
Reimplemented in MLABWindowControl.
|
inlineslot |
Sets the minimum size of the widget.
References size().
|
inlinevirtualslot |
Sets the minimum width of the widget.
Reimplemented in MLABWindowControl.
|
slot |
Sets the Qt style sheet value from a file.
|
slot |
Sets the Qt style sheet value.
|
virtualslot |
Sets the title of the widget (this method is reimplemented in the different widgets).
Please note that this method will be removed in the future, so that it can only be called on derived classes which actually support a title.
Reimplemented in MLABWindowControl.
|
virtualslot |
Sets a tool tip text for the control.
|
virtualslot |
Makes the control visible/invisible.
|
virtualslot |
Sets a Whats This text for the control.
|
inlineslot |
Returns the size of the widget.
Referenced by setMaxSize(), and setMinSize().
|
inlineslot |
Returns the size hint of the widget.
|
inlineslot |
Returns the MDL tree for this control.
|
slot |
Recursively updates the layout.
You might need to call MLAB.processEvents() afterwards to make sure that the changes take effect completely.
|
slot |
Updates the maximum size of the widget when expandX/Y == no and the contents have changed size.
|
inlineslot |
Returns the main QWidget of this control (this widget may be different depending on tags used in the control).
|
inlineslot |
Returns the width of the widget.
|
virtualslot |
Returns the window handle of the underlying QWidget as string encoded in hexadecimal, e.g., "1234ABCD".
|
inlineslot |
Returns the window ID for this control.
The windowId can be used on MLABModule::controlForWindowID(id) to get a named control of a specific window.