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
0736891f
Commit
0736891f
authored
Apr 16, 2019
by
Gus Grubba
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add Plan/Fly switch to ToolStrip
parent
2ceca793
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
36 additions
and
19 deletions
+36
-19
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+16
-7
PlanView.qml
src/PlanView/PlanView.qml
+20
-12
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
0736891f
...
@@ -570,8 +570,8 @@ Item {
...
@@ -570,8 +570,8 @@ Item {
z
:
_mapAndVideo
.
z
+
4
z
:
_mapAndVideo
.
z
+
4
title
:
qsTr
(
"
Fly
"
)
title
:
qsTr
(
"
Fly
"
)
maxHeight
:
(
_flightVideo
.
visible
?
_flightVideo
.
y
:
parent
.
height
)
-
toolStrip
.
y
maxHeight
:
(
_flightVideo
.
visible
?
_flightVideo
.
y
:
parent
.
height
)
-
toolStrip
.
y
buttonVisible
:
[
_useChecklist
,
_guidedController
.
showTakeoff
||
!
_guidedController
.
showLand
,
_guidedController
.
showLand
&&
!
_guidedController
.
showTakeoff
,
true
,
true
,
true
]
buttonVisible
:
[
true
,
_useChecklist
,
_guidedController
.
showTakeoff
||
!
_guidedController
.
showLand
,
_guidedController
.
showLand
&&
!
_guidedController
.
showTakeoff
,
true
,
true
,
true
]
buttonEnabled
:
[
_useChecklist
&&
activeVehicle
,
_guidedController
.
showTakeoff
,
_guidedController
.
showLand
,
_guidedController
.
showRTL
,
_guidedController
.
showPause
,
_anyActionAvailable
]
buttonEnabled
:
[
true
,
_useChecklist
&&
activeVehicle
,
_guidedController
.
showTakeoff
,
_guidedController
.
showLand
,
_guidedController
.
showRTL
,
_guidedController
.
showPause
,
_anyActionAvailable
]
property
bool
_anyActionAvailable
:
_guidedController
.
showStartMission
||
_guidedController
.
showResumeMission
||
_guidedController
.
showChangeAlt
||
_guidedController
.
showLandAbort
property
bool
_anyActionAvailable
:
_guidedController
.
showStartMission
||
_guidedController
.
showResumeMission
||
_guidedController
.
showChangeAlt
||
_guidedController
.
showLandAbort
property
var
_actionModel
:
[
property
var
_actionModel
:
[
...
@@ -608,6 +608,10 @@ Item {
...
@@ -608,6 +608,10 @@ Item {
]
]
model
:
[
model
:
[
{
name
:
"
Plan
"
,
iconSource
:
"
/qmlimages/Plan.svg
"
,
},
{
{
name
:
"
Checklist
"
,
name
:
"
Checklist
"
,
iconSource
:
"
/qmlimages/check.svg
"
,
iconSource
:
"
/qmlimages/check.svg
"
,
...
@@ -642,13 +646,18 @@ Item {
...
@@ -642,13 +646,18 @@ Item {
onClicked
:
{
onClicked
:
{
guidedActionsController
.
closeAll
()
guidedActionsController
.
closeAll
()
var
action
=
model
[
index
].
action
if
(
index
===
0
)
{
if
(
action
===
-
1
)
{
mainWindow
.
showPlanView
()
guidedActionList
.
model
=
_actionModel
guidedActionList
.
visible
=
true
}
else
{
}
else
{
_guidedController
.
confirmAction
(
action
)
var
action
=
model
[
index
].
action
if
(
action
===
-
1
)
{
guidedActionList
.
model
=
_actionModel
guidedActionList
.
visible
=
true
}
else
{
_guidedController
.
confirmAction
(
action
)
}
}
}
}
}
}
}
...
...
src/PlanView/PlanView.qml
View file @
0736891f
...
@@ -551,16 +551,20 @@ Item {
...
@@ -551,16 +551,20 @@ Item {
color
:
qgcPal
.
window
color
:
qgcPal
.
window
title
:
qsTr
(
"
Plan
"
)
title
:
qsTr
(
"
Plan
"
)
z
:
QGroundControl
.
zOrderWidgets
z
:
QGroundControl
.
zOrderWidgets
showAlternateIcon
:
[
_planMasterController
.
dirty
,
false
,
false
,
false
,
false
,
false
,
false
]
showAlternateIcon
:
[
false
,
_planMasterController
.
dirty
,
false
,
false
,
false
,
false
,
false
,
false
]
rotateImage
:
[
_planMasterController
.
syncInProgress
,
false
,
false
,
false
,
false
,
false
,
false
]
rotateImage
:
[
false
,
_planMasterController
.
syncInProgress
,
false
,
false
,
false
,
false
,
false
,
false
]
animateImage
:
[
_planMasterController
.
dirty
,
false
,
false
,
false
,
false
,
false
,
false
]
animateImage
:
[
false
,
_planMasterController
.
dirty
,
false
,
false
,
false
,
false
,
false
,
false
]
buttonEnabled
:
[
!
_planMasterController
.
syncInProgress
,
true
,
true
,
true
,
true
,
true
,
true
]
buttonEnabled
:
[
true
,
!
_planMasterController
.
syncInProgress
,
true
,
true
,
true
,
true
,
true
,
true
]
buttonVisible
:
[
true
,
true
,
_waypointsOnlyMode
,
true
,
true
,
_showZoom
,
_showZoom
]
buttonVisible
:
[
true
,
true
,
true
,
_waypointsOnlyMode
,
true
,
true
,
_showZoom
,
_showZoom
]
maxHeight
:
mapScale
.
y
-
toolStrip
.
y
maxHeight
:
mapScale
.
y
-
toolStrip
.
y
property
bool
_showZoom
:
!
ScreenTools
.
isMobile
property
bool
_showZoom
:
!
ScreenTools
.
isMobile
model
:
[
model
:
[
{
name
:
qsTr
(
"
Fly
"
),
iconSource
:
"
/qmlimages/PaperPlane.svg
"
,
},
{
{
name
:
qsTr
(
"
File
"
),
name
:
qsTr
(
"
File
"
),
iconSource
:
"
/qmlimages/MapSync.svg
"
,
iconSource
:
"
/qmlimages/MapSync.svg
"
,
...
@@ -599,29 +603,33 @@ Item {
...
@@ -599,29 +603,33 @@ Item {
onClicked
:
{
onClicked
:
{
switch
(
index
)
{
switch
(
index
)
{
case
1
:
case
0
:
mainWindow
.
showFlyView
()
break
;
case
2
:
_addWaypointOnClick
=
checked
_addWaypointOnClick
=
checked
_addROIOnClick
=
false
_addROIOnClick
=
false
break
break
case
2
:
case
3
:
_addROIOnClick
=
checked
_addROIOnClick
=
checked
_addWaypointOnClick
=
false
_addWaypointOnClick
=
false
break
break
case
3
:
case
4
:
if
(
_singleComplexItem
)
{
if
(
_singleComplexItem
)
{
addComplexItem
(
_missionController
.
complexMissionItemNames
[
0
])
addComplexItem
(
_missionController
.
complexMissionItemNames
[
0
])
}
}
break
break
case
5
:
case
6
:
editorMap
.
zoomLevel
+=
0.5
editorMap
.
zoomLevel
+=
0.5
break
break
case
6
:
case
7
:
editorMap
.
zoomLevel
-=
0.5
editorMap
.
zoomLevel
-=
0.5
break
break
}
}
}
}
}
}
}
}
//-----------------------------------------------------------
//-----------------------------------------------------------
// Right pane for mission editing controls
// Right pane for mission editing controls
Rectangle
{
Rectangle
{
...
...
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