diff --git a/KelvinDashboardGUI/DapUiQmlScreenDashboard.qml b/KelvinDashboardGUI/DapUiQmlScreenDashboard.qml index 15d4eaa70025e6ce8af4ff38dc6e8c73bc60028e..e266a9e8dba06d4a30e1224109be2c6857e04038 100755 --- a/KelvinDashboardGUI/DapUiQmlScreenDashboard.qml +++ b/KelvinDashboardGUI/DapUiQmlScreenDashboard.qml @@ -6,24 +6,35 @@ 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" } } @@ -33,22 +44,25 @@ Page { Component { id: componentTab Item { + id: componentItem 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) - } + 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 } } @@ -63,11 +77,26 @@ 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: "#EE5321" + } + } + } focus: true } + } Rectangle { - anchors.left: listViewTabs.right + 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 7d7f8bd1b993dba75cbd79d579bc5a1ec99c4579..320b7468040cabe9947444097a56fceff1ff7ab3 100644 --- a/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml @@ -1,41 +1,124 @@ import QtQuick 2.11 import QtQuick.Controls 1.4 import QtQuick.Controls 2.2 +import KelvinDashboard 1.0 Page { id: dapUiQmlWidgetChainNodeLogs title: "Logs" - TableView { - id: tableViewLogs - anchors.top: parent.top - anchors.bottom: parent.bottom - anchors.left: parent.left - anchors.right: parent.right - - - TableViewColumn { - id: columnDate - role: "date" - title: "Date" - } - TableViewColumn { - id: columnTime - role: "time" - title: "Time" - } - TableViewColumn { - id: columnFile - role: "file" - title: "File" - } - TableViewColumn { - id: columnMessage - role: "Message" - title: "Message" + + ListModel { + id: dataModel + + ListElement { + name: "Apple" + cost: 2.45 +// type: ":/Resources/Icons/dialogquestion.png" + } + ListElement { + name: "Orange" + cost: 3.25 +// type: ":/Resources/Icons/dialogwarning.png" + } + ListElement { + name: "Banana" + cost: 1.95 +// type: ":/Resources/Icons/dialoinformation.png" + } } - } + 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..47fbc6bf556c2588cfcea9b754be6ae01ba919c9 100755 --- a/KelvinDashboardGUI/main.qml +++ b/KelvinDashboardGUI/main.qml @@ -74,7 +74,7 @@ ApplicationWindow { scale: 0.7 visible: false anchors.verticalCenter: parent.verticalCenter - anchors.right: labelBalance.left + anchors.right: imageDollars.left } Image { @@ -83,12 +83,23 @@ ApplicationWindow { scale: 0.7 visible: true anchors.verticalCenter: parent.verticalCenter - anchors.right: labelBalance.left + 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" + text: "0" font.pointSize: 16 anchors.verticalCenter: parent.verticalCenter anchors.right: parent.right diff --git a/KelvinDashboardGUI/qml.qrc b/KelvinDashboardGUI/qml.qrc index 8d93e1b02c9a6c266a93892ce9f6505fecba7074..6226a7f0901afdc30f966c3f2022e2fd13e3b815 100755 --- a/KelvinDashboardGUI/qml.qrc +++ b/KelvinDashboardGUI/qml.qrc @@ -22,5 +22,8 @@ <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> </qresource> </RCC>