VR-Forces Developer's Guide
 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(). 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

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

Public Member Functions

 DtSimpleMenuItem (makVrv::DtDe &de, std::string menuItemId, std::string menuItemText)
 
virtual ~DtSimpleMenuItem () override
 
virtual std::string menuItemText ()
 
virtual QActioncreateAction (makVrv::DtDe &, QWidget *parent) override
 
virtual void setAction (DtSimpleMenuItemAction *actionFunction, void *usr)
 
- Public Member Functions inherited from makVrv::DtMenuItem
 DtMenuItem (const std::string &menuItemIdName)
 
virtual ~DtMenuItem ()
 
virtual const std::string & menuItemIdName () const
 

Protected Member Functions

virtual void on_triggered () override
 

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

Constructor & Destructor Documentation

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

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 
)
inlineoverridevirtual

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.

virtual void makVrf::DtSimpleMenuItem::on_triggered ( )
inlineoverrideprotectedvirtual

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 Oct 23 22:29:17 EDT 2025 from SVN revision 280951
Copyright © 2005-2024 MAK Technologies. All Rights Reserved (www.mak.com)