Version: 8.3.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
QtxDockAction Class Reference

Dockable windows & toolbars list action. More...

#include <QtxDockAction.h>

Inheritance diagram for QtxDockAction:
Inheritance graph

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...
 
QMainWindowmainWindow () const
 Get parent main window. More...
 
- Public Member Functions inherited from QtxAction
 QtxAction (QObject *=0, bool=false, const QString &=QString())
 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
 Return shortcut action name for the action. More...
 
void setShortcutActionName (const QString &)
 Set shortcut action name to the action. More...
 

Public Attributes

enum QtxDockAction:: { ... }  DockType
 

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...
 
QMainWindowmyMain
 parent main window More...
 

Detailed Description

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".

Member Enumeration Documentation

anonymous enum
Enumerator
ToolBar 

list toolbars only

DockWidget 

list dockable windows only

Both 

list toolbars and dockable windows

Constructor & Destructor Documentation

QtxDockAction::QtxDockAction ( QMainWindow mw)
Parameters
mwparent main window

References initialize().

QtxDockAction::QtxDockAction ( const QString &  text,
const QString &  menuText,
QMainWindow mw 
)
Parameters
textdescription (tooltip) text
menuTextmenu text
mwparent main window

References initialize().

QtxDockAction::QtxDockAction ( const QString &  text,
const QIcon &  icon,
const QString &  menuText,
QMainWindow mw 
)
Parameters
textdescription (tooltip) text
iconaction icon
menuTextmenu text
mwparent main window

References initialize().

QtxDockAction::~QtxDockAction ( )
virtual

Does nothing currently.

Member Function Documentation

void QtxDockAction::addedTo ( QWidget w)
protectedvirtual

Called when the action is added to the widget. Reimplemented from QtxAction class.

Parameters
wwidget this action is added to (menu or toolbar)

Reimplemented from QtxAction.

References onAboutToShow().

int QtxDockAction::dockType ( ) const
Returns
dock type (QtxDockAction::DockType)

References myType.

void QtxDockAction::dockWidgets ( QList< QDockWidget * > &  lst) const
private
Parameters
lstreturned list of all dockable windows owned by main window

References mainWindow().

void QtxDockAction::initialize ( )
private
QMainWindow * QtxDockAction::mainWindow ( ) const
Returns
main window pointer.

References myMain.

void QtxDockAction::onAboutToShow ( )
privateslot

References updateMenu().

void QtxDockAction::removedFrom ( QWidget w)
protectedvirtual

Called when the action is removed from the widget. Reimplemented from QtxAction class.

Parameters
wwidget this action is removed from to (menu or toolbar)

Reimplemented from QtxAction.

References onAboutToShow().

void QtxDockAction::setDockType ( const int  type)
Parameters
typedock type (QtxDockAction::DockType)

References myType.

void QtxDockAction::toolBars ( QList< QToolBar * > &  lst) const
private
Parameters
lstreturned list of all toolbars owned by main window

References mainWindow().

void QtxDockAction::update ( )

References updateMenu().

void QtxDockAction::updateMenu ( )
private

Member Data Documentation

enum { ... } QtxDockAction::DockType
QMainWindow* QtxDockAction::myMain
private
int QtxDockAction::myType
private

The documentation for this class was generated from the following files: