# HG changeset patch # User Raimund Renkert # Date 1395843694 -3600 # Node ID a3f542bf38f7b176299166efe4d696a570e654ef # Parent 45f6b62f91e7a5fbe30764d8f2901343de4a4f95 Added header for mainwindow. diff -r 45f6b62f91e7 -r a3f542bf38f7 ui/mainwindow.cpp --- 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 #include #include +#include +#include // 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("

" + tr("Certificate Installer") + "

"); + 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);