Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[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 "XGUI.h"
9
10 #include <QObject>
11 #include <QMap>
12 #include <QStringList>
13
14 class XGUI_Command;
15 class QAction;
16
17 class XGUI_EXPORT XGUI_ActionsMgr: public QObject
18 {
19   Q_OBJECT
20
21 public:
22   XGUI_ActionsMgr(QObject* theParent);
23   virtual ~XGUI_ActionsMgr();
24
25
26   void addCommand(XGUI_Command* theCmd);
27   void saveCommandsState();
28   void restoreCommandState();
29
30   void setNestedActionsEnabled(bool);
31
32 public slots:
33   void setActionsDisabled(bool isEnabled);
34
35 private:
36   QStringList myNestedActions;
37   QMap<QString, QAction*> myActions;
38   QMap<QString, bool> myActionsState;
39 };
40
41 #endif /* XGUI_ACTIONSMGR_H_ */