SHAPER  9.12.0
XGUI_ContextMenuMgr Class Reference

A class wihich provides managent of context menu. More...

Inheritance diagram for XGUI_ContextMenuMgr:
Inheritance graph

Signals

void actionTriggered (const QString &theId, bool isChecked)
 Signal aabout triggered action. More...
 
void beforeContextMenu ()
 A signal which is sent before context menu show. More...
 
void afterContextMenu ()
 A signal which is sent after context menu show. More...
 

Public Member Functions

 XGUI_ContextMenuMgr (XGUI_Workshop *theParent)
 Constructor. More...
 
void createActions ()
 Create all actions for context menus. It is called on creation of application. More...
 
QAction * action (const QString &theId) const
 Returns action according to the given ID. More...
 
QAction * actionByName (const QString &theName) const
 Returns action object by its Id (name) More...
 
QStringList actionIds () const
 Returns list of registered actions Ids. More...
 
void updateCommandsStatus ()
 update state of internal commands More...
 
void connectObjectBrowser ()
 Connect to object browser from workshop. Has to called at creation of viewer. More...
 
void connectViewer ()
 Connect to viewer from workshop. Has to called at creation of viewer. More...
 
void addObjBrowserMenu (QMenu *) const
 Add menu items for Object browser pop-up. More...
 
void addViewerMenu (QMenu *) const
 Add menu items for Viewer pop-up. More...
 
QStringList actionObjectGroups (const QString &theName)
 Returns a list of object group names of the action. More...
 
void updateObjectBrowserMenu ()
 Updates menu for object browser. More...
 
void updateViewerMenu ()
 Updates menu for viewer. More...
 

Detailed Description

A class wihich provides managent of context menu.

Constructor & Destructor Documentation

◆ XGUI_ContextMenuMgr()

XGUI_ContextMenuMgr::XGUI_ContextMenuMgr ( XGUI_Workshop theParent)

Constructor.

Parameters
theParenta parent object

Member Function Documentation

◆ createActions()

void XGUI_ContextMenuMgr::createActions ( )

Create all actions for context menus. It is called on creation of application.

◆ action()

QAction * XGUI_ContextMenuMgr::action ( const QString &  theId) const

Returns action according to the given ID.

Parameters
theIdan id of an action

◆ actionByName()

QAction * XGUI_ContextMenuMgr::actionByName ( const QString &  theName) const

Returns action object by its Id (name)

Parameters
theNameis an Id of the action

◆ actionIds()

QStringList XGUI_ContextMenuMgr::actionIds ( ) const

Returns list of registered actions Ids.

◆ updateCommandsStatus()

void XGUI_ContextMenuMgr::updateCommandsStatus ( )

update state of internal commands

◆ connectObjectBrowser()

void XGUI_ContextMenuMgr::connectObjectBrowser ( )

Connect to object browser from workshop. Has to called at creation of viewer.

◆ connectViewer()

void XGUI_ContextMenuMgr::connectViewer ( )

Connect to viewer from workshop. Has to called at creation of viewer.

◆ addObjBrowserMenu()

void XGUI_ContextMenuMgr::addObjBrowserMenu ( QMenu theMenu) const

Add menu items for Object browser pop-up.

◆ addViewerMenu()

void XGUI_ContextMenuMgr::addViewerMenu ( QMenu theMenu) const

Add menu items for Viewer pop-up.

◆ actionObjectGroups()

QStringList XGUI_ContextMenuMgr::actionObjectGroups ( const QString &  theName)

Returns a list of object group names of the action.

Parameters
theNamea name of the action
Returns
a list of group names

◆ updateObjectBrowserMenu()

void XGUI_ContextMenuMgr::updateObjectBrowserMenu ( )

Updates menu for object browser.

◆ updateViewerMenu()

void XGUI_ContextMenuMgr::updateViewerMenu ( )

Updates menu for viewer.

◆ actionTriggered

void XGUI_ContextMenuMgr::actionTriggered ( const QString &  theId,
bool  isChecked 
)
signal

Signal aabout triggered action.

Parameters
theIdan id of triggered action
isCheckedis checked flag

◆ beforeContextMenu

void XGUI_ContextMenuMgr::beforeContextMenu ( )
signal

A signal which is sent before context menu show.

◆ afterContextMenu

void XGUI_ContextMenuMgr::afterContextMenu ( )
signal

A signal which is sent after context menu show.