Salome HOME
The sketch solver error should be checked after nested sketch operation check.
[modules/shaper.git] / src / PartSet / PartSet_WidgetPoint2dAngle.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_WidgetPoint2dAngle.h
4 // Created:     30 Apr 2015
5 // Author:      Natalia Ermolaeva
6
7 #ifndef PartSet_WidgetPoint2dAngle_H
8 #define PartSet_WidgetPoint2dAngle_H
9
10 #include "PartSet.h"
11 #include "PartSet_WidgetPoint2dDistance.h"
12
13 #include <ModelAPI_Feature.h>
14
15 class ModuleBase_IWorkshop;
16
17 class GeomAPI_Pnt2d;
18
19 /**
20 * \ingroup Modules
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.
23 */ 
24 class PARTSET_EXPORT PartSet_WidgetPoint2dAngle : public PartSet_WidgetPoint2dDistance
25 {
26 Q_OBJECT
27  public:
28   /// Constructor
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);
35
36   virtual ~PartSet_WidgetPoint2dAngle();
37
38 protected:
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);
45 };
46
47 #endif