SHAPER  9.12.0
PartSet_MenuMgr Class Reference

A class for management of module specific menu. More...

Inheritance diagram for PartSet_MenuMgr:
Inheritance graph

Public Slots

void onAction (bool isChecked)
 Processes the context menu action click. More...
 

Public Member Functions

 PartSet_MenuMgr (PartSet_Module *theModule)
 Constructor. More...
 
QAction * action (const QString &theId) const
 Returns action according to the given ID. More...
 
bool addViewerMenu (const QMap< QString, QAction * > &theStdActions, QWidget *theParent, QMap< int, QAction * > &theMenuActions) const
 Add menu items for viewer into the actions map. More...
 
void updateViewerMenu (const QMap< QString, QAction * > &theStdActions)
 Update state of pop-up menu items in viewer. More...
 
void activatePartSet () const
 Activates a PartSet document. More...
 
virtual void grantedOperationIds (ModuleBase_Operation *theOperation, QStringList &theIds) const
 Returns list of granted operation indices. More...
 
void activatePart (ResultPartPtr thePart) const
 Activates a Part document. More...
 

Protected Member Functions

virtual bool eventFilter (QObject *theObj, QEvent *theEvent)
 Redefinition of virtual method. More...
 

Detailed Description

A class for management of module specific menu.

Constructor & Destructor Documentation

◆ PartSet_MenuMgr()

PartSet_MenuMgr::PartSet_MenuMgr ( PartSet_Module theModule)

Constructor.

Parameters
theModulea parent module

Member Function Documentation

◆ action()

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

Returns action according to the given ID.

Parameters
theIdan action identifier, it should be uniqued in the bounds of the module

◆ addViewerMenu()

bool PartSet_MenuMgr::addViewerMenu ( const QMap< QString, QAction * > &  theStdActions,
QWidget theParent,
QMap< int, QAction * > &  theMenuActions 
) const

Add menu items for viewer into the actions map.

Parameters
theStdActionsa map of standard actions
theParenta parent widget for the
theMenuActionsmap of action/menu for the desirable index in the viewer menu
Returns
true if items are added and there is no necessity to provide standard menu

◆ updateViewerMenu()

void PartSet_MenuMgr::updateViewerMenu ( const QMap< QString, QAction * > &  theStdActions)

Update state of pop-up menu items in viewer.

Parameters
theStdActions- a map of standard actions

◆ activatePartSet()

void PartSet_MenuMgr::activatePartSet ( ) const

Activates a PartSet document.

◆ grantedOperationIds()

void PartSet_MenuMgr::grantedOperationIds ( ModuleBase_Operation theOperation,
QStringList &  theIds 
) const
virtual

Returns list of granted operation indices.

◆ activatePart()

void PartSet_MenuMgr::activatePart ( ResultPartPtr  thePart) const

Activates a Part document.

◆ onAction

void PartSet_MenuMgr::onAction ( bool  isChecked)
slot

Processes the context menu action click.

Parameters
isCheckeda state of toggle if the action is checkable

◆ eventFilter()

bool PartSet_MenuMgr::eventFilter ( QObject theObj,
QEvent theEvent 
)
protectedvirtual

Redefinition of virtual method.

Parameters
theObjan object
theEventan event