Salome HOME
Make undo/redo lists stored/restored and managed correctly
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
index 23990f8bc9354130723298b8ac84b95a8becd787..1cf400d0f89a52956cf8e9d05516641cfea30c80 100644 (file)
@@ -10,6 +10,8 @@
 #include <ModelAPI_Document.h>
 #include <ModelAPI_Feature.h>
 
+#include <ModuleBase_ActionInfo.h>
+
 #include <QObject>
 #include <QMap>
 #include <QKeySequence>
@@ -215,8 +217,8 @@ signals:
   //! the application is started
   void applicationStarted();
 
-  void updateUndoHistory(const QList<QAction*>&);
-  void updateRedoHistory(const QList<QAction*>&);
+  void updateUndoHistory(const QList<ActionInfo>&);
+  void updateRedoHistory(const QList<ActionInfo>&);
 
  public slots:
    /// Update of commands status
@@ -383,6 +385,13 @@ signals:
   /// Displaus object and fit all viewer if the object is first (update viewer will not be called)
   void displayObject(ObjectPtr theObj);
 
+  //! Extends undo/redo toolbutton's with history menu
+  //! \param theObject - in the OpenParts it is a QToolButton by itself,
+  //! in salome mode - QAction that creates a button.
+  //! \param theSignal - void "updateUndoHistory" or "updateRedoHistory" SIGNAL;
+  //! \param theSlot - onUndo(int) or onRedo(int) SLOT
+  void addHistoryMenu(QObject* theObject, const char* theSignal, const char* theSlot);
+
 private:
   AppElements_MainWindow* myMainWindow;
   ModuleBase_IModule* myModule;