From 1deee6f9cb176cf6010c507c5c0b8c20b95d93b3 Mon Sep 17 00:00:00 2001
From: "littletux89@gmail.com" <littletux89@gmail.com>
Date: Wed, 19 Feb 2020 17:47:20 +0300
Subject: [PATCH] [+] Added widget for informational message window.

---
 libdap-qt-ui-qml.qrc             |  2 +
 widgets/DapMessageBox.qml        |  6 ++
 widgets/DapMessageBoxForm.ui.qml | 99 ++++++++++++++++++++++++++++++++
 3 files changed, 107 insertions(+)
 create mode 100644 widgets/DapMessageBox.qml
 create mode 100644 widgets/DapMessageBoxForm.ui.qml

diff --git a/libdap-qt-ui-qml.qrc b/libdap-qt-ui-qml.qrc
index ee0c2a1..5b942bf 100644
--- a/libdap-qt-ui-qml.qrc
+++ b/libdap-qt-ui-qml.qrc
@@ -25,5 +25,7 @@
         <file>widgets/DapText.qml</file>
         <file>widgets/DapTextForm.ui.qml</file>
         <file>widgets/DapScrollViewHandling.qml</file>
+        <file>widgets/DapMessageBox.qml</file>
+        <file>widgets/DapMessageBoxForm.ui.qml</file>
     </qresource>
 </RCC>
diff --git a/widgets/DapMessageBox.qml b/widgets/DapMessageBox.qml
new file mode 100644
index 0000000..46220ce
--- /dev/null
+++ b/widgets/DapMessageBox.qml
@@ -0,0 +1,6 @@
+import QtQuick 2.4
+
+DapMessageBoxForm
+{
+
+}
diff --git a/widgets/DapMessageBoxForm.ui.qml b/widgets/DapMessageBoxForm.ui.qml
new file mode 100644
index 0000000..c16711a
--- /dev/null
+++ b/widgets/DapMessageBoxForm.ui.qml
@@ -0,0 +1,99 @@
+import QtQuick 2.4
+import QtQuick.Controls 2.0
+import QtGraphicalEffects 1.0
+
+Rectangle
+{
+    id: dapMessageBox
+
+    property alias dapTitleText: titleText
+    property alias dapContentText: contentText
+    property alias dapButtonOk: buttonOk
+
+    layer.enabled: true
+    layer.effect:
+        DropShadow
+        {
+            horizontalOffset: 3
+            verticalOffset: 3
+            radius: 13
+            samples: 17
+            color: "#ababab"
+        }
+
+    Rectangle
+    {
+        id: frameTitle
+        anchors.top: parent.top
+        anchors.left: parent.left
+        anchors.right: parent.right
+        height: 44 * pt
+        color: "#908D9D"
+
+        Text
+        {
+            id: titleText
+            anchors.verticalCenter: parent.verticalCenter
+            anchors.left: parent.left
+            anchors.right: parent.right
+            anchors.leftMargin: 30 * pt
+            anchors.rightMargin: 30 * pt
+            font.pixelSize: 16 * pt
+            font.family: "Roboto"
+            font.styleName: "Normal"
+            font.weight: Font.Normal
+            color: "#FFFFFF"
+        }
+    }
+
+    Rectangle
+    {
+        id: frameContent
+        anchors.top: frameTitle.bottom
+        anchors.left: parent.left
+        anchors.right: parent.right
+        anchors.bottom: parent.bottom
+        anchors.topMargin: 30 * pt
+        anchors.leftMargin: 30 * pt
+        anchors.rightMargin: 30 * pt
+        anchors.bottomMargin: 32 * pt
+        height: 172 * pt
+        color: "#FFFFFF"
+
+        Text
+        {
+            id: contentText
+            anchors.top: parent.top
+            anchors.left: parent.left
+            anchors.right: parent.right
+            anchors.bottom: buttonOk.top
+            font.pixelSize: 16 * pt
+            font.family: "Roboto"
+            font.styleName: "Normal"
+            font.weight: Font.Normal
+            color: "#070023"
+            wrapMode: Text.WordWrap
+        }
+
+        DapButton
+        {
+            id: buttonOk
+            widthButton: 78 * pt
+            heightButton: 36 * pt
+            anchors.right: parent.right
+            anchors.bottom: parent.bottom
+            textButton: qsTr("OK")
+            colorBackgroundNormal:"#3E3853"
+            colorBackgroundHover: "#D51F5D"
+            colorButtonTextNormal: "#FFFFFF"
+            colorButtonTextHover: "#FFFFFF"
+            fontButton.pixelSize: 14 * pt
+            borderColorButton: "#FFFFFF"
+            borderWidthButton: 0
+            fontButton.family: "Roboto"
+            fontButton.weight: Font.Normal
+            horizontalAligmentText:Qt.AlignCenter
+            colorTextButton: "#FFFFFF"
+        }
+    }
+}
-- 
GitLab