changeset 807:1e18d4c1932a

Unify about dialog labels and Remove Trustbridge header
author Andre Heinecke <andre.heinecke@intevation.de>
date Tue, 15 Jul 2014 16:30:09 +0200
parents bb02101a7f4b
children 13cf42dbe9bd
files ui/CMakeLists.txt ui/aboutdialog.cpp ui/mainwindow.cpp
diffstat 3 files changed, 21 insertions(+), 64 deletions(-) [+]
line wrap: on
line diff
--- a/ui/CMakeLists.txt	Tue Jul 15 16:07:15 2014 +0200
+++ b/ui/CMakeLists.txt	Tue Jul 15 16:30:09 2014 +0200
@@ -36,7 +36,6 @@
     ${CMAKE_CURRENT_SOURCE_DIR}/certificateitemwidget.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/separatoritemdelegate.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/installwrapper.cpp
-    ${CMAKE_CURRENT_SOURCE_DIR}/aboutdialog.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/processhelp_win.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/processhelp_linux.cpp
     ${CMAKE_CURRENT_SOURCE_DIR}/processwaitdialog.cpp
--- a/ui/aboutdialog.cpp	Tue Jul 15 16:07:15 2014 +0200
+++ b/ui/aboutdialog.cpp	Tue Jul 15 16:30:09 2014 +0200
@@ -28,10 +28,6 @@
     QVBoxLayout *centerLayout = new QVBoxLayout;
     QHBoxLayout *bottomLayout = new QHBoxLayout;
 
-    QImage *logoImage = new QImage(":/img/logo.png");
-    QLabel *logo = new QLabel;
-    logo->setBackgroundRole(QPalette::Base);
-    logo->setPixmap(QPixmap::fromImage(*logoImage));
     QLabel *title = new QLabel("<h2>" + tr("TrustBridge") + "</h2>");
     QString version = tr("Version: ");
     version.append(QApplication::applicationVersion());
@@ -40,49 +36,29 @@
         Qt::TextSelectableByMouse |
         Qt::TextSelectableByKeyboard);
 
-    QFrame *headerSeparator = new QFrame();
-    headerSeparator->setFrameShape(QFrame::HLine);
-    headerSeparator->setFrameShadow(QFrame::Sunken);
-
     headerTextLayout->addWidget(title);
     headerTextLayout->addWidget(appVersion);
-    headerLayout->addWidget(logo);
     headerLayout->addLayout(headerTextLayout);
     headerLayout->insertStretch(2, 10);
 
     QLabel *textDesc = new QLabel(tr("TrustBridge is a root certificate"
-        " installer for Windows and Linux."));
+        " installer for Windows and GNU/Linux.<br/>") +
+    tr("The root certificate lists are managed"
+        " by the German <a href=\"https://www.bsi.bund.de\">"
+        "Federal Office for Information Security (BSI)</a>.<br/><br/>") +
+    tr("The software was developed by the companies"
+        " <a href=\"http://www.intevation.de\">Intevation GmbH</a> and "
+        " <a href=\"http://www.dn-systems.de\">DN-Systems GmbH</a>, <br>"
+        " contracted by the German Federal Office for Information Security (BSI).<br/><br/>") +
+    tr("TrustBridge is Free Software licensed"
+        " under GNU GPL v2+.<br/><br/>Copyright (C) 2014 by Bundesamt für Sicherheit"
+        " in der Informationstechnik"));
+    textDesc->setTextFormat(Qt::RichText);
     textDesc->setTextInteractionFlags(
         Qt::TextSelectableByMouse |
         Qt::TextSelectableByKeyboard);
-    QLabel *textManage = new QLabel(tr("The root certificate lists are managed"
-        " by the German <a href=\"https://www.bsi.bund.de\">"
-        "Federal Office for Information Security (BSI)</a>.\n\n"));
-    textManage->setTextInteractionFlags(
-        Qt::TextBrowserInteraction |
-        Qt::TextSelectableByKeyboard);
-    QLabel *textDevel = new QLabel(tr("The software was developed by the companies"
-        " <a href=\"http://www.intevation.de\">Intevation GmbH</a> and "
-        " <a href=\"http://www.dn-systems.de\">DN-Systems GmbH</a>, <br>"
-        " contracted by the German Federal Office for Information Security (BSI).\n\n"));
-    textDevel->setTextInteractionFlags(
-        Qt::TextBrowserInteraction |
-        Qt::TextSelectableByKeyboard);
-    QLabel *textLicense = new QLabel(tr("TrustBridge is Free Software licensed"
-        " under GNU GPL v2+.\n\nCopyright (C) 2014 by Bundesamt für Sicherheit"
-        " in der Informationstechnik"));
-    textLicense->setTextInteractionFlags(
-        Qt::TextSelectableByMouse |
-        Qt::TextSelectableByKeyboard);
 
