-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathabout.cpp
More file actions
43 lines (36 loc) · 2.1 KB
/
about.cpp
File metadata and controls
43 lines (36 loc) · 2.1 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
#include "about.h"
aboutDialog::aboutDialog(QWidget *parent) : QDialog(parent)
{
setupUi(this);
layout()->setSizeConstraint(QLayout::SetFixedSize);
setWindowFlags(windowFlags() | Qt::MSWindowsFixedSizeDialogHint);
label_Name->setText(QString("%1").arg(APPNAME));
label_Version->setText(tr("Version %1 - %2").arg(APPVERS, APPDATE));
textEdit->setAlignment(Qt::AlignCenter);
textEdit->textCursor().insertText(tr("This program is Freeware and may be installed and used free of charge for non-commercial use on as many computers as you like without limitations.\n\nA liability for any damages resulting from the use is excluded. Use at your own risk!"));
textEdit->moveCursor(QTextCursor::Start);
textEdit->setFixedHeight(5 * textEdit->fontMetrics().height() + textEdit->document()->documentMargin() + 2);
}
void aboutDialog::mouseReleaseEvent(QMouseEvent *me)
{
QWidget *child = QWidget::childAt(me->pos());
if(child)
{
QString name = child->objectName();
if(name == "label_Mail")
{
QDesktopServices::openUrl(QUrl(QByteArray::fromBase64("bWFpbHRvOkxhenlUQG1haWxib3gub3JnP3N1YmplY3Q9TE1HUiZib2R5PVdyaXRlIGluIEVuZ2xpc2ggb3IgR2VybWFuIHBsZWFzZS4uLg==")));
}
else if(name == "label_Forum")
{
QDesktopServices::openUrl(QUrl(QByteArray::fromBase64("aHR0cHM6Ly9mb3J1bS54ZGEtZGV2ZWxvcGVycy5jb20vazIwLXByby90aGVtZXMvYXBwLWxvZ28tbWFuYWdlci1zcGxhc2gtc2NyZWVucy10NDA4NDQ1NQ==")));
}
else if(name == "label_Donation")
{
if(QMessageBox::warning(this, APPNAME, tr("Please note the following points:\n\n* The payment is made voluntarily without the acquisition of claims.\n* You receive no rights to the offered software.\n* Because this is not a donation in juridical sense no certificate can be issued.\n\nWould you like to support the further development of this project nevertheless?"), QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes) == QMessageBox::Yes)
{
QDesktopServices::openUrl(QUrl(QByteArray::fromBase64("aHR0cHM6Ly93d3cucGF5cGFsLmNvbS9jZ2ktYmluL3dlYnNjcj9jbWQ9X2RvbmF0aW9ucyZidXNpbmVzcz1MYXp5VEBtYWlsYm94Lm9yZyZpdGVtX25hbWU9TG9nbyUyME1hbmFnZXImYW1vdW50PTAmY3VycmVuY3lfY29kZT1FVVI=")));
}
}
}
}