Skip to content
Snippets Groups Projects
Commit 58c298ac authored by DonLakeFlyer's avatar DonLakeFlyer
Browse files

Much better ui

parent 9b7cfd25
No related branches found
No related tags found
No related merge requests found
......@@ -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 {
}
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 {
// 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 {
onClicked: updateValues()
Layout.fillWidth: true
Layout.minimumWidth: ScreenTools.defaultFontPixelWidth * 20
Component.onCompleted: {
if (checked) {
header.checked = true
}
}
}
QGCCheckBox {
......@@ -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 : ""
}
}
}
}
......
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