Salome HOME
Merge branch 'master' into cgt/devCEA
[modules/shaper.git] / src / SamplePanelPlugin / SamplePanelPlugin_Panel.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
2
3 // File:        SamplePanelPlugin_PageGroupBox.h
4 // Created:     29 Mar 2015
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef SAMPLEPANELPLUGIN_PANEL_H_
8 #define SAMPLEPANELPLUGIN_PANEL_H_
9
10 #include <QWidget>
11
12 #include <ModelAPI_Feature.h>
13
14 class QComboBox;
15
16 /*!
17  * \ingroup GUI
18  * Represent a content of the property panel to show/modify parameters of some feature.
19  */
20 class SamplePanelPlugin_Panel : public QWidget
21 {
22  Q_OBJECT
23 public:
24   /// Constructs a panel page
25   SamplePanelPlugin_Panel(QWidget* theParent);
26   /// Destructs the page
27   virtual ~SamplePanelPlugin_Panel() {}
28
29   /// Fill the panel by the feature
30   /// \param theFeature a feature to fill the panel controls
31   void setFeature(const FeaturePtr& theFeature);
32
33 protected slots:
34   /// Update feature attribute by the current value of combo box
35   /// \param theIndex a combo box modified value
36   void onCurrentIndexChanged(int theIndex);
37
38 private:
39   FeaturePtr myFeature; // the feature which corresponds to the current panel
40   QComboBox* myComboBox; // control for value attribute of the current feature
41   int myDefaultValue; /// the default combo box value
42 };
43
44 #endif /* SAMPLEPANELPLUGIN_PANEL_H_ */