annotate ui/aboutdialog.cpp @ 1340:8f7cbe522ab8

Testplan updated for 1.0.
author Emanuel Schuetze <emanuel@intevation.de>
date Mon, 27 Oct 2014 16:14:24 +0100
parents f1f4059ec320
children
rev   line source
404
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
1 /* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
2 * Software engineering by Intevation GmbH
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
3 *
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
4 * This file is Free Software under the GNU GPL (v>=2)
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
5 * and comes with ABSOLUTELY NO WARRANTY!
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
6 * See LICENSE.txt for details.
17e1c8f37d72 Add License
Andre Heinecke <aheinecke@intevation.de>
parents: 199
diff changeset
7 */
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
8 #include "aboutdialog.h"
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
9 #include <QApplication>
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
10 #include <QDebug>
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
11 #include <QVBoxLayout>
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
12 #include <QHBoxLayout>
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
13 #include <QPushButton>
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
14 #include <QLabel>
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
15
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
16 AboutDialog::AboutDialog(QMainWindow *parent) :
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
17 QDialog(parent)
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
18 {
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
19 setWindowTitle("About TrustBridge");
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
20 setupGUI();
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
21 }
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
22
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
23 void AboutDialog::setupGUI()
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
24 {
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
25 QVBoxLayout *mainLayout = new QVBoxLayout(this);
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
26 QHBoxLayout *headerLayout = new QHBoxLayout;
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
27 QVBoxLayout *headerTextLayout = new QVBoxLayout;
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
28 QVBoxLayout *centerLayout = new QVBoxLayout;
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
29 QHBoxLayout *bottomLayout = new QHBoxLayout;
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
30
1274
f1f4059ec320 (admin) Updated strings.
Emanuel Schuetze <emanuel@intevation.de>
parents: 1229
diff changeset
31 QLabel *title = new QLabel("<h2>" + tr("TrustBridge Administration") + "</h2>");
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
32 QString version = tr("Version: ");
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
33 version.append(QApplication::applicationVersion());
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
34 QLabel *appVersion = new QLabel(version);
568
8dbfd0cb534b Made text selectable in about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 531
diff changeset
35 appVersion->setTextInteractionFlags(
8dbfd0cb534b Made text selectable in about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 531
diff changeset
36 Qt::TextSelectableByMouse |
8dbfd0cb534b Made text selectable in about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 531
diff changeset
37 Qt::TextSelectableByKeyboard);
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
38
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
39 headerTextLayout->addWidget(title);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
40 headerTextLayout->addWidget(appVersion);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
41 headerLayout->addLayout(headerTextLayout);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
42 headerLayout->insertStretch(2, 10);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
43
1215
1171a4778562 (issue68) Added license note to about dialog of client and admin application.
Emanuel Schuetze <emanuel@intevation.de>
parents: 844
diff changeset
44 QLabel *textDesc = new QLabel("<hr>" + tr("TrustBridge is a root certificate"
807
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
45 " installer for Windows and GNU/Linux.<br/>") +
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
46 tr("The root certificate lists are managed"
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
47 " by the German <a href=\"https://www.bsi.bund.de\">"
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
48 "Federal Office for Information Security (BSI)</a>.<br/><br/>") +
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
49 tr("The software was developed by the companies"
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
50 " <a href=\"http://www.intevation.de\">Intevation GmbH</a> and "
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
51 " <a href=\"http://www.dn-systems.de\">DN-Systems GmbH</a>, <br>"
1215
1171a4778562 (issue68) Added license note to about dialog of client and admin application.
Emanuel Schuetze <emanuel@intevation.de>
parents: 844
diff changeset
52 " contracted by the BSI.<br/><br/>") +
807
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
53 tr("TrustBridge is Free Software licensed"
1218
5f59344dbd13 (issue68) License corrections:
Bernhard Reiter <bernhard@intevation.de>
parents: 1215
diff changeset
54 " under GNU GPL v==3.<br/>Copyright (C) 2014 by Bundesamt für Sicherheit"
1215
1171a4778562 (issue68) Added license note to about dialog of client and admin application.
Emanuel Schuetze <emanuel@intevation.de>
parents: 844
diff changeset
55 " in der Informationstechnik<br/><br/>") +
1171a4778562 (issue68) Added license note to about dialog of client and admin application.
Emanuel Schuetze <emanuel@intevation.de>
parents: 844
diff changeset
56 tr("TrustBridge Administrator uses several Free Software components with different licenses:") +
1218
5f59344dbd13 (issue68) License corrections:
Bernhard Reiter <bernhard@intevation.de>
parents: 1215
diff changeset
57 "<ul><li>TrustBridge source code (GNU GPL v>=2)" +
5f59344dbd13 (issue68) License corrections:
Bernhard Reiter <bernhard@intevation.de>
parents: 1215
diff changeset
58 "<li>Qt (GNU LGPL v==2.1 | GNU GPL v==3)" +
5f59344dbd13 (issue68) License corrections:
Bernhard Reiter <bernhard@intevation.de>
parents: 1215
diff changeset
59 "<li>PolarSSL (GNU GPL v>=2)" +
5f59344dbd13 (issue68) License corrections:
Bernhard Reiter <bernhard@intevation.de>
parents: 1215
diff changeset
60 "<li>Oxygen-Icons (GNU LGPL v>=3)" +
5f59344dbd13 (issue68) License corrections:
Bernhard Reiter <bernhard@intevation.de>
parents: 1215
diff changeset
61 "<li>OpenSSL-based signcode utility (GNU GPL v==3)" +
1215
1171a4778562 (issue68) Added license note to about dialog of client and admin application.
Emanuel Schuetze <emanuel@intevation.de>
parents: 844
diff changeset
62 "<li>OpenSSL (OpenSSL License)" +
1171a4778562 (issue68) Added license note to about dialog of client and admin application.
Emanuel Schuetze <emanuel@intevation.de>
parents: 844
diff changeset
63 "<li>NSIS (zlib/libpng license & Common Public License version 1.0)</ul>" +
1229
6154d554b3af (issue101) Text improved, pointing to local dir and the online repo.:
Bernhard Reiter <bernhard@intevation.de>
parents: 1218
diff changeset
64 tr("You will find the legally binding details in the 'licenses' directory "
1274
f1f4059ec320 (admin) Updated strings.
Emanuel Schuetze <emanuel@intevation.de>
parents: 1229
diff changeset
65 "where TrustBridge is installed<br/>"
f1f4059ec320 (admin) Updated strings.
Emanuel Schuetze <emanuel@intevation.de>
parents: 1229
diff changeset
66 "or in the corresponding revision of the "
1215
1171a4778562 (issue68) Added license note to about dialog of client and admin application.
Emanuel Schuetze <emanuel@intevation.de>
parents: 844
diff changeset
67 "<a href=\"https://wald.intevation.org/hg/trustbridge/file/tip/licenses\">TrustBridge code repository</a>."));
1171a4778562 (issue68) Added license note to about dialog of client and admin application.
Emanuel Schuetze <emanuel@intevation.de>
parents: 844
diff changeset
68
807
1e18d4c1932a Unify about dialog labels and Remove Trustbridge header
Andre Heinecke <andre.heinecke@intevation.de>
parents: 568
diff changeset
69 textDesc->setTextFormat(Qt::RichText);
568
8dbfd0cb534b Made text selectable in about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 531
diff changeset
70 textDesc->setTextInteractionFlags(
8dbfd0cb534b Made text selectable in about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents: 531
diff changeset
71 Qt::TextSelectableByMouse |
844
fa68e5aeeaac Make links clickable and also change the about info in mainwindow.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 843
diff changeset
72 Qt::TextSelectableByKeyboard |
fa68e5aeeaac Make links clickable and also change the about info in mainwindow.
Andre Heinecke <andre.heinecke@intevation.de>
parents: 843
diff changeset
73 Qt::LinksAccessibleByMouse);
843
c27a9b2b096e Allow to open external links from aboutdialog label.
Emanuel Schuetze <emanuel@intevation.de>
parents: 807
diff changeset
74 textDesc->setOpenExternalLinks(true);
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
75
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
76 centerLayout->addWidget(textDesc);
428
d1819cd56dee Updated dialog layout.
Raimund Renkert <rrenkert@intevation.de>
parents: 427
diff changeset
77 centerLayout->insertStretch(8, 10);
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
78
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
79 QPushButton *closeButton = new QPushButton(tr("Close"));
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
80 connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
81 bottomLayout->insertStretch(0, 10);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
82 bottomLayout->addWidget(closeButton);
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
83
427
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
84 QFrame *bottomSeparator = new QFrame();
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
85 bottomSeparator->setFrameShape(QFrame::HLine);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
86 bottomSeparator->setFrameShadow(QFrame::Sunken);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
87 mainLayout->addLayout(headerLayout);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
88 mainLayout->addLayout(centerLayout);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
89 mainLayout->addWidget(bottomSeparator);
d08e39b913ee Added about dialog content and open the dialog via administration app.
Raimund Renkert <rrenkert@intevation.de>
parents: 404
diff changeset
90 mainLayout->addLayout(bottomLayout);
199
4790a26c2e8b Added about dialog.
Raimund Renkert <rrenkert@intevation.de>
parents:
diff changeset
91 }

http://wald.intevation.org/projects/trustbridge/