diff --git a/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml b/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml index 7d7f8bd1b993dba75cbd79d579bc5a1ec99c4579..ffb7b6afbb502e3e67b852ef73662dc427a3ad99 100644 --- a/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml +++ b/KelvinDashboardGUI/DapUiQmlWidgetChainNodeLogs.ui.qml @@ -1,41 +1,118 @@ 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" + + ListModel { + id: dataModel + + ListElement { + name: "Apple" + cost: 2.45 + } + ListElement { + name: "Orange" + cost: 3.25 + } + ListElement { + name: "Banana" + cost: 1.95 + } } - TableViewColumn { - id: columnMessage - role: "Message" - title: "Message" + + 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 +// anchors.top: parent.top +// anchors.bottom: parent.bottom +// anchors.left: parent.left +// anchors.right: parent.right + model: dataModel + clip: true + + TableViewColumn { + id: columnType + role: "type" + title: "Type" + + delegate: + Image { + id: names + source: "qrc:/Resources/Icons/icon.png" + } + } + 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: "red" + + Text { + text: styleData.value + color: "#FFF" + width: parent.width + height: parent.height + font.pointSize: 18 + minimumPointSize: 3 + fontSizeMode: Text.Fit + horizontalAlignment: Text.AlignHCenter + verticalAlignment: Text.AlignVCenter + } + } + + } + } } } + + }