-    centerLayout->addWidget(headerSeparator);
     centerLayout->addWidget(textDesc);
-    centerLayout->addWidget(textManage);
-    centerLayout->addWidget(textDevel);
-    centerLayout->addWidget(textLicense);
-    centerLayout->insertSpacing(2, 10);
-    centerLayout->insertSpacing(4, 10);
-    centerLayout->insertSpacing(6, 10);
     centerLayout->insertStretch(8, 10);
 
     QPushButton *closeButton = new QPushButton(tr("Close"));
--- a/ui/mainwindow.cpp	Tue Jul 15 16:07:15 2014 +0200
+++ b/ui/mainwindow.cpp	Tue Jul 15 16:30:09 2014 +0200
@@ -440,11 +440,6 @@
     QVBoxLayout *infoHeaderTextLayout = new QVBoxLayout;
     QVBoxLayout *infoCenterLayout = new QVBoxLayout;
 
-    QImage *infoLogoImage = new QImage(":/img/logo.png");
-    QLabel *infoLogo = new QLabel;
-    infoLogo->setBackgroundRole(QPalette::Base);
-    infoLogo->setPixmap(QPixmap::fromImage(*infoLogoImage));
-    QLabel *infoTitle = new QLabel("<h1>" + tr("TrustBridge") + "</h1>");
     QString infoVersion = tr("Version: ");
     infoVersion.append(QApplication::applicationVersion());
     QLabel *appVersion = new QLabel(infoVersion);
@@ -456,42 +451,29 @@
     infoHeaderSeparator->setFrameShape(QFrame::HLine);
     infoHeaderSeparator->setFrameShadow(QFrame::Sunken);
 
-    infoHeaderTextLayout->addWidget(infoTitle);
     infoHeaderTextLayout->addWidget(appVersion);
-    infoHeaderLayout->addWidget(infoLogo);
     infoHeaderLayout->addLayout(infoHeaderTextLayout);
     infoHeaderLayout->insertStretch(2, 10);
 
     QLabel *textDesc = new QLabel(tr("TrustBridge is a root certificate"
-        " installer for Windows and GNU/Linux."));
-    textDesc->setTextInteractionFlags(
-        Qt::TextSelectableByMouse |
-        Qt::TextSelectableByKeyboard);
-    QLabel *textManage = new QLabel(tr("The root certificate lists are managed"
+        " installer for Windows and GNU/Linux.<br/>") +
+    tr("The root certificate lists are managed"
         " by the German <a href=\"https://www.bsi.bund.de\">"
-        "Federal Office for Information Security (BSI)</a>.\n\n"));
-    textManage->setTextInteractionFlags(
-        Qt::TextBrowserInteraction |
-        Qt::TextSelectableByKeyboard);
-    QLabel *textDevel = new QLabel(tr("The software was developed by the companies"
+        "Federal Office for Information Security (BSI)</a>.<br/><br/>") +
+    tr("The software was developed by the companies"
         " <a href=\"http://www.intevation.de\">Intevation GmbH</a> and "
         " <a href=\"http://www.dn-systems.de\">DN-Systems GmbH</a>, <br>"
-        " contracted by the German Federal Office for Information Security (BSI).\n\n"));
-    textDevel->setTextInteractionFlags(
-        Qt::TextBrowserInteraction |
-        Qt::TextSelectableByKeyboard);
-    QLabel *textLicense = new QLabel(tr("TrustBridge is Free Software licensed"
-        " under GNU GPL v2+.\n\nCopyright (C) 2014 by Bundesamt für Sicherheit"
+        " contracted by the German Federal Office for Information Security (BSI).<br/><br/>") +
+    tr("TrustBridge is Free Software licensed"
+        " under GNU GPL v2+.<br/><br/>Copyright (C) 2014 by Bundesamt für Sicherheit"
         " in der Informationstechnik"));
-    textLicense->setTextInteractionFlags(
+    textDesc->setTextFormat(Qt::RichText);
+    textDesc->setTextInteractionFlags(
         Qt::TextSelectableByMouse |
         Qt::TextSelectableByKeyboard);
 
     infoCenterLayout->addWidget(infoHeaderSeparator);
     infoCenterLayout->addWidget(textDesc);
-    infoCenterLayout->addWidget(textManage);
-    infoCenterLayout->addWidget(textDevel);
-    infoCenterLayout->addWidget(textLicense);
     infoCenterLayout->insertSpacing(2, 10);
     infoCenterLayout->insertSpacing(4, 10);
     infoCenterLayout->insertSpacing(6, 10);

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