-
Notifications
You must be signed in to change notification settings - Fork 1
/
aboutdialogue.cpp
45 lines (39 loc) · 1.64 KB
/
aboutdialogue.cpp
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
/*
* Copyright (C) 2017 Lily Rivers (VioletDarkKitty)
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; version 3
* of the License only.
*
* This program 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. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#include "aboutdialogue.h"
#include "ui_aboutdialogue.h"
#include <QPushButton>
AboutDialogue::AboutDialogue(QWidget *parent) :
QDialog(parent),
ui(new Ui::AboutDialogue)
{
ui->setupUi(this);
this->setWindowFlags(Qt::Window);
QPushButton* closeButton = this->findChild<QPushButton*>("closeButton");
connect(closeButton,SIGNAL(clicked(bool)),this,SLOT(close()));
QLabel* versionLabel = this->findChild<QLabel*>("versionLabel");
QString version = QString::number(VERSION_MAJOR) + "." + QString::number(VERSION_MINOR) + "." + QString::number(VERSION_BUILD);
versionLabel->setText(version);
QIcon appIcon = QIcon::fromTheme("utilities-system-monitor",QIcon::fromTheme("application-x-executable"));
QLabel* programIcon = this->findChild<QLabel*>("programIcon");
programIcon->setPixmap(appIcon.pixmap(appIcon.actualSize(QSize(128,128))));
}
AboutDialogue::~AboutDialogue()
{
delete ui;
}