Salome HOME
Issue #2618: PlaneGCS errors processing
[modules/shaper.git] / src / SketchPlugin / SketchPlugin_ConstraintDistanceVertical.h
index e5f14d83ee99d1a0d987b2816a708698cdd20a57..a9d7284b95c409e29c3883a5f217c5bd67ae9368 100644 (file)
@@ -1,4 +1,22 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
+// Copyright (C) 2017  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 // File:    SketchPlugin_ConstraintDistanceVertical.h
 // Created: 10 May 2017
@@ -8,7 +26,7 @@
 #define SketchPlugin_ConstraintDistanceVertical_H_
 
 #include <SketchPlugin.h>
-#include <SketchPlugin_ConstraintDistance.h>
+#include <SketchPlugin_ConstraintDistanceAlongDir.h>
 
 /** \class SketchPlugin_ConstraintDistanceVertical
  *  \ingroup Plugins
@@ -17,7 +35,7 @@
  *  This constraint has three attributes:
  *  SketchPlugin_Constraint::VALUE(), SketchPlugin_Constraint::ENTITY_A() and SketchPlugin_Constraint::ENTITY_B()
  */
-class SketchPlugin_ConstraintDistanceVertical : public SketchPlugin_ConstraintDistance
+class SketchPlugin_ConstraintDistanceVertical : public SketchPlugin_ConstraintDistanceAlongDir
 {
 public:
   /// Distance constraint kind
@@ -34,24 +52,6 @@ public:
     return MY_KIND;
   }
 
-  /// \brief Creates a new part document if needed
-  SKETCHPLUGIN_EXPORT virtual void execute();
-
-  /// \brief Request for initialization of data model of the feature: adding all attributes
-  SKETCHPLUGIN_EXPORT virtual void initAttributes();
-
-  /// Returns the AIS preview
-  SKETCHPLUGIN_EXPORT virtual AISObjectPtr getAISObject(AISObjectPtr thePrevious);
-
-  /// Moves the feature
-  /// \param theDeltaX the delta for X coordinate is moved
-  /// \param theDeltaY the delta for Y coordinate is moved
-  SKETCHPLUGIN_EXPORT virtual void move(const double theDeltaX, const double theDeltaY);
-
-  /// Called on change of any argument-attribute of this object
-  /// \param theID identifier of changed attribute
-  SKETCHPLUGIN_EXPORT virtual void attributeChanged(const std::string& theID);
-
   /// \brief Use plugin manager for features creation
   SketchPlugin_ConstraintDistanceVertical();
 
@@ -59,8 +59,8 @@ protected:
   /// Returns the current distance between the feature attributes
   virtual double calculateCurrentDistance();
 
-private:
-  bool myFlyoutUpdate; ///< to avoid cyclic dependencies on automatic updates of flyout point
+  /// Update flyout point
+  virtual void updateFlyoutPoint();
 };
 
 #endif