4
0
mirror of https://github.com/QuasarApp/SimpleQmlNotify.git synced 2025-04-28 22:54:33 +00:00
SimpleQmlNotify/NotifyModule/NotificationServiceView.qml

44 lines
988 B
QML
Raw Normal View History

2020-05-23 02:30:51 +03:00
/*
* Copyright (C) 2018-2020 QuasarApp.
* Distributed under the lgplv3 software license, see the accompanying
* Everyone is permitted to copy and distribute verbatim copies
* of this license document, but changing it is not allowed.
*/
2019-11-19 15:20:38 +03:00
import QtQuick 2.12
import QtQuick.Controls.Material 2.12
import QtQuick.Controls 2.12
import QtQuick.Layouts 1.3
import QtGraphicalEffects 1.12
Item {
readonly property var model: notificationService;
readonly property var msg: model.notify
readonly property var history: model.history
2019-11-19 18:09:01 +03:00
Metrix {
id: metrix
}
2019-11-19 15:20:38 +03:00
NotificationForm {
id: notyfyView
titleText : msg.title;
text: (msg)? msg.text: "";
img: (msg)? msg.img: "";
type: (msg)? msg.type: 0;
x: parent.width - width - margin;
y: margin;
2021-01-17 22:37:30 +03:00
width: 5 * metrix.pt;
2019-11-19 15:20:38 +03:00
height: width * 0.5
}
onMsgChanged: {
2019-11-20 17:54:52 +03:00
if (msg.isValid()) {
notyfyView._show();
}
2019-11-19 15:20:38 +03:00
}
}