]> SALOME platform Git repositories - modules/shaper.git/blobdiff - src/XGUI/XGUI_Workshop.h
Salome HOME
Delete key regression corrections: in previous implementation sketch entities did...
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
index 505bf5370343d4e909078c396582b47d94198c12..5bb898533422e55d0fb6dac75623d416da96ce6b 100755 (executable)
@@ -47,6 +47,7 @@ class QMainWindow;
 
 class QAction;
 
+
 /**\class XGUI_Workshop
  * \ingroup GUI
  * \brief Class which defines a configuration of the application (Workshop) and launches it.
@@ -167,6 +168,11 @@ Q_OBJECT
   //! Delete features
   void deleteObjects();
 
+  //! Searches for selected features unused in other (not selected) features. If one or several
+  //! selected features are found, a warning message proposes to delete them. It contains 
+  //! the list of features to be deleted.
+  void cleanHistory();
+
   //! Returns true if the selected feature can be moved to the position after the current feature
   //! \return boolean value
   bool canMoveFeature();
@@ -258,6 +264,10 @@ Q_OBJECT
   /// \param theUpdateViewer update viewer flag
   void synchronizeGroupInViewer(const DocumentPtr& theDoc, const std::string& theGroup, bool theUpdateViewer);
 
+  /// A constant string used for "Move to end" command definition
+  /// It is used for specific processing of Undo/Redo for this command.
+  static QString MOVE_TO_END_COMMAND;
+
 signals:
   /// Emitted when selection happens in Salome viewer
   void salomeViewerSelection();
@@ -332,6 +342,9 @@ signals:
   void onPreferences();
 #endif
 
+  /// Activates/deactivates the trihedron in the viewer AIS context
+  void onTrihedronVisibilityChanged(bool theState);
+
  protected:
   /// Sets the granted operations for the parameter operation. Firstly, it finds the nested features
   /// and set them into the operation. Secondly, it asks the module about ids of granted operations.
@@ -394,15 +407,6 @@ private:
   /// the operation can be committed and do it if it returns true.
   void onAcceptActionClicked();
 
-  /// Listens the corresponded signal from operation manager and send it with the Ok
-  /// action to operation manager.
-  /// \param theEnabled an enabled state for the action
-  //void onValidationStateChanged(bool theEnabled);
-
-  //connect(myOperationMgr,  SIGNAL(validationStateChanged(bool)),
-  //        aOkAct,          SLOT(setEnabled(bool)));
-
-
  private:
    /// Init menu
   void initMenu();
@@ -435,6 +439,15 @@ private:
   //! \param theSlot - onUndo(int) or onRedo(int) SLOT
   void addHistoryMenu(QObject* theObject, const char* theSignal, const char* theSlot);
 
+
+  /// Calls removeFeature of the document for each object in the list
+  //! \param theList an objects to be deleted
+  //! \param theIgnoredFeatures a list of features to be ignored during delete
+  //! \param theActionId an action command key to find context menu object types enabled for remove
+  bool removeFeatures(const QObjectPtrList& theList,
+                      const std::set<FeaturePtr>& theIgnoredFeatures,
+                      const QString& theActionId);
+
   //! Creates list of actions (commands) by given history list from session
   QList<ActionInfo> processHistoryList(const std::list<std::string>&) const;