Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
ac265c19
Unverified
Commit
ac265c19
authored
Feb 13, 2020
by
Don Gagne
Committed by
GitHub
Feb 13, 2020
Browse files
Merge pull request #8326 from DonLakeFlyer/PresetWizard
Survey: Preset selection in wizard mode
parents
323aeda3
e87f6deb
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/PlanView/SurveyItemEditor.qml
View file @
ac265c19
...
...
@@ -28,6 +28,9 @@ Rectangle {
property
real
_fieldWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10.5
property
var
_vehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
?
QGroundControl
.
multiVehicleManager
.
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
offlineEditingVehicle
property
real
_cameraMinTriggerInterval
:
missionItem
.
cameraCalc
.
minTriggerInterval
.
rawValue
property
bool
_polygonDone
:
false
property
string
_doneAdjusting
:
qsTr
(
"
Done Adjusting
"
)
property
bool
_presetsAvailable
:
missionItem
.
presetNames
.
length
!==
0
function
polygonCaptureStarted
()
{
missionItem
.
clearPolygon
()
...
...
@@ -62,19 +65,109 @@ Rectangle {
spacing
:
_margin
visible
:
!
missionItem
.
surveyAreaPolygon
.
isValid
||
missionItem
.
wizardMode
QGCLabel
{
ColumnLayout
{
Layout.fillWidth
:
true
wrapMode
:
Text
.
WordWrap
text
:
qsTr
(
"
Use the Polygon Tools to create the polygon which outlines your survey area.
"
)
spacing
:
_margin
visible
:
!
_polygonDone
QGCLabel
{
Layout.fillWidth
:
true
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
text
:
qsTr
(
"
Use the Polygon Tools to create the polygon which outlines your survey area.
"
)
}
QGCButton
{
text
:
qsTr
(
"
Done With Polygon
"
)
Layout.fillWidth
:
true
enabled
:
missionItem
.
surveyAreaPolygon
.
isValid
onClicked
:
{
if
(
!
_presetsAvailable
)
{
missionItem
.
wizardMode
=
false
editorRoot
.
selectNextNotReadyItem
()
}
_polygonDone
=
true
}
}
}
QGCButton
{
text
:
qsTr
(
"
Done With Polygon
"
)
ColumnLayout
{
Layout.fillWidth
:
true
enabled
:
missionItem
.
surveyAreaPolygon
.
isValid
onClicked
:
{
missionItem
.
wizardMode
=
false
editorRoot
.
selectNextNotReadyItem
()
spacing
:
_margin
visible
:
_polygonDone
QGCLabel
{
Layout.fillWidth
:
true
wrapMode
:
Text
.
WordWrap
horizontalAlignment
:
Text
.
AlignHCenter
text
:
qsTr
(
"
Apply a Preset or click %1 for manual setup.
"
).
arg
(
_doneAdjusting
)
}
QGCComboBox
{
id
:
wizardPresetCombo
Layout.fillWidth
:
true
model
:
missionItem
.
presetNames
}
QGCButton
{
Layout.fillWidth
:
true
text
:
qsTr
(
"
Apply Preset
"
)
enabled
:
missionItem
.
presetNames
.
length
!=
0
onClicked
:
missionItem
.
loadPreset
(
wizardPresetCombo
.
textAt
(
wizardPresetCombo
.
currentIndex
))
}
SectionHeader
{
id
:
wizardPresectsTransectsHeader
Layout.fillWidth
:
true
text
:
qsTr
(
"
Transects
"
)
}
GridLayout
{
Layout.fillWidth
:
true
columnSpacing
:
_margin
rowSpacing
:
_margin
columns
:
2
visible
:
wizardPresectsTransectsHeader
.
checked
QGCLabel
{
text
:
qsTr
(
"
Angle
"
)
}
FactTextField
{
fact
:
missionItem
.
gridAngle
Layout.fillWidth
:
true
onUpdated
:
wizardPresetsAngleSlider
.
value
=
missionItem
.
gridAngle
.
value
}
QGCSlider
{
id
:
wizardPresetsAngleSlider
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
}
QGCButton
{
Layout.columnSpan
:
2
Layout.fillWidth
:
true
text
:
qsTr
(
"
Rotate Entry Point
"
)
onClicked
:
missionItem
.
rotateEntryPoint
();
}
}
Item
{
height
:
ScreenTools
.
defaultFontPixelHeight
;
width
:
1
}
QGCButton
{
text
:
_doneAdjusting
Layout.fillWidth
:
true
enabled
:
missionItem
.
surveyAreaPolygon
.
isValid
onClicked
:
{
missionItem
.
wizardMode
=
false
editorRoot
.
selectNextNotReadyItem
()
}
}
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment