43 lines
774 B
C++
43 lines
774 B
C++
#include "nastrel.h"
|
|
#include "ui_nastrel.h"
|
|
|
|
nastrel::nastrel(QWidget *parent) :
|
|
QDialog(parent),
|
|
ui(new Ui::nastrel)
|
|
{
|
|
ui->setupUi(this);
|
|
this->setAttribute(Qt::WA_DeleteOnClose);
|
|
|
|
((Widget*)parent)->changeOpenWidget(this);
|
|
|
|
|
|
ZAnastrel = 0;
|
|
ZAnastrel = (((Widget*)parent)->ZAnastrel);
|
|
ui->lineEdit->setText(QString::number(ZAnastrel));
|
|
}
|
|
|
|
nastrel::~nastrel()
|
|
{
|
|
delete ui;
|
|
}
|
|
|
|
void nastrel::closeEvent(QCloseEvent *event)
|
|
{
|
|
((Widget*)parent())->clearOpenWidget();
|
|
event->accept();
|
|
}
|
|
|
|
void nastrel::on_pushButton_2_clicked()
|
|
{
|
|
|
|
close();
|
|
}
|
|
|
|
void nastrel::on_pushButton_clicked()
|
|
{
|
|
ZAnastrel = ui->lineEdit->text().toInt();
|
|
((Widget*)parent())->ZAnastrel = ZAnastrel;
|
|
((Widget*)parent())->writeFile();
|
|
close();
|
|
}
|