Salome HOME
Issue #6 Extended processing of nested actions.
[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 QAction;
14
15 class XGUI_ActionsMgr: public QObject
16 {
17   Q_OBJECT
18
19 public:
20   XGUI_ActionsMgr(QObject* theParent);
21   virtual ~XGUI_ActionsMgr();
22
23
24   void addCommand(XGUI_Command* theCmd);
25   void saveCommandsState();
26   void restoreCommandState();
27
28   void setNestedActionsEnabled(bool);
29
30 public slots:
31   void setActionsDisabled(bool isEnabled);
32
33 private:
34   QStringList myNestedActions;
35   QMap<QString, QAction*> myActions;
36   QMap<QString, bool> myActionsState;
37 };
38
39 #endif /* XGUI_ACTIONSMGR_H_ */