{"id":21023427,"url":"https://github.com/quasarapp/simpleqmlnotify","last_synced_at":"2025-07-19T23:35:08.324Z","repository":{"id":50575488,"uuid":"222669712","full_name":"QuasarApp/SimpleQmlNotify","owner":"QuasarApp","description":"Simple Qml notification service for qml applications.","archived":false,"fork":false,"pushed_at":"2023-12-31T09:21:29.000Z","size":413,"stargazers_count":12,"open_issues_count":0,"forks_count":2,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-05-15T08:37:53.973Z","etag":null,"topics":["notify","qml"],"latest_commit_sha":null,"homepage":"https://quasarapp.ddns.net:3031/docs/QuasarApp/SimpleQmlNotify/latest/","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/QuasarApp.png","metadata":{"files":{"readme":"README.md","changelog":"historynotificationsmodel.cpp","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2019-11-19T10:28:01.000Z","updated_at":"2025-01-06T21:38:48.000Z","dependencies_parsed_at":"2023-12-31T10:24:00.021Z","dependency_job_id":"5c7ebc4a-87d8-4a86-984c-f421f79c39f9","html_url":"https://github.com/QuasarApp/SimpleQmlNotify","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/QuasarApp/SimpleQmlNotify","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FSimpleQmlNotify","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FSimpleQmlNotify/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FSimpleQmlNotify/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FSimpleQmlNotify/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/QuasarApp","download_url":"https://codeload.github.com/QuasarApp/SimpleQmlNotify/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/QuasarApp%2FSimpleQmlNotify/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266041861,"owners_count":23867955,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["notify","qml"],"created_at":"2024-11-19T11:18:08.244Z","updated_at":"2025-07-19T23:35:08.302Z","avatar_url":"https://github.com/QuasarApp.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# SimpleQmlNotify\nSimple Qml notification service for qml applications.\n\n## Include\n\n### For cmake projects\n#### The cmake build do not required Qt libraries. \n \n * cd yourRepo\n * git submodule add https://github.com/QuasarApp/SimpleQmlNotify.git # add the repository of QSimpleQmlNotify into your repo like submodule\n * git submodule update --init --recursive\n * Include in your CMakeLists.txt file the main CMakeLists.txt file of QSimpleQmlNotify library\n  ```cmake\n    include(QmlNotyfyService)\n  ```\n * Rebuild yuor project\n\n\n\n### For other build system\n \n * cd yourRepo\n * git submodule add https://github.com/QuasarApp/SimpleQmlNotify.git # add the repository of QSimpleQmlNotify into your repo like submodule\n * git submodule update --init --recursive\n * Add the rule for build QmlNotyfyService\n * Add INCLUDEPATH and LIBS for your build system \n * Rebuild yuor project\n\n\n## Using\n\n### Notification\n\n#### CPP\n```cpp\n #include \u003cqmlnotifyservice.h\u003e\n\n int main() {\n     QmlNotificationService::init();\n     auto service = QmlNotificationService::NotificationService::getService();\n     service-\u003esetNotify(\"title\", \"text\", \"UrlOfImage\", NotificationData::Normal);\n }\n\n\n```\n\n#### QML\n\n```qml\n import NotifyModule 1.0\n\n NotificationServiceView {\n     anchors.fill: parent;\n }\n\n```\n\n### Questions\n\n\n#### CPP\n```cpp\n #include \u003cqmlnotifyservice.h\u003e\n\n int main() {\n     QmlNotificationService::init();\n     auto service = QmlNotificationService::NotificationService::getService();\n\n     QmlNotificationService::Listner listner = [] (bool accepted) {\n                            // your action here.\n     };\n\n     service-\u003esetQuestion(listner, \"title\", \"some text\");\n\n     \n }\n\n\n```\n\n#### QML\n\n```qml\n import NotifyModule 1.0\n \n NotificationServiceView {\n     anchors.fill: parent;\n }\n \n Item {\n \n     notificationService.setQuestion(this, \"onQuestionCompleted\", qsTr(\"Remove %0 user\").arg(userModel.userId),\n                                qsTr(\"All saved data and records will be delete, Do you want continuee?\"));\n                                \n     function onQuestionCompleted(accepted) {\n        // your action here.   \n     }\n }\n\n```\n### Include translations\n\nFor include translations into your projects you need to use the QuasarAppUtils::Locales class. See oficiald [documentation](https://quasarapp.ddns.net:3031/docs/QuasarApp/QuasarAppLib/latest/classQuasarAppUtils_1_1Locales.html)\n\n```cpp\nif(!QuasarAppUtils::Locales::init(locale, {\":/qmlNotify_languages/\"})) {\n    QuasarAppUtils::Params::log(\"Error load language : \" , QuasarAppUtils::Error);\n}\n```\n\nOr you can manually load needed qm file.\nAll qm files located in qmlNotify_languages folder.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquasarapp%2Fsimpleqmlnotify","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fquasarapp%2Fsimpleqmlnotify","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fquasarapp%2Fsimpleqmlnotify/lists"}