Salome HOME
Merge remote-tracking branch 'remotes/origin/master' into Dev_2.8.0
[modules/shaper.git] / src / SketchSolver / SketchSolver_Manager.h
index 45c1a4284bbaff4df86690f1669785e1dd0cb923..d3509c7078f33cee6d7ab049de1f4a3adf2b3e9d 100644 (file)
 #include <SketchSolver_Group.h>
 
 #include <Events_Listener.h>
-#include <SketchPlugin_Constraint.h>
 
 #include <list>
 #include <set>
 
+class GeomAPI_Pnt2d;
+class GeomDataAPI_Point2D;
+class SketchPlugin_Constraint;
+
 /** \class   SketchSolver_Manager
  *  \ingroup Plugins
  *  \brief   Listens the changes of SketchPlugin features and transforms the Constraint
@@ -66,6 +69,26 @@ protected:
    */
   bool updateFeature(std::shared_ptr<SketchPlugin_Feature> theFeature, bool theMoved = false);
 
+  /** \brief Move feature
+   *  \param[in] theMovedFeature dragged sketch feature
+   *  \param[in] theFromPoint    original position of the feature
+   *  \param[in] theToPoint      prefereble position of the feature (current position of the mouse)
+   *  \return \c true if the feature has been changed successfully
+   */
+  bool moveFeature(const std::shared_ptr<SketchPlugin_Feature>& theMovedFeature,
+                   const std::shared_ptr<GeomAPI_Pnt2d>& theFromPoint,
+                   const std::shared_ptr<GeomAPI_Pnt2d>& theToPoint);
+
+  /** \brief Move feature using its moved attribute
+   *  \param[in] theMovedAttribute dragged point attribute of sketch feature
+   *  \param[in] theFromPoint      original position of the moved point
+   *  \param[in] theToPoint        prefereble position (current position of the mouse)
+   *  \return \c true if the attribute owner has been changed successfully
+   */
+  bool moveAttribute(const std::shared_ptr<GeomDataAPI_Point2D>& theMovedAttribute,
+                     const std::shared_ptr<GeomAPI_Pnt2d>& theFromPoint,
+                     const std::shared_ptr<GeomAPI_Pnt2d>& theToPoint);
+
   /** \brief Removes a constraint from the manager
    *  \param[in] theConstraint constraint to be removed
    *  \return \c true if the constraint removed successfully