You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
28 lines
557 B
28 lines
557 B
3 months ago
|
#include "warningdialog.h"
|
||
|
#include "ui_warningdialog.h"
|
||
|
|
||
|
WarningDialog::WarningDialog(QString warningText, QWidget *parent) :
|
||
|
QDialog(parent),
|
||
|
ui(new Ui::WarningDialog)
|
||
|
{
|
||
|
ui->setupUi(this);
|
||
|
ui->warningLabel->setText(warningText);
|
||
|
connect (ui->okButton, &QPushButton::clicked, this, &WarningDialog::onOkClicked);
|
||
|
}
|
||
|
|
||
|
WarningDialog::~WarningDialog()
|
||
|
{
|
||
|
delete ui;
|
||
|
}
|
||
|
|
||
|
void WarningDialog::showWarning(QString warningText)
|
||
|
{
|
||
|
WarningDialog warn(warningText);
|
||
|
warn.exec();
|
||
|
}
|
||
|
|
||
|
void WarningDialog::onOkClicked()
|
||
|
{
|
||
|
this->done(0);
|
||
|
}
|