Salome HOME
2de332108f08e3186498abd6d2cab38e70a46d50
[modules/shaper.git] / src / ModuleBase / ModuleBase_WidgetValueFeature.h
1 // File:        ModuleBase_WidgetValueFeature.h
2 // Created:     25 Apr 2014
3 // Author:      Natalia ERMOLAEVA
4
5 #ifndef ModuleBase_WidgetValueFeature_H
6 #define ModuleBase_WidgetValueFeature_H
7
8 #include <ModuleBase.h>
9 #include <ModuleBase_WidgetValue.h>
10
11 #include <ModelAPI_Result.h>
12
13 #include <boost/shared_ptr.hpp>
14
15 class GeomAPI_Pnt2d;
16
17 /**\class ModuleBase_WidgetValueFeature
18  * \ingroup GUI
19  * \brief Custom widget value. The widget contains a feature and 2D point.
20  */
21 class MODULEBASE_EXPORT ModuleBase_WidgetValueFeature : public ModuleBase_WidgetValue
22 {
23 public:
24   /// Constructor
25   ModuleBase_WidgetValueFeature();
26   /// Destructor
27   virtual ~ModuleBase_WidgetValueFeature();
28
29   /// Fill the widget values by given point
30   /// \param thePoint the point
31   void setResult(const ResultPtr& theFeature);
32
33   /// Returns the widget values by given point
34   /// \return theFeature the current feature
35   const ResultPtr& result() const;
36
37   /// Fill the widget values by given point
38   /// \param thePoint the point
39   void setPoint(const boost::shared_ptr<GeomAPI_Pnt2d>& thePoint);
40
41   /// Returns the widget point
42   /// \return the current point
43   const boost::shared_ptr<GeomAPI_Pnt2d>& point() const;
44
45 private:
46   ResultPtr myResult;
47   boost::shared_ptr<GeomAPI_Pnt2d> myPoint;
48 };
49
50 #endif