comparison ui/mainwindow.h @ 71:f22a99f7cb69

Add certificatelist to install as member. Look for updates on startup
author Andre Heinecke <aheinecke@intevation.de>
date Wed, 19 Mar 2014 11:32:25 +0000
parents c6125d73faf4
children 252ffe6e27fd
comparison
equal deleted inserted replaced
70:64c8c6350e60 71:f22a99f7cb69
1 #ifndef MAINWINDOW_H 1 #ifndef MAINWINDOW_H
2 #define MAINWINDOW_H 2 #define MAINWINDOW_H
3
4 /**
5 * @file mainwindow.h
6 * @brief Main UI controller
7 */
3 8
4 #include <QSystemTrayIcon> 9 #include <QSystemTrayIcon>
5 #include <QDialog> 10 #include <QDialog>
6 #include <QSettings> 11 #include <QSettings>
7 12
8 #include "downloader.h" 13 #include "downloader.h"
14 #include "certificatelist.h"
9 class QMenu; 15 class QMenu;
10 class QAction; 16 class QAction;
11 class QTimer; 17 class QTimer;
12 18
13 class MainWindow : public QDialog 19 class MainWindow : public QDialog
35 void iconActivated(QSystemTrayIcon::ActivationReason reason); 41 void iconActivated(QSystemTrayIcon::ActivationReason reason);
36 void checkUpdates(); 42 void checkUpdates();
37 void handleNewList(const QString& fileName, const QDateTime& modDate); 43 void handleNewList(const QString& fileName, const QDateTime& modDate);
38 void handleNewSW(const QString& fileName, const QDateTime& modDate); 44 void handleNewSW(const QString& fileName, const QDateTime& modDate);
39 void downloaderError(const QString &message, SSLConnection::ErrorCode error); 45 void downloaderError(const QString &message, SSLConnection::ErrorCode error);
46 /** @brief Trigger the appropiate action depending on the state */
47 void messageClicked();
40 48
41 private: 49 private:
50 /** @brief check the integrity of available files.
51 *
52 * Do not use this as a trust check as this only works on
53 * FileNames where the underlying files can change. This
54 * is just meant to check if the downloaded data was somehow
55 * removed or corrupted.
56 *
57 */
42 void verifyAvailableData(); 58 void verifyAvailableData();
43 void createTrayIcon(); 59 void createTrayIcon();
44 void createActions(); 60 void createActions();
45 61
46 QString mCurMessage; 62 QString mCurMessage;
53 QTimer *mMessageTimer; 69 QTimer *mMessageTimer;
54 QMenu *mTrayMenu; 70 QMenu *mTrayMenu;
55 QAction *mCheckUpdates; 71 QAction *mCheckUpdates;
56 QAction *mQuitAction; 72 QAction *mQuitAction;
57 CurrentState mCurState; 73 CurrentState mCurState;
74
75 CertificateList mListToInstall;
58 }; 76 };
59 77
60 #endif // MAINWINDOW_H 78 #endif // MAINWINDOW_H

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