diff ui/mainwindow.cpp @ 1096:10f0efd197c7

(issue111) Rework header to be simpler and left bound.
author Andre Heinecke <andre.heinecke@intevation.de>
date Mon, 15 Sep 2014 10:53:21 +0200
parents a0fb21625cf3
children b033a7d26f2e
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Mon Sep 15 10:40:24 2014 +0200
+++ b/ui/mainwindow.cpp	Mon Sep 15 10:53:21 2014 +0200
@@ -600,7 +600,8 @@
     QVBoxLayout *updatesMainLayout = new QVBoxLayout;
 
     /* The header */
-    QGridLayout *updatesHeaderLayout = new QGridLayout;
+    QVBoxLayout *updatesHeaderLayout = new QVBoxLayout;
+
 
     /* Header 1: Update date and search button */
     QHBoxLayout *updateDateAndSearchButton = new QHBoxLayout;
@@ -630,17 +631,11 @@
     updateDateAndSearchButton->addWidget(mLastUpdateCheckContents);
     updateDateAndSearchButton->addWidget(searchUpdates);
 
-    // addWidget(*Widget, row, column, rowspan, colspan, [Qt::Alignment])
-    updatesHeaderLayout->addWidget(mUpdatesHeader, 0, 0, 1, 2);
-    updatesHeaderLayout->addWidget(mLastUpdateCheck, 2, 0, 1, 1);
-    updatesHeaderLayout->addLayout(updateDateAndSearchButton, 2, 1, 1, 1);
-//    updatesHeaderLayout->addWidget(mLastUpdateCheckContents, 2, 1, 1, 1);
-    updatesHeaderLayout->addWidget(mLastCertUpdate, 3, 0, 1, 1);
-    updatesHeaderLayout->addWidget(mLastCertUpdateContents, 3, 1, 1, 1);
-    updatesHeaderLayout->setColumnStretch(3, 1);
-
-//    updatesHeaderLayout->addWidget(searchUpdates, 1, 4, 1, 2, Qt::AlignRight);
-    updatesHeaderLayout->setRowMinimumHeight(4, 15);
+    updatesHeaderLayout->addWidget(mUpdatesHeader);
+//  TODO  updatesHeaderLayout->addWidget(mLastUpdateCheck, 2, 0, 1, 1);
+//  TODO  updatesHeaderLayout->addLayout(updateDateAndSearchButton, 2, 1, 1, 1);
+//  TODO  updatesHeaderLayout->addWidget(mLastCertUpdate, 3, 0, 1, 1);
+//  TODO  updatesHeaderLayout->addWidget(mLastCertUpdateContents, 3, 1, 1, 1);
 
     /* Header 2: Action text and buttons */
     mUpdatesTip =
@@ -665,11 +660,18 @@
     connect(mInstallButton, SIGNAL(clicked()), this, SLOT(checkAndInstallCerts()));
 
     // addWidget(*Widget, row, column, rowspan, colspan)
-    updatesHeaderLayout->addWidget(mUpdatesTip, 5, 0, 1, 4);
+// TODO     updatesHeaderLayout->addWidget(mUpdatesTip, 5, 0, 1, 4);
     updatesHeaderActionButtonLayout->addWidget(mInstallButton);
     updatesHeaderActionButtonLayout->addWidget(mQuitButton);
-    updatesHeaderLayout->addLayout(updatesHeaderActionButtonLayout, 6, 0, 1, -1, Qt::AlignRight);
-    updatesHeaderLayout->setRowMinimumHeight(7, 10);
+    updatesHeaderActionButtonLayout->addStretch(-1);
+    updatesHeaderLayout->addLayout(updatesHeaderActionButtonLayout);
+    updatesHeaderLayout->addSpacing(20);
+
+    /* The splitter line */
+    QFrame *line = new QFrame();
+    line->setFrameShape(QFrame::HLine);
+    line->setFrameShadow(QFrame::Sunken);
+    updatesHeaderLayout->addWidget(line);
 
     /* The central panels. */
     QScrollArea *centralScrollArea = new QScrollArea;

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