aboutsummaryrefslogtreecommitdiff
path: root/src/qt/macnotificationhandler.h
diff options
context:
space:
mode:
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