diff ui/mainwindow.cpp @ 205:a3f542bf38f7

Added header for mainwindow.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 26 Mar 2014 15:21:34 +0100
parents fe424c5fc875
children 9c51c472e596
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Mar 26 13:30:33 2014 +0100
+++ b/ui/mainwindow.cpp	Wed Mar 26 15:21:34 2014 +0100
@@ -14,6 +14,8 @@
 #include <QGroupBox>
 #include <QPushButton>
 #include <QSplitter>
+#include <QLabel>
+#include <QImage>
 
 // The amount of time in minutes stay silent if we have
 // something to say
@@ -228,9 +230,23 @@
     QWidget *base = new QWidget;
 
     QVBoxLayout *mainLayout = new QVBoxLayout;
+    QHBoxLayout *headerLayout = new QHBoxLayout;
+    QVBoxLayout *headerTextLayout = new QVBoxLayout;
     QHBoxLayout *certLayout = new QHBoxLayout;
     QHBoxLayout *bottomLayout = new QHBoxLayout;
 
+    QImage *logoImage = new QImage(":/img/logo.png");
+    QLabel *logo = new QLabel;
+    logo->setBackgroundRole(QPalette::Base);
+    logo->setScaledContents(true);
+    logo->setPixmap(QPixmap::fromImage(*logoImage));
+    QLabel *title = new QLabel("<h3>" + tr("Certificate Installer") + "</h3>");
+    QLabel *subTitle = new QLabel("This Software installs and removes Certificates");
+    headerTextLayout->addWidget(title);
+    headerTextLayout->addWidget(subTitle);
+    headerLayout->addWidget(logo);
+    headerLayout->addLayout(headerTextLayout);
+
     QGroupBox *certBox = new QGroupBox(tr("Managed Certificates"));
     certificateList = new QListWidget;
     connect(certificateList, SIGNAL(itemClicked(QListWidgetItem*)),
@@ -247,6 +263,7 @@
     connect(update, SIGNAL(clicked()), this, SLOT(checkUpdates()));
     bottomLayout->insertStretch(0, 10);
     bottomLayout->addWidget(update);
+    mainLayout->addLayout(headerLayout);
     mainLayout->addWidget(certBox);
     mainLayout->addLayout(bottomLayout);
 

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