# HG changeset patch # User Raimund Renkert # Date 1395821530 -3600 # Node ID a3bde2aaabd9d451753a71cc3ac768c975454d26 # Parent 0c06a608e15f7a8bfadfbb5c8154c3a0da6ac5c1# Parent ee37c085b9f7e259d7bb85224e3ab6628e6fd13d merged. diff -r ee37c085b9f7 -r a3bde2aaabd9 ui/mainwindow.cpp --- a/ui/mainwindow.cpp Tue Mar 25 18:03:49 2014 +0000 +++ b/ui/mainwindow.cpp Wed Mar 26 09:12:10 2014 +0100 @@ -9,6 +9,11 @@ #include #include #include +#include +#include +#include +#include +#include // The amount of time in minutes stay silent if we have // something to say @@ -26,6 +31,7 @@ createActions(); createTrayIcon(); createMenuBar(); + createContent(); qRegisterMetaType("SSLConnection::ErrorCode"); connect(mTrayIcon, SIGNAL(activated(QSystemTrayIcon::ActivationReason)), @@ -213,6 +219,35 @@ setMenuBar(mMenuBar); } +void MainWindow::createContent() +{ + // Create a central widget containing the main layout. + QWidget *base = new QWidget; + + QVBoxLayout *mainLayout = new QVBoxLayout; + QHBoxLayout *certLayout = new QHBoxLayout; + QHBoxLayout *bottomLayout = new QHBoxLayout; + + QGroupBox *certBox = new QGroupBox(tr("Managed Certificates")); + QListWidget *certificates = new QListWidget; + QListWidget *details = new QListWidget; + certLayout->addWidget(certificates); + certLayout->addWidget(details); + certBox->setLayout(certLayout); + + QPushButton *update = new QPushButton("Search for Updates"); + connect(update, SIGNAL(clicked()), this, SLOT(checkUpdates())); + bottomLayout->insertStretch(0, 10); + bottomLayout->addWidget(update); + mainLayout->addWidget(certBox); + mainLayout->addLayout(bottomLayout); + + // QMainWindow allready has a layout. All child layouts and widgets are + // managed in the central widget. + base->setLayout(mainLayout); + setCentralWidget(base); +} + void MainWindow::showSettings() { qDebug() << "show settingsdialog"; } @@ -226,3 +261,4 @@ { qDebug() << "show aboutdialog"; } + diff -r ee37c085b9f7 -r a3bde2aaabd9 ui/mainwindow.h --- a/ui/mainwindow.h Tue Mar 25 18:03:49 2014 +0000 +++ b/ui/mainwindow.h Wed Mar 26 09:12:10 2014 +0100 @@ -63,6 +63,7 @@ void createTrayIcon(); void createActions(); void createMenuBar(); + void createContent(); QString mCurMessage; QString mInstalledSWVersion;