Skip to content
Snippets Groups Projects
Commit 6b9158a6 authored by andrey.daragan's avatar andrey.daragan
Browse files

[*] Created a generic screen concept.

parent e1f88da0
No related branches found
No related tags found
No related merge requests found
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
}
}
}
}
}
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment