You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
782 B
38 lines
782 B
4 years ago
|
#ifndef TANGRATRAY_H
|
||
|
#define TANGRATRAY_H
|
||
|
|
||
|
#include <QObject>
|
||
|
#include <QAction>
|
||
|
#include <QSystemTrayIcon>
|
||
|
#include <QMenu>
|
||
|
#include <QApplication>
|
||
|
|
||
|
class TangraTray : public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit TangraTray(QObject *parent = 0);
|
||
|
|
||
|
signals:
|
||
|
void signalIconActivated();
|
||
|
void signalShow();
|
||
|
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();
|
||
|
|
||
|
private:
|
||
|
/* Declare the object of future applications for the tray icon*/
|
||
|
QSystemTrayIcon * trayIcon;
|
||
|
void setTrayIcon(QString image);
|
||
|
void createTrayIcon();
|
||
|
};
|
||
|
|
||
|
#endif // SYSTEMTRAY_H
|
||
|
|