-
Notifications
You must be signed in to change notification settings - Fork 1
/
about.cpp
87 lines (77 loc) · 3.13 KB
/
about.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
/**
* Log2Log Chat Log Converter
* Libraries
* About Dialog
*
* @author Deltik
*
* License:
* This file is part of Log2Log.
*
* Log2Log 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, either version 3 of the License, or
* (at your option) any later version.
*
* Log2Log 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 Log2Log. If not, see <http://www.gnu.org/licenses/>.
*
*/
#include "about.h"
#include "ui_about.h"
#include "update.h"
#include <QTimer>
About::About(QWidget *parent) :
QDialog(parent),
ui(new Ui::About)
{
ui->setupUi(this);
connect(ui->backButton, SIGNAL(clicked()), this, SLOT(goBack()));
connect(ui->creditsButton, SIGNAL(clicked()), this, SLOT(showCredits()));
connect(ui->licenseButton, SIGNAL(clicked()), this, SLOT(showLicense()));
// Set Version Number
ui->textBrowser->setHtml(ui->textBrowser->toHtml().replace("VERSION", (QString)VERSION));
this->setWindowTitle("About Log2Log");
this->setWindowOpacity(0.0);
QTimer* timer = new QTimer;
timer->setInterval(10);
connect(timer, SIGNAL(timeout()), this, SLOT(fader()));
timer->start();
}
About::~About()
{
delete ui;
}
// Go back / Cancel button
void About::goBack()
{
this->close();
}
// Show Credits
void About::showCredits()
{
this->ui->textBrowser->setHtml((QString)"<table width=\"100%\">" +
"<tr><td>Designed by:</td><th>Nick Liu (Deltik)</th></tr>" +
"<tr><td>Inspired by:</td><th>UFGrayMatter</th></tr>" +
"<tr><td>Programmer:</td><th>Nick Liu (Deltik)</th></tr>" +
"<tr><td>Programmer:</td><th>Igor Cardoso (igordcard)</th></tr>" +
"</table>" +
"<p><center><img src=\":/images/etc/Deltik.png\" alt=\"Deltik\" /></center></p>");
}
// Show License
void About::showLicense()
{
this->ui->textBrowser->setHtml((QString)"<p>Log2Log 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, either version 3 of the License, or (at your option) any later version.</p>" +
"<p>Log2Log 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.</p>" +
"<p>You should have received a copy of the GNU General Public License along with Log2Log If not, see <http://www.gnu.org/licenses/>.</p>");
}
// Sleeper
void About::fader()
{
this->setWindowOpacity(this->windowOpacity() + 0.025);
}