VR-Forces 4.8 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | 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]

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 More...
 
virtual QActioncreateAction (makVrv::DtDe &, QWidget *parent)
 Build a menu item (via an action). More...
 
virtual void setAction (DtSimpleMenuItemAction *actionFunction, void *usr)
 Sets a function that gets called when this menu item is chosen. More...
 
- Public Member Functions inherited from makVrv::DtMenuItem
 DtMenuItem (const std::string &menuItemIdName)
 CTOR. More...
 
virtual ~DtMenuItem ()
 DTOR. More...
 
virtual const std::string & menuItemIdName () const
 Get the menu id name, the menu id name is not the same thing as the visible menu text. More...
 

Protected Member Functions

void on_triggered ()
 Invoke the menu action. More...
 

Protected Attributes

DtSimpleMenuItemActionmyActionFunction
 
void * myUser
 
std::string myMenuItemText
 
makVrv::DtDemyDe
 
- Protected Attributes inherited from makVrv::DtMenuItem
std::string myMenuIdName
 

Additional Inherited Members

- Protected Slots inherited from makVrv::DtMenuItem
virtual void on_checkStateChanged (bool)
 
virtual void on_aboutToShow ()
 

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 ( )
inlinevirtual

Member Function Documentation

virtual std::string makVrf::DtSimpleMenuItem::menuItemText ( )
inlinevirtual

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

virtual QAction* makVrf::DtSimpleMenuItem::createAction ( makVrv::DtDe ,
QWidget *  parent 
)
inlinevirtual

Build a menu item (via an action).

Implements makVrv::DtMenuItem.

virtual void makVrf::DtSimpleMenuItem::setAction ( DtSimpleMenuItemAction actionFunction,
void *  usr 
)
inlinevirtual

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 ( )
inlineprotectedvirtual

Invoke the menu action.

Reimplemented from makVrv::DtMenuItem.

Member Data Documentation

DtSimpleMenuItemAction* makVrf::DtSimpleMenuItem::myActionFunction
protected
void* makVrf::DtSimpleMenuItem::myUser
protected
std::string makVrf::DtSimpleMenuItem::myMenuItemText
protected
makVrv::DtDe& makVrf::DtSimpleMenuItem::myDe
protected

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

Document ID: Generated on Thu Aug 27 10:56:05 EDT 2020 from SVN revision 217100
Copyright © 2005-2020 MAK Technologies. All Rights Reserved (www.mak.com)