Isis 3 Programmer Reference
GuiIntegerParameter.cpp
1 #include <QHBoxLayout>
2 #include <QIntValidator>
3 
4 #include "GuiIntegerParameter.h"
5 #include "UserInterface.h"
6 
7 namespace Isis {
8 
9  GuiIntegerParameter::GuiIntegerParameter(QGridLayout *grid, UserInterface &ui,
10  int group, int param) :
11  GuiParameter(grid, ui, group, param) {
12 
13  p_lineEdit = new QLineEdit;
14  p_lineEdit->setValidator(new QIntValidator(p_lineEdit));
15  connect(p_lineEdit, SIGNAL(textChanged(const QString &)), this, SIGNAL(ValueChanged()));
16  grid->addWidget(p_lineEdit, param, 2);
17 
18  if(p_ui->HelpersSize(group, param) != 0) {
19  grid->addWidget(AddHelpers(p_lineEdit), param, 3);
20  }
21 
22  RememberWidget(p_lineEdit);
23  p_type = IntegerWidget;
24  }
25 
26 
27  GuiIntegerParameter::~GuiIntegerParameter() {}
28 
29  void GuiIntegerParameter::Set(QString newValue) {
30  p_lineEdit->setText(newValue);
31  }
32 
33 
34  QString GuiIntegerParameter::Value() {
35  return p_lineEdit->text();
36  }
37 
38 }
39 
Namespace for ISIS/Bullet specific routines.
Definition: Apollo.h:31