Isis 3 Programmer Reference
GuiStringParameter.cpp
1 
6 /* SPDX-License-Identifier: CC0-1.0 */
7 #include <QHBoxLayout>
8 
9 #include "GuiStringParameter.h"
10 #include "UserInterface.h"
11 
12 namespace Isis {
13 
14  GuiStringParameter::GuiStringParameter(QGridLayout *grid, UserInterface &ui,
15  int group, int param) :
16  GuiParameter(grid, ui, group, param) {
17 
18  p_lineEdit = new QLineEdit;
19  connect(p_lineEdit, SIGNAL(textChanged(const QString &)), this, SIGNAL(ValueChanged()));
20  grid->addWidget(p_lineEdit, param, 2);
21 
22  if(p_ui->HelpersSize(group, param) != 0) {
23  grid->addWidget(AddHelpers(p_lineEdit), param, 3);
24  }
25 
26  RememberWidget(p_lineEdit);
27 
28  p_type = StringWidget;
29  }
30 
31 
32  GuiStringParameter::~GuiStringParameter() {}
33 
34  void GuiStringParameter::Set(QString newValue) {
35  p_lineEdit->setText(newValue);
36  }
37 
38 
39  QString GuiStringParameter::Value() {
40  return p_lineEdit->text();
41  }
42 
43 
44 }
45 
Isis
This is free and unencumbered software released into the public domain.
Definition: Apollo.h:16