1 // File: ModuleBase_WidgetPoint2dDistance.h
2 // Created: 23 June 2014
3 // Author: Vitaly Smetannikov
5 #ifndef ModuleBase_WidgetPoint2dDistance_H
6 #define ModuleBase_WidgetPoint2dDistance_H
8 #include "ModuleBase.h"
9 #include "ModuleBase_WidgetDoubleValue.h"
11 class ModuleBase_WidgetValue;
14 class MODULEBASE_EXPORT ModuleBase_WidgetPoint2dDistance : public ModuleBase_WidgetDoubleValue
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 const std::string& theParentId);
24 virtual ~ModuleBase_WidgetPoint2dDistance();
26 /// Set the given wrapped value to the current widget
27 /// This value should be processed in the widget according to the needs
28 /// \param theValue the wrapped widget value
29 virtual bool setValue(ModuleBase_WidgetValue* theValue);
32 /// Set the second point which defines a value in the widget as a distance with a first point defined by feature
33 void setPoint(FeaturePtr theFeature, const boost::shared_ptr<GeomAPI_Pnt2d>& thePnt);
36 std::string myFirstPntName;