2019-11-19 15:20:38 +03:00
|
|
|
#ifndef QMLNOTIFYSERVICE_H
|
|
|
|
#define QMLNOTIFYSERVICE_H
|
|
|
|
#include "notifyservice_global.h"
|
|
|
|
|
|
|
|
#include "notificationservice.h"
|
|
|
|
|
|
|
|
class QQmlApplicationEngine;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Simple notify service for qml.
|
|
|
|
* Use :
|
2021-04-16 09:49:55 +03:00
|
|
|
* @code cpp
|
2019-11-19 15:20:38 +03:00
|
|
|
* #include <qmlnotifyservice.h>
|
|
|
|
* QmlNotificationService::init();
|
|
|
|
* auto service = QmlNotificationService::NotificationService::getService()
|
|
|
|
* service->setNotify("title", "text", "UrlOfImage", NotificationData::Normal)
|
2021-04-16 09:49:55 +03:00
|
|
|
* @endcode
|
2019-11-19 15:20:38 +03:00
|
|
|
*
|
|
|
|
* in qml :
|
2021-04-16 09:49:55 +03:00
|
|
|
* @code cpp
|
2019-11-19 15:20:38 +03:00
|
|
|
* NotificationServiceView {
|
|
|
|
anchors.fill: parent;
|
|
|
|
}
|
2021-04-16 09:49:55 +03:00
|
|
|
* @endcode
|
2019-11-19 15:20:38 +03:00
|
|
|
*/
|
|
|
|
namespace QmlNotificationService {
|
|
|
|
bool NOTIFYSERVICESHARED_EXPORT init(QQmlApplicationEngine *engine);
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
#endif // QMLNOTIFYSERVICE_H
|