view ui/aboutdialog.cpp @ 1378:3c61ab983f9b

(Auto) Update l10n
author Andre Heinecke <andre.heinecke@intevation.de>
date Thu, 15 Jan 2015 11:50:19 +0100
parents f1f4059ec320
children
line wrap: on
line source
/* Copyright (C) 2014 by Bundesamt für Sicherheit in der Informationstechnik
 * Software engineering by Intevation GmbH
 *
 * This file is Free Software under the GNU GPL (v>=2)
 * and comes with ABSOLUTELY NO WARRANTY!
 * See LICENSE.txt for details.
 */
#include "aboutdialog.h"
#include <QApplication>
#include <QDebug>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QPushButton>
#include <QLabel>

AboutDialog::AboutDialog(QMainWindow *parent) :
    QDialog(parent)
{
    setWindowTitle("About TrustBridge");
    setupGUI();
}

void AboutDialog::setupGUI()
{
    QVBoxLayout *mainLayout = new QVBoxLayout(this);
    QHBoxLayout *headerLayout = new QHBoxLayout;
    QVBoxLayout *headerTextLayout = new QVBoxLayout;
    QVBoxLayout *centerLayout = new QVBoxLayout;
    QHBoxLayout *bottomLayout = new QHBoxLayout;

    QLabel *title = new QLabel("<h2>" + tr("TrustBridge Administration") + "</h2>");
    QString version = tr("Version: ");
    version.append(QApplication::applicationVersion());
    QLabel *appVersion = new QLabel(version);
    appVersion->setTextInteractionFlags(
        Qt::TextSelectableByMouse |
        Qt::TextSelectableByKeyboard);

    headerTextLayout->addWidget(title);
    headerTextLayout->addWidget(appVersion);
    headerLayout->addLayout(headerTextLayout);
    headerLayout->insertStretch(2, 10);

    QLabel *textDesc = new QLabel("<hr>" + tr("TrustBridge is a root certificate"
        " 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 BSI.<br/><br/>") +
    tr("TrustBridge is Free Software licensed"
        " under GNU GPL v==3.<br/>Copyright (C) 2014 by Bundesamt für Sicherheit"
        " in der Informationstechnik<br/><br/>") +
    tr("TrustBridge Administrator uses several Free Software components with different licenses:") +
	"<ul><li>TrustBridge source code (GNU GPL v>=2)" +
	"<li>Qt (GNU LGPL v==2.1 | GNU GPL v==3)" +
	"<li>PolarSSL (GNU GPL v>=2)" +
	"<li>Oxygen-Icons (GNU LGPL v>=3)" +
	"<li>OpenSSL-based signcode utility (GNU GPL v==3)" +
	"<li>OpenSSL (OpenSSL License)" +
	"<li>NSIS (zlib/libpng license & Common Public License version 1.0)</ul>" +
    tr("You will find the legally binding details in the 'licenses' directory "
       "where TrustBridge is installed<br/>"
       "or in the corresponding revision of the "
       "<a href=\"https://wald.intevation.org/hg/trustbridge/file/tip/licenses\">TrustBridge code repository</a>."));

    textDesc->setTextFormat(Qt::RichText);
    textDesc->setTextInteractionFlags(
        Qt::TextSelectableByMouse |
        Qt::TextSelectableByKeyboard |
        Qt::LinksAccessibleByMouse);
    textDesc->setOpenExternalLinks(true);

    centerLayout->addWidget(textDesc);
    centerLayout->insertStretch(8, 10);

    QPushButton *closeButton = new QPushButton(tr("Close"));
    connect(closeButton, SIGNAL(clicked()), this, SLOT(close()));
    bottomLayout->insertStretch(0, 10);
    bottomLayout->addWidget(closeButton);

    QFrame *bottomSeparator = new QFrame();
    bottomSeparator->setFrameShape(QFrame::HLine);
    bottomSeparator->setFrameShadow(QFrame::Sunken);
    mainLayout->addLayout(headerLayout);
    mainLayout->addLayout(centerLayout);
    mainLayout->addWidget(bottomSeparator);
    mainLayout->addLayout(bottomLayout);
}

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