[PATCH 3 of 3] (issue111) Rework header to be simpler and left bound

Wald Commits scm-commit at wald.intevation.org
Mon Sep 15 10:53:27 CEST 2014


# HG changeset patch
# User Andre Heinecke <andre.heinecke at intevation.de>
# Date 1410771201 -7200
# Node ID 10f0efd197c7f977f1c128930731e50442e3904e
# Parent  a0fb21625cf3065c1c607a23fa529ddae345d064
(issue111) Rework header to be simpler and left bound.

diff -r a0fb21625cf3 -r 10f0efd197c7 ui/mainwindow.cpp
--- 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;


More information about the Trustbridge-commits mailing list