VR-Forces 4.1 Class Documentation
List of all members | Public Member Functions | Protected Slots | Protected Member Functions | Protected Attributes
DtActionGroup Class Reference

This subclas of the Qt QActionGroup will try and replicate some of the old functionality for easier porting. More...

Inheritance diagram for DtActionGroup:
Inheritance graph
[legend]

Public Member Functions

 DtActionGroup (QMenu *parent)
virtual ~DtActionGroup ()
void setUsesDropDown (bool b)
bool usesDropDown () const
void setTitle (const QString &t)
const QString & title () const
void setTearOffEnabled (bool)
 Only valid if item uses a drop down menu.
QMenumenu ()
QMenumenuParent ()
QActionaddAction (QAction *action, QString addBefore="")
 These are overridden to call createMenu (and add to menu) if this item uses a dropdown.
QActionaddAction (const QString &text, QString addBefore="")
QActionaddAction (const QIcon &icon, const QString &text, QString addBefore="")
virtual QMenucreateMenu ()
 Creates a menu but does not add it to the parent menu immediately.
void addActions (const QList< QAction * > &)
 Calls addAction for each action in the list.
void removeAttachment ()
void linkTo (DtActionGroup *, int)
void attach ()
 Attaches these menu items to either the menu (main) or action group menu this is linked to.
QActionaction (int)
int numActions () const

Protected Slots

virtual void actionDestroyed ()

Protected Member Functions

virtual QActionaddActionInternal (QAction *, QString addBefore)
 Adds the action to the menu (if drop down) and removes from action group. Called from addAction commands.

Protected Attributes

QMenumyDropDownMenu
QMenumyMenuParent
bool myUsesDropDown
QString myTitle
DtActionGroupmyLinkTo
int myInsertAtIndex
QList< QAction * > myActions

Detailed Description

This subclas of the Qt QActionGroup will try and replicate some of the old functionality for easier porting.

Under the Qt4 architecture, there are no such things are drop drown menus for actions groups – they are all QMenus. If the usesDropDown flag is true, then, a QMenu will be created and added to the popup menu and the action items that are part of this action group added to that menu

Constructor & Destructor Documentation

DtActionGroup::DtActionGroup ( QMenu parent)
virtual DtActionGroup::~DtActionGroup ( )
virtual

Member Function Documentation

void DtActionGroup::setUsesDropDown ( bool  b)
inline
bool DtActionGroup::usesDropDown ( ) const
inline
void DtActionGroup::setTitle ( const QString &  t)
const QString& DtActionGroup::title ( ) const
inline
void DtActionGroup::setTearOffEnabled ( bool  )

Only valid if item uses a drop down menu.

QMenu* DtActionGroup::menu ( )
QMenu* DtActionGroup::menuParent ( )
QAction* DtActionGroup::addAction ( QAction action,
QString  addBefore = "" 
)

These are overridden to call createMenu (and add to menu) if this item uses a dropdown.

Note that since the parent class does not have these methods as virtual, if they are called as part of the base class, this will not work

QAction* DtActionGroup::addAction ( const QString &  text,
QString  addBefore = "" 
)
QAction* DtActionGroup::addAction ( const QIcon &  icon,
const QString &  text,
QString  addBefore = "" 
)
virtual QMenu* DtActionGroup::createMenu ( )
virtual

Creates a menu but does not add it to the parent menu immediately.

void DtActionGroup::addActions ( const QList< QAction * > &  )

Calls addAction for each action in the list.

void DtActionGroup::removeAttachment ( )
void DtActionGroup::linkTo ( DtActionGroup ,
int   
)
void DtActionGroup::attach ( )

Attaches these menu items to either the menu (main) or action group menu this is linked to.

QAction* DtActionGroup::action ( int  )
int DtActionGroup::numActions ( ) const
virtual void DtActionGroup::actionDestroyed ( )
protectedvirtualslot
virtual QAction* DtActionGroup::addActionInternal ( QAction ,
QString  addBefore 
)
protectedvirtual

Adds the action to the menu (if drop down) and removes from action group. Called from addAction commands.

Member Data Documentation

QMenu* DtActionGroup::myDropDownMenu
protected
QMenu* DtActionGroup::myMenuParent
protected
bool DtActionGroup::myUsesDropDown
protected
QString DtActionGroup::myTitle
protected
DtActionGroup* DtActionGroup::myLinkTo
protected
int DtActionGroup::myInsertAtIndex
protected
QList<QAction*> DtActionGroup::myActions
protected

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

Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)