2022-06-13 22:53:46 +00:00
|
|
|
#include <QVBoxLayout>
|
|
|
|
#include <QLabel>
|
|
|
|
#include <QPushButton>
|
|
|
|
#include "success_dialog.h"
|
2022-06-19 18:10:44 +00:00
|
|
|
#include "message_source.h"
|
2022-06-13 22:53:46 +00:00
|
|
|
|
|
|
|
namespace display {
|
|
|
|
|
2022-06-19 18:10:44 +00:00
|
|
|
SuccessDialog::SuccessDialog(std::string message) {
|
2022-06-13 22:53:46 +00:00
|
|
|
setLayout(new QVBoxLayout());
|
2022-06-19 18:10:44 +00:00
|
|
|
setWindowTitle(QMESSAGE("msg_dialog_success_title"));
|
2022-06-13 22:53:46 +00:00
|
|
|
layout()->addWidget(new QLabel(QString::fromStdString(message)));
|
|
|
|
|
2022-06-19 18:10:44 +00:00
|
|
|
auto button = new QPushButton(QMESSAGE("msg_dialog_actions_ok"));
|
2022-06-13 22:53:46 +00:00
|
|
|
connect(button, &QPushButton::clicked, [this]() {accept();});
|
|
|
|
layout()->addWidget(button);
|
|
|
|
}
|
|
|
|
|
|
|
|
} // display
|