![]() |
VR-Forces 4.0.4 Class Documentation
|
This subclas of the Qt QActionGroup will try and replicate some of the old functionality for easier porting. More...

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. | |
| QMenu * | menu () |
| QMenu * | menuParent () |
| QAction * | addAction (QAction *action, QString addBefore="") |
| These are overridden to call createMenu (and add to menu) if this item uses a dropdown. | |
| QAction * | addAction (const QString &text, QString addBefore="") |
| QAction * | addAction (const QIcon &icon, const QString &text, QString addBefore="") |
| virtual QMenu * | createMenu () |
| 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. | |
| QAction * | action (int) |
| int | numActions () const |
Protected Slots | |
| virtual void | actionDestroyed () |
Protected Member Functions | |
| virtual QAction * | addActionInternal (QAction *, QString addBefore) |
| Adds the action to the menu (if drop down) and removes from action group. Called from addAction commands. | |
Protected Attributes | |
| QMenu * | myDropDownMenu |
| QMenu * | myMenuParent |
| bool | myUsesDropDown |
| QString | myTitle |
| DtActionGroup * | myLinkTo |
| int | myInsertAtIndex |
| QList< QAction * > | myActions |
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
| DtActionGroup::DtActionGroup | ( | QMenu * | parent | ) |
| virtual DtActionGroup::~DtActionGroup | ( | ) | [virtual] |
| 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 | ( | ) |
| 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 | ( | ) | [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.
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] |