Init version
This commit is contained in:
44
DEC_GUI/Kolch_Shind/createrangedialog.cpp
Normal file
44
DEC_GUI/Kolch_Shind/createrangedialog.cpp
Normal file
@@ -0,0 +1,44 @@
|
||||
#include "createrangedialog.h"
|
||||
#include "limits.h"
|
||||
#include <QPushButton>
|
||||
#include <QLabel>
|
||||
#include <QHBoxLayout>
|
||||
#include <QGridLayout>
|
||||
|
||||
CreateRangeDialog::CreateRangeDialog(QWidget *parent, int flag)
|
||||
: QDialog(parent)
|
||||
{
|
||||
|
||||
if (flag == 1) //iterate window
|
||||
{
|
||||
QGridLayout *layout = new QGridLayout(this);
|
||||
|
||||
layout->addWidget(new QLabel(tr("Add new iterations:")), 0, 0);
|
||||
iterations = new QLineEdit;
|
||||
layout->addWidget(iterations, 0, 1);
|
||||
|
||||
QHBoxLayout *buttonLayout = new QHBoxLayout;
|
||||
layout->addLayout(buttonLayout, 1, 0, 1, 0);
|
||||
buttonLayout->addStretch();
|
||||
|
||||
QPushButton *cancelButton = new QPushButton(tr("Cancel"));
|
||||
connect(cancelButton, SIGNAL(clicked()), this, SLOT(reject()));
|
||||
buttonLayout->addWidget(cancelButton);
|
||||
QPushButton *okButton = new QPushButton(tr("OK"));
|
||||
connect(okButton, SIGNAL(clicked()), this, SLOT(accept()));
|
||||
buttonLayout->addWidget(okButton);
|
||||
|
||||
okButton->setDefault(true);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
QString CreateRangeDialog::iterField()
|
||||
{
|
||||
return iterations->text();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user