Salome HOME
Issue #1368: Creation of a Qt panel. feature name correction
[modules/shaper.git] / src / SamplePanelPlugin / SamplePanelPlugin_Feature.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        SamplePanelPlugin_Feature.h
4 // Created:     29 Mar 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef SAMPLEPANELPLUGIN_FEATURE_H_
8 #define SAMPLEPANELPLUGIN_FEATURE_H_
9
10 #include "SamplePanelPlugin.h"
11
12 #include <ModelAPI_Feature.h>
13
14 /**\class SamplePanelPlugin_Feature
15  * \ingroup Plugins
16  * \brief Sample feature to be filled by the panel.
17  */
18 class SamplePanelPlugin_Feature : public ModelAPI_Feature
19 {
20  public:
21   /// SketchShape feature kind
22   inline static const std::string& ID()
23   {
24     static const std::string MY_SAMPLE_PANEL_FEATURE_ID("QtPanelFeature");
25     return MY_SAMPLE_PANEL_FEATURE_ID;
26   }
27
28   /// Request for initialization of data model of the object: adding all attributes
29   virtual void initAttributes() {};
30
31   /// Returns the unique kind of a feature
32   virtual const std::string& getKind() {
33     static std::string MY_KIND = SamplePanelPlugin_Feature::ID();
34     return MY_KIND;
35   };
36
37   /// Computes or recomputes the results
38   virtual void execute() {}
39
40   /// Use plugin manager for features creation
41   SamplePanelPlugin_Feature();
42 };
43
44 typedef std::shared_ptr<SamplePanelPlugin_Feature> SamplePanelFeaturePtr;
45
46 #endif