Salome HOME
Issue #1854 Recover feature control update
[modules/shaper.git] / src / XGUI / XGUI_DeflectionDialog.h
1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
2
3 // File:        XGUI_DeflectionDialog.hxx
4 // Created:     27 Jul 2016
5 // Author:      Natalia ERMOLAEVA
6
7 #ifndef XGUI_DeflectionDialog_H
8 #define XGUI_DeflectionDialog_H
9
10 #include "XGUI.h"
11
12 #include <QDialog>
13
14 class QButtonGroup;
15 class QDoubleSpinBox;
16
17 /**
18 * \ingroup GUI
19 * A class of dialog to chose a deflection value. The deflection value is in range [0, 1]
20 */ 
21 class XGUI_DeflectionDialog : public QDialog
22 {
23   Q_OBJECT
24 public:
25   /// Constructor
26   /// \param theParent a parent widget for the dialog
27   XGUI_EXPORT XGUI_DeflectionDialog(QWidget* theParent);
28
29   XGUI_EXPORT virtual ~XGUI_DeflectionDialog() {};
30
31   /// Initializes the dialog with the given value.
32   /// \param theValue the deflection value
33   void setDeflection(const double& theDeflection);
34
35   /// Returns the current deflection value.
36   /// \return a double value
37   double getDeflection() const;
38
39 private:
40   QButtonGroup* myButtonGroup; /// a group, contained random and certain color radio button choice
41   QDoubleSpinBox* myDeflection; /// a deflection value
42 };
43
44 #endif