VR-Forces 4.0.4 Class Documentation
Public Member Functions | Protected Member Functions | Protected Attributes
makVrf::DtSimpleMenuItem Class Reference

/briefClass used by DtConfigurableMenu when asked to create simple menu items as in the function DtConfigurableMenu::createSimpleMenuItem(). More...

Inheritance diagram for makVrf::DtSimpleMenuItem:
Inheritance graph
[legend]

List of all members.

Public Member Functions

 DtSimpleMenuItem (makVrv::DtDe &de, std::string menuItemId, std::string menuItemText)
virtual ~DtSimpleMenuItem ()
virtual std::string menuItemText ()
 gets the display text of the menu item, not the menuId
virtual QActioncreateAction (makVrv::DtDe &, QWidget *parent)
 Build a menu item (via an action).
virtual void setAction (DtSimpleMenuItemAction *actionFunction, void *usr)
 Sets a function that gets called when this menu item is chosen.

Protected Member Functions

void on_triggered ()
 Invoke the menu action.

Protected Attributes

DtSimpleMenuItemActionmyActionFunction
void * myUser
std::string myMenuItemText
makVrv::DtDemyDe

Detailed Description

/briefClass used by DtConfigurableMenu when asked to create simple menu items as in the function DtConfigurableMenu::createSimpleMenuItem().

This class can be overridden to create even more extensively custom menu items, but one could also just override the makVrv::DtMenuItem as well. Menu item text is plainly passed in and the translation can be applied to it


Constructor & Destructor Documentation

makVrf::DtSimpleMenuItem::DtSimpleMenuItem ( makVrv::DtDe de,
std::string  menuItemId,
std::string  menuItemText 
) [inline]
virtual makVrf::DtSimpleMenuItem::~DtSimpleMenuItem ( ) [inline, virtual]

Member Function Documentation

virtual std::string makVrf::DtSimpleMenuItem::menuItemText ( ) [inline, virtual]

gets the display text of the menu item, not the menuId

virtual QAction* makVrf::DtSimpleMenuItem::createAction ( makVrv::DtDe ,
QWidget parent 
) [inline, virtual]

Build a menu item (via an action).

Implements makVrv::DtMenuItem.

virtual void makVrf::DtSimpleMenuItem::setAction ( DtSimpleMenuItemAction actionFunction,
void *  usr 
) [inline, virtual]

Sets a function that gets called when this menu item is chosen.

This function is stored and associated with this menu item. You can also pass in an object pointer in case the function requires more than just the makVrv::DtDe it will give the user. If usr is not set, the argument will be null. No function is set, this menu item will simply do nothing.

void makVrf::DtSimpleMenuItem::on_triggered ( ) [inline, protected, virtual]

Invoke the menu action.

Reimplemented from makVrv::DtMenuItem.


Member Data Documentation


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)