Salome HOME
Constriction type for all sketch entities
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
index 23990f8bc9354130723298b8ac84b95a8becd787..c2b067741db3bb8162dd48b7565ab87046036251 100644 (file)
@@ -10,6 +10,8 @@
 #include <ModelAPI_Document.h>
 #include <ModelAPI_Feature.h>
 
+#include <ModuleBase_ActionInfo.h>
+
 #include <QObject>
 #include <QMap>
 #include <QKeySequence>
@@ -164,6 +166,15 @@ Q_OBJECT
   //! Delete features
   void deleteObjects(const QObjectPtrList& theList);
 
+  //! Returns true if there is at least one selected body/construction/group result
+  //! \return boolean value
+  bool canChangeColor() const;
+
+  //! Change color of the features if it is possible
+  //! The operation is available for construction, body and group results
+  //! theObjects a list of selected objects
+  void changeColor(const QObjectPtrList& theObjects);
+
   //! Show the given features in 3d Viewer
   void showObjects(const QObjectPtrList& theList, bool isVisible);
 
@@ -215,8 +226,10 @@ signals:
   //! the application is started
   void applicationStarted();
 
-  void updateUndoHistory(const QList<QAction*>&);
-  void updateRedoHistory(const QList<QAction*>&);
+  //! Signal to update Undo history list
+  void updateUndoHistory(const QList<ActionInfo>&);
+  //! Signal to update Redo history list
+  void updateRedoHistory(const QList<ActionInfo>&);
 
  public slots:
    /// Update of commands status
@@ -349,9 +362,6 @@ signals:
   /// \param isChecked a state of toggle if the action is checkable
   void onContextMenuCommand(const QString& theId, bool isChecked);
 
-  /// Processing of values changed in model widget
-  void onWidgetValuesChanged();
-
   /// Set waiting cursor
   void onStartWaiting();
 
@@ -383,6 +393,16 @@ 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);
+
+  //! Creates list of actions (commands) by given history list from session
+  QList<ActionInfo> processHistoryList(const std::list<std::string>&) const;
+
 private:
   AppElements_MainWindow* myMainWindow;
   ModuleBase_IModule* myModule;