AlarmNotifications
PANDA Slow Control Alarm Daemon
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
desktopalarmwidgetqt.h
Go to the documentation of this file.
1 
34 #ifndef DESKTOPALARMWIDGETQT_H
35 #define DESKTOPALARMWIDGETQT_H
36 
37 #include "oldgcccompat.h" // Compatibilty macros for GCC < 4.7
38 
39 #include <QSystemTrayIcon>
40 
41 #include "desktopalarmwidget.h"
42 
43 namespace AlarmNotifications
44 {
45 
54 {
55  Q_OBJECT
56 private:
62  QSystemTrayIcon _trayicon;
68  QMenu* _contextmenu;
74  QAction* _toggleAction;
80  QAction* _configureAction;
86  QAction* _exitAction;
87 
94  virtual void createContextMenu();
102  void setStatusIcon ( DesktopAlarmWidgetStatus status );
111  static bool getBeedoActivated() noexcept;
112 private slots:
120  void activated ( const QSystemTrayIcon::ActivationReason reason );
128  virtual void notificationSwitchChange ( bool enabled );
135  virtual void changeTrayIcon();
136 public:
149  ~DesktopAlarmWidgetQt();
156  DesktopAlarmWidgetQt ( const DesktopAlarmWidgetQt& other ) = delete;
163  DesktopAlarmWidgetQt ( DesktopAlarmWidgetQt&& other ) = delete;
171  DesktopAlarmWidgetQt& operator= ( const DesktopAlarmWidgetQt& other ) = delete;
179  DesktopAlarmWidgetQt& operator= ( DesktopAlarmWidgetQt&& other ) = delete;
180 };
181 
182 }
183 
184 #endif // DESKTOPALARMWIDGETQT_H