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