mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-27 06:04:33 +00:00
32 lines
705 B
C++
32 lines
705 B
C++
#ifndef QMLNOTIFYSERVICE_H
|
|
#define QMLNOTIFYSERVICE_H
|
|
#include "notifyservice_global.h"
|
|
|
|
#include "notificationservice.h"
|
|
|
|
class QQmlApplicationEngine;
|
|
|
|
/**
|
|
* Simple notify service for qml.
|
|
* Use :
|
|
* @code cpp
|
|
* #include <qmlnotifyservice.h>
|
|
* QmlNotificationService::init();
|
|
* auto service = QmlNotificationService::NotificationService::getService()
|
|
* service->setNotify("title", "text", "UrlOfImage", NotificationData::Normal)
|
|
* @endcode
|
|
*
|
|
* in qml :
|
|
* @code qml
|
|
* NotificationServiceView {
|
|
anchors.fill: parent;
|
|
}
|
|
* @endcode
|
|
*/
|
|
namespace QmlNotificationService {
|
|
bool NOTIFYSERVICESHARED_EXPORT init(QQmlApplicationEngine *engine);
|
|
}
|
|
|
|
|
|
#endif // QMLNOTIFYSERVICE_H
|