changeset 188:a3bde2aaabd9

merged.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 26 Mar 2014 09:12:10 +0100
parents 0c06a608e15f (diff) ee37c085b9f7 (current diff)
children 5f0d45ca9de4
files
diffstat 2 files changed, 37 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- 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 <QApplication>
 #include <QFile>
 #include <QTimer>
+#include <QHBoxLayout>
+#include <QListWidget>
+#include <QVBoxLayout>
+#include <QGroupBox>
+#include <QPushButton>
 
 // 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>("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";
 }
+
--- 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;

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