[ui] GraphEditor: single tab group + status table

- Use a single tab group for attributes, log, statistics, status
- Use a ListView with key/value to display the node status fields (instead of a file viewer)
This commit is contained in:
Fabien Castan 2019-09-14 23:07:41 +02:00
parent e5b950992f
commit 2705c89130
5 changed files with 364 additions and 110 deletions

View file

@ -19,6 +19,15 @@ Panel {
signal attributeDoubleClicked(var mouse, var attribute)
signal upgradeRequest()
Item {
id: m
property int chunkCurrentIndex: 0
}
onNodeChanged: {
m.chunkCurrentIndex = 0 // Needed to avoid invalid state of ChunksListView
}
title: "Node" + (node !== null ? " - <b>" + node.label + "</b>" : "")
icon: MaterialLabel { text: MaterialIcons.tune }
@ -113,7 +122,6 @@ Panel {
currentIndex: tabBar.currentIndex
AttributeEditor {
Layout.fillWidth: true
attributes: root.node.attributes
readOnly: root.readOnly || root.isCompatibilityNode
onAttributeDoubleClicked: root.attributeDoubleClicked(mouse, attribute)
@ -122,10 +130,23 @@ Panel {
NodeLog {
id: nodeLog
Layout.fillHeight: true
Layout.fillWidth: true
node: root.node
chunkCurrentIndex: m.chunkCurrentIndex
onChangeCurrentChunk: { m.chunkCurrentIndex = chunkIndex }
}
NodeStatistics {
id: nodeStatistics
node: root.node
chunkCurrentIndex: m.chunkCurrentIndex
onChangeCurrentChunk: { m.chunkCurrentIndex = chunkIndex }
}
NodeStatus {
id: nodeStatus
node: root.node
chunkCurrentIndex: m.chunkCurrentIndex
onChangeCurrentChunk: { m.chunkCurrentIndex = chunkIndex }
}
}
}
@ -152,6 +173,18 @@ Panel {
leftPadding: 8
rightPadding: leftPadding
}
TabButton {
text: "Statistics"
width: implicitWidth
leftPadding: 8
rightPadding: leftPadding
}
TabButton {
text: "Status"
width: implicitWidth
leftPadding: 8
rightPadding: leftPadding
}
}
}
}