Salome HOME
Fix for the issue #593: do not remove naming attribute, but use TNaming_Builder for...
[modules/shaper.git] / src / XGUI / XGUI_Displayer.h
index 89f693d522c1c58bd8fa21dc955326260fea6498..29cf7482a91e49acb0ab4160a0b496d8adf64b49 100644 (file)
@@ -79,11 +79,13 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   void redisplay(ObjectPtr theObject, bool isUpdateViewer = true);
 
   /**
-   * Add presentations which corresponds to the given features to current selection
-   * \param theFeatures a list of features to be selected
+   * Add presentations to current selection. It unhighlight and deselect the current selection.
+   * The shape and result components are processed in the values. If the presentation shape is not
+   * empty, select it, otherwise select the result.
+   * \param theValues a list of presentation to be selected
    * \param isUpdateViewer the parameter whether the viewer should be update immediatelly
    */
-  void setSelected(const QObjectPtrList& theFeatures, bool isUpdateViewer = true);
+  void setSelected(const  QList<ModuleBase_ViewerPrs>& theValues, bool isUpdateViewer = true);
 
 
   /// Unselect all objects
@@ -126,7 +128,7 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
   bool enableUpdateViewer(const bool isEnabled);
 
   /// Updates the viewer
-  void updateViewer();
+  void updateViewer() const;
 
   /// Searches the interactive object by feature
   /// \param theObject the object or presentable feature
@@ -167,7 +169,8 @@ class XGUI_EXPORT XGUI_Displayer: public QObject
 
   /// Activates in local context displayed outside of the context.
   /// \param theModes - modes on which it has to be activated (can be empty)
-  void activateObjects(const QIntList& theModes);
+  /// \param theObjList - list of objects which has to be activated. Can be empty. In this case all displayed objects will be used.
+  void activateObjects(const QIntList& theModes, const QObjectPtrList& theObjList = QObjectPtrList());
 
   /// Activates in local context displayed outside of the context.
   void deactivateObjects();
@@ -249,6 +252,15 @@ private:
    */
   bool customizeObject(ObjectPtr theObject);
 
+  /// Append the objects in the internal map. Checks whether the map already contains the object
+  /// \param theObject an object to display
+  /// \param theAIS AIOS object to display
+  void appendResultObject(ObjectPtr theObject, AISObjectPtr theAIS);
+
+  /// Returns an information about alredy displayed objects
+  /// \return a string representation
+  std::string getResult2AISObjectMapInfo() const;
+
  protected:
    /// Reference to workshop
   XGUI_Workshop* myWorkshop;