MeVisLab Scripting Reference
|
#include <mlabWindowControl.h>
Inherits MLABWidgetControl.
Public Member Functions | |
void | setMinHeight (int s) override |
void | setMinWidth (int s) override |
Special methods for dialog access. | |
| |
void | accept () |
void | reject () |
void | done (int result) |
int | exec () |
Special methods for background images and borderless windows. | |
| |
void | setBackgroundImage (const QString &image, bool automask=false, bool resizeWindowToImage=false) |
void | setEnableMouseMoving (int button) |
void | startMouseMove () |
void | stopMouseMove () |
void | setMouseMoveField (MLABVector2Field *field) |
Friends | |
class | MLABWidgetControl |
Scripting access. | |
| |
void | setTitle (const QString &title) override |
QString | title () |
void | setGeometry (QRect rect) |
QRect | geometry () const |
void | resize (const QSize &size) |
void | resize (int w, int h) |
void | setWidth (int w) |
void | setHeight (int h) |
void | resizeToMin () |
void | resizeToHint () |
void | resizeToPreferred () |
void | updateFrame (bool minimum=false, bool center=false) |
QRect | screenGeometry () const |
void | show () |
void | hide () |
bool | close () |
void | setCloseAllowed (bool flag) |
void | center () |
void | moveTo (MLABWidgetControl *w, int align, int xdistance, int ydistance) |
void | move (int x, int y) |
void | showNormal () |
void | showFullscreen () |
void | setCanGoFullscreen (bool flag) |
bool | canGoFullscreen () |
void | showMinimized () |
bool | isMinimized () |
void | showMaximized () |
void | raise () |
void | raiseWindow () |
Additional Inherited Members | |
Public Slots inherited from MLABWidgetControl | |
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) |
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 () |
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 |
Window control.
This control shows a window.
void MLABWindowControl::accept | ( | ) |
Accepts and closes the dialog (result 1).
|
slot |
Returns whether the window can go fullscreen (Mac OS X only currently).
|
slot |
Centers the window on the screen it's on.
|
slot |
Closes the window.
void MLABWindowControl::done | ( | int | result | ) |
Closes the dialog and returns the result.
int MLABWindowControl::exec | ( | ) |
|
slot |
Returns the geometry of the window.
|
slot |
Hides the window.
|
slot |
Returns whether the panel window is minimized.
|
slot |
Moves the window to the given position.
|
slot |
Moves to the given control and aligns this window relative to the given align position.
Available align flags (or'ed together) are, if not given centering is default:
|
slot |
Raises this window to top of all windows.
|
inlineslot |
Raises this window to top of all windows (this forwards to raise() but was necessary because "raise" is a reserved keyword in Python).
void MLABWindowControl::reject | ( | ) |
Rejects and closes the dialog (result 0).
|
slot |
Sets the size of the window.
|
slot |
Sets a new size of the window.
|
slot |
Resizes the window to the size hint, see also updateFrame().
|
slot |
Resizes the window to the minimum size, see also updateFrame().
this call might require a
|
slot |
Resizes the window to the preferred size (taking into account pw and ph window tags if they are greater than the minimumSize).
|
slot |
Returns the screen geometry of the screen this widget is on, see MLABDesktop for more methods on screens and geometries.
void MLABWindowControl::setBackgroundImage | ( | const QString & | image, |
bool | automask = false, | ||
bool | resizeWindowToImage = false ) |
Sets a background image for the window (which may also have a 0/255 alpha channel).
|
slot |
Enables/disables the button to go fullscreen (Mac OS X only currently).
|
inlineslot |
Sets whether the window can be closed (default is true).
void MLABWindowControl::setEnableMouseMoving | ( | int | button | ) |
Enables mouse moving by clicking inside of the window and dragging.
Default is off, only recommended for borderless windows, button = -1 switches it off, 0 = left, 1 = middle, 2 = right button.
|
slot |
Sets the geometry of the window.
|
slot |
Sets the height of the window.
|
overridevirtual |
Sets the minimum height of the widget.
Reimplemented from MLABWidgetControl.
|
overridevirtual |
Sets the minimum width of the widget.
Reimplemented from MLABWidgetControl.
void MLABWindowControl::setMouseMoveField | ( | MLABVector2Field * | field | ) |
Set a move field that is notified on changes of the moved window (x,y screen position).
|
overridevirtual |
Sets the title of the window.
Reimplemented from MLABWidgetControl.
|
slot |
Sets the width of the window.
|
slot |
Shows the window.
|
slot |
Shows the window fullscreen (with no menu bar decoration and quit buttons).
|
slot |
Shows the window maximized to fullscreen (with menu bar and close buttons).
|
slot |
Shows the window minimized, as an icon.
|
slot |
Shows the window normally.
void MLABWindowControl::startMouseMove | ( | ) |
Starts the mouse move manually.
void MLABWindowControl::stopMouseMove | ( | ) |
Stops the mouse move manually.
QString MLABWindowControl::title | ( | ) |
Returns the current title caption (for window lists, etc.).
|
slot |
Updates window size and position, guarantees that the layout is updated correctly.
minimum | resizes to minimum size, otherwise to size hint |
center | also centers the window |
This method updates the layout, processes the Qt events and then resizes the window. If center is set to true, the window is hidden, resized, centered, and shown again to avoid flickering.