Salome HOME
Issue #2024: Redesign of circle and arc of circle
[modules/shaper.git] / src / PartSet / PartSet_OverconstraintListener.h
index fc771a82438bb6b0883dee4aad71340bcf12e838..1f0e8f01c7ca3347c5fe5fcc49393dce4819e72d 100755 (executable)
@@ -14,6 +14,8 @@
 class ModuleBase_IWorkshop;
 class XGUI_Workshop;
 
+#include <QString>
+
 #include <vector>
 #include <set>
 
@@ -31,16 +33,16 @@ public:
 
   virtual ~PartSet_OverconstraintListener() {};
 
-  /// Set erroneous color for the presentation of object if the object is in the conflicting list
-  /// \param theObject an object to be settled
-  /// \param theUpdateViewer a boolean state whether the current viewer should be updated
+  // Set erroneous color for the presentation of object if the object is in the conflicting list
+  // \param theObject an object to be settled
+  // \param theUpdateViewer a boolean state whether the current viewer should be updated
   //bool customizeObject(ObjectPtr theObject, const bool theUpdateViewer);
 
   /// Returns true if the object belongs to internal container of conflicting objects
   /// \param theObject an object to be checked
   /// \return boolean result
   bool isConflictingObject(const ObjectPtr& theObject);
-  
+
   /// Returns values of conflicting color
   /// \param theColor the output container to be filled in [red, green, blue] values
   void getConflictingColor(std::vector<int>& theColor);
@@ -49,24 +51,31 @@ public:
   virtual void processEvent(const std::shared_ptr<Events_Message>& theMessage);
 
 protected:
-  /// Updates the internal container of conflicting object, redisplay necessary objects
+  /// Append objects to the internal container of conflicting object, redisplay necessary objects
   /// \param theObjects a list of new conflicting objects
   /// \return boolean value whether the list differs from the internal list
-  bool updateConflictingObjects(const std::set<ObjectPtr>& theObjects);
+  bool appendConflictingObjects(const std::set<ObjectPtr>& theObjects);
 
-  /// Obtains the object custom AIS presentation and change conflicting state if it exists
-  /// \param theObject the object which presentation error state should be changed
-  /// \param theConflicting if true, the object state is erroneous, else correct
-  void setConflictingObject(const ObjectPtr& theObject, const bool theConflicting);
+  /// Removes objects from internal container of conflicting object, redisplay necessary objects
+  /// \param theObjects a list of repaired objects
+  /// \return boolean value whether the list differs from the internal list
+  bool repairConflictingObjects(const std::set<ObjectPtr>& theObjects);
 
   /// Sends update object signal for each object in the container and flush it.
   /// \param theObjects a list of object to be redisplayed
   void redisplayObjects(const std::set<ObjectPtr>& theObjects);
 
 private:
-  //! Returns workshop
+  /// Returns workshop
   XGUI_Workshop* workshop() const;
 
+#ifdef _DEBUG
+  /// Unite objects in one string information
+  /// \param theObjects a list of objects
+  /// \return a string info
+  static QString getObjectsInfo(const std::set<ObjectPtr>& theObjects);
+#endif
+
 private:
   std::set<ObjectPtr> myConflictingObjects;
   ModuleBase_IWorkshop* myWorkshop;