| Home · All Classes · Main Classes · Grouped Classes · Modules · Functions |
The QMdiSubWindow class provides a subwindow class for QWorkspace. More...
#include <QMdiSubWindow>
Inherits QWidget.
This class was introduced in Qt 4.3.
The QMdiSubWindow class provides a subwindow class for QWorkspace.
It represents the toplevel window in a QWorkspace, and consists of a titlebar with window decorations, an internal widget, and depending on the current style, a window frame.
QMdiSubWindow shares many properties with regular (top-level) windows, but it is designed to work optimally as a subwindow of QWorkspace.
The most common way to construct a QMdiSubWindow is to call QWorkspace::addSubWindow(), but you can also construct one manually, and assign an internal widget by calling setWidget().
By default, QMdiSubWindow keeps itself visible inside the workspace viewport when it is moved around. You can customize this behavior by calling setOption(). You can also set options that enable opaque (rubberband) resize and move.
You can call isShaded() to detect whether the subwindow is currently shaded. To enter shaded mode, call showShaded(). QMdiSubWindow emits the windowStateChanged() signal whenever the window state has changed (i.e., when the window becomes minimized, or is restored). It also emits aboutToActivate() before it is activated.
See also QWorkspace.
This enum describes options that you can toggle to customize the behavior of QMdiSubWindow.
| Constant | Value | Description |
|---|---|---|
| QMdiSubWindow::AllowOutsideArea | 0x1 | If you enable this option, QWorkspace will allow this window to move outside the workspace area. This option is disabled by default. |
| QMdiSubWindow::TransparentResize | 0x2 | If you enable this option, QMdiSubWindow will show a rubberband control while resizing, leaving the widget unchanged until the resize operation has completed. In contrast, when this option is disabled, the subwindow will continuously resize as you move the mouse or use the keyboard. By default, this option is disabled. |
| QMdiSubWindow::TransparentMove | 0x4 | If you enable this option, QMdiSubWindow will show a rubberband control while moving, leaving the widget unchanged until the move operation has completed. In contrast, when this option is disabled, the subwindow will continuously move as you move the mouse or use the keyboard. By default, this option is disabled. |
The SubWindowOptions type is a typedef for QFlags<SubWindowOption>. It stores an OR combination of SubWindowOption values.
This property holds sets how far a widget should move or resize when using the keyboard page keys.
When in keyboard-interactive mode, you can use the arrow and page keys to either move or resize the window. This property controls the page keys. The common way to enter keyboard interactive mode is to enter the subwindow menu, and select either "resize" or "move".
The default keyboard page step value is 20 pixels.
Access functions:
See also keyboardSingleStep.
This property holds sets how far a widget should move or resize when using the keyboard arrow keys.
When in keyboard-interactive mode, you can use the arrow and page keys to either move or resize the window. This property controls the arrow keys. The common way to enter keyboard interactive mode is to enter the subwindow menu, and select either "resize" or "move".
The default keyboard single step value is 5 pixels.
Access functions:
See also keyboardPageStep.
Constructs a new QMdiSubWindow widget. The parent and flags arguments are passed to QWidget's constructor.
See also QWorkspace::addSubWindow().
Destructs the subwindow.
See also QWorkspace::removeSubWindow().
QMdiSubWindow emits this signal immediately before it is activated.
Returns the size of the titlebar icon. This size depends on the height of the title bar, and is controlled by the current style.
See also QIcon and QStyle::styleHint().
Returns true if this window is shaded; otherwise returns false.
A window is shaded if it is collapsed so that only the title bar is visible.
If on is true, option is enabled on the subwindow. Otherwise, it is disabled. See SubWindowOption for the effect of each option.
See also SubWindowOption and testOption().
Sets systemMenu as the current system menu for this subwindow.
QMdiSubWindow creates a system menu by default.
QActions for the system menu created by QMdiSubWindow will automatically be updated depending on the current window state, e.g. will the minimize action be disabled after the window is minimized.
QActions added by the user are not updated by QMdiSubWindow.
QMdiSubWindow takes ownership of systemMenu; you do not have to delete it. Any existing menus will be deleted.
See also systemMenu and showSystemMenu.
Sets widget as the internal widget of this subwindow. The widget will be added to the subwindow's base layout.
QMdiSubWindow takes temporary ownership of widget; you do not have to delete it. Any existing internal widget will be removed and reparented to the root window.
See also widget().
Shows the system menu below the system menu icon in the title bar.
See also setSystemMenu and systemMenu.
Returns a pointer to the current system menu or zero if not set.
See also setSystemMenu and showSystemMenu.
Returns true if option is enabled; otherwise returns false.
See also SubWindowOption and setOption().
Returns a pointer to the current internal widget.
See also setWidget().
QMdiSubWindow emits this signal after the window state changed. oldState is the window state before it changed, and newState is the new, current state.
| Copyright © 2007 Trolltech | Trademarks | Qt 4.3.0-snapshot-20070202 |