aboutsummaryrefslogtreecommitdiff
path: root/src/qt/macnotificationhandler.h
diff options
context:
space:
mode:
authorJonas Schnelli <jonas.schnelli@include7.ch>2013-05-10 22:20:51 +0200
committerJonas Schnelli <jonas.schnelli@include7.ch>2013-05-24 12:51:46 +0200
commitb4b017059514ed0157877984363ed94f5ab098e9 (patch)
treeb8bd52d5059231402fcd6df591e6169e6571e712 /src/qt/macnotificationhandler.h
parent5b5d399593adbdf8b9b4fb49ef39d51d4eac03cd (diff)
osx: make use of the 10.8+ user notification center to display growl like notifications
- if 10.8, use user notification center, if <10.8, use growl Signed-off-by: Jonas Schnelli <jonas.schnelli@include7.ch>
Diffstat (limited to 'src/qt/macnotificationhandler.h')
-rw-r--r--src/qt/macnotificationhandler.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/qt/macnotificationhandler.h b/src/qt/macnotificationhandler.h
new file mode 100644
index 0000000000..cd8064c61c
--- /dev/null
+++ b/src/qt/macnotificationhandler.h
@@ -0,0 +1,25 @@
+#ifndef MACNOTIFICATIONHANDLER_H
+#define MACNOTIFICATIONHANDLER_H
+#include <QObject>
+
+/** Macintosh-specific notification handler (supports UserNotificationCenter and Growl).
+ */
+class MacNotificationHandler : public QObject
+{
+ Q_OBJECT
+
+public:
+ /** shows a 10.8+ UserNotification in the UserNotificationCenter
+ */
+ void showNotification(const QString &title, const QString &text);
+
+ /** executes AppleScript */
+ void sendAppleScript(const QString &script);
+
+ /** check if OS can handle UserNotifications */
+ bool hasUserNotificationCenterSupport(void);
+ static MacNotificationHandler *instance();
+};
+
+
+#endif // MACNOTIFICATIONHANDLER_H