9 #include <QDoubleValidator>
10 #include "GuiDoubleParameter.h"
11 #include "UserInterface.h"
16 GuiDoubleParameter::GuiDoubleParameter(QGridLayout *grid, UserInterface &ui,
17 int group,
int param) :
18 GuiParameter(grid, ui, group, param) {
20 p_lineEdit =
new QLineEdit;
21 p_lineEdit->setValidator(
new QDoubleValidator(p_lineEdit));
22 connect(p_lineEdit, SIGNAL(textChanged(
const QString &)),
this, SIGNAL(ValueChanged()));
23 grid->addWidget(p_lineEdit, param, 2);
26 grid->addWidget(
AddHelpers(p_lineEdit), param, 3);
31 p_type = DoubleWidget;
35 GuiDoubleParameter::~GuiDoubleParameter() {}
38 void GuiDoubleParameter::Set(QString newValue) {
39 p_lineEdit->setText(newValue);
43 QString GuiDoubleParameter::Value() {
44 return p_lineEdit->text();