Unverified Commit 51700e7d authored by Gus Grubba's avatar Gus Grubba Committed by GitHub

Merge pull request #6730 from mavlink/angleSlider

Adding a slider to set the mission path angle
parents 45c2e7d3 62407de6
......@@ -16,6 +16,8 @@ QGCTextField {
showUnits: true
showHelp: true
signal updated()
property Fact fact: null
property string _validateString
......@@ -29,6 +31,7 @@ QGCTextField {
var errorString = fact.validate(text, false /* convertOnly */)
if (errorString === "") {
fact.value = text
_textField.updated()
} else {
_validateString = text
qgcView.showDialog(validationErrorDialogComponent, qsTr("Invalid Value"), qgcView.showDialogDefaultWidth, StandardButton.Save | StandardButton.Cancel)
......@@ -36,6 +39,7 @@ QGCTextField {
} else {
fact.value = text
fact.valueChanged(fact.value)
_textField.updated()
}
}
......
......@@ -90,6 +90,20 @@ Rectangle {
FactTextField {
fact: missionItem.gridAngle
Layout.fillWidth: true
onUpdated: angleSlider.value = missionItem.gridAngle.value
}
QGCSlider {
id: angleSlider
minimumValue: 0
maximumValue: 359
stepSize: 1
tickmarksEnabled: false
Layout.fillWidth: true
Layout.columnSpan: 2
Layout.preferredHeight: ScreenTools.defaultFontPixelHeight * 1.5
onValueChanged: missionItem.gridAngle.value = value
Component.onCompleted: value = missionItem.gridAngle.value
updateValueWhileDragging: true
}
QGCLabel { text: qsTr("Turnaround dist") }
......
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