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