8#include <QIntValidator> 
   10#include "GuiIntegerParameter.h" 
   11#include "UserInterface.h" 
   15  GuiIntegerParameter::GuiIntegerParameter(QGridLayout *grid, 
UserInterface &ui,
 
   16      int group, 
int param) :
 
   19    p_lineEdit = 
new QLineEdit;
 
   20    p_lineEdit->setValidator(
new QIntValidator(p_lineEdit));
 
   21    connect(p_lineEdit, SIGNAL(textChanged(
const QString &)), 
this, SIGNAL(ValueChanged()));
 
   22    grid->addWidget(p_lineEdit, param, 2);
 
   24    if(p_ui->HelpersSize(group, param) != 0) {
 
   25      grid->addWidget(AddHelpers(p_lineEdit), param, 3);
 
   28    RememberWidget(p_lineEdit);
 
   29    p_type = IntegerWidget;
 
   33  GuiIntegerParameter::~GuiIntegerParameter() {}
 
   35  void GuiIntegerParameter::Set(QString newValue) {
 
   36    p_lineEdit->setText(newValue);
 
   40  QString GuiIntegerParameter::Value() {
 
   41    return p_lineEdit->text();
 
Command Line and Xml loader, validation, and access.
 
This is free and unencumbered software released into the public domain.