You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

macnotificationhandler.h 895B

123456789101112131415161718192021222324252627282930
  1. // Copyright (c) 2011-2014 The Starwels developers
  2. // Distributed under the MIT software license, see the accompanying
  3. // file COPYING or http://www.opensource.org/licenses/mit-license.php.
  4. #ifndef STARWELS_QT_MACNOTIFICATIONHANDLER_H
  5. #define STARWELS_QT_MACNOTIFICATIONHANDLER_H
  6. #include <QObject>
  7. /** Macintosh-specific notification handler (supports UserNotificationCenter and Growl).
  8. */
  9. class MacNotificationHandler : public QObject
  10. {
  11. Q_OBJECT
  12. public:
  13. /** shows a 10.8+ UserNotification in the UserNotificationCenter
  14. */
  15. void showNotification(const QString &title, const QString &text);
  16. /** executes AppleScript */
  17. void sendAppleScript(const QString &script);
  18. /** check if OS can handle UserNotifications */
  19. bool hasUserNotificationCenterSupport(void);
  20. static MacNotificationHandler *instance();
  21. };
  22. #endif // STARWELS_QT_MACNOTIFICATIONHANDLER_H