Salome HOME
Pipe validator fix
[modules/shaper.git] / src / SamplePanelPlugin / SamplePanelPlugin_Panel.h
index 29c2859d8cc449a7a3697fb78eac1c875394a732..1855e093fe7df7823d0f2e1353b7eb41fb533158 100755 (executable)
@@ -9,17 +9,36 @@
 
 #include <QWidget>
 
+#include <ModelAPI_Feature.h>
+
+class QComboBox;
+
 /*!
  * \ingroup GUI
- * Represent a property panel's list of ModuleBase_ModelWidgets.
+ * Represent a content of the property panel to show/modify parameters of some feature.
  */
 class SamplePanelPlugin_Panel : public QWidget
 {
+ Q_OBJECT
 public:
   /// Constructs a panel page
   SamplePanelPlugin_Panel(QWidget* theParent);
   /// Destructs the page
   virtual ~SamplePanelPlugin_Panel() {}
+
+  /// Fill the panel by the feature
+  /// \param theFeature a feature to fill the panel controls
+  void setFeature(const FeaturePtr& theFeature);
+
+protected slots:
+  /// Update feature attribute by the current value of combo box
+  /// \param theIndex a combo box modified value
+  void onCurrentIndexChanged(int theIndex);
+
+private:
+  FeaturePtr myFeature; // the feature which corresponds to the current panel
+  QComboBox* myComboBox; // control for value attribute of the current feature
+  int myDefaultValue; /// the default combo box value
 };
 
 #endif /* SAMPLEPANELPLUGIN_PANEL_H_ */