SHAPER
9.12.0
|
A class for management of menu actions (features). More...
Public Member Functions | |
XGUI_MenuMgr (XGUI_Workshop *theWorkshop) | |
Constructor. More... | |
void | createFeatureActions () |
Creates feature actions. More... | |
virtual void | processEvent (const std::shared_ptr< Events_Message > &theMessage) |
Redefinition of Events_Listener method. More... | |
virtual EVENTS_EXPORT bool | groupMessages () |
Listener that needs mostly grouped messages received returns true in this method. More... | |
Protected Member Functions | |
void | addFeature (const std::shared_ptr< Config_FeatureMessage > &theMessage) |
Process event "Add a feature". More... | |
std::shared_ptr< XGUI_MenuWorkbench > | findWorkbench (const std::string &theWorkbenchName) |
Finds or creates a workbench for the given name. More... | |
QAction * | buildAction (const std::shared_ptr< Config_FeatureMessage > &theMessage, const std::string &theWchName, const bool aUseSeparator) const |
Creates a new action by the message. More... | |
void | groupWhileFlush (const std::shared_ptr< Events_Message > &theMessage) |
Allows to group messages while they are flushed (for flush for groupMessages=true listeners) More... | |
EVENTS_EXPORT void | flushGrouped (const Events_ID &theID) |
Sends myGroups on flush finish. More... | |
A class for management of menu actions (features).
The actions should be arranged like they are in XML file. It listens the read feature of XML and fills internal structure of menu workbenches and groups of feature. After, it creates menues and tools in the module.
XGUI_MenuMgr::XGUI_MenuMgr | ( | XGUI_Workshop * | theWorkshop | ) |
Constructor.
theWorkshop | the current workshop |
void XGUI_MenuMgr::createFeatureActions | ( | ) |
Creates feature actions.
|
virtual |
|
protected |
Process event "Add a feature".
|
protected |
Finds or creates a workbench for the given name.
theWorkbenchName | a name defined in XML |
|
protected |
Creates a new action by the message.
theMessage | an XML information of the feature |
theWchName | a workbench name, will be used as menu/tool bar name |
aUseSeparator | boolean value if a separator should be added after the action |
|
inlinevirtualinherited |
Listener that needs mostly grouped messages received returns true in this method.
In this case during the message is flushed, all the new messages are grouped, not sended immideately and then sent in the end of flush.
Reimplemented in SketchSolver_Manager, and SketchPlugin_OverConstraintsResolver.
|
protectedinherited |
Allows to group messages while they are flushed (for flush for groupMessages=true listeners)
|
protectedinherited |
Sends myGroups on flush finish.