]>
Commit | Line | Data |
---|---|---|
b4b01705 JS |
1 | #ifndef MACNOTIFICATIONHANDLER_H |
2 | #define MACNOTIFICATIONHANDLER_H | |
3 | #include <QObject> | |
4 | ||
5 | /** Macintosh-specific notification handler (supports UserNotificationCenter and Growl). | |
6 | */ | |
7 | class MacNotificationHandler : public QObject | |
8 | { | |
9 | Q_OBJECT | |
10 | ||
11 | public: | |
12 | /** shows a 10.8+ UserNotification in the UserNotificationCenter | |
13 | */ | |
14 | void showNotification(const QString &title, const QString &text); | |
15 | ||
16 | /** executes AppleScript */ | |
17 | void sendAppleScript(const QString &script); | |
18 | ||
19 | /** check if OS can handle UserNotifications */ | |
20 | bool hasUserNotificationCenterSupport(void); | |
21 | static MacNotificationHandler *instance(); | |
22 | }; | |
23 | ||
24 | ||
25 | #endif // MACNOTIFICATIONHANDLER_H |