mirror of
https://github.com/QuasarApp/Snake.git
synced 2025-04-28 10:44:42 +00:00
notify is work
This commit is contained in:
parent
6fd2976004
commit
4f8db0f267
@ -1,6 +1,8 @@
|
||||
#include "notificationservice.h"
|
||||
|
||||
NotificationService::NotificationService(QObject * ptr): QObject (ptr) {
|
||||
qRegisterMetaType<NotificationData>("NotificationData");
|
||||
qRegisterMetaType<QList<NotificationData>> ("QList<NotificationData>");
|
||||
|
||||
}
|
||||
|
||||
|
@ -31,8 +31,6 @@ bool ClientApp::init(QQmlApplicationEngine *engine) {
|
||||
qmlRegisterType <Diff> ();
|
||||
qmlRegisterType <MainMenuModel> ();
|
||||
qmlRegisterType <UserView> ();
|
||||
qRegisterMetaType<NotificationData>("NotificationData");
|
||||
qRegisterMetaType<QList<NotificationData>> ("QList<NotificationData>");
|
||||
|
||||
auto root = engine->rootContext();
|
||||
if (!root)
|
||||
|
@ -13,24 +13,23 @@ BasePopUp {
|
||||
autoClose: true;
|
||||
closeInterval: 5000
|
||||
|
||||
margins: 0
|
||||
spacing: 0
|
||||
|
||||
Page {
|
||||
id: page
|
||||
title: titleText
|
||||
anchors.fill: parent
|
||||
|
||||
header: Label {
|
||||
text: titleText
|
||||
horizontalAlignment: Text.AlignHCenter
|
||||
}
|
||||
|
||||
contentItem:
|
||||
RowLayout {
|
||||
id: rowLayout
|
||||
spacing: 5
|
||||
clip: true
|
||||
anchors.top: parent.bottom
|
||||
anchors.topMargin: 1
|
||||
anchors.left: parent.left
|
||||
anchors.leftMargin: 0
|
||||
anchors.right: parent.right
|
||||
anchors.rightMargin: 0
|
||||
anchors.bottom: parent.bottom
|
||||
anchors.bottomMargin: 0
|
||||
|
||||
Rectangle {
|
||||
color: "#00000000"
|
||||
@ -43,14 +42,14 @@ BasePopUp {
|
||||
fillMode: Image.PreserveAspectCrop
|
||||
clip: true
|
||||
anchors.fill: parent;
|
||||
source: ""
|
||||
source: img
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Label {
|
||||
id: message
|
||||
text: qsTr("Message")
|
||||
text: popup.text
|
||||
Layout.alignment: Qt.AlignRight | Qt.AlignVCenter
|
||||
Layout.fillHeight: true;
|
||||
Layout.fillWidth: true;
|
||||
|
@ -12,7 +12,7 @@ Item {
|
||||
|
||||
NotificationForm {
|
||||
id: notyfyView
|
||||
titleText : (msg)? msg.title: "";
|
||||
titleText : msg.title;
|
||||
text: (msg)? msg.text: "";
|
||||
img: (msg)? msg.img: "";
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user