MainWindowBase subclass that manages an embedded QMdiArea.
More...
#include <mdiwindow.h>
|
| | MdiWindow (const QString &logPrefix, QWidget *parent=nullptr) |
| | Construct with a log prefix and optional parent.
|
| |
Public Member Functions inherited from MainWindowBase |
| | MainWindowBase (const QString &loggingCategory, QWidget *parent=nullptr) |
| | Construct with a logging category and optional parent.
|
| |
| bool | persistPosition () const |
| | Return whether the window persists its position between sessions.
|
| |
| void | setPersistPosition (bool value) |
| | Enable or disable position persistence.
|
| |
| bool | persistSize () const |
| | Return whether the window persists its size between sessions.
|
| |
| void | setPersistSize (bool value) |
| | Enable or disable size persistence.
|
| |
| int | type () const |
| | Return the application-defined window type integer.
|
| |
| void | setType (int value) |
| | Set the application-defined window type integer.
|
| |
| QSize | defaultSize () const |
| | Return the default window size.
|
| |
| void | setDefaultSize (const QSize &value) |
| | Set the default window size.
|
| |
| void | setDefaultSize (int width, int height) |
| | Set the default window size by width and height.
|
| |
| QMdiArea * | parentMdiArea () |
| | Return the parent QMdiArea if this window is hosted in one.
|
| |
| StatusBar * | statusBar () |
| | Return the built-in StatusBar widget.
|
| |
| bool | formLoadComplete () const |
| | Return whether the form has finished loading.
|
| |
| bool | formLoadFailed () const |
| | Return whether the form failed to load.
|
| |
|
Public Slots inherited from MainWindowBase |
| void | showStatusBarMessage (const QString &text, const QColor &textColor, const TimeSpan &timeout=TimeSpan()) |
| | Show a coloured status message with an optional timeout.
|
| |
| void | showStatusBarMessage (const QString &text, const TimeSpan &timeout=TimeSpan()) |
| | Show a default-coloured status message with an optional timeout.
|
| |
| void | showStatusBarAnimatedProgressMessage (const QString &text, const QColor &textColor=QColor()) |
| | Show an animated progress message in the status bar.
|
| |
|
void | stopStatusBarAnimation () |
| | Stop any active status bar animation.
|
| |
|
virtual void | onPreferencesChanged () |
| | Called when application preferences change; override to react.
|
| |
MainWindowBase subclass that manages an embedded QMdiArea.
MdiWindow provides helpers for opening, closing, and finding MdiSubWindow instances by type, and receives a subWindowClosing() callback when any sub-window signals that it is about to close.
Definition at line 16 of file mdiwindow.h.
◆ MdiWindow()
| MdiWindow::MdiWindow |
( |
const QString & |
logPrefix, |
|
|
QWidget * |
parent = nullptr |
|
) |
| |
Construct with a log prefix and optional parent.
- Parameters
-
| logPrefix | Category name used for log output |
| parent | Optional QWidget parent |
◆ activeSubWindow()
Return the currently active sub-window's MainWindowBase.
- Returns
- Pointer to the active sub-window's base, or nullptr
◆ closeSubWindows()
| virtual void MdiWindow::closeSubWindows |
( |
int |
type | ) |
|
|
protectedvirtual |
Close all open sub-windows of the given type.
- Parameters
-
| type | Application-defined sub-window type integer |
◆ findFirstMdiSubWindow()
| MdiSubWindow * MdiWindow::findFirstMdiSubWindow |
( |
int |
type | ) |
const |
|
protected |
Return the first open sub-window of the given type.
- Parameters
-
| type | Application-defined sub-window type integer |
- Returns
- Pointer to the first matching MdiSubWindow, or nullptr
◆ findMdiSubWindows()
| QList< MdiSubWindow * > MdiWindow::findMdiSubWindows |
( |
int |
type | ) |
const |
|
protected |
Return all open sub-windows of the given type.
- Parameters
-
| type | Application-defined sub-window type integer |
- Returns
- List of matching MdiSubWindow pointers
◆ mdiArea()
| QMdiArea * MdiWindow::mdiArea |
( |
| ) |
|
|
protected |
Return the embedded QMdiArea.
- Returns
- Pointer to the QMdiArea
◆ openSubWindow()
◆ subWindowClosing()
| virtual void MdiWindow::subWindowClosing |
( |
MdiSubWindow * |
window | ) |
|
|
inlineprotectedvirtual |
Called just before a sub-window closes (no-op by default).
- Parameters
-
| window | The sub-window that is closing |
Definition at line 72 of file mdiwindow.h.
The documentation for this class was generated from the following file: