forked from GLDsuh-a/qt-1
-
Notifications
You must be signed in to change notification settings - Fork 0
/
aboutpathwalker.cpp
70 lines (61 loc) · 2.56 KB
/
aboutpathwalker.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
/*
* This file is part of the PathWalker software
*
* Copyright (C) 2014 Denis Kvita <[email protected]>
*
* 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; either version 3 of the License, or
* (at your option) any later version.
*
* 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, see <http://www.gnu.org/licenses/>.
*/
#include <QPushButton>
#include <QLabel>
#include <QGridLayout>
#include <QApplication>
#include "aboutpathwalker.h"
AboutPathWalker::AboutPathWalker(QWidget *parent) :
QDialog(parent)
{
QLabel *ico= new QLabel;
ico->setPixmap(QPixmap("://img/folders.png"));
QLabel *title= new QLabel("<b>Path Walker</b> <a href=\"https://code.google.com/p/path-walker/\"><img src=\":/img/shortcut.png\"></a>");
title->setTextFormat(Qt::RichText);
title->setOpenExternalLinks(true);
title->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
QLabel *author= new QLabel("Author: <b>Denis Kvita</b> (<a href=\"mailto:[email protected]\">[email protected]</a>)");
author->setTextFormat(Qt::RichText);
author->setOpenExternalLinks(true);
author->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
QLabel *fugue= new QLabel("Some Icons are Copyright© <a href=\"http://p.yusukekamiyamane.com\">Yusuke Kamiyamane</a>.");
fugue->setTextFormat(Qt::RichText);
fugue->setOpenExternalLinks(true);
fugue->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
QLabel *qt= new QLabel("Powered by <a href=\"http://qt.digia.com/\">Qt 5.4.0</a>.");
qt->setTextFormat(Qt::RichText);
qt->setOpenExternalLinks(true);
qt->setTextInteractionFlags(Qt::LinksAccessibleByMouse);
QPushButton *ok= new QPushButton("Close");
connect(ok, &QPushButton::clicked, this, &QDialog::accept);
QHBoxLayout *clt= new QHBoxLayout;
clt->addStretch(1);
clt->addWidget(ok);
clt->addStretch(1);
QGridLayout *alt= new QGridLayout;
alt->addWidget(ico, 0,0);
alt->addWidget(title, 0,1);
alt->addWidget(author, 1,0, 1,2);
alt->addWidget(fugue, 2,0, 1,2);
alt->addWidget(qt, 3,0, 1,2);
alt->addLayout(clt, 4,0, 1,2);
alt->setColumnStretch(1,1);
setLayout(alt);
resize(350,150);
}