AlarmNotifications
PANDA Slow Control Alarm Daemon
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
desktopalarmwidgetkde4.h
Go to the documentation of this file.
1 
34 #ifndef DESKTOPALARMWIDGETKDE4_H
35 #define DESKTOPALARMWIDGETKDE4_H
36 
37 #include "oldgcccompat.h" // Compatibilty macros for GCC < 4.7
38 
39 #include <QAction>
40 #include <KDE/KMenu>
41 #include <KDE/KStatusNotifierItem>
42 
43 #include "desktopalarmwidget.h"
44 
45 namespace AlarmNotifications
46 {
47 
58 {
59  Q_OBJECT
60 private:
66  KStatusNotifierItem _trayicon;
72  KMenu* _contextmenu;
78  QAction* _toggleAction;
84  QAction* _configureAction;
90  QAction* _exitAction;
91 
98  virtual void createContextMenu();
115  static bool getBeedoActivated() noexcept;
116 private slots:
124  void notificationSwitchChange ( bool enabled );
131  void changeTrayIcon();
140  void activated ( bool active, const QPoint& pos );
141 public:
154  ~DesktopAlarmWidgetKde4();
161  DesktopAlarmWidgetKde4 ( const DesktopAlarmWidgetKde4& other ) = delete;
168  DesktopAlarmWidgetKde4 ( DesktopAlarmWidgetKde4&& other ) = delete;
176  DesktopAlarmWidgetKde4& operator= ( const DesktopAlarmWidgetKde4& other ) = delete;
184  DesktopAlarmWidgetKde4& operator= ( DesktopAlarmWidgetKde4&& other ) = delete;
185 };
186 }
187 
188 #endif // DESKTOPALARMWIDGETKDE4_H
KStatusNotifierItem _trayicon
Tray icon object.
void setStatusIconAndTooltip(DesktopAlarmWidgetStatus status)
Adjust tray icon and tooltip message.
DesktopAlarmWidgetStatus
Status of the desktop widget.
QAction * _toggleAction
Context menu entry to toggle the desktop widget.
Abstract base class for desktop alarm widgets.
QAction * _exitAction
Context menu entry to close the application.
KMenu * _contextmenu
Tray icon context menu.
Compatibility macros for older versions of the GCC.
void activated(bool active, const QPoint &pos)
React on click on tray icon.
Desktop widget featuring an item in the KDE4 notification area.
QAction * _configureAction
Context menu entry to configure notification timeout.
Namespace for Alarm Notifications application.
static bool getBeedoActivated() noexcept
Return compile-time Beedo activation flag.
virtual void createContextMenu()
Create context menu objects.
#define noexcept
Allow using the noexcept keyword with GCC < 4.6.
Definition: oldgcccompat.h:52
Provide a tray icon and desktop notifications in case of an alarm.
void changeTrayIcon()
Change the tray icon due to status change.
void notificationSwitchChange(bool enabled)
React on widget enable/disable.