diff --git a/src/ClientLib/SnakeProject.qrc b/src/ClientLib/SnakeProject.qrc index fcc8699..5dc4fa9 100644 --- a/src/ClientLib/SnakeProject.qrc +++ b/src/ClientLib/SnakeProject.qrc @@ -14,8 +14,6 @@ SnakeProjectModule/MainMenu.qml SnakeProjectModule/MainMenuButton.qml SnakeProjectModule/Metrix.qml - SnakeProjectModule/NotificationForm.qml - SnakeProjectModule/NotificationServiceView.qml SnakeProjectModule/PagePopUp.qml SnakeProjectModule/PropertyView.qml SnakeProjectModule/Scene.qml diff --git a/src/ClientLib/SnakeProjectModule/NotificationForm.qml b/src/ClientLib/SnakeProjectModule/NotificationForm.qml deleted file mode 100644 index 72445bc..0000000 --- a/src/ClientLib/SnakeProjectModule/NotificationForm.qml +++ /dev/null @@ -1,84 +0,0 @@ -import QtQuick 2.11 -import QtQuick.Controls 2.3 -import QtQuick.Controls.Material 2.0 -import QtQuick.Layouts 1.3 - -BasePopUp { - id : popup - - property string text: qsTr("Message") - property string img: "" - property string titleText: qsTr("Message") - property int type: 0 - - function _getBackGraundColor(type) { - switch(type) { - - case 1: return "#FFC107" - case 2: return "#FF5722" - - } - - return Material.background - } - - autoClose: true; - closeInterval: 5000 - - margins: 0 - margin: 0 - spacing: 0 - - - backgroundColor: _getBackGraundColor(type); - - Page { - id: page - anchors.fill: parent - spacing: 0 - - background: Rectangle { - color: "#00000000" - } - - header: Label { - text: titleText - horizontalAlignment: Text.AlignHCenter - } - - contentItem: - RowLayout { - id: rowLayout - spacing: 5 - clip: true - - Rectangle { - color: "#00000000" - Layout.alignment: Qt.AlignLeft | Qt.AlignVCenter - Layout.preferredWidth: rowLayout.height; - Layout.preferredHeight: rowLayout.height; - - Image { - id: image - fillMode: Image.PreserveAspectCrop - clip: true - anchors.fill: parent; - source: img - } - } - - - Label { - id: message - text: popup.text - Layout.alignment: Qt.AlignRight | Qt.AlignVCenter - Layout.fillHeight: true; - Layout.fillWidth: true; - clip: true - wrapMode: Text.WordWrap - verticalAlignment: Text.AlignVCenter - horizontalAlignment: Text.AlignHCenter - } - } - } -} diff --git a/src/ClientLib/SnakeProjectModule/NotificationServiceView.qml b/src/ClientLib/SnakeProjectModule/NotificationServiceView.qml deleted file mode 100644 index fb6d18e..0000000 --- a/src/ClientLib/SnakeProjectModule/NotificationServiceView.qml +++ /dev/null @@ -1,30 +0,0 @@ -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 - - - 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: { - notyfyView._show(); - } -} diff --git a/src/ClientLib/SnakeProjectModule/SnakeProject.qml b/src/ClientLib/SnakeProjectModule/SnakeProject.qml index bd8e027..25d1be6 100644 --- a/src/ClientLib/SnakeProjectModule/SnakeProject.qml +++ b/src/ClientLib/SnakeProjectModule/SnakeProject.qml @@ -2,6 +2,8 @@ import QtQuick 2.12 import QtQuick.Window 2.12 import QtQuick.Controls 2.12 +import NotifyModule 1.0 + ApplicationWindow { id: mainWindow; visible: true; diff --git a/src/ClientLib/languages/en.ts b/src/ClientLib/languages/en.ts index df7761d..9cda168 100644 --- a/src/ClientLib/languages/en.ts +++ b/src/ClientLib/languages/en.ts @@ -128,13 +128,6 @@ - - NotificationForm - - Message - - - Scene diff --git a/submodules/SimpleQmlNotify b/submodules/SimpleQmlNotify index 61b683c..69e8233 160000 --- a/submodules/SimpleQmlNotify +++ b/submodules/SimpleQmlNotify @@ -1 +1 @@ -Subproject commit 61b683c0591a41394e30d8f1099a856d7f4a552e +Subproject commit 69e823353284a1bba33569072428ea44d1a0e332