]> git.sesse.net Git - nageru/blob - shared/aboutdialog.cpp
Move VADisplayWithCleanup into its own header file, in shared/.
[nageru] / shared / aboutdialog.cpp
1 #include "aboutdialog.h"
2
3 #include <QDialogButtonBox>
4
5 #include "ui_aboutdialog.h"
6
7 using namespace std;
8
9 AboutDialog::AboutDialog(const string &program, const string &subheading)
10         : ui(new Ui::AboutDialog)
11 {
12         ui->setupUi(this);
13         QString str = ui->header->text();
14         str.replace("@NAGERU_VERSION@", NAGERU_VERSION);
15         str.replace("@PROGRAM@", QString::fromStdString(program));
16         str.replace("@SUBHEADING@", QString::fromStdString(subheading));
17         ui->header->setText(str);
18
19         connect(ui->button_box, &QDialogButtonBox::accepted, [this]{ this->close(); });
20 }
21