Andrei Yankovich 2a5e0c0afb
All checks were successful
buildbot/DocsGenerator Build finished.
buildbot/AndroidBuilder_v8Qt6 Build finished.
buildbot/WindowsCMakeBuilder Build finished.
buildbot/IOSCMakeBuilder Build finished.
buildbot/LinuxCMakeBuilderQt6 Build finished.
Merge pull request #19 from QuasarApp/new_year2024
update copyright
2023-12-31 10:21:29 +01:00
2023-12-31 10:03:40 +01:00
2021-01-19 21:35:18 +03:00
2023-12-31 10:03:40 +01:00
2021-11-23 21:49:27 +03:00
2020-03-30 15:47:10 +03:00
2023-12-31 10:03:40 +01:00
2021-04-17 15:40:14 +03:00
2019-11-19 13:28:02 +03:00
2023-12-31 10:03:40 +01:00
2023-12-31 10:03:40 +01:00
2023-12-31 10:03:40 +01:00
2023-12-31 10:03:40 +01:00
2023-12-31 10:03:40 +01:00
2023-12-31 10:03:40 +01:00
2023-04-03 11:30:07 +03:00

SimpleQmlNotify

Simple Qml notification service for qml applications.

Include

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

 import NotifyModule 1.0

 NotificationServiceView {
     anchors.fill: parent;
 }

Questions

CPP

 #include <qmlnotifyservice.h>

 int main() {
     QmlNotificationService::init();
     auto service = QmlNotificationService::NotificationService::getService();

     QmlNotificationService::Listner listner = [] (bool accepted) {
                            // your action here.
     };

     service->setQuestion(listner, "title", "some text");

     
 }


QML

 import NotifyModule 1.0
 
 NotificationServiceView {
     anchors.fill: parent;
 }
 
 Item {
 
     notificationService.setQuestion(this, "onQuestionCompleted", qsTr("Remove %0 user").arg(userModel.userId),
                                qsTr("All saved data and records will be delete, Do you want continuee?"));
                                
     function onQuestionCompleted(accepted) {
        // your action here.   
     }
 }

Include translations

For include translations into your projects you need to use the QuasarAppUtils::Locales class. See oficiald documentation

if(!QuasarAppUtils::Locales::init(locale, {":/qmlNotify_languages/"})) {
    QuasarAppUtils::Params::log("Error load language : " , QuasarAppUtils::Error);
}

Or you can manually load needed qm file. All qm files located in qmlNotify_languages folder.

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