Dockable windows & toolbars list action. More...
#include <QtxDockAction.h>

Public Types | |
| enum | { ToolBar , DockWidget , Both } |
| Dock windows type. More... | |
Public Member Functions | |
| QtxDockAction (QMainWindow *) | |
| Constructor. More... | |
| QtxDockAction (const QString &, const QString &, QMainWindow *) | |
| Constructor. More... | |
| QtxDockAction (const QString &, const QIcon &, const QString &, QMainWindow *) | |
| Constructor. More... | |
| virtual | ~QtxDockAction () |
| Desctructor. More... | |
| void | update () |
| Update associated menu. More... | |
| int | dockType () const |
| Get dock action type. More... | |
| void | setDockType (const int) |
| Set dock action type. More... | |
| QMainWindow * | mainWindow () const |
| Get parent main window. More... | |
Public Member Functions inherited from QtxAction | |
| QtxAction (QObject *=0, bool=false, const QString &=QString()) | |
| Constructor. More... | |
| QtxAction (QObject *, bool, const QString &, const QString &, const QString &=QString(), const QIcon &=QIcon()) | |
| Constructor. More... | |
| QtxAction (const QString &, const QString &, int, QObject *, bool=false, const QString &=QString()) | |
| Constructor. More... | |
| QtxAction (const QString &, const QString &, const QKeySequence &, QObject *, bool=false, const QString &=QString()) | |
| Constructor. More... | |
| QtxAction (const QString &, const QIcon &, const QString &, int, QObject *, bool=false, const QString &=QString()) | |
| Constructor. More... | |
| QtxAction (const QString &, const QIcon &, const QString &, const QKeySequence &, QObject *, bool=false, const QString &=QString()) | |
| Constructor. More... | |
| virtual | ~QtxAction () |
| Destructor. More... | |
| virtual bool | eventFilter (QObject *, QEvent *) |
| Customize action events. More... | |
| QString | shortcutActionName () const |
| void | setShortcutActionName (const QString &) |
| const QString & | ID () const |
| Unique for the entire application ID. More... | |
| void | setID (const QString &theID) |
Public Attributes | |
| enum QtxDockAction:: { ... } | DockType |
| Dock windows type. More... | |
Protected Member Functions | |
| virtual void | addedTo (QWidget *) |
| Customize action adding to the widget operation. More... | |
| virtual void | removedFrom (QWidget *) |
| Customize action removing from the widget operation. More... | |
Protected Member Functions inherited from QtxAction | |
| virtual void | customEvent (QEvent *) |
| Process notification events. More... | |
Private Slots | |
| void | onAboutToShow () |
| Prepare popup menu with dock windows list when parent popup menu is shown. More... | |
Private Member Functions | |
| void | initialize () |
| Initialize the action. More... | |
| void | updateMenu () |
| Update action child popup menu. More... | |
| void | toolBars (QList< QToolBar * > &) const |
| Get all toolbars owned by parent main window. More... | |
| void | dockWidgets (QList< QDockWidget * > &) const |
| Get all dockable windows owned by parent main window. More... | |
Private Attributes | |
| int | myType |
| dock action type More... | |
| QMainWindow * | myMain |
| parent main window More... | |
Dockable windows & toolbars list action.
Implements the action which provides the popup menu with the list of toolbars and/or dockable windows list owned by the main window. This action can be used, for example, in the menu "Windows".
| anonymous enum |
| QtxDockAction::QtxDockAction | ( | QMainWindow * | mw | ) |
| QtxDockAction::QtxDockAction | ( | const QString & | text, |
| const QString & | menuText, | ||
| QMainWindow * | mw | ||
| ) |
Constructor.
| text | description (tooltip) text |
| menuText | menu text |
| mw | parent main window |
References initialize().
| QtxDockAction::QtxDockAction | ( | const QString & | text, |
| const QIcon & | icon, | ||
| const QString & | menuText, | ||
| QMainWindow * | mw | ||
| ) |
Constructor.
| text | description (tooltip) text |
| icon | action icon |
| menuText | menu text |
| mw | parent main window |
References initialize().
|
virtual |
Desctructor.
Does nothing currently.
|
protectedvirtual |
Customize action adding to the widget operation.
Called when the action is added to the widget. Reimplemented from QtxAction class.
| w | widget this action is added to (menu or toolbar) |
Reimplemented from QtxAction.
References onAboutToShow().
| int QtxDockAction::dockType | ( | ) | const |
|
private |
Get all dockable windows owned by parent main window.
| lst | returned list of all dockable windows owned by main window |
References mainWindow().
|
private |
Initialize the action.
| QMainWindow * QtxDockAction::mainWindow | ( | ) | const |
|
privateslot |
Prepare popup menu with dock windows list when parent popup menu is shown.
References updateMenu().
|
protectedvirtual |
Customize action removing from the widget operation.
Called when the action is removed from the widget. Reimplemented from QtxAction class.
| w | widget this action is removed from to (menu or toolbar) |
Reimplemented from QtxAction.
References onAboutToShow().
| void QtxDockAction::setDockType | ( | const int | type | ) |
Get all toolbars owned by parent main window.
| lst | returned list of all toolbars owned by main window |
References mainWindow().
| void QtxDockAction::update | ( | ) |
Update associated menu.
References updateMenu().
|
private |
Update action child popup menu.
References Both, dockType(), DockWidget, dockWidgets(), Qtx::simplifySeparators(), ToolBar, and toolBars().
| enum { ... } QtxDockAction::DockType |
Dock windows type.
|
private |
parent main window
|
private |
dock action type