1 // Copyright (C) 2014-20xx CEA/DEN, EDF R&D
3 // File: XGUI_DeflectionDialog.cpp
4 // Created: 27 Jul 2016
5 // Author: Natalia ERMOLAEVA
7 #include <XGUI_DeflectionDialog.h>
9 #include <ModelAPI_Tools.h>
11 #include <ModuleBase_DoubleSpinBox.h>
14 #include <QButtonGroup>
15 #include <QGridLayout>
16 #include <QRadioButton>
17 #include <QDialogButtonBox>
19 XGUI_DeflectionDialog::XGUI_DeflectionDialog(QWidget* theParent)
22 setWindowTitle(tr("Deflection"));
23 QGridLayout* aLay = new QGridLayout(this);
25 myDeflection = new ModuleBase_DoubleSpinBox(this);
26 myDeflection->setDecimals(12);
27 myDeflection->setRange(0, 1);
28 myDeflection->setSingleStep(0.001);
29 aLay->addWidget(myDeflection, 0, 0);
31 QDialogButtonBox* aButtons = new QDialogButtonBox(QDialogButtonBox::Ok | QDialogButtonBox::Cancel,
32 Qt::Horizontal, this);
33 connect(aButtons, SIGNAL(accepted()), this, SLOT(accept()));
34 connect(aButtons, SIGNAL(rejected()), this, SLOT(reject()));
35 aLay->addWidget(aButtons, 1, 0);
38 void XGUI_DeflectionDialog::setDeflection(const double& theValue)
40 myDeflection->setValue(theValue);
43 double XGUI_DeflectionDialog::getDeflection() const
45 return myDeflection->value();