Salome HOME
refs #30 - Sketch base GUI: create, draw lines
[modules/shaper.git] / src / XGUI / XGUI_ActionsMgr.h
index dd5ac36f7d593a6b79c9d2aa949bbd22fb088c60..965f2289f05e884d451e2c32450a68ad7aea7f3d 100644 (file)
@@ -12,6 +12,7 @@
 #include <QStringList>
 
 class XGUI_Command;
+class XGUI_Workshop;
 class QAction;
 
 class XGUI_EXPORT XGUI_ActionsMgr: public QObject
@@ -19,14 +20,26 @@ class XGUI_EXPORT XGUI_ActionsMgr: public QObject
   Q_OBJECT
 
 public:
-  XGUI_ActionsMgr(QObject* theParent);
+  XGUI_ActionsMgr(XGUI_Workshop* theParent);
   virtual ~XGUI_ActionsMgr();
 
 
   void addCommand(XGUI_Command* theCmd);
+
+  /// Register a command in SALOME mode
+  /// \param theId - string ID of the command
+  /// \param theCmd - command object
+  void addCommand(QString theId, QAction* theCmd);
+
   void saveCommandsState();
   void restoreCommandState();
 
+  /// Set the action is checked
+  /// \param theId - string ID of the command
+  /// \praram theChecked - the new checked state
+  void setActionChecked(const QString& theId, const bool theChecked);
+
+  void updateAction(const QString&);
   void setNestedActionsEnabled(bool);
 
 public slots:
@@ -36,6 +49,8 @@ private:
   QStringList myNestedActions;
   QMap<QString, QAction*> myActions;
   QMap<QString, bool> myActionsState;
+
+  XGUI_Workshop* myWorkshop;
 };
 
 #endif /* XGUI_ACTIONSMGR_H_ */