-
Notifications
You must be signed in to change notification settings - Fork 25
Expand file tree
/
Copy pathabout.cpp
More file actions
32 lines (25 loc) · 827 Bytes
/
about.cpp
File metadata and controls
32 lines (25 loc) · 827 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
#include <QtGui>
#include "about.h"
#include "ui_about.h"
About::About(QWidget *parent)
: QDialog(parent)
, ui(new Ui::About)
{
ui->setupUi(this);
ui->labelProduct->setText(TARGET_HUMAN_STRING);
ui->labelVersion->setText(tr("Version %1").arg(VERSION_STRING));
ui->labelIcon->setPixmap(QIcon(":/images/" TARGET_STRING ".ico").pixmap(48, 48));
// %1 will be replaced with a product name
ui->labelWarranty->setText(tr("%1 is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.")
.arg(TARGET_HUMAN_STRING));
#ifdef Q_OS_MAC
ui->pushOK->hide();
#else
setWindowTitle(tr("About"));
#endif
adjustSize();
}
About::~About()
{
delete ui;
}