Enhanced main window which supports dockable menubar and status bar plus geometry saving/restoring.
#include <QtxMainWindow.h>

Data Structures | |
| class | Filter |
| Internal object used to filter child removal events for specified widget from parent widget. More... | |
| class | Resizer |
| Internal object used to resize dock widgets. More... | |
Public Member Functions | |
| QtxMainWindow (QWidget *=0, Qt::WindowFlags=0) | |
| Constructor. | |
| virtual | ~QtxMainWindow () |
| Destructor. | |
| bool | isOpaqueResize () const |
| void | setOpaqueResize (bool) |
| bool | isDockableMenuBar () const |
| Check if the menu bar is dockable. | |
| void | setDockableMenuBar (const bool) |
| Set menu bar dockable/undockable. | |
| bool | isDockableStatusBar () const |
| Check if the status bar is dockable. | |
| void | setDockableStatusBar (const bool) |
| Set status bar dockable/undockable. | |
| QString | storeGeometry () const |
| Dump main window geometry to the string. | |
| void | retrieveGeometry (const QString &) |
| Restore main window geometry from the string. | |
Protected Member Functions | |
| virtual bool | event (QEvent *) |
Private Slots | |
| void | onDestroyed (QObject *) |
| Called when child object (menu bar, status bar) is destroyed. | |
Private Member Functions | |
| int | geometryValue (const QString &, int &, bool &) const |
| Retrieve numerical value from the string. | |
Private Attributes | |
| QToolBar * | myMenuBar |
| dockable menu bar | |
| QToolBar * | myStatusBar |
| dockable status bar | |
| bool | myOpaque |
| Resizer * | myResizer |
| QMouseEvent * | myMouseMove |
| QtxMainWindow::QtxMainWindow | ( | QWidget * | parent = 0, |
| Qt::WindowFlags | f = 0 |
||
| ) |
| parent | parent widget |
| f | widget flags (Qt.WindowFlags) |
| QtxMainWindow::~QtxMainWindow | ( | ) | [virtual] |
References setDockableMenuBar(), and setDockableStatusBar().
| bool QtxMainWindow::isOpaqueResize | ( | ) | const |
References myOpaque.
| void QtxMainWindow::setOpaqueResize | ( | bool | on | ) |
References myOpaque.
| bool QtxMainWindow::isDockableMenuBar | ( | ) | const |
true if dockable menu bar exists References myMenuBar.
| void QtxMainWindow::setDockableMenuBar | ( | const bool | on | ) |
| on | if true, make menu bar dockable, otherwise make menu bar undockable |
References isDockableMenuBar(), myMenuBar, and onDestroyed().
| bool QtxMainWindow::isDockableStatusBar | ( | ) | const |
true if dockable status bar exists References myStatusBar.
| void QtxMainWindow::setDockableStatusBar | ( | const bool | on | ) |
| on | if true, make status bar dockable, otherwise make status bar undockable |
References isDockableStatusBar(), myStatusBar, and onDestroyed().
| QString QtxMainWindow::storeGeometry | ( | ) | const |
| void QtxMainWindow::retrieveGeometry | ( | const QString & | str | ) |
| str | string represenation of the window geometry |
References geometryValue().
| bool QtxMainWindow::event | ( | QEvent * | e | ) | [protected, virtual] |
Reimplemented in SUIT_Desktop.
References Horizontal, isOpaqueResize(), myMouseMove, myResizer, QtxMainWindow.Resizer.setFinalEvent(), QtxMainWindow.Resizer.setPosition(), and Vertical.
| void QtxMainWindow::onDestroyed | ( | QObject * | obj | ) | [private, slot] |
Clears internal pointer to prevent crashes.
| obj | signal sender (object being destroyed) |
References myMenuBar, and myStatusBar.
| int QtxMainWindow::geometryValue | ( | const QString & | str, |
| int & | num, | ||
| bool & | percent | ||
| ) | const [private] |
Numerical value in the string have the structure [+|-]*[%], that is one or more digits which can start from "+" or "-" and can end with "%" symbol.
| str | string being converted |
| num | returning value (> 0) |
| percent | if string ends with "%" this parameter is equal to true after returning from the function |
QToolBar* QtxMainWindow.myMenuBar [private] |
QToolBar* QtxMainWindow.myStatusBar [private] |
bool QtxMainWindow.myOpaque [private] |
Resizer* QtxMainWindow.myResizer [private] |
QMouseEvent* QtxMainWindow.myMouseMove [private] |