Mercurial > trustbridge
comparison ui/mainwindow.h @ 0:cb0cde2c5eb9
Initial commit. Basically a Hello World with a Tray Icon.
author | Andre Heinecke <aheinecke@intevation.de> |
---|---|
date | Fri, 07 Feb 2014 11:41:15 +0000 |
parents | |
children | cf88cc432b9d |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:cb0cde2c5eb9 |
---|---|
1 #ifndef MAINWINDOW_H | |
2 #define MAINWINDOW_H | |
3 | |
4 #include <QSystemTrayIcon> | |
5 #include <QDialog> | |
6 class QMenu; | |
7 class QAction; | |
8 | |
9 class MainWindow : public QDialog | |
10 { | |
11 Q_OBJECT | |
12 | |
13 public: | |
14 MainWindow(); | |
15 | |
16 void setMessage(const QString message) {mCurMessage = message;} | |
17 QString getMessage() {return mCurMessage;} | |
18 | |
19 private slots: | |
20 void showMessage(); | |
21 void iconActivated(QSystemTrayIcon::ActivationReason reason); | |
22 void manualCheck(); | |
23 | |
24 private: | |
25 void createTrayIcon(); | |
26 void createActions(); | |
27 | |
28 QString mCurMessage; | |
29 | |
30 QSystemTrayIcon *mTrayIcon; | |
31 QMenu *mTrayMenu; | |
32 QAction *mCheckUpdates; | |
33 }; | |
34 | |
35 #endif // MAINWINDOW_H |