diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-06-09 00:54:24 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2015-06-09 00:54:24 +0200 |
commit | 783e6b4a6b19223bc54cd99f0101d4131aab7048 (patch) | |
tree | 64631057aeed852b33f94dc09f92c3c68953da81 /trayicon.h | |
parent | 64898b575f9e7c3b5d4d072fc369a66d2c2397ee (diff) |
trying old trayicon code
Diffstat (limited to 'trayicon.h')
-rw-r--r-- | trayicon.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/trayicon.h b/trayicon.h new file mode 100644 index 00000000..3daa8dfe --- /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 |