Qt 5.10 Book Examples
SystemTray.h
Go to the documentation of this file.
1 // ======================================================================
2 // SystemTray.h
3 // ======================================================================
4 // This file is a part of the book
5 // "Qt 5.10 Professional programming with C++"
6 // http://qt-book.com
7 // ======================================================================
8 // Copyright (c) 2017 by Max Schlee
9 // ======================================================================
10 
11 #pragma once
12 
13 #include <QLabel>
14 
15 class QSystemTrayIcon;
16 class QMenu;
17 
18 // ======================================================================
19 class SystemTray : public QLabel {
20 Q_OBJECT
21 private:
22  QSystemTrayIcon* m_ptrayIcon;
23  QMenu* m_ptrayIconMenu;
24  bool m_bIconSwitcher;
25 
26 protected:
27  virtual void closeEvent(QCloseEvent*);
28 
29 public:
30  SystemTray(QWidget* pwgt = 0);
31 
32 public slots:
33  void slotShowHide ();
34  void slotShowMessage();
35  void slotChangeIcon ();
36 };
37 
void slotChangeIcon()
Definition: SystemTray.cpp:82
void slotShowHide()
Definition: SystemTray.cpp:65
SystemTray(QWidget *pwgt=0)
Definition: SystemTray.cpp:15
void slotShowMessage()
Definition: SystemTray.cpp:71
virtual void closeEvent(QCloseEvent *)
Definition: SystemTray.cpp:57