]> SALOME platform Git repositories - modules/shaper.git/blob - src/XGUI/XGUI_ActionsMgr.h
Salome HOME
194412ec13b29edea9ec74b04c306a91b843f331
[modules/shaper.git] / src / XGUI / XGUI_ActionsMgr.h
1 /*
2  * XGUI_ActionsMgr.h
3  */
4
5 #ifndef XGUI_ACTIONSMGR_H_
6 #define XGUI_ACTIONSMGR_H_
7
8 #include <QObject>
9 #include <QMap>
10 #include <QStringList>
11
12 class XGUI_Command;
13 class XGUI_Workshop;
14 class QAction;
15
16 class XGUI_ActionsMgr: public QObject
17 {
18   Q_OBJECT
19
20 public:
21   XGUI_ActionsMgr(XGUI_Workshop* theParent);
22   virtual ~XGUI_ActionsMgr();
23
24
25   void addCommand(XGUI_Command* theCmd);
26
27   /// Register a command in SALOME mode
28   /// \param theId - string ID of the command
29   /// \param theCmd - command object
30   void addCommand(QString theId, QAction* theCmd);
31
32   void saveCommandsState();
33   void restoreCommandState();
34
35   void setNestedActionsEnabled(bool);
36
37 public slots:
38   void setActionsDisabled(bool isEnabled);
39
40 private:
41   QStringList myNestedActions;
42   QMap<QString, QAction*> myActions;
43   QMap<QString, bool> myActionsState;
44
45   XGUI_Workshop* myWorkshop;
46 };
47
48 #endif /* XGUI_ACTIONSMGR_H_ */