Salome HOME
Merge branch 'Dev_0.6.1' of newgeom:newgeom into Dev_0.6.1
[modules/shaper.git] / src / PartSet / PartSet_WidgetShapeSelector.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        PartSet_WidgetShapeSelector.h
4 // Created:     27 Nov 2014
5 // Author:      Vitaly Smetannikov
6
7
8 #ifndef PartSet_WidgetShapeSelector_H
9 #define PartSet_WidgetShapeSelector_H
10
11 #include "PartSet.h"
12
13 #include <ModuleBase_WidgetShapeSelector.h>
14
15 #include <ModelAPI_CompositeFeature.h>
16
17 class PARTSET_EXPORT PartSet_WidgetShapeSelector: public ModuleBase_WidgetShapeSelector
18 {
19 Q_OBJECT
20  public:
21   PartSet_WidgetShapeSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
22     const Config_WidgetAPI* theData, const std::string& theParentId)
23     : ModuleBase_WidgetShapeSelector(theParent, theWorkshop, theData, theParentId) {}
24
25   virtual ~PartSet_WidgetShapeSelector() {}
26
27   /// Saves the internal parameters to the given feature
28   virtual bool storeValue() const;
29
30   void setSketcher(CompositeFeaturePtr theSketch) { mySketch = theSketch; }
31   CompositeFeaturePtr sketch() const { return mySketch; }
32
33 private:
34   CompositeFeaturePtr mySketch;
35 };
36
37
38 class PARTSET_EXPORT PartSet_WidgetConstraintShapeSelector: public ModuleBase_WidgetShapeSelector
39 {
40 Q_OBJECT
41  public:
42   PartSet_WidgetConstraintShapeSelector(QWidget* theParent, ModuleBase_IWorkshop* theWorkshop,
43     const Config_WidgetAPI* theData, const std::string& theParentId)
44     : ModuleBase_WidgetShapeSelector(theParent, theWorkshop, theData, theParentId) {}
45
46   virtual ~PartSet_WidgetConstraintShapeSelector() {}
47
48   /// Saves the internal parameters to the given feature
49   virtual bool storeValue() const;
50
51   void setSketcher(CompositeFeaturePtr theSketch) { mySketch = theSketch; }
52   CompositeFeaturePtr sketch() const { return mySketch; }
53
54 private:
55   CompositeFeaturePtr mySketch;
56 };
57
58 #endif