Salome HOME
Fix for selection of groups features
[modules/shaper.git] / src / XGUI / XGUI_Workshop.h
index ea1ecf0944d24fa867bdc128a86c42875cd3abf2..37ae6a8a2be07ea5265ba5463d38f4670c141f45 100644 (file)
@@ -24,6 +24,7 @@
 
 #include <ModelAPI_Document.h>
 #include <ModelAPI_Feature.h>
+#include <ModelAPI_ResultBody.h>
 
 #include <ModuleBase_ActionInfo.h>
 #include <ModuleBase_ActionType.h>
@@ -185,7 +186,7 @@ Q_OBJECT
   bool canMoveFeature();
 
   /// Move selected features to be after the current feature
-  void moveObjects();
+  void moveObjects(const bool theSplit);
 
   /// Returns true if the object can be shaded. If the object is a compsolid result, the method
   /// checks subobjects of the result
@@ -281,12 +282,12 @@ Q_OBJECT
   /// Has to be called in order to display objects from a specifed group
   /// with visibility status = true
   /// \param theDoc the document for objects synchronisation
-  /// \param theGroup the group name
   /// \param theUpdateViewer update viewer flag
   void synchronizeGroupInViewer(const DocumentPtr& theDoc,
-                                const std::string& theGroup,
                                 bool theUpdateViewer);
 
+  void synchronizeResultTree(const ResultBodyPtr& theRes, bool theUpdateViewer);
+
 #endif
   /// Update the property panel content by the XML description of the operation and set the panel
   /// into the operation
@@ -315,6 +316,9 @@ Q_OBJECT
   /// 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;
+  /// A constant string used for "Move to end and split" command definition
+  /// It is used for specific processing of Undo/Redo for this command.
+  static QString MOVE_TO_END_SPLIT_COMMAND;
 
   /// Closes all in the current session and load the directory
   /// \param theDirectory a path to directory
@@ -322,6 +326,11 @@ Q_OBJECT
 
   void updateAutoComputeState();
 
+  void deactivateCurrentSelector();
+
+  /// The method updates a Color Scale object in the viewer
+  void updateColorScaleVisibility();
+
 signals:
   /// Emitted when selection happens in Salome viewer
   void salomeViewerSelection();
@@ -389,6 +398,12 @@ signals:
   /// Create a new document
   void onNew();
 
+  /// Import part structure from a file
+  void onImportPart();
+
+  /// Export features to a file
+  void onExportPart();
+
 #ifndef HAVE_SALOME
   /// Exit application
   void onExit();
@@ -406,9 +421,6 @@ signals:
   /// Apply the current transparency value if preview in transparency dialog is switched on
   void onTransparencyValueChanged();
 
-  /// Switch on/off preview of transparency change
-  void onPreviewStateChanged();
-
  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.
@@ -474,6 +486,9 @@ private:
   /// Called on help button clicked in the property panel.
   void onHelpActionClicked();
 
+  //! The slot is called only once on resizing of Object Browser
+  void onDockSizeChanged();
+
  private:
   /// Init menu
   void initMenu();
@@ -496,7 +511,7 @@ private:
   void createDockWidgets();
 
   /// Extends undo/redo toolbutton's with history menu
-  /// \param theObject - in the OpenParts it is a QToolButton by itself,
+  /// \param theObject - in the CADBuilder 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
@@ -513,6 +528,10 @@ private:
   /// Clear content of temporary directory
   void clearTemporaryDir();
 
+  /// Set current point of view normal to selected planar face
+  /// \param toInvert invert the normal vector
+  void setNormalView(bool toInvert = false);
+
 private:
 #ifndef HAVE_SALOME
   AppElements_MainWindow* myMainWindow; ///< desktop window