2021-04-27 00:21:17 +03:00
2021-04-27 00:21:17 +03:00
2021-01-19 21:35:18 +03:00
2021-01-31 19:57:49 +03:00
2021-01-17 14:10:47 +03:00
2020-03-30 15:47:10 +03:00
2021-04-20 18:26:18 +03:00
2021-04-17 15:40:14 +03:00
2019-11-19 13:28:02 +03:00
2019-11-19 15:20:38 +03:00
2021-04-15 16:17:41 +03:00
2021-01-19 21:35:18 +03:00
2021-01-31 19:57:49 +03:00
2021-04-16 10:23:45 +03:00
2021-04-16 10:05:32 +03:00

SimpleQmlNotify

Simple Qml notification service for qml applications.

Include

For qmake projects

  • cd yourRepo
  • git submodule add https://github.com/QuasarApp/SimpleQmlNotify.git # add the repository of QSimpleQmlNotify into your repo like submodule
  • git submodule update --init --recursive
  • Include in your pro file the pri file of Qt-Secret library
  include($$PWD/SimpleQmlNotify/QmlNotify.pri)
  • Rebuild yuor project

For cmake projects

The cmake build do not required Qt libraries.

  • cd yourRepo
  • git submodule add https://github.com/QuasarApp/SimpleQmlNotify.git # add the repository of QSimpleQmlNotify into your repo like submodule
  • git submodule update --init --recursive
  • Include in your CMakeLists.txt file the main CMakeLists.txt file of QSimpleQmlNotify library
  include(QmlNotyfyService)
  • Rebuild yuor project

For other build system

  • cd yourRepo
  • git submodule add https://github.com/QuasarApp/SimpleQmlNotify.git # add the repository of QSimpleQmlNotify into your repo like submodule
  • git submodule update --init --recursive
  • Add the rule for build QmlNotyfyService
  • Add INCLUDEPATH and LIBS for your build system
  • Rebuild yuor project

Using

Notification

CPP

 #include <qmlnotifyservice.h>

 int main() {
     QmlNotificationService::init();
     auto service = QmlNotificationService::NotificationService::getService();
     service->setNotify("title", "text", "UrlOfImage", NotificationData::Normal);
 }


QML


 NotificationServiceView {
     anchors.fill: parent;
 }

Questions

CPP

 #include <qmlnotifyservice.h>

 int main() {
     QmlNotificationService::init();
     auto service = QmlNotificationService::NotificationService::getService();
     int questionCode = service->setQuestion("title", "some text");

     QObject::connect(service, QmlNotificationService::NotificationService::questionCompleted,
                     [questionCode](bool accepted, int questionCode) {
                         if (accepted && code === questionCode) {
                            // your action here. 
                         }
                     })

     
 }


QML


 NotificationServiceView {
     anchors.fill: parent;
 }
 
readonly property int questionCode: 0;

questionCode = notificationService.setQuestion(qsTr("Remove %0 user").arg(userModel.userId),
                                qsTr("All saved data and records will be delete, Do you want continuee?"))
Connections {
    target: notificationService
    function onQuestionCompleted(accepted, code) {
        if (accepted && code === privateRoot.questionCode) {
            if (userModel)
                backEnd.removeUser(userModel.userId)
        }
    }
}

Description
No description provided
Readme GPL-3.0 586 KiB
Languages
C++ 58.3%
QML 35.5%
CMake 6.2%