Salome HOME
refs #80 - Sketch base GUI: create/draw point, circle and arc
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetPoint2dDistance.h
1 // File:        ModuleBase_WidgetPoint2dDistance.h
2 // Created:     23 June 2014
3 // Author:      Vitaly Smetannikov
4
5
6 #ifndef ModuleBase_WidgetPoint2dDistance_H
7 #define ModuleBase_WidgetPoint2dDistance_H
8
9 #include "ModuleBase.h"
10 #include "ModuleBase_WidgetDoubleValue.h"
11
12 class GeomAPI_Pnt2d;
13
14 class MODULEBASE_EXPORT ModuleBase_WidgetPoint2dDistance: public ModuleBase_WidgetDoubleValue
15 {
16   Q_OBJECT
17 public:
18   /// Constructor
19   /// \theParent the parent object
20   /// \theData the widget configuation. The attribute of the model widget is obtained from
21   ModuleBase_WidgetPoint2dDistance(QWidget* theParent, const Config_WidgetAPI* theData);
22
23   virtual ~ModuleBase_WidgetPoint2dDistance();
24
25   /// Set the second point which defines a value in the widget as a distance with a first point defined by feature
26   void setPoint(FeaturePtr theFeature, const boost::shared_ptr<GeomAPI_Pnt2d>& thePnt);
27
28 private:
29   std::string myFirstPntName;
30 };
31
32
33 #endif