Init
This commit is contained in:
42
nastrel.cpp
Normal file
42
nastrel.cpp
Normal file
@@ -0,0 +1,42 @@
|
||||
#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();
|
||||
}
|
||||
Reference in New Issue
Block a user