diff options
| author | Max Christian Pohle | 2015-11-18 04:12:48 +0100 |
|---|---|---|
| committer | Max Christian Pohle | 2015-11-18 04:12:48 +0100 |
| commit | de6cb045fd2b237e58320f0da7f3a365ca4d2ace (patch) | |
| tree | 2bc3a13c3308aadaa0e92c556d587c60f8d718de /mainwindow.h | |
| download | qspacestatus-de6cb045fd2b237e58320f0da7f3a365ca4d2ace.tar.bz2 qspacestatus-de6cb045fd2b237e58320f0da7f3a365ca4d2ace.zip | |
downloads+parses json and displays systemtray icon
can be activated by a single click and shows the corresponding window.
Diffstat (limited to 'mainwindow.h')
| -rw-r--r-- | mainwindow.h | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/mainwindow.h b/mainwindow.h new file mode 100644 index 0000000..11c1616 --- /dev/null +++ b/mainwindow.h | |||
| @@ -0,0 +1,44 @@ | |||
| 1 | #ifndef MAINWINDOW_H | ||
| 2 | #define MAINWINDOW_H | ||
| 3 | |||
| 4 | #include <QMainWindow> | ||
| 5 | #include <QSystemTrayIcon> | ||
| 6 | |||
| 7 | #include <QJsonDocument> | ||
| 8 | #include <QJsonObject> | ||
| 9 | #include <QByteArray> | ||
| 10 | |||
| 11 | |||
| 12 | #include <QString> | ||
| 13 | #include <QObject> | ||
| 14 | |||
| 15 | #include <QtNetwork/QNetworkAccessManager> | ||
| 16 | #include <QtNetwork/QNetworkRequest> | ||
| 17 | #include <QtNetwork/QNetworkReply> | ||
| 18 | |||
| 19 | |||
| 20 | namespace Ui { | ||
| 21 | class MainWindow; | ||
| 22 | } | ||
| 23 | |||
| 24 | class MainWindow : public QMainWindow | ||
| 25 | { | ||
| 26 | Q_OBJECT | ||
| 27 | |||
| 28 | public: | ||
| 29 | explicit MainWindow(QWidget *parent = 0); | ||
| 30 | ~MainWindow(); | ||
| 31 | |||
| 32 | private: | ||
| 33 | Ui::MainWindow *ui; | ||
| 34 | QSystemTrayIcon* qsystemtrayicon; | ||
| 35 | QByteArray download(QUrl url); | ||
| 36 | QIcon* currentIcon; | ||
| 37 | |||
| 38 | private slots: | ||
| 39 | void slotActivated(QSystemTrayIcon::ActivationReason); | ||
| 40 | void exitApplication(); | ||
| 41 | |||
| 42 | }; | ||
| 43 | |||
| 44 | #endif // MAINWINDOW_H | ||
