SimpleQmlNotify/qmlnotifyservice.h
Oleg-designer 6999c2944d
Update qmlnotifyservice.h
Co-authored-by: Andrei Yankovich <EndrIIMail@gmail.com>
2021-04-16 09:58:21 +03:00

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