diff --git a/KelvinDashboardGUI/DapUiQmlScreenDashboard.qml b/KelvinDashboardGUI/DapUiQmlScreenDashboard.qml index 15d4eaa70025e6ce8af4ff38dc6e8c73bc60028e..e6909d573c90276af8780a51c2524a5470ed419f 100755 --- a/KelvinDashboardGUI/DapUiQmlScreenDashboard.qml +++ b/KelvinDashboardGUI/DapUiQmlScreenDashboard.qml @@ -6,55 +6,70 @@ import QtQuick.Controls.Styles 1.4 Page { id: dapUiQmlScreenDashboard title: qsTr("General") + + Rectangle { + id: rectangleTabs + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.left: parent.left + width: 70 + color: "#353841" ListView { id: listViewTabs - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - width: dapUiQmlScreenDashboard.width/5 + anchors.fill: parent model: listModelTabs - + ListModel { id: listModelTabs - + ListElement { - name: qsTr("Dashboard") + name: qsTr("Home") page: "DapUiQmlScreenDialog.qml" + source: "qrc:/Resources/Icons/home.png" + } + ListElement { + name: qsTr("Settings") + page: "DapQmlScreenAbout.qml" + source: "qrc:/Resources/Icons/settings.png" } ListElement { name: qsTr("About") page: "DapQmlScreenAbout.qml" + source: "qrc:/Resources/Icons/about.png" } } - - - - delegate: + + + + delegate: Component { id: componentTab Item { - width: listViewTabs.width - height: textTab.height + 10 - Rectangle { - id: canvas - border.color: "whitesmoke" - color: "Transparent" - anchors.fill: parent - Row { - anchors.margins: 5 - anchors.fill: parent - - Text - { - id: textTab - text: qsTr(name) - } + id: componentItem + width: listViewTabs.width + height: 64 + Column + { + anchors.centerIn: parent + Image + { + id: imageMenu + source: model.source + height: 36 + width: 36 + anchors.horizontalCenter: parent.horizontalCenter + } + Text + { + text: qsTr(name) + color: "#BBBEBF" + anchors.horizontalCenter: parent.horizontalCenter } } - + MouseArea { anchors.fill: parent - onClicked: + onClicked: { listViewTabs.currentIndex = index stackViewScreenDashboard.setSource(Qt.resolvedUrl(page)) @@ -62,12 +77,80 @@ Page { } } } - - highlight: Rectangle { color: "aliceblue"; radius: 1 } + +// highlight: Rectangle { color: "aliceblue"; radius: 1 } + highlight: + Component + { + Rectangle { + id: rectangleMenu + color: "#121B28" + Rectangle + { + height: rectangleMenu.height + width: 4 + color: "green" + } + } + } focus: true } - Rectangle { - anchors.left: listViewTabs.right + } + Rectangle + { + id: rectangleExit + color: "transparent" + width: listViewTabs.width + height: 64 + anchors.left: parent.left + anchors.bottom: parent.bottom + + Rectangle + { + color: "transparent" + width: listViewTabs.width + height: 64 + anchors.left: parent.left + anchors.bottom: parent.bottom + + Rectangle + { + id: rectangleBorder + anchors.left: parent.left + height: rectangleExit.height + width: 4 + color: "transparent" + } + Column + { + anchors.centerIn: parent + Image + { + id: imageMenu + source: "qrc:/Resources/Icons/home.png" + height: 36 + width: 36 + anchors.horizontalCenter: parent.horizontalCenter + } + Text + { + text: qsTr("Exit") + color: "#BBBEBF" + anchors.horizontalCenter: parent.horizontalCenter + } + } + MouseArea { + anchors.fill: parent + onClicked: + { + rectangleBorder.color = "#EE5321" + } + } + } + } + Rectangle { + id: mainDashboard + anchors.left: rectangleTabs.right anchors.top: parent.top anchors.bottom: parent.bottom anchors.right: parent.right diff --git a/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml index 98096425efad25d92d4b5a655e17b4af10329bf6..ae9aa0714406d80b3d5de0005a16d4b035b3b6fe 100644 --- a/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml @@ -106,10 +106,98 @@ Page { } } } - } - - - + + TabView + { + id: tabViewLogs + anchors.top: parent.top + anchors.bottom: parent.bottom + anchors.left: parent.left + anchors.right: parent.right + Repeater { + anchors.fill: parent + model: dapUiQmlWidgetModel + delegate: + Tab{ - + + + title: qsTr(name) + + TableView { + id: tableViewLogs + model: dataModel + clip: true + + TableViewColumn { + id: columnType + role: "type" + title: "Type" + delegate: + Item + { + height: parent.height + width: parent.height + Rectangle { + anchors.fill: parent + color: "transparent" + Image { + id: names + height: parent.height + width: parent.height +// source: model.type + anchors.centerIn: parent + } + } + } + } + TableViewColumn { + id: columnDate + role: "name" + title: "Date" + } + TableViewColumn { + id: columnTime + role: "cost" + title: "Time" + } + TableViewColumn { + id: columnFile + role: "file" + title: "File" + } + TableViewColumn { + id: columnMessage + role: "Message" + title: "Message" + } + itemDelegate: Item { + Text { + anchors.centerIn: parent + renderType: Text.NativeRendering + text: styleData.value + } + } + headerDelegate: Rectangle { + height: 20 + color: "#29333f" + + Text { + text: styleData.value + color: "#FFF" + width: parent.width + height: parent.height + font.pointSize: 24 + minimumPointSize: 3 + font.family: "Roboto" + fontSizeMode: Text.Fit + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + } + } + } + } } diff --git a/KelvinDashboardGUI/KelvinDashboardGUI.pro b/KelvinDashboardGUI/KelvinDashboardGUI.pro index 1a7d6d67aa8dbd2f84230023c08b809fe4498606..3eea6c63c7ad886ddefd733ddd7b3bebc816cc88 100755 --- a/KelvinDashboardGUI/KelvinDashboardGUI.pro +++ b/KelvinDashboardGUI/KelvinDashboardGUI.pro @@ -91,3 +91,5 @@ include (../DapRPCProtocol/DapRPCProtocol.pri) INCLUDEPATH += $$_PRO_FILE_PWD_/../libKelvinDashboardCommon/ $$_PRO_FILE_PWD_/../DapRPCProtocol/ $$_PRO_FILE_PWD_/../libdap-qt/ + +DISTFILES += diff --git a/KelvinDashboardGUI/Resources/Icons/about.png b/KelvinDashboardGUI/Resources/Icons/about.png new file mode 100644 index 0000000000000000000000000000000000000000..a7b17286e71740ce64a2bead2369f0be0d1991b3 Binary files /dev/null and b/KelvinDashboardGUI/Resources/Icons/about.png differ diff --git a/KelvinDashboardGUI/Resources/Icons/home.png b/KelvinDashboardGUI/Resources/Icons/home.png new file mode 100644 index 0000000000000000000000000000000000000000..6cce557a5fa0eaed1a05434b94bfce6518ed3594 Binary files /dev/null and b/KelvinDashboardGUI/Resources/Icons/home.png differ diff --git a/KelvinDashboardGUI/Resources/Icons/settings.png b/KelvinDashboardGUI/Resources/Icons/settings.png new file mode 100644 index 0000000000000000000000000000000000000000..f3fc9a640698781d6678d04a6bda91068b1e75ef Binary files /dev/null and b/KelvinDashboardGUI/Resources/Icons/settings.png differ diff --git a/KelvinDashboardGUI/main.qml b/KelvinDashboardGUI/main.qml index fd7fede5a69c6da3425bd26d827f1dcca7e31f7b..f5786572477962fff2e9ce3b3c17727fb8eba97d 100755 --- a/KelvinDashboardGUI/main.qml +++ b/KelvinDashboardGUI/main.qml @@ -2,6 +2,7 @@ import QtQuick 2.9 import QtQuick.Controls 1.4 import QtQuick.Controls 2.4 import QtQuick.Window 2.0 +import QtQuick.Controls.Styles 1.3 import QtQuick.Controls.Styles 1.4 import Qt.labs.platform 1.0 import KelvinDashboard 1.0 @@ -46,53 +47,102 @@ ApplicationWindow { } - header: ToolBar { - contentHeight: buttomMenu.implicitHeight - spacing: 20 - ToolButton { - id: buttomMenu - text: stackView.depth > 1 ? "\u25C0" : "\u2630" - font.pixelSize: Qt.application.font.pixelSize * 1.6 - onClicked: { - if (stackView.depth > 1) { - stackView.pop() - } else { - drawerMenu.open() + header: + Column + { + ToolBar + { + width: parent.width + height: buttomMenu.implicitHeight + contentItem: Item { + anchors.fill: parent + Rectangle + { + anchors.fill: parent + color: "#353841" } + + } + + ToolButton { + id: buttomMenu + + contentItem: Item { + anchors.fill: parent + Rectangle + { + anchors.fill: parent + color: "#353841" + + Text { + text: stackView.depth > 1 ? "\u25C0" : "\u2630" + font.pixelSize: Qt.application.font.pixelSize * 2 + anchors.centerIn: parent + color: "#A5A7AA" + } + } + + } + + onClicked: { + if (stackView.depth > 1) { + stackView.pop() + } else { + drawerMenu.open() + } + } + } + + Label { + id: labelTitleWidget + text: stackView.currentItem.title + anchors.centerIn: parent + color: "white" + } + + Image { + id: imageNetwork + source: "qrc:/Resources/Icons/iconNetwork.png" + scale: 0.7 + visible: false + anchors.verticalCenter: parent.verticalCenter + anchors.right: imageDollars.left + } + + Image { + id: imageErrorNetwork + source: "qrc:/Resources/Icons/iconErrorNetwork.png" + scale: 0.7 + visible: true + anchors.verticalCenter: parent.verticalCenter + anchors.right: imageDollars.left + } + + Image { + id: imageDollars + source: "qrc:/Resources/Icons/dollar.png" + scale: 0.7 + visible: true + anchors.verticalCenter: parent.verticalCenter + anchors.right: labelBalance.right + anchors.leftMargin: 5 + anchors.rightMargin: 5 + } + + Text { + id: labelBalance + text: "0" + font.pointSize: 16 + anchors.verticalCenter: parent.verticalCenter + anchors.right: parent.right + anchors.rightMargin: 10 } } - - Label { - id: labelTitleWidget - text: stackView.currentItem.title - anchors.centerIn: parent - } - - Image { - id: imageNetwork - source: "qrc:/Resources/Icons/iconNetwork.png" - scale: 0.7 - visible: false - anchors.verticalCenter: parent.verticalCenter - anchors.right: labelBalance.left - } - - Image { - id: imageErrorNetwork - source: "qrc:/Resources/Icons/iconErrorNetwork.png" - scale: 0.7 - visible: true - anchors.verticalCenter: parent.verticalCenter - anchors.right: labelBalance.left - } - - Text { - id: labelBalance - text: "$0" - font.pointSize: 16 - anchors.verticalCenter: parent.verticalCenter - anchors.right: parent.right - anchors.rightMargin: 10 + Rectangle + { + height: 1 + width: parent.width + color: "green" } } diff --git a/KelvinDashboardGUI/qml.qrc b/KelvinDashboardGUI/qml.qrc index 9d4d9bc8622ffd701129e9a5a849cace8f002132..abfd1123f0a4d78c65066cbfa59c68cddd01a158 100755 --- a/KelvinDashboardGUI/qml.qrc +++ b/KelvinDashboardGUI/qml.qrc @@ -22,6 +22,9 @@ <file>DapUiQmlWidgetChainNodeLogs.ui.qml</file> <file>Resources/Icons/add.png</file> <file>Resources/Icons/icon.ico</file> + <file>Resources/Icons/about.png</file> + <file>Resources/Icons/home.png</file> + <file>Resources/Icons/settings.png</file> <file>Resources/Icons/dialog.png</file> </qresource> </RCC>