Salome HOME
Return test.
[modules/shaper.git] / src / SamplePanelPlugin / SamplePanelPlugin_Panel.h
index 29c2859d8cc449a7a3697fb78eac1c875394a732..2c0e3960fed51cd4a7d0e8e4a3f7a468854e3142 100755 (executable)
@@ -1,25 +1,58 @@
-// Copyright (C) 2014-20xx CEA/DEN, EDF R&D -->
-
-// File:        SamplePanelPlugin_PageGroupBox.h
-// Created:     29 Mar 2015
-// Author:      Natalia ERMOLAEVA
+// Copyright (C) 2014-2017  CEA/DEN, EDF R&D
+//
+// This library is free software; you can redistribute it and/or
+// modify it under the terms of the GNU Lesser General Public
+// License as published by the Free Software Foundation; either
+// version 2.1 of the License, or (at your option) any later version.
+//
+// This library is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+// Lesser General Public License for more details.
+//
+// You should have received a copy of the GNU Lesser General Public
+// License along with this library; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+//
+// See http://www.salome-platform.org/ or
+// email : webmaster.salome@opencascade.com<mailto:webmaster.salome@opencascade.com>
+//
 
 #ifndef SAMPLEPANELPLUGIN_PANEL_H_
 #define SAMPLEPANELPLUGIN_PANEL_H_
 
 #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_ */