VR-Forces 4.0.4 Class Documentation
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]

List of all members.

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

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]

Only valid if item uses a drop down menu.

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::linkTo ( DtActionGroup ,
int   
)

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

virtual void DtActionGroup::actionDestroyed ( ) [protected, virtual, slot]
virtual QAction* DtActionGroup::addActionInternal ( QAction ,
QString  addBefore 
) [protected, virtual]

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


Member Data Documentation

QString DtActionGroup::myTitle [protected]

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

Document ID: Generated on Fri Jun 29 16:33:32 EDT 2012 from SVN revision 116588
Copyright © 2005-2012 VT MÄK Inc. All Rights Reserved (www.mak.com)