diff 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
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/mainwindow.h	Fri Feb 07 11:41:15 2014 +0000
@@ -0,0 +1,35 @@
+#ifndef MAINWINDOW_H
+#define MAINWINDOW_H
+
+#include <QSystemTrayIcon>
+#include <QDialog>
+class QMenu;
+class QAction;
+
+class MainWindow : public QDialog
+{
+    Q_OBJECT
+
+public:
+    MainWindow();
+
+    void setMessage(const QString message) {mCurMessage = message;}
+    QString getMessage() {return mCurMessage;}
+
+private slots:
+    void showMessage();
+    void iconActivated(QSystemTrayIcon::ActivationReason reason);
+    void manualCheck();
+
+private:
+    void createTrayIcon();
+    void createActions();
+    
+    QString mCurMessage;
+
+    QSystemTrayIcon *mTrayIcon;
+    QMenu *mTrayMenu;
+    QAction *mCheckUpdates;
+};
+
+#endif // MAINWINDOW_H

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