Uh oh!
There was an error while loading. Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathAboutDialog.cpp
More file actions
Latest commit
63 lines (48 loc) · 1.38 KB
/
Copy pathAboutDialog.cpp
File metadata and controls
63 lines (48 loc) · 1.38 KB
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
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
#include"AboutDialog.h"
#include<QLibraryInfo>
#include<QSysInfo>
#include"ui_AboutDialog.h"
#include"ToolBase.h"
AboutDialog::AboutDialog(QWidget *parent)
: QDialog(parent)
, ui_(new Ui::AboutDialog())
{
ui_->setupUi(this);
//title
setWindowTitle("About "+QApplication::applicationName());
//name
ui_->name->setText(QApplication::applicationName());
//version
ui_->version->setText(QCoreApplication::applicationVersion() + " (" + ToolBase::date() + ")");
//lib versions
QString lib_versions;
lib_versions += "Operating system: " + QSysInfo::prettyProductName() + "<br>";
lib_versions += "Architecture: " + QSysInfo::buildCpuArchitecture() + "<br>";
lib_versions += "Qt version: " + QLibraryInfo::version().toString();
ui_->lib_versions->setText(lib_versions);
}
AboutDialog::~AboutDialog()
{
delete ui_;
}
voidAboutDialog::setIcon(QPixmap pixmap)
{
ui_->icon->setPixmap(pixmap.scaled(96, 96));
}
voidAboutDialog::setDescription(QString description)
{
ui_->description->setText(description);
adjustSize();
}
voidAboutDialog::addLibVersionLine(QString line)
{
QString lib_versions = ui_->lib_versions->text();
lib_versions += "<br>" + line.trimmed();
ui_->lib_versions->setText(lib_versions);
adjustSize();
}
voidAboutDialog::setAddInfo(QString add_info)
{
ui_->add_info->setText(add_info);
adjustSize();
}