Unverified Commit b810c9ec authored by Don Gagne's avatar Don Gagne Committed by GitHub

Merge pull request #6311 from DonLakeFlyer/ValuesPagePicker

Values Page: Value picker UI
parents 14fff3e6 58c298ac
...@@ -134,7 +134,7 @@ Column { ...@@ -134,7 +134,7 @@ Column {
QGCFlickable { QGCFlickable {
anchors.fill: parent anchors.fill: parent
contentHeight: _loader.y + _loader.height contentHeight: column.height
flickableDirection: Flickable.VerticalFlick flickableDirection: Flickable.VerticalFlick
clip: true clip: true
...@@ -169,13 +169,26 @@ Column { ...@@ -169,13 +169,26 @@ Column {
} }
Loader { Loader {
id: _loader
anchors.left: parent.left anchors.left: parent.left
anchors.right: parent.right anchors.right: parent.right
sourceComponent: factGroupList sourceComponent: factGroupList
property var factGroup: _activeVehicle 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 // property string factGroupName
Column { Column {
id: _root
spacing: _margins spacing: _margins
QGCLabel { SectionHeader {
width: parent.width id: header
wrapMode: Text.WordWrap anchors.left: parent.left
text: factGroup ? factGroupName : qsTr("Vehicle must be connected to assign values.") anchors.right: parent.right
text: factGroupName.charAt(0).toUpperCase() + factGroupName.slice(1)
checked: false
} }
Column {
spacing: _margins
visible: header.checked
Repeater { Repeater {
model: factGroup ? factGroup.factNames : 0 model: factGroup ? factGroup.factNames : 0
...@@ -253,6 +271,12 @@ Column { ...@@ -253,6 +271,12 @@ Column {
onClicked: updateValues() onClicked: updateValues()
Layout.fillWidth: true Layout.fillWidth: true
Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 20 Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 20
Component.onCompleted: {
if (checked) {
header.checked = true
}
}
} }
QGCCheckBox { 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 : ""
}
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment