mirror of
https://github.com/QuasarApp/SimpleQmlNotify.git
synced 2025-04-28 22:54:33 +00:00
37 lines
762 B
QML
37 lines
762 B
QML
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
|
|
|
|
Metrix {
|
|
id: metrix
|
|
}
|
|
|
|
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: {
|
|
|
|
if (msg.isValid()) {
|
|
notyfyView._show();
|
|
}
|
|
}
|
|
}
|