Mercurial > trustbridge
comparison ui/mainwindow.h @ 158:fb3b2d77518f
Merged
author | Sascha Wilde <wilde@intevation.de> |
---|---|
date | Tue, 25 Mar 2014 09:30:51 +0100 |
parents | c0fdb8d336cf |
children | 0c06a608e15f |
comparison
equal
deleted
inserted
replaced
157:a46a4b443410 | 158:fb3b2d77518f |
---|---|
5 * @file mainwindow.h | 5 * @file mainwindow.h |
6 * @brief Main UI controller | 6 * @brief Main UI controller |
7 */ | 7 */ |
8 | 8 |
9 #include <QSystemTrayIcon> | 9 #include <QSystemTrayIcon> |
10 #include <QDialog> | 10 #include <QMainWindow> |
11 #include <QSettings> | 11 #include <QSettings> |
12 #include <QMenuBar> | |
12 | 13 |
13 #include "downloader.h" | 14 #include "downloader.h" |
14 #include "certificatelist.h" | 15 #include "certificatelist.h" |
15 class QMenu; | 16 class QMenu; |
16 class QAction; | 17 class QAction; |
17 class QTimer; | 18 class QTimer; |
18 | 19 |
19 class MainWindow : public QDialog | 20 class MainWindow : public QMainWindow |
20 { | 21 { |
21 Q_OBJECT | 22 Q_OBJECT |
22 | 23 |
23 public: | 24 public: |
24 MainWindow(); | 25 MainWindow(); |
43 void handleNewList(const QString& fileName, const QDateTime& modDate); | 44 void handleNewList(const QString& fileName, const QDateTime& modDate); |
44 void handleNewSW(const QString& fileName, const QDateTime& modDate); | 45 void handleNewSW(const QString& fileName, const QDateTime& modDate); |
45 void downloaderError(const QString &message, SSLConnection::ErrorCode error); | 46 void downloaderError(const QString &message, SSLConnection::ErrorCode error); |
46 /** @brief Trigger the appropiate action depending on the state */ | 47 /** @brief Trigger the appropiate action depending on the state */ |
47 void messageClicked(); | 48 void messageClicked(); |
49 void showSettings(); | |
50 void showHelp(); | |
51 void showAbout(); | |
48 | 52 |
49 private: | 53 private: |
50 /** @brief check the integrity of available files. | 54 /** @brief check the integrity of available files. |
51 * | 55 * |
52 * Do not use this as a trust check as this only works on | 56 * Do not use this as a trust check as this only works on |
56 * | 60 * |
57 */ | 61 */ |
58 void verifyAvailableData(); | 62 void verifyAvailableData(); |
59 void createTrayIcon(); | 63 void createTrayIcon(); |
60 void createActions(); | 64 void createActions(); |
65 void createMenuBar(); | |
61 | 66 |
62 QString mCurMessage; | 67 QString mCurMessage; |
63 QString mInstalledSWVersion; | 68 QString mInstalledSWVersion; |
64 QString mInstalledListVersion; | 69 QString mInstalledListVersion; |
65 | 70 |
69 QTimer *mMessageTimer; | 74 QTimer *mMessageTimer; |
70 QMenu *mTrayMenu; | 75 QMenu *mTrayMenu; |
71 QAction *mCheckUpdates; | 76 QAction *mCheckUpdates; |
72 QAction *mQuitAction; | 77 QAction *mQuitAction; |
73 CurrentState mCurState; | 78 CurrentState mCurState; |
79 QMenuBar *mMenuBar; | |
74 | 80 |
75 CertificateList mListToInstall; | 81 CertificateList mListToInstall; |
76 }; | 82 }; |
77 | 83 |
78 #endif // MAINWINDOW_H | 84 #endif // MAINWINDOW_H |