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. | |
| QtxDockAction (const QString &, const QString &, QMainWindow *) | |
| Constructor. | |
| QtxDockAction (const QString &, const QIcon &, const QString &, QMainWindow *) | |
| Constructor. | |
| virtual | ~QtxDockAction () |
| Desctructor. | |
| void | update () |
| Update associated menu. | |
| int | dockType () const |
| Get dock action type. | |
| void | setDockType (const int) |
| Set dock action type. | |
| QMainWindow * | mainWindow () const |
| Get parent main window. | |
| virtual bool | eventFilter (QObject *, QEvent *) |
| Customize action events. | |
| QString | shortcutActionName () const |
| Return shortcut action name for the action. | |
| void | setShortcutActionName (const QString &) |
| Set shortcut action name to the action. | |
Data Fields | |
| enum QtxDockAction:: { ... } | DockType |
Protected Member Functions | |
| virtual void | addedTo (QWidget *) |
| Customize action adding to the widget operation. | |
| virtual void | removedFrom (QWidget *) |
| Customize action removing from the widget operation. | |
| virtual void | customEvent (QEvent *) |
| Process notification events. | |
Private Slots | |
| void | onAboutToShow () |
| Prepare popup menu with dock windows list when parent popup menu is shown. | |
Private Member Functions | |
| void | initialize () |
| Initialize the action. | |
| void | updateMenu () |
| Update action child popup menu. | |
| void | toolBars (QList< QToolBar * > &) const |
| Get all toolbars owned by parent main window. | |
| void | dockWidgets (QList< QDockWidget * > &) const |
| Get all dockable windows owned by parent main window. | |
Private Attributes | |
| int | myType |
| dock action type | |
| QMainWindow * | myMain |
| parent main window | |
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 | ) |
| mw | parent main window |
References initialize().
| QtxDockAction::QtxDockAction | ( | const QString & | text, |
| const QString & | menuText, | ||
| QMainWindow * | mw | ||
| ) |
| 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 | ||
| ) |
| text | description (tooltip) text |
| icon | action icon |
| menuText | menu text |
| mw | parent main window |
References initialize().
| QtxDockAction::~QtxDockAction | ( | ) | [virtual] |
Does nothing currently.
| void QtxDockAction::update | ( | ) |
References updateMenu().
| int QtxDockAction::dockType | ( | ) | const |
References myType.
| void QtxDockAction::setDockType | ( | const int | type | ) |
| type | dock type (QtxDockAction.DockType) |
References myType.
| QMainWindow * QtxDockAction::mainWindow | ( | ) | const |
References myMain.
| void QtxDockAction::onAboutToShow | ( | ) | [private, slot] |
References updateMenu().
| void QtxDockAction::addedTo | ( | QWidget * | w | ) | [protected, virtual] |
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().
| void QtxDockAction::removedFrom | ( | QWidget * | w | ) | [protected, virtual] |
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::initialize | ( | ) | [private] |
| void QtxDockAction::updateMenu | ( | ) | [private] |
References Both, dockType(), DockWidget, dockWidgets(), Qtx.simplifySeparators(), ToolBar, and toolBars().
| lst | returned list of all toolbars owned by main window |
References mainWindow().
| void QtxDockAction::dockWidgets | ( | QList< QDockWidget * > & | lst | ) | const [private] |
| lst | returned list of all dockable windows owned by main window |
References mainWindow().
Sends a notification event to the action when it is added to the widget or removed from it in order to perform custom processing.
| o | object |
| e | event |
true if further event processing should be stopped | QString QtxAction::shortcutActionName | ( | ) | const [inherited] |
References QtxAction.myShortcutActionName.
| void QtxAction::setShortcutActionName | ( | const QString & | shortcutAction | ) | [inherited] |
Shortcut action name is used for shortcuts customization.
| shortcutAction | shortcut action name |
References QtxAction.myShortcutActionName.
| void QtxAction::customEvent | ( | QEvent * | e | ) | [protected, virtual, inherited] |
Calls addedTo() method when the action is added to the widget and removedFrom() when it is removed from the widget in order to perform custom processing.
| e | noification event |
References QtxAction.addedTo(), QtxAction.ActionNotify.isAdded(), QtxAction.removedFrom(), and QtxAction.ActionNotify.widget().
| enum { ... } QtxDockAction.DockType |
int QtxDockAction.myType [private] |
QMainWindow* QtxDockAction.myMain [private] |