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);
25 if(p_ui->HelpersSize(group, param) != 0) {
26 grid->addWidget(AddHelpers(p_lineEdit), param, 3);
29 RememberWidget(p_lineEdit);
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();
This is free and unencumbered software released into the public domain.