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;
|
|
|
|
|
|
|
|
width: 6 * metrix.controlPtMaterial;
|
|
|
|
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
|
|
|
}
|
|
|
|
}
|