summaryrefslogtreecommitdiffstats
path: root/trayicon.h
diff options
context:
space:
mode:
Diffstat (limited to 'trayicon.h')
-rw-r--r--trayicon.h39
1 files changed, 39 insertions, 0 deletions
diff --git a/trayicon.h b/trayicon.h
new file mode 100644
index 00000000..3ad4f00d
--- /dev/null
+++ b/trayicon.h
@@ -0,0 +1,39 @@
+#ifndef TRAYICON_H
+#define TRAYICON_H
+
+#include <QApplication>
+#include <QMenu>
+#include <QAction>
+#include <QMainWindow>
+#include <QSystemTrayIcon>
+#include <QWidget>
+
+class trayIcon : public QWidget
+{
+ Q_OBJECT
+public:
+ explicit trayIcon(QMainWindow *parent);
+ void showMessage(QString title, QString msg, int time);
+ void setVisible(bool visible);
+
+signals:
+
+public slots:
+ void showHideParent();
+ void iconActivated(QSystemTrayIcon::ActivationReason reason);
+
+private:
+ void createActions();
+ void createTrayIcon();
+
+// QAction *minimizeAction;
+// QAction *maximizeAction;
+// QAction *restoreAction;
+ QAction *quitAction;
+
+ QSystemTrayIcon *sysTrayIcon;
+ QMenu *trayIconMenu;
+ QMainWindow *parentwin;
+};
+
+#endif // TRAYICON_H