Salome HOME
Issue #1660: Ability to change the deflection coefficient
[modules/shaper.git] / src / XGUI / XGUI_DeflectionDialog.h
diff --git a/src/XGUI/XGUI_DeflectionDialog.h b/src/XGUI/XGUI_DeflectionDialog.h
new file mode 100755 (executable)
index 0000000..0ec10ab
--- /dev/null
@@ -0,0 +1,44 @@
+// Copyright (C) 2014-20xx CEA/DEN, EDF R&D
+
+// File:        XGUI_DeflectionDialog.hxx
+// Created:     27 Jul 2016
+// Author:      Natalia ERMOLAEVA
+
+#ifndef XGUI_DeflectionDialog_H
+#define XGUI_DeflectionDialog_H
+
+#include "XGUI.h"
+
+#include <QDialog>
+
+class QButtonGroup;
+class QDoubleSpinBox;
+
+/**
+* \ingroup GUI
+* A class of dialog to chose a deflection value. The deflection value is in range [0, 1]
+*/ 
+class XGUI_DeflectionDialog : public QDialog
+{
+  Q_OBJECT
+public:
+  /// Constructor
+  /// \param theParent a parent widget for the dialog
+  XGUI_EXPORT XGUI_DeflectionDialog(QWidget* theParent);
+
+  XGUI_EXPORT virtual ~XGUI_DeflectionDialog() {};
+
+  /// Initializes the dialog with the given value.
+  /// \param theValue the deflection value
+  void setDeflection(const double& theDeflection);
+
+  /// Returns the current deflection value.
+  /// \return a double value
+  double getDeflection() const;
+
+private:
+  QButtonGroup* myButtonGroup; /// a group, contained random and certain color radio button choice
+  QDoubleSpinBox* myDeflection; /// a deflection value
+};
+
+#endif