Browse Source

Much better ui

QGC4.4
DonLakeFlyer 7 years ago
parent
commit
58c298ac46
  1. 50
      src/FlightMap/Widgets/ValuePageWidget.qml

50
src/FlightMap/Widgets/ValuePageWidget.qml

@ -134,7 +134,7 @@ Column { @@ -134,7 +134,7 @@ Column {
QGCFlickable {
anchors.fill: parent
contentHeight: _loader.y + _loader.height
contentHeight: column.height
flickableDirection: Flickable.VerticalFlick
clip: true
@ -169,13 +169,26 @@ Column { @@ -169,13 +169,26 @@ Column {
}
Loader {
id: _loader
anchors.left: parent.left
anchors.right: parent.right
sourceComponent: factGroupList
property var factGroup: _activeVehicle
property string factGroupName: "Vehicle"
property string factGroupName: qsTr("Vehicle")
}
Repeater {
model: _activeVehicle.factGroupNames
Loader {
anchors.left: parent.left
anchors.right: parent.right
sourceComponent: factGroupList
property var factGroup: _activeVehicle.getFactGroup(modelData)
property string factGroupName: modelData
}
}
}
}
@ -190,15 +203,20 @@ Column { @@ -190,15 +203,20 @@ Column {
// property string factGroupName
Column {
id: _root
spacing: _margins
QGCLabel {
width: parent.width
wrapMode: Text.WordWrap
text: factGroup ? factGroupName : qsTr("Vehicle must be connected to assign values.")
SectionHeader {
id: header
anchors.left: parent.left
anchors.right: parent.right
text: factGroupName.charAt(0).toUpperCase() + factGroupName.slice(1)
checked: false
}
Column {
spacing: _margins
visible: header.checked
Repeater {
model: factGroup ? factGroup.factNames : 0
@ -253,6 +271,12 @@ Column { @@ -253,6 +271,12 @@ Column {
onClicked: updateValues()
Layout.fillWidth: true
Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 20
Component.onCompleted: {
if (checked) {
header.checked = true
}
}
}
QGCCheckBox {
@ -264,16 +288,6 @@ Column { @@ -264,16 +288,6 @@ Column {
}
}
}
Item { height: 1; width: 1 }
Repeater {
model: factGroup ? factGroup.factGroupNames : 0
Loader {
sourceComponent: factGroupList
property var factGroup: _root ? _root.parent.factGroup.getFactGroup(modelData) : undefined
property string factGroupName: _root ? _root.parent.factGroupName + "." + modelData : ""
}
}
}
}

Loading…
Cancel
Save