QtBase
v6.3.1
|
The QMdiSubWindow class provides a subwindow class for QMdiArea. More...
#include <qmdisubwindow.h>
Public Types | |
enum | SubWindowOption { AllowOutsideAreaHorizontally = 0x1 , AllowOutsideAreaVertically = 0x2 , RubberBandResize = 0x4 , RubberBandMove = 0x8 } |
Public Types inherited from QWidget | |
enum | RenderFlag { DrawWindowBackground = 0x1 , DrawChildren = 0x2 , IgnoreMask = 0x4 } |
Public Types inherited from QPaintDevice | |
enum | PaintDeviceMetric { PdmWidth = 1 , PdmHeight , PdmWidthMM , PdmHeightMM , PdmNumColors , PdmDepth , PdmDpiX , PdmDpiY , PdmPhysicalDpiX , PdmPhysicalDpiY , PdmDevicePixelRatio , PdmDevicePixelRatioScaled } |
Public Slots | |
void | showShaded () |
Public Slots inherited from QWidget | |
void | setEnabled (bool) |
void | setDisabled (bool) |
void | setWindowModified (bool) |
void | setWindowTitle (const QString &) |
void | setStyleSheet (const QString &styleSheet) |
void | setFocus () |
void | update () |
void | repaint () |
virtual void | setVisible (bool visible) |
void | setHidden (bool hidden) |
void | show () |
void | hide () |
void | showMinimized () |
void | showMaximized () |
void | showFullScreen () |
void | showNormal () |
bool | close () |
void | raise () |
void | lower () |
Public Slots inherited from QObject | |
void | deleteLater () |
Signals | |
void | windowStateChanged (Qt::WindowStates oldState, Qt::WindowStates newState) |
void | aboutToActivate () |
Signals inherited from QWidget | |
void | windowTitleChanged (const QString &title) |
void | windowIconChanged (const QIcon &icon) |
void | windowIconTextChanged (const QString &iconText) |
void | customContextMenuRequested (const QPoint &pos) |
Signals inherited from QObject | |
void | destroyed (QObject *=nullptr) |
void | objectNameChanged (const QString &objectName, QPrivateSignal) |
Properties | |
int | keyboardSingleStep |
sets how far a widget should move or resize when using the keyboard arrow keys. More... | |
int | keyboardPageStep |
sets how far a widget should move or resize when using the keyboard page keys. More... | |
Properties inherited from QWidget | |
bool | modal |
whether the widget is a modal widget More... | |
Qt::WindowModality | windowModality |
which windows are blocked by the modal widget More... | |
bool | enabled |
whether the widget is enabled More... | |
QRect | geometry |
the geometry of the widget relative to its parent and excluding the window frame More... | |
QRect | frameGeometry |
geometry of the widget relative to its parent including any window frame More... | |
QRect | normalGeometry |
the geometry of the widget as it will appear when shown as a normal (not maximized or full screen) top-level widget More... | |
int | x |
the x coordinate of the widget relative to its parent including any window frame More... | |
int | y |
the y coordinate of the widget relative to its parent and including any window frame More... | |
QPoint | pos |
the position of the widget within its parent widget More... | |
QSize | frameSize |
the size of the widget including any window frame More... | |
QSize | size |
the size of the widget excluding any window frame More... | |
int | width |
the width of the widget excluding any window frame More... | |
int | height |
the height of the widget excluding any window frame More... | |
QRect | rect |
the internal geometry of the widget excluding any window frame More... | |
QRect | childrenRect |
the bounding rectangle of the widget's children More... | |
QRegion | childrenRegion |
the combined region occupied by the widget's children More... | |
QSizePolicy | sizePolicy |
the default layout behavior of the widget More... | |
QSize | minimumSize |
the widget's minimum size More... | |
QSize | maximumSize |
the widget's maximum size in pixels More... | |
int | minimumWidth |
the widget's minimum width in pixels More... | |
int | minimumHeight |
the widget's minimum height in pixels More... | |
int | maximumWidth |
the widget's maximum width in pixels More... | |
int | maximumHeight |
the widget's maximum height in pixels More... | |
QSize | sizeIncrement |
the size increment of the widget More... | |
QSize | baseSize |
the base size of the widget More... | |
QPalette | palette |
the widget's palette More... | |
QFont | font |
the font currently set for the widget More... | |
QCursor | cursor |
the cursor shape for this widget More... | |
bool | mouseTracking |
whether mouse tracking is enabled for the widget More... | |
bool | tabletTracking |
whether tablet tracking is enabled for the widget More... | |
bool | isActiveWindow |
whether this widget's window is the active window More... | |
Qt::FocusPolicy | focusPolicy |
the way the widget accepts keyboard focus More... | |
bool | focus |
whether this widget (or its focus proxy) has the keyboard input focus More... | |
Qt::ContextMenuPolicy | contextMenuPolicy |
how the widget shows a context menu More... | |
bool | updatesEnabled |
whether updates are enabled More... | |
bool | visible |
whether the widget is visible More... | |
bool | minimized |
whether this widget is minimized (iconified) More... | |
bool | maximized |
whether this widget is maximized More... | |
bool | fullScreen |
whether the widget is shown in full screen mode More... | |
QSize | sizeHint |
the recommended size for the widget More... | |
QSize | minimumSizeHint |
the recommended minimum size for the widget More... | |
bool | acceptDrops |
whether drop events are enabled for this widget More... | |
QString | windowTitle |
the window title (caption) More... | |
QIcon | windowIcon |
the widget's icon More... | |
QString | windowIconText |
the text to be displayed on the icon of a minimized window More... | |
double | windowOpacity |
The level of opacity for the window. More... | |
bool | windowModified |
whether the document shown in the window has unsaved changes More... | |
QString | accessibleName |
the widget's name as seen by assistive technologies More... | |
QString | accessibleDescription |
the widget's description as seen by assistive technologies More... | |
Qt::LayoutDirection | layoutDirection |
the layout direction for this widget. More... | |
bool | autoFillBackground |
whether the widget background is filled automatically More... | |
QString | styleSheet |
the widget's style sheet More... | |
QLocale | locale |
the widget's locale More... | |
QString | windowFilePath |
the file path associated with a widget More... | |
Qt::InputMethodHints | inputMethodHints |
What input method specific hints the widget has. More... | |
Properties inherited from QObject | |
QString | objectName |
the name of this object More... | |
Friends | |
class | QMdi::ControlContainer |
The QMdiSubWindow class provides a subwindow class for QMdiArea.
\inmodule QtWidgets
QMdiSubWindow represents a top-level window in a QMdiArea, and consists of a title bar with window decorations, an internal widget, and (depending on the current style) a window frame and a size grip. QMdiSubWindow has its own layout, which consists of the title bar and a center area for the internal widget.
The most common way to construct a QMdiSubWindow is to call QMdiArea::addSubWindow() with the internal widget as the argument. You can also create a subwindow yourself, and set an internal widget by calling setWidget().
You use the same API when programming with subwindows as with regular top-level windows (e.g., you can call functions such as show(), hide(), showMaximized(), and setWindowTitle()).
Definition at line 55 of file qmdisubwindow.h.
This enum describes options that customize the behavior of QMdiSubWindow.
\omitvalue AllowOutsideAreaHorizontally \omitvalue AllowOutsideAreaVertically
\value RubberBandResize If you enable this option, a rubber band control is used to represent the subwindow's outline, and the user resizes this instead of the subwindow itself. As a result, the subwindow maintains its original position and size until the resize operation has been completed, at which time it will receive a single QResizeEvent. By default, this option is disabled.
\value RubberBandMove If you enable this option, a rubber band control is used to represent the subwindow's outline, and the user moves this instead of the subwindow itself. As a result, the subwindow remains in its original position until the move operation has completed, at which time a QMoveEvent is sent to the window. By default, this option is disabled.
Enumerator | |
---|---|
AllowOutsideAreaHorizontally | |
AllowOutsideAreaVertically | |
RubberBandResize | |
RubberBandMove |
Definition at line 61 of file qmdisubwindow.h.
QMdiSubWindow::QMdiSubWindow | ( | QWidget * | parent = nullptr , |
Qt::WindowFlags | flags = Qt::WindowFlags() |
||
) |
Constructs a new QMdiSubWindow widget. The parent and flags arguments are passed to QWidget's constructor.
Instead of using addSubWindow(), it is also simply possible to use setParent() when you add the subwindow to a QMdiArea.
Note that only \l{QMdiSubWindow}s can be set as children of QMdiArea; you cannot, for instance, write:
Definition at line 2244 of file qmdisubwindow.cpp.
QMdiSubWindow::~QMdiSubWindow | ( | ) |
Destroys the subwindow.
Definition at line 2279 of file qmdisubwindow.cpp.
|
signal |
QMdiSubWindow emits this signal immediately before it is activated. After the subwindow has been activated, the QMdiArea that manages the subwindow will also emit the \l{QMdiArea::}{subWindowActivated()} signal.
\reimp
Reimplemented from QWidget.
Definition at line 2968 of file qmdisubwindow.cpp.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
\reimp
Reimplemented from QWidget.
Definition at line 3024 of file qmdisubwindow.cpp.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
\reimp
Reimplemented from QWidget.
Definition at line 2786 of file qmdisubwindow.cpp.
\reimp
Reimplemented from QObject.
Definition at line 2677 of file qmdisubwindow.cpp.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
bool QMdiSubWindow::isShaded | ( | ) | const |
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.
Definition at line 2395 of file qmdisubwindow.cpp.
int QMdiSubWindow::keyboardPageStep | ( | ) | const |
Definition at line 2468 of file qmdisubwindow.cpp.
int QMdiSubWindow::keyboardSingleStep | ( | ) | const |
Definition at line 2441 of file qmdisubwindow.cpp.
\reimp
Reimplemented from QWidget.
Definition at line 3048 of file qmdisubwindow.cpp.
QWidget * QMdiSubWindow::maximizedButtonsWidget | ( | ) | const |
QWidget * QMdiSubWindow::maximizedSystemMenuIconWidget | ( | ) | const |
QMdiArea * QMdiSubWindow::mdiArea | ( | ) | const |
Returns the area containing this sub-window, or \nullptr if there is none.
Definition at line 2571 of file qmdisubwindow.cpp.
|
overridevirtual |
\reimp
Reimplemented from QWidget.
Definition at line 3502 of file qmdisubwindow.cpp.
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
|
overrideprotectedvirtual |
\reimp
Reimplemented from QWidget.
Definition at line 3108 of file qmdisubwindow.cpp.
|
overrideprotectedvirtual |
\reimp
Reimplemented from QWidget.
Definition at line 3123 of file qmdisubwindow.cpp.
|
overrideprotectedvirtual |
\reimp
Reimplemented from QWidget.
Definition at line 3063 of file qmdisubwindow.cpp.
void QMdiSubWindow::setKeyboardPageStep | ( | int | step | ) |
Definition at line 2473 of file qmdisubwindow.cpp.
void QMdiSubWindow::setKeyboardSingleStep | ( | int | step | ) |
Definition at line 2446 of file qmdisubwindow.cpp.
void QMdiSubWindow::setOption | ( | SubWindowOption | option, |
bool | on = true |
||
) |
If on is true, option is enabled on the subwindow; otherwise it is disabled. See SubWindowOption for the effect of each option.
Definition at line 2406 of file qmdisubwindow.cpp.
Sets widget as the internal widget of this subwindow. The internal widget is displayed in the center of the subwindow beneath the title bar.
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.
Definition at line 2299 of file qmdisubwindow.cpp.
|
overrideprotectedvirtual |
\reimp
Reimplemented from QWidget.
Definition at line 2920 of file qmdisubwindow.cpp.
|
slot |
Calling this function makes the subwindow enter the shaded mode. When the subwindow is shaded, only the title bar is visible.
Although shading is not supported by all styles, this function will still show the subwindow as shaded, regardless of whether support for shading is available. However, when used with styles without shading support, the user will be unable to return from shaded mode through the user interface (e.g., through a shade button in the title bar).
Definition at line 2597 of file qmdisubwindow.cpp.
|
overridevirtual |
bool QMdiSubWindow::testOption | ( | SubWindowOption | option | ) | const |
Returns true
if option is enabled; otherwise returns false
.
Definition at line 2422 of file qmdisubwindow.cpp.
|
overrideprotectedvirtual |
\reimp
Reimplemented from QObject.
Definition at line 3095 of file qmdisubwindow.cpp.
QWidget * QMdiSubWindow::widget | ( | ) | const |
Returns the current internal widget.
Definition at line 2357 of file qmdisubwindow.cpp.
|
signal |
QMdiSubWindow emits this signal after the window state changes. oldState is the window state before it changed, and newState is the new, current state.
|
friend |
Definition at line 143 of file qmdisubwindow.h.
|
readwrite |
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.
Definition at line 148 of file qmdisubwindow.h.
|
readwrite |
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.
Definition at line 148 of file qmdisubwindow.h.