diff ui/mainwindow.h @ 654:129e611eaf50

Merge branch trustbridge-refactor
author Andre Heinecke <andre.heinecke@intevation.de>
date Wed, 25 Jun 2014 15:16:24 +0200
parents 292c590ba9cb f65503c1833b
children a2e94e88d304
line wrap: on
line diff
--- a/ui/mainwindow.h	Wed Jun 25 12:44:47 2014 +0200
+++ b/ui/mainwindow.h	Wed Jun 25 15:16:24 2014 +0200
@@ -22,14 +22,15 @@
 #include <QPushButton>
 #include <QLabel>
 #include <QCheckBox>
+#include <QScrollArea>
 
 #include "downloader.h"
 #include "certificatelist.h"
+#include "certificatelistwidget.h"
 class QMenu;
 class QAction;
 class QTimer;
 
-Q_DECLARE_METATYPE(Certificate);
 
 class MainWindow : public QMainWindow
 {
@@ -70,16 +71,17 @@
     void downloaderError(const QString &message, SSLConnection::ErrorCode error);
     /** @brief Trigger the appropiate action depending on the state */
     void messageClicked();
-    void showHelp();
-    void showAbout();
-    void showDetails(QListWidgetItem*);
-    void resizeButtons();
     void installerError(const QString& errMsg);
     void installerSuccess();
     void installCerts();
+    void toggleInManual(bool state, const Certificate &cert);
+    void removeFromManual(bool state, const Certificate &cert);
 
-    void saveAutoUpdate(int state);
-    void saveAutoStart(int state);
+    void togglePages(int button);
+    void toggleUpdatesNew();
+    void toggleUpdatesRemove();
+    void toggleUpdatesManual();
+    void listChanged(int selected);
 
     /** @brief check for running software that needs to close before installing
      *
@@ -117,7 +119,7 @@
      *
      * Returns false on error.
      */
-    bool saveUnselectedCertificates();
+    bool saveUnselectedCertificates(QStringList unselected);
 
     /** @brief loads previously unselected certificates from settings
      *
@@ -162,35 +164,9 @@
 
     void createTrayIcon();
     void createActions();
-    void createMenuBar();
     void createContent();
     void loadCertificateList();
 
-    /** @brief Create a separator item for the certificate list.
-     *
-     * The item uses a SeparatorItemDelegate for layout and styling at the given
-     * index.
-     *
-     * @param[in] text  The text for the item.
-     * @param[in] index The index of the item.
-     *
-     * @return The new separator item.
-     */
-    QListWidgetItem* createSeparator(const QString &text, int index);
-
-    /** @brief Create a certificate list item for the list.
-     *
-     * The item uses a CertificateItemDelegate for layout and styling.
-     *
-     * @param[in] text   The certificate to display.
-     * @param[in] status The certificate status.
-     * @param[in] index  The index of the item.
-     *
-     * @return The new separator item.
-     */
-    QListWidgetItem* createListItem(const Certificate &certificate,
-        Certificate::Status status, int index);
-
     /* Are we running in tray mode ?*/
     const bool mTrayMode;
     /* The message currently shown at intervals */
@@ -216,24 +192,32 @@
      * base64lines with I:/R: prefix */
     QStringList mPreviouslyUnselected;
 
-    QListWidget *mCertListWidget;
-
-    QLabel *mSubjectCN;
-    QLabel *mSubjectO;
-    QLabel *mIssuerCN;
-    QLabel *mIssuerO;
-    QLabel *mValidFrom;
-    QLabel *mValidTo;
-    QLabel *mFingerprint;
-
     QLabel *mCurrentListDate;
     QLabel *mNewListDate;
 
-    QCheckBox *mAutoUpdateOption;
-    QCheckBox *mAutoStartOption;
+    QButtonGroup *mButtonGroup;
+    QScrollArea *mUpdatesPanel;
+    QWidget *mUpdatesWidget;
+    QScrollArea *mInstallPanel;
+    QScrollArea *mRemovePanel;
+    QScrollArea *mInfoPanel;
 
-    QPushButton *installButton;
-    QPushButton *quitButton;
+    QLabel *mUpdatesHeader;
+    QLabel *mLastCertUpdate;
+    QLabel *mLastSWupdate;
+    QLabel *mUpdatesNewCertificates;
+    QLabel *mUpdatesRemoveCertificates;
+    QLabel *mUpdatesManualCertificates;
+
+    CertificateListWidget *mUpdatesNew;
+    CertificateListWidget *mUpdatesRemove;
+    CertificateListWidget *mUpdatesManual;
+    CertificateListWidget *mInstallList;
+    CertificateListWidget *mRemoveList;
+
+    QPushButton *mUpdatesDetailsNew;
+    QPushButton *mUpdatesDetailsRemove;
+    QPushButton *mUpdatesDetailsManual;
 };
 
 #endif // MAINWINDOW_H

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