wip: qml overview tab

This commit is contained in:
2025-09-13 14:47:24 +08:00
parent 5b44696fd7
commit 87304b02f7
5 changed files with 82 additions and 295 deletions

65
ui/qmls/Overview.qml Normal file
View File

@ -0,0 +1,65 @@
import QtQuick
import QtQuick.Controls
import QtQuick.Layouts
import internal.ui.vm 1.0
Page {
id: root
property var b30: vm.b30
OverviewViewModel {
id: vm
onB30Changed: {
root.b30 = vm.b30;
}
}
component Display: RowLayout {
required property string label
required property string value
spacing: 5
// implicitHeight: valueText.implicitHeight
Text {
text: parent.label
Layout.alignment: Qt.AlignBaseline
}
Text {
id: valueText
text: parent.value
font.pointSize: 18
Layout.alignment: Qt.AlignBaseline
}
}
RowLayout {
ColumnLayout {
Layout.fillWidth: true
Layout.alignment: Qt.AlignBottom
Display {
label: 'B30'
value: root.b30 >= 0 ? root.b30.toFixed(3) : 'N/A'
}
Display {
label: 'R10'
value: 'Not supported'
}
}
Button {
Layout.alignment: Qt.AlignBottom
// TODO: icon
text: 'Reload'
onClicked: vm.reload()
}
}
}