first commit
This commit is contained in:
36
dialog.cpp
Normal file
36
dialog.cpp
Normal file
@@ -0,0 +1,36 @@
|
||||
#include "dialog.h"
|
||||
#include "ui_dialog.h"
|
||||
|
||||
Dialog::Dialog(QWidget *parent, QString title, QString headline, QString message) : QDialog(parent), ui(new Ui::Dialog)
|
||||
{
|
||||
ui->setupUi(this);
|
||||
this->setWindowTitle(title);
|
||||
ui->headline->setText(headline);
|
||||
ui->message->setText(message);
|
||||
}
|
||||
|
||||
Dialog::~Dialog()
|
||||
{
|
||||
delete ui;
|
||||
}
|
||||
|
||||
QString Dialog::getInput()
|
||||
{
|
||||
if (this->result() != Accepted) {
|
||||
return "";
|
||||
}
|
||||
return this->ui->lineEdit->text();
|
||||
}
|
||||
|
||||
|
||||
void Dialog::on_buttonBox_accepted()
|
||||
{
|
||||
accept();
|
||||
}
|
||||
|
||||
|
||||
void Dialog::on_buttonBox_rejected()
|
||||
{
|
||||
reject();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user