20 #ifndef XGUI_ActionsMgr_H
21 #define XGUI_ActionsMgr_H
25 #include <Events_Listener.h>
26 #include <ModelAPI_Feature.h>
28 #include <ModuleBase_ActionInfo.h>
33 #include <QStringList>
34 #include <QKeySequence>
68 void addCommand(QAction* theCmd);
71 void addNestedCommands(
const QString& theId,
const QStringList& theCommands);
75 QStringList nestedCommands(
const QString& theId)
const;
79 bool isNested(
const QString& theId)
const;
83 QKeySequence registerShortcut(
const QKeySequence& theKeySequence);
88 QKeySequence registerShortcut(
const QString& theKeySequence);
91 virtual void processEvent(
const std::shared_ptr<Events_Message>& theMessage);
95 QAction* operationStateAction(OperationStateActionId theId);
98 QAction* action(
const QString& theId);
102 ActionInfo actionInfoById(
const QString& theId);
109 void updateCommandsStatus();
112 void updateCheckState();
115 void updateOnViewSelection();
118 void setAllEnabled();
122 void setNestedCommandsEnabled(
bool isEnabled,
const QString& theParent = QString());
128 void setActionChecked(
const QString& theId,
const bool theChecked);
131 void setActionEnabled(
const QString& theId,
const bool theEnabled);
134 void updateByDocumentKind();
137 void updateByPlugins(FeaturePtr theActiveFeature);
145 QMap<QString, QAction*> myActions;
146 QMap<QString, QStringList> myNestedActions;
147 QMap<OperationStateActionId, QAction*> myOperationActions;
148 QList<QKeySequence> myShortcuts;
Base interface for any event listener.
Definition: Events_Listener.h:37
virtual EVENTS_EXPORT void processEvent(const std::shared_ptr< Events_Message > &theMessage)=0
This method is called by loop when the event is started to process.
Base class for all operations.
Definition: ModuleBase_Operation.h:53
class XGUI_ActionsMgrA class for management of actions (features) activation/deactivation
Definition: XGUI_ActionsMgr.h:45
OperationStateActionId
Actions on operations.
Definition: XGUI_ActionsMgr.h:55
Operation manager.
Definition: XGUI_OperationMgr.h:49
Class which defines a configuration of the application (Workshop) and launches it.
Definition: XGUI_Workshop.h:83
Definition: ModuleBase_ActionInfo.h:37