forked from Stremio/stremio-shell
-
Notifications
You must be signed in to change notification settings - Fork 0
/
systemtray.h
39 lines (32 loc) · 1.07 KB
/
systemtray.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#ifndef SYSTEMTRAY_H
#define SYSTEMTRAY_H
#include <QObject>
#include <QAction>
#include <QSystemTrayIcon>
class SystemTray : public QObject
{
Q_OBJECT
public:
explicit SystemTray(QObject *parent = 0);
signals:
void signalIconMenuAboutToShow();
void signalIconActivated();
void signalShow();
void signalAlwaysOnTop();
void signalQuit();
private slots:
/* The slot that will accept the signal from the event click on the application icon in the system tray
*/
void iconActivated(QSystemTrayIcon::ActivationReason reason);
public slots:
void hideIconTray();
void updateVisibleAction(bool isVisible);
void updateIsOnTop(bool isOnTop);
void alwaysOnTopEnabled(bool enabled);
private:
/* Declare the object of future applications for the tray icon*/
QSystemTrayIcon * trayIcon;
QAction * viewWindowAction;
QAction * alwaysOnTopAction;
};
#endif // SYSTEMTRAY_H