changeset 456:37a97621b466

Added label for current and updated list date.
author Raimund Renkert <rrenkert@intevation.de>
date Wed, 23 Apr 2014 14:00:10 +0200
parents 4204ae2753d9
children c17c1da7108d
files ui/mainwindow.cpp ui/mainwindow.h
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/ui/mainwindow.cpp	Wed Apr 23 13:59:33 2014 +0200
+++ b/ui/mainwindow.cpp	Wed Apr 23 14:00:10 2014 +0200
@@ -290,6 +290,7 @@
     QVBoxLayout *headerTextLayout = new QVBoxLayout;
     QHBoxLayout *bottomLayout = new QHBoxLayout;
     QVBoxLayout *settingsLayout = new QVBoxLayout;
+    QVBoxLayout *listInfoLayout = new QVBoxLayout;
 
     // The certificate list
     QGroupBox *certBox = new QGroupBox(tr("Managed Certificates"));
@@ -297,6 +298,13 @@
     connect(mCertListWidget, SIGNAL(currentItemChanged(QListWidgetItem*, QListWidgetItem*)),
         this, SLOT(showDetails(QListWidgetItem*)));
     certLayout->addWidget(mCertListWidget);
+
+    mCurrentListDate = new QLabel(tr("Current List Date: %1").arg(""));
+    mNewListDate = new QLabel("");
+    listInfoLayout->addWidget(mCurrentListDate);
+    listInfoLayout->addWidget(mNewListDate);
+    certLayout->addLayout(listInfoLayout);
+
     certBox->setLayout(certLayout);
 
     // The header (icon, about text)
@@ -411,6 +419,9 @@
                 oldRemoveCerts.append(cert);
             }
         }
+        // Set the date of the old list.
+        mCurrentListDate->setText(tr("Current List Date: %1")
+            .arg(mInstalledList.date().toString()));
     }
     else {
         // Sort and filter both lists.
@@ -439,6 +450,9 @@
                 }
             }
         }
+        mCurrentListDate->setText(tr("Current List Date: %1")
+            .arg(mInstalledList.date().toString()));
+        mNewListDate->setText(tr("New List Date: %1").arg(mListToInstall.date().toString()));
     }
 
     // Add separators and certificates to list widget.
--- a/ui/mainwindow.h	Wed Apr 23 13:59:33 2014 +0200
+++ b/ui/mainwindow.h	Wed Apr 23 14:00:10 2014 +0200
@@ -178,6 +178,9 @@
     QLabel *mValidTo;
     QLabel *mFingerprint;
 
+    QLabel *mCurrentListDate;
+    QLabel *mNewListDate;
+
     QCheckBox *mAutoUpdateOption;
     QCheckBox *mAutoStartOption;
 

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