2018-01-02 18:12:05 +01:00
|
|
|
// Copyright (c) 2011-2017 The Bitcoin Core developers
|
2014-12-13 05:09:33 +01:00
|
|
|
// Distributed under the MIT software license, see the accompanying
|
2013-11-04 16:20:43 +01:00
|
|
|
// file COPYING or http://www.opensource.org/licenses/mit-license.php.
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#ifndef BITCOIN_QT_MACNOTIFICATIONHANDLER_H
|
|
|
|
#define BITCOIN_QT_MACNOTIFICATIONHANDLER_H
|
2013-04-13 07:13:08 +02:00
|
|
|
|
2013-05-10 22:20:51 +02:00
|
|
|
#include <QObject>
|
|
|
|
|
2017-09-07 19:11:44 +02:00
|
|
|
/** Macintosh-specific notification handler (supports UserNotificationCenter).
|
2013-05-10 22:20:51 +02:00
|
|
|
*/
|
|
|
|
class MacNotificationHandler : public QObject
|
|
|
|
{
|
|
|
|
Q_OBJECT
|
|
|
|
|
|
|
|
public:
|
2017-09-07 19:11:44 +02:00
|
|
|
/** shows a macOS 10.8+ UserNotification in the UserNotificationCenter
|
2013-05-10 22:20:51 +02:00
|
|
|
*/
|
|
|
|
void showNotification(const QString &title, const QString &text);
|
|
|
|
|
|
|
|
/** check if OS can handle UserNotifications */
|
|
|
|
bool hasUserNotificationCenterSupport(void);
|
|
|
|
static MacNotificationHandler *instance();
|
|
|
|
};
|
|
|
|
|
|
|
|
|
2014-11-03 16:16:40 +01:00
|
|
|
#endif // BITCOIN_QT_MACNOTIFICATIONHANDLER_H
|