1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: PartSet_WidgetPoint2dAngle.h
4 // Created: 30 Apr 2015
5 // Author: Natalia Ermolaeva
7 #ifndef PartSet_WidgetPoint2dAngle_H
8 #define PartSet_WidgetPoint2dAngle_H
11 #include "PartSet_WidgetPoint2dDistance.h"
13 #include <ModelAPI_Feature.h>
15 class ModuleBase_IWorkshop;
21 * Implementation of model widget for widget which provides input of an anble between two points
22 * The XML definion is the same as the parent one.
24 class PARTSET_EXPORT PartSet_WidgetPoint2dAngle : public PartSet_WidgetPoint2dDistance
29 /// \param theParent the parent object
30 /// \param theWorkshop a current workshop
31 /// \param theData the widget configuation. The attribute of the model widget is obtained from
32 /// \param theParentId is Id of a parent of the current attribute
33 PartSet_WidgetPoint2dAngle(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
34 const Config_WidgetAPI* theData, const std::string& theParentId);
36 virtual ~PartSet_WidgetPoint2dAngle();
39 /// Compute an angle between points
40 /// \param theFirstPnt a point value of the out point attribute
41 /// \param theCurrentPnt a point of the current widget
42 /// \return a double value
43 virtual double computeValue(const std::shared_ptr<GeomAPI_Pnt2d>& theFirstPnt,
44 const std::shared_ptr<GeomAPI_Pnt2d>& theCurrentPnt);