Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
eb7f384c
Unverified
Commit
eb7f384c
authored
Sep 08, 2019
by
Don Gagne
Committed by
GitHub
Sep 08, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #7795 from DonLakeFlyer/Options
Use Options control in Corridor scan
parents
5bbb313d
72c9bf6c
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
24 deletions
+35
-24
CorridorScanEditor.qml
src/PlanView/CorridorScanEditor.qml
+25
-19
QGCComboBox.qml
src/QmlControls/QGCComboBox.qml
+8
-4
QGCOptionsComboBox.qml
src/QmlControls/QGCOptionsComboBox.qml
+2
-1
No files found.
src/PlanView/CorridorScanEditor.qml
View file @
eb7f384c
...
...
@@ -70,7 +70,9 @@ Rectangle {
cameraCalc
:
missionItem
.
cameraCalc
vehicleFlightIsFrontal
:
true
distanceToSurfaceLabel
:
qsTr
(
"
Altitude
"
)
distanceToSurfaceAltitudeMode
:
missionItem
.
followTerrain
?
QGroundControl
.
AltitudeModeAboveTerrain
:
QGroundControl
.
AltitudeModeRelative
distanceToSurfaceAltitudeMode
:
missionItem
.
followTerrain
?
QGroundControl
.
AltitudeModeAboveTerrain
:
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
frontalDistanceLabel
:
qsTr
(
"
Trigger Dist
"
)
sideDistanceLabel
:
qsTr
(
"
Spacing
"
)
}
...
...
@@ -100,26 +102,30 @@ Rectangle {
Layout.fillWidth
:
true
}
FactCheckBox
{
text
:
qsTr
(
"
Take images in turnarounds
"
)
fact
:
missionItem
.
cameraTriggerInTurnAround
enabled
:
missionItem
.
hoverAndCaptureAllowed
?
!
missionItem
.
hoverAndCapture
.
rawValue
:
true
QGCOptionsComboBox
{
Layout.columnSpan
:
2
}
QGCCheckBox
{
id
:
relAlt
text
:
qsTr
(
"
Relative altitude
"
)
checked
:
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
enabled
:
missionItem
.
cameraCalc
.
isManualCamera
&&
!
missionItem
.
followTerrain
visible
:
QGroundControl
.
corePlugin
.
options
.
showMissionAbsoluteAltitude
||
(
!
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
&&
!
missionItem
.
followTerrain
)
Layout.alignment
:
Qt
.
AlignLeft
Layout.columnSpan
:
2
onClicked
:
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
=
checked
Layout.fillWidth
:
true
Connections
{
target
:
missionItem
.
cameraCalc
onDistanceToSurfaceRelativeChanged
:
relAlt
.
checked
=
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
model
:
[
{
text
:
qsTr
(
"
Images in turnarounds
"
),
fact
:
missionItem
.
cameraTriggerInTurnAround
,
enabled
:
missionItem
.
hoverAndCaptureAllowed
?
!
missionItem
.
hoverAndCapture
.
rawValue
:
true
,
visible
:
true
},
{
text
:
qsTr
(
"
Relative altitude
"
),
enabled
:
missionItem
.
cameraCalc
.
isManualCamera
&&
!
missionItem
.
followTerrain
,
visible
:
QGroundControl
.
corePlugin
.
options
.
showMissionAbsoluteAltitude
||
(
!
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
&&
!
missionItem
.
followTerrain
),
checked
:
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
}
]
onItemClicked
:
{
if
(
index
==
1
)
{
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
=
!
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
console
.
log
(
missionItem
.
cameraCalc
.
distanceToSurfaceRelative
)
}
}
}
}
...
...
src/QmlControls/QGCComboBox.qml
View file @
eb7f384c
...
...
@@ -23,10 +23,14 @@ ComboBox {
property
bool
centeredLabel
:
false
property
var
_qgcPal
:
QGCPalette
{
colorGroupEnabled
:
enabled
}
Component.onCompleted
:
indicator
.
color
=
Qt
.
binding
(
function
()
{
return
_qgcPal
.
text
})
background
:
Rectangle
{
implicitWidth
:
ScreenTools
.
implicitComboBoxWidth
implicitHeight
:
ScreenTools
.
implicitComboBoxHeight
color
:
qgcPal
.
window
color
:
_
qgcPal
.
window
border.width
:
enabled
?
1
:
0
border.color
:
"
#999
"
}
...
...
@@ -38,12 +42,12 @@ ComboBox {
contentItem
:
Text
{
text
:
control
.
textRole
?
(
Array
.
isArray
(
control
.
model
)
?
modelData
[
control
.
textRole
]
:
model
[
control
.
textRole
])
:
modelData
color
:
control
.
currentIndex
===
index
?
qgcPal
.
buttonHighlightText
:
qgcPal
.
buttonText
color
:
control
.
currentIndex
===
index
?
_qgcPal
.
buttonHighlightText
:
_
qgcPal
.
buttonText
verticalAlignment
:
Text
.
AlignVCenter
}
background
:
Rectangle
{
color
:
control
.
currentIndex
===
index
?
qgcPal
.
buttonHighlight
:
qgcPal
.
button
color
:
control
.
currentIndex
===
index
?
_qgcPal
.
buttonHighlight
:
_
qgcPal
.
button
}
highlighted
:
control
.
highlightedIndex
===
index
...
...
@@ -59,7 +63,7 @@ ComboBox {
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.horizontalCenter
:
centeredLabel
?
parent
.
horizontalCenter
:
undefined
text
:
control
.
currentText
color
:
qgcPal
.
text
color
:
_
qgcPal
.
text
}
}
}
src/QmlControls/QGCOptionsComboBox.qml
View file @
eb7f384c
...
...
@@ -30,6 +30,8 @@ ComboBox {
property
string
_flashText
property
bool
_showFlash
:
false
Component.onCompleted
:
indicator
.
color
=
Qt
.
binding
(
function
()
{
return
_controlQGCPal
.
text
})
background
:
Rectangle
{
implicitWidth
:
ScreenTools
.
implicitComboBoxWidth
implicitHeight
:
ScreenTools
.
implicitComboBoxHeight
...
...
@@ -58,7 +60,6 @@ ComboBox {
(
modelData
.
fact
.
typeIsBool
?
(
modelData
.
fact
.
value
===
false
?
Qt
.
Unchecked
:
Qt
.
Checked
)
:
(
modelData
.
fact
.
value
===
0
?
Qt
.
Unchecked
:
Qt
.
Checked
))
:
modelData
.
checked
}
contentItem
:
RowLayout
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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