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
20f3f54c
Commit
20f3f54c
authored
Oct 26, 2015
by
Gus Grubba
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #2118 from dogmaphobic/flightView
Flight View Work
parents
579206c6
4530e96d
Changes
21
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
21 changed files
with
1010 additions
and
613 deletions
+1010
-613
qgroundcontrol.qrc
qgroundcontrol.qrc
+5
-2
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+80
-118
FlightDisplayViewDelayLoadOuter.qml
src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml
+0
-145
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+111
-0
FlightDisplayViewVideo.qml
src/FlightDisplay/FlightDisplayViewVideo.qml
+55
-0
FlightDisplayViewWidgets.qml
src/FlightDisplay/FlightDisplayViewWidgets.qml
+202
-0
qmldir
src/FlightDisplay/qmldir
+1
-3
FlightMap.qml
src/FlightMap/FlightMap.qml
+3
-1
ZoomMinus.svg
src/FlightMap/Images/ZoomMinus.svg
+11
-5
ZoomPlus.svg
src/FlightMap/Images/ZoomPlus.svg
+9
-4
attitudeInstrument.svg
src/FlightMap/Images/attitudeInstrument.svg
+7
-4
buttonLeft.svg
src/FlightMap/Images/buttonLeft.svg
+9
-15
buttonRight.svg
src/FlightMap/Images/buttonRight.svg
+9
-15
VehicleMapItem.qml
src/FlightMap/MapItems/VehicleMapItem.qml
+4
-3
QGCAttitudeWidget.qml
src/FlightMap/Widgets/QGCAttitudeWidget.qml
+78
-55
QGCCompassWidget.qml
src/FlightMap/Widgets/QGCCompassWidget.qml
+68
-39
QGCInstrumentWidget.qml
src/FlightMap/Widgets/QGCInstrumentWidget.qml
+112
-0
QGCPitchIndicator.qml
src/FlightMap/Widgets/QGCPitchIndicator.qml
+5
-2
qmldir
src/FlightMap/qmldir
+2
-1
MissionEditor.qml
src/MissionEditor/MissionEditor.qml
+14
-201
MissionEditorHelp.qml
src/MissionEditor/MissionEditorHelp.qml
+225
-0
No files found.
qgroundcontrol.qrc
View file @
20f3f54c
...
@@ -77,12 +77,14 @@
...
@@ -77,12 +77,14 @@
<file alias="FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="FlightDisplayWidget.qml">src/FlightDisplay/FlightDisplayWidget.qml</file>
<file alias="FlightDisplayWidget.qml">src/FlightDisplay/FlightDisplayWidget.qml</file>
<file alias="MissionEditor.qml">src/MissionEditor/MissionEditor.qml</file>
<file alias="MissionEditor.qml">src/MissionEditor/MissionEditor.qml</file>
<file alias="MissionEditorHelp.qml">src/MissionEditor/MissionEditorHelp.qml</file>
<!-- FlightDisplay module -->
<!-- FlightDisplay module -->
<file alias="QGroundControl/FlightDisplay/qmldir">src/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightDisplay/qmldir">src/FlightDisplay/qmldir</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayView.qml">src/FlightDisplay/FlightDisplayView.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewDelayLoadInner.qml">src/FlightDisplay/FlightDisplayViewDelayLoadInner.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewMap.qml">src/FlightDisplay/FlightDisplayViewMap.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml">src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewVideo.qml">src/FlightDisplay/FlightDisplayViewVideo.qml</file>
<file alias="QGroundControl/FlightDisplay/FlightDisplayViewWidgets.qml">src/FlightDisplay/FlightDisplayViewWidgets.qml</file>
<!-- FlightMap module -->
<!-- FlightMap module -->
<file alias="QGroundControl/FlightMap/qmldir">src/FlightMap/qmldir</file>
<file alias="QGroundControl/FlightMap/qmldir">src/FlightMap/qmldir</file>
...
@@ -96,6 +98,7 @@
...
@@ -96,6 +98,7 @@
<file alias="QGroundControl/FlightMap/QGCCompassHUD.qml">src/FlightMap/Widgets/QGCCompassHUD.qml</file>
<file alias="QGroundControl/FlightMap/QGCCompassHUD.qml">src/FlightMap/Widgets/QGCCompassHUD.qml</file>
<file alias="QGroundControl/FlightMap/QGCCurrentAltitude.qml">src/FlightMap/Widgets/QGCCurrentAltitude.qml</file>
<file alias="QGroundControl/FlightMap/QGCCurrentAltitude.qml">src/FlightMap/Widgets/QGCCurrentAltitude.qml</file>
<file alias="QGroundControl/FlightMap/QGCCurrentSpeed.qml">src/FlightMap/Widgets/QGCCurrentSpeed.qml</file>
<file alias="QGroundControl/FlightMap/QGCCurrentSpeed.qml">src/FlightMap/Widgets/QGCCurrentSpeed.qml</file>
<file alias="QGroundControl/FlightMap/QGCInstrumentWidget.qml">src/FlightMap/Widgets/QGCInstrumentWidget.qml</file>
<file alias="QGroundControl/FlightMap/QGCPitchIndicator.qml">src/FlightMap/Widgets/QGCPitchIndicator.qml</file>
<file alias="QGroundControl/FlightMap/QGCPitchIndicator.qml">src/FlightMap/Widgets/QGCPitchIndicator.qml</file>
<file alias="QGroundControl/FlightMap/QGCSlider.qml">src/FlightMap/Widgets/QGCSlider.qml</file>
<file alias="QGroundControl/FlightMap/QGCSlider.qml">src/FlightMap/Widgets/QGCSlider.qml</file>
<file alias="QGroundControl/FlightMap/QGCSpeedWidget.qml">src/FlightMap/Widgets/QGCSpeedWidget.qml</file>
<file alias="QGroundControl/FlightMap/QGCSpeedWidget.qml">src/FlightMap/Widgets/QGCSpeedWidget.qml</file>
...
...
src/FlightDisplay/FlightDisplayView.qml
View file @
20f3f54c
...
@@ -41,16 +41,6 @@ import QGroundControl.Controllers 1.0
...
@@ -41,16 +41,6 @@ import QGroundControl.Controllers 1.0
Item
{
Item
{
id
:
root
id
:
root
property
alias
latitude
:
flightMap
.
latitude
property
alias
longitude
:
flightMap
.
longitude
// Top margin for all widgets. Used to prevent overlap with the toolbar
property
real
topMargin
:
0
// Used by parent to hide widgets when it displays something above in the z order.
// Prevents z order drawing problems.
property
bool
hideWidgets
:
false
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
enabled
}
property
var
_activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
_activeVehicle
:
multiVehicleManager
.
activeVehicle
...
@@ -64,145 +54,117 @@ Item {
...
@@ -64,145 +54,117 @@ Item {
readonly
property
real
_defaultAirSpeed
:
0
readonly
property
real
_defaultAirSpeed
:
0
readonly
property
real
_defaultClimbRate
:
0
readonly
property
real
_defaultClimbRate
:
0
readonly
property
string
_mapName
:
"
FlightDisplayView
"
readonly
property
string
_mapName
:
"
FlightDisplayView
"
readonly
property
string
_showMapBackgroundKey
:
"
/showMapBackground
"
readonly
property
string
_showMapBackgroundKey
:
"
/showMapBackground
"
readonly
property
var
_flightMap
:
flightMap
property
bool
_mainIsMap
:
!
_controller
.
hasVideo
property
real
_roll
:
_activeVehicle
?
(
isNaN
(
_activeVehicle
.
roll
)
?
_defaultRoll
:
_activeVehicle
.
roll
)
:
_defaultRoll
property
real
_roll
:
_activeVehicle
?
(
isNaN
(
_activeVehicle
.
roll
)
?
_defaultRoll
:
_activeVehicle
.
roll
)
:
_defaultRoll
property
real
_pitch
:
_activeVehicle
?
(
isNaN
(
_activeVehicle
.
pitch
)
?
_defaultPitch
:
_activeVehicle
.
pitch
)
:
_defaultPitch
property
real
_pitch
:
_activeVehicle
?
(
isNaN
(
_activeVehicle
.
pitch
)
?
_defaultPitch
:
_activeVehicle
.
pitch
)
:
_defaultPitch
property
real
_heading
:
_activeVehicle
?
(
isNaN
(
_activeVehicle
.
heading
)
?
_defaultHeading
:
_activeVehicle
.
heading
)
:
_defaultHeading
property
real
_heading
:
_activeVehicle
?
(
isNaN
(
_activeVehicle
.
heading
)
?
_defaultHeading
:
_activeVehicle
.
heading
)
:
_defaultHeading
property
var
_vehicleCoordinate
:
_activeVehicle
?
(
_activeVehicle
.
coordinateValid
?
_activeVehicle
.
coordinate
:
_defaultVehicleCoordinate
)
:
_defaultVehicleCoordinate
property
var
_vehicleCoordinate
:
_activeVehicle
?
(
_activeVehicle
.
coordinateValid
?
_activeVehicle
.
coordinate
:
_defaultVehicleCoordinate
)
:
_defaultVehicleCoordinate
property
real
_altitudeWGS84
:
_activeVehicle
?
_activeVehicle
.
altitudeWGS84
:
_defaultAltitudeWGS84
property
real
_altitudeWGS84
:
_activeVehicle
?
_activeVehicle
.
altitudeWGS84
:
_defaultAltitudeWGS84
property
real
_groundSpeed
:
_activeVehicle
?
_activeVehicle
.
groundSpeed
:
_defaultGroundSpeed
property
real
_groundSpeed
:
_activeVehicle
?
_activeVehicle
.
groundSpeed
:
_defaultGroundSpeed
property
real
_airSpeed
:
_activeVehicle
?
_activeVehicle
.
airSpeed
:
_defaultAirSpeed
property
real
_airSpeed
:
_activeVehicle
?
_activeVehicle
.
airSpeed
:
_defaultAirSpeed
property
real
_climbRate
:
_activeVehicle
?
_activeVehicle
.
climbRate
:
_defaultClimbRate
property
real
_climbRate
:
_activeVehicle
?
_activeVehicle
.
climbRate
:
_defaultClimbRate
property
bool
_showMap
:
getBool
(
QGroundControl
.
flightMapSettings
.
loadMapSetting
(
flightMap
.
mapName
,
_showMapBackgroundKey
,
"
1
"
))
property
var
_flightMap
:
null
property
var
_flightVideo
:
null
property
var
_savedZoomLevel
:
0
FlightDisplayViewController
{
id
:
_controller
}
FlightDisplayViewController
{
id
:
_controller
}
MissionController
{
MissionController
{
id
:
_missionController
id
:
_missionController
Component.onCompleted
:
start
(
false
/* editMode */
)
Component.onCompleted
:
start
(
false
/* editMode */
)
}
}
ExclusiveGroup
{
function
reloadContents
()
{
id
:
_dropButtonsExclusiveGroup
if
(
_flightVideo
)
{
_flightVideo
.
visible
=
false
}
if
(
_mainIsMap
)
{
mainLoader
.
source
=
"
FlightDisplayViewMap.qml
"
pipLoader
.
source
=
"
FlightDisplayViewVideo.qml
"
}
else
{
mainLoader
.
source
=
"
FlightDisplayViewVideo.qml
"
pipLoader
.
source
=
"
FlightDisplayViewMap.qml
"
}
}
}
// Validate _showMap setting
Component.onCompleted
:
{
Component.onCompleted
:
{
delayLoader
.
source
=
"
FlightDisplayViewDelayLoadOuter.qml
"
reloadContents
();
widgetsLoader
.
source
=
"
FlightDisplayViewWidgets.qml
"
// We have to be careful to not reference root properties in a function which is in a subcomponent
// until the root component has completed loading. Otherwise you get undefined references.
flightMap
.
rootLoadCompleted
=
true
flightMap
.
updateMapPosition
(
true
/* force */
)
_setShowMap
(
_showMap
)
}
function
getBool
(
value
)
{
return
value
===
'
0
'
?
false
:
true
;
}
function
setBool
(
value
)
{
return
value
?
"
1
"
:
"
0
"
;
}
function
_setShowMap
(
showMap
)
{
_showMap
=
_controller
.
hasVideo
?
showMap
:
true
QGroundControl
.
flightMapSettings
.
saveMapSetting
(
flightMap
.
mapName
,
_showMapBackgroundKey
,
setBool
(
_showMap
))
}
}
FlightMap
{
//-- Main Window
id
:
flightMap
Loader
{
anchors.fill
:
parent
id
:
mainLoader
mapName
:
_mapName
anchors.fill
:
parent
visible
:
_showMap
onLoaded
:
{
latitude
:
root
.
_defaultCoordinate
.
latitude
if
(
_mainIsMap
)
{
longitude
:
root
.
_defaultCoordinate
.
longitude
_flightMap
=
item
if
(
_savedZoomLevel
!=
0
)
property
var
rootVehicleCoordinate
:
_vehicleCoordinate
_flightMap
.
zoomLevel
=
_savedZoomLevel
property
bool
rootLoadCompleted
:
false
else
_savedZoomLevel
=
_flightMap
.
zoomLevel
property
bool
_followVehicle
:
true
_flightMap
.
updateMapPosition
(
true
/* force */
)
}
else
{
onRootVehicleCoordinateChanged
:
updateMapPosition
(
false
/* force */
)
_flightVideo
=
item
_flightVideo
.
visible
=
true
Component.onCompleted
:
flightMapDelayLoader
.
source
=
"
FlightDisplayViewDelayLoadInner.qml
"
function
updateMapPosition
(
force
)
{
if
((
_followVehicle
||
force
)
&&
rootLoadCompleted
)
{
flightMap
.
latitude
=
root
.
_vehicleCoordinate
.
latitude
flightMap
.
longitude
=
root
.
_vehicleCoordinate
.
longitude
}
}
}
}
// Home position
}
MissionItemIndicator
{
label
:
"
H
"
coordinate
:
(
_activeVehicle
&&
_activeVehicle
.
homePositionAvailable
)
?
_activeVehicle
.
homePosition
:
QtPositioning
.
coordinate
(
0
,
0
)
visible
:
_activeVehicle
?
_activeVehicle
.
homePositionAvailable
:
false
z
:
QGroundControl
.
zOrderMapItems
}
// Add trajectory points to the map
MapItemView
{
model
:
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
trajectoryPoints
:
0
delegate
:
MapPolyline
{
line.width
:
3
line.color
:
"
orange
"
z
:
QGroundControl
.
zOrderMapItems
-
1
path
:
[
{
latitude
:
object
.
coordinate1
.
latitude
,
longitude
:
object
.
coordinate1
.
longitude
},
{
latitude
:
object
.
coordinate2
.
latitude
,
longitude
:
object
.
coordinate2
.
longitude
},
]
}
}
// Add the vehicles to the map
MapItemView
{
model
:
multiVehicleManager
.
vehicles
delegate
:
VehicleMapItem
{
vehicle
:
object
coordinate
:
object
.
coordinate
isSatellite
:
flightMap
.
isSatelliteMap
z
:
QGroundControl
.
zOrderMapItems
}
}
// Add the mission items to the map
MissionItemView
{
model
:
_missionController
.
missionItems
}
// Add lines between waypoints
//-- PIP Window
MissionLineView
{
Rectangle
{
model
:
_missionController
.
waypointLines
id
:
pip
visible
:
_controller
.
hasVideo
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
height
:
ScreenTools
.
defaultFontPixelSize
*
(
9
)
width
:
ScreenTools
.
defaultFontPixelSize
*
(
9
)
*
(
16
/
9
)
color
:
"
#000010
"
border.width
:
4
radius
:
4
border.color
:
{
if
(
_mainIsMap
&&
_flightMap
!=
null
)
return
_flightMap
.
isSatelliteMap
?
Qt
.
rgba
(
1
,
1
,
1
,
0.75
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
else
return
Qt
.
rgba
(
0
,
0
,
0
,
0.75
)
}
}
Loader
{
Loader
{
id
:
flightMapDelayLoader
id
:
pipLoader
anchors.fill
:
parent
anchors.fill
:
parent
anchors.margins
:
2
onLoaded
:
{
if
(
_mainIsMap
)
{
_flightVideo
=
item
_flightVideo
.
visible
=
true
}
else
{
_flightMap
=
item
_savedZoomLevel
=
_flightMap
.
zoomLevel
_flightMap
.
zoomLevel
=
_savedZoomLevel
-
3
}
pip
.
visible
=
_controller
.
hasVideo
}
}
}
// Used to make pinch zoom work
MouseArea
{
MouseArea
{
anchors.fill
:
parent
anchors.fill
:
parent
onClicked
:
{
_mainIsMap
=
!
_mainIsMap
pip
.
visible
=
false
reloadContents
();
}
}
}
}
// Flight Map
}
//-- Widgets
Loader
{
Loader
{
id
:
delay
Loader
id
:
widgets
Loader
anchors.fill
:
parent
anchors.fill
:
parent
}
}
}
}
src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml
deleted
100644 → 0
View file @
579206c6
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
import
QtQuick
2.4
import
QtQuick
.
Controls
1.3
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QtLocation
5.3
import
QtPositioning
5.2
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
FlightMap
1.0
/// This component is used to delay load the items which are direct children of the
/// FlightDisplayViewControl.
Item
{
QGCVideoBackground
{
anchors.fill
:
parent
display
:
_controller
.
videoSurface
receiver
:
_controller
.
videoReceiver
visible
:
!
_showMap
QGCCompassHUD
{
id
:
compassHUD
y
:
root
.
height
*
0.7
x
:
root
.
width
*
0.5
-
ScreenTools
.
defaultFontPixelSize
*
(
5
)
width
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
height
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
heading
:
_heading
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
}
QGCAttitudeHUD
{
id
:
attitudeHUD
rollAngle
:
_roll
pitchAngle
:
_pitch
width
:
ScreenTools
.
defaultFontPixelSize
*
(
30
)
height
:
ScreenTools
.
defaultFontPixelSize
*
(
30
)
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
}
}
QGCAltitudeWidget
{
anchors.right
:
parent
.
right
height
:
parent
.
height
*
0.65
>
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
?
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
:
parent
.
height
*
0.65
width
:
ScreenTools
.
defaultFontPixelSize
*
(
5
)
altitude
:
_altitudeWGS84
z
:
QGroundControl
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCSpeedWidget
{
anchors.left
:
parent
.
left
width
:
ScreenTools
.
defaultFontPixelSize
*
(
5
)
height
:
parent
.
height
*
0.65
>
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
?
ScreenTools
.
defaultFontPixelSize
*
(
23.4
)
:
parent
.
height
*
0.65
speed
:
_groundSpeed
z
:
QGroundControl
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCCurrentSpeed
{
anchors.left
:
parent
.
left
width
:
ScreenTools
.
defaultFontPixelSize
*
(
6.25
)
airspeed
:
_airSpeed
groundspeed
:
_groundSpeed
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCCurrentAltitude
{
anchors.right
:
parent
.
right
width
:
ScreenTools
.
defaultFontPixelSize
*
(
6.25
)
altitude
:
_altitudeWGS84
vertZ
:
_climbRate
active
:
multiVehicleManager
.
activeVehicleAvailable
z
:
QGroundControl
.
zOrderWidgets
visible
:
!
hideWidgets
}
QGCButton
{
id
:
optionsButton
x
:
_flightMap
.
mapWidgets
.
x
y
:
_flightMap
.
mapWidgets
.
y
-
height
-
(
ScreenTools
.
defaultFontPixelHeight
/
2
)
z
:
QGroundControl
.
zOrderWidgets
width
:
_flightMap
.
mapWidgets
.
width
text
:
"
Options
"
menu
:
optionsMenu
visible
:
_controller
.
hasVideo
&&
!
hideWidgets
ExclusiveGroup
{
id
:
backgroundTypeGroup
}
Menu
{
id
:
optionsMenu
MenuItem
{
id
:
mapBackgroundMenuItem
exclusiveGroup
:
backgroundTypeGroup
checkable
:
true
checked
:
_showMap
text
:
"
Show map as background
"
onTriggered
:
_setShowMap
(
true
)
}
MenuItem
{
id
:
videoBackgroundMenuItem
exclusiveGroup
:
backgroundTypeGroup
checkable
:
true
checked
:
!
_showMap
text
:
"
Show video as background
"
onTriggered
:
_setShowMap
(
false
)
}
}
}
}
src/FlightDisplay/FlightDisplayViewMap.qml
0 → 100644
View file @
20f3f54c
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
import
QtQuick
2.4
import
QtQuick
.
Controls
1.3
import
QtLocation
5.3
import
QtPositioning
5.2
import
QGroundControl
1.0
import
QGroundControl
.
FlightDisplay
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Controllers
1.0
FlightMap
{
id
:
flightMap
anchors.fill
:
parent
mapName
:
_mapName
latitude
:
root
.
_defaultCoordinate
.
latitude
longitude
:
root
.
_defaultCoordinate
.
longitude
property
var
rootVehicleCoordinate
:
_vehicleCoordinate
property
bool
_followVehicle
:
true
onRootVehicleCoordinateChanged
:
updateMapPosition
(
false
/* force */
)
function
updateMapPosition
(
force
)
{
if
(
_followVehicle
||
force
)
{
flightMap
.
latitude
=
root
.
_vehicleCoordinate
.
latitude
flightMap
.
longitude
=
root
.
_vehicleCoordinate
.
longitude
}
}
// Home position
MissionItemIndicator
{
label
:
"
H
"
coordinate
:
(
_activeVehicle
&&
_activeVehicle
.
homePositionAvailable
)
?
_activeVehicle
.
homePosition
:
QtPositioning
.
coordinate
(
0
,
0
)
visible
:
{
if
(
!
_mainIsMap
)
return
false
;
return
_activeVehicle
?
_activeVehicle
.
homePositionAvailable
:
false
}
z
:
QGroundControl
.
zOrderMapItems
}
// Add trajectory points to the map
MapItemView
{
model
:
_mainIsMap
?
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
trajectoryPoints
:
0
:
0
delegate
:
MapPolyline
{
line.width
:
3
line.color
:
"
orange
"
z
:
QGroundControl
.
zOrderMapItems
-
1
path
:
[
{
latitude
:
object
.
coordinate1
.
latitude
,
longitude
:
object
.
coordinate1
.
longitude
},
{
latitude
:
object
.
coordinate2
.
latitude
,
longitude
:
object
.
coordinate2
.
longitude
},
]
}
}
// Add the vehicles to the map
MapItemView
{
model
:
multiVehicleManager
.
vehicles
delegate
:
VehicleMapItem
{
vehicle
:
object
coordinate
:
object
.
coordinate
isSatellite
:
flightMap
.
isSatelliteMap
size
:
_mainIsMap
?
ScreenTools
.
defaultFontPixelHeight
*
5
:
ScreenTools
.
defaultFontPixelHeight
*
2
z
:
QGroundControl
.
zOrderMapItems
}
}
// Add the mission items to the map
MissionItemView
{
model
:
_mainIsMap
?
_missionController
.
missionItems
:
0
}
// Add lines between waypoints
MissionLineView
{
model
:
_mainIsMap
?
_missionController
.
waypointLines
:
0
}
// Used to make pinch zoom work
MouseArea
{
anchors.fill
:
parent
}
}
src/FlightDisplay/FlightDisplayViewVideo.qml
0 → 100644
View file @
20f3f54c
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
import
QtQuick
2.4
import
QtQuick
.
Controls
1.3
import
QGroundControl
1.0
import
QGroundControl
.
FlightDisplay
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Controllers
1.0
QGCVideoBackground
{
anchors.fill
:
parent
display
:
_controller
.
videoSurface
receiver
:
_controller
.
videoReceiver
/* TODO: Come up with a way to make this an option
QGCAttitudeHUD {
id: attitudeHUD
visible: !_mainIsMap
rollAngle: _roll
pitchAngle: _pitch
width: ScreenTools.defaultFontPixelSize * (30)
height: ScreenTools.defaultFontPixelSize * (30)
active: multiVehicleManager.activeVehicleAvailable
z: QGroundControl.zOrderWidgets
}
*/
}
src/FlightDisplay/FlightDisplayView
DelayLoadInner
.qml
→
src/FlightDisplay/FlightDisplayView
Widgets
.qml
View file @
20f3f54c
...
@@ -35,10 +35,15 @@ import QGroundControl.Palette 1.0
...
@@ -35,10 +35,15 @@ import QGroundControl.Palette 1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
FlightMap
1.0
/// This component is used to delay load the controls which are children of the inner FlightMap
/// This component is used to delay load the items which are direct children of the
/// control of FlightDisplayView.
/// FlightDisplayViewControl.
// Vehicle GPS lock display
Item
{
Item
{
ExclusiveGroup
{
id
:
_dropButtonsExclusiveGroup
}
//-- Vehicle GPS lock display
Column
{
Column
{
id
:
gpsLockColumn
id
:
gpsLockColumn
y
:
(
parent
.
height
-
height
)
/
2
y
:
(
parent
.
height
-
height
)
/
2
...
@@ -48,7 +53,7 @@ Item {
...
@@ -48,7 +53,7 @@ Item {
model
:
multiVehicleManager
.
vehicles
model
:
multiVehicleManager
.
vehicles
delegate
:
delegate
:
QGCLabel
{
QGCLabel
{
width
:
gpsLockColumn
.
width
width
:
gpsLockColumn
.
width
horizontalAlignment
:
Text
.
AlignHCenter
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
!
object
.
coordinateValid
visible
:
!
object
.
coordinateValid
...
@@ -58,102 +63,140 @@ Item {
...
@@ -58,102 +63,140 @@ Item {
}
}
}
}
QGCCompassWidget
{
//-- Dismiss Drop Down (if any)
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
MouseArea
{
anchors.topMargin
:
topMargin
anchors.fill
:
parent
anchors.left
:
parent
.
left
enabled
:
_dropButtonsExclusiveGroup
.
current
!=
null
anchors.top
:
parent
.
top
onClicked
:
{
size
:
ScreenTools
.
defaultFontPixelSize
*
(
13.3
)
if
(
_dropButtonsExclusiveGroup
.
current
)
heading
:
_heading
_dropButtonsExclusiveGroup
.
current
.
checked
=
false
z
:
QGroundControl
.
zOrderWidgets
_dropButtonsExclusiveGroup
.
current
=
null
}
}
}
QGCAttitudeWidget
{
//-- Instrument Pannel
QGCInstrumentWidget
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
anchors.bottom
:
parent
.
bottom
size
:
ScreenTools
.
defaultFontPixelSize
*
(
13.3
)
anchors.right
:
parent
.
right
size
:
ScreenTools
.
defaultFontPixelSize
*
(
9
)
active
:
_activeVehicle
!=
null
heading
:
_heading
rollAngle
:
_roll
rollAngle
:
_roll
pitchAngle
:
_pitch
pitchAngle
:
_pitch
active
:
multiVehicleManager
.
activeVehicleAvailabl
e
isSatellite
:
_mainIsMap
?
_flightMap
?
_flightMap
.
isSatelliteMap
:
true
:
tru
e
z
:
QGroundControl
.
zOrderWidgets
z
:
QGroundControl
.
zOrderWidgets
}
}
DropButton
{
//-- Vertical Tool Buttons
id
:
centerMapDropButton
Column
{
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
id
:
toolColumn
anchors.right
:
mapTypeButton
.
left
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
mapTypeButton
.
top
anchors.left
:
parent
.
left
dropDirection
:
dropDown
anchors.top
:
parent
.
top
buttonImage
:
"
/qmlimages/MapCenter.svg
"
spacing
:
ScreenTools
.
defaultFontPixelHeight
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
exclusiveGroup
:
_dropButtonsExclusiveGroup
//-- Map Center Control
z
:
QGroundControl
.
zOrderWidgets
DropButton
{
id
:
centerMapDropButton
dropDownComponent
:
Component
{
dropDirection
:
dropRight
Row
{
buttonImage
:
"
/qmlimages/MapCenter.svg
"
spacing
:
ScreenTools
.
defaultFontPixelWidth
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
exclusiveGroup
:
_dropButtonsExclusiveGroup
QGCCheckBox
{
z
:
QGroundControl
.
zOrderWidgets
id
:
followVehicleCheckBox
text
:
"
Follow Vehicle
"
dropDownComponent
:
Component
{
checked
:
flightMap
.
_followVehicle
Row
{
anchors.baseline
:
centerMapButton
.
baseline
spacing
:
ScreenTools
.
defaultFontPixelWidth
onClicked
:
{
QGCCheckBox
{
centerMapDropButton
.
hideDropDown
()
id
:
followVehicleCheckBox
flightMap
.
_followVehicle
=
!
flightMap
.
_followVehicle
text
:
"
Follow Vehicle
"
checked
:
_flightMap
?
_flightMap
.
_followVehicle
:
false
anchors.baseline
:
centerMapButton
.
baseline
onClicked
:
{
_dropButtonsExclusiveGroup
.
current
=
null
_flightMap
.
_followVehicle
=
!
_flightMap
.
_followVehicle
}
}
}
}
QGCButton
{
QGCButton
{
id
:
centerMapButton
id
:
centerMapButton
text
:
"
Center map on Vehicle
"
text
:
"
Center map on Vehicle
"
enabled
:
_activeVehicle
&&
!
followVehicleCheckBox
.
checked
enabled
:
_activeVehicle
&&
!
followVehicleCheckBox
.
checked
property
var
activeVehicle
:
multiVehicleManager
.
activeVehicle
property
var
activeVehicle
:
multiVehicleManager
.
activeVehicle
onClicked
:
{
onClicked
:
{
centerMapDropButton
.
hideDropDown
()
_dropButtonsExclusiveGroup
.
current
=
null
flightMap
.
latitude
=
activeVehicle
.
latitude
_flightMap
.
latitude
=
activeVehicle
.
latitude
flightMap
.
longitude
=
activeVehicle
.
longitude
_flightMap
.
longitude
=
activeVehicle
.
longitude
}
}
}
}
}
}
}
}
}
}
DropButton
{
//-- Map Type Control
id
:
mapTypeButton
DropButton
{
anchors.topMargin
:
topMargin
id
:
mapTypeButton
anchors.rightMargin
:
ScreenTools
.
defaultFontPixelHeight
dropDirection
:
dropRight
anchors.top
:
parent
.
top
buttonImage
:
"
/qmlimages/MapType.svg
"
anchors.right
:
parent
.
right
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
dropDirection
:
dropDown
exclusiveGroup
:
_dropButtonsExclusiveGroup
buttonImage
:
"
/qmlimages/MapType.svg
"
z
:
QGroundControl
.
zOrderWidgets
viewportMargins
:
ScreenTools
.
defaultFontPixelWidth
/
2
exclusiveGroup
:
_dropButtonsExclusiveGroup
dropDownComponent
:
Component
{
z
:
QGroundControl
.
zOrderWidgets
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
dropDownComponent
:
Component
{
Row
{
Repeater
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
model
:
QGroundControl
.
flightMapSettings
.
mapTypes
Repeater
{
QGCButton
{
model
:
QGroundControl
.
flightMapSettings
.
mapTypes
checkable
:
true
checked
:
_flightMap
?
_flightMap
.
mapType
==
text
:
false
QGCButton
{
text
:
modelData
checkable
:
true
checked
:
flightMap
.
mapType
==
text
onClicked
:
{
text
:
modelData
_flightMap
.
mapType
=
text
_dropButtonsExclusiveGroup
.
current
=
null
onClicked
:
{
}
flightMap
.
mapType
=
text
mapTypeButton
.
hideDropDown
()
}
}
}
}
}
}
}
}
}
}
//-- Zoom Map In
RoundButton
{
id
:
mapZoomPlus
visible
:
_mainIsMap
buttonImage
:
"
/qmlimages/ZoomPlus.svg
"
exclusiveGroup
:
_dropButtonsExclusiveGroup
z
:
QGroundControl
.
zOrderWidgets
onClicked
:
{
if
(
_flightMap
)
_flightMap
.
zoomLevel
+=
0.5
checked
=
false
}
}
//-- Zoom Map Out
RoundButton
{
id
:
mapZoomMinus
visible
:
_mainIsMap
buttonImage
:
"
/qmlimages/ZoomMinus.svg
"
exclusiveGroup
:
_dropButtonsExclusiveGroup
z
:
QGroundControl
.
zOrderWidgets
onClicked
:
{
if
(
_flightMap
)
_flightMap
.
zoomLevel
-=
0.5
checked
=
false
}
}
}
}
}
}
src/FlightDisplay/qmldir
View file @
20f3f54c
Module QGroundControl.FlightDisplay
Module QGroundControl.FlightDisplay
FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayView 1.0 FlightDisplayView.qml
FlightDisplayViewDelayLoadInner 1.0 FlightDisplayViewDelayLoadInner.qml
FlightDisplayViewDelayLoadOuter 1.0 FlightDisplayViewDelayLoadOuter.qml
src/FlightMap/FlightMap.qml
View file @
20f3f54c
...
@@ -49,7 +49,7 @@ Map {
...
@@ -49,7 +49,7 @@ Map {
property
bool
interactive
:
true
property
bool
interactive
:
true
property
string
mapName
:
'
defaultMap
'
property
string
mapName
:
'
defaultMap
'
property
string
mapType
:
QGroundControl
.
flightMapSettings
.
mapTypeForMapName
(
mapName
)
property
string
mapType
:
QGroundControl
.
flightMapSettings
.
mapTypeForMapName
(
mapName
)
property
alias
mapWidgets
:
controlWidgets
//
property alias mapWidgets: controlWidgets
property
bool
isSatelliteMap
:
mapType
==
"
Satellite Map
"
||
mapType
==
"
Hybrid Map
"
property
bool
isSatelliteMap
:
mapType
==
"
Satellite Map
"
||
mapType
==
"
Hybrid Map
"
property
real
lon
:
(
longitude
>=
-
180
&&
longitude
<=
180
)
?
longitude
:
0
property
real
lon
:
(
longitude
>=
-
180
&&
longitude
<=
180
)
?
longitude
:
0
...
@@ -80,6 +80,7 @@ Map {
...
@@ -80,6 +80,7 @@ Map {
}
}
}
}
/*********************************************
/// Map control widgets
/// Map control widgets
Column {
Column {
id: controlWidgets
id: controlWidgets
...
@@ -151,6 +152,7 @@ Map {
...
@@ -151,6 +152,7 @@ Map {
}
}
} // Row - +/- buttons
} // Row - +/- buttons
} // Column - Map control widgets
} // Column - Map control widgets
*********************************************/
/*
/*
The slider and scale display are commented out for now to try to save real estate - DonLakeFlyer
The slider and scale display are commented out for now to try to save real estate - DonLakeFlyer
...
...
src/FlightMap/Images/ZoomMinus.svg
View file @
20f3f54c
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"0 0 72 72"
enable-background=
"new 0 0 72 72"
xml:space=
"preserve"
>
viewBox=
"-269 361 72 72"
style=
"enable-background:new -269 361 72 72;"
xml:space=
"preserve"
>
<circle
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"2"
stroke-miterlimit=
"10"
cx=
"29.573"
cy=
"30.04"
r=
"22.416"
/>
<style
type=
"text/css"
>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"3"
stroke-miterlimit=
"10"
x1=
"64.8"
y1=
"64.83"
x2=
"45.801"
y2=
"45.765"
/>
.st0{fill:none;stroke:#FFFFFF;stroke-width:2;stroke-miterlimit:10;}
<line
fill=
"none"
x1=
"16.973"
y1=
"30.04"
x2=
"42.173"
y2=
"30.04"
/>
.st1{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-miterlimit:10;}
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"5"
stroke-miterlimit=
"10"
x1=
"16.973"
y1=
"30.134"
x2=
"42.173"
y2=
"29.946"
/>
.st2{fill:none;}
.st3{fill:none;stroke:#FFFFFF;stroke-width:5;stroke-miterlimit:10;}
</style>
<circle
class=
"st0"
cx=
"-236.2"
cy=
"393.9"
r=
"11.2"
/>
<line
class=
"st1"
x1=
"-218.6"
y1=
"411.3"
x2=
"-228.1"
y2=
"401.8"
/>
<line
class=
"st2"
x1=
"-242.5"
y1=
"393.9"
x2=
"-229.9"
y2=
"393.9"
/>
<line
class=
"st3"
x1=
"-242.5"
y1=
"394"
x2=
"-229.9"
y2=
"393.9"
/>
</svg>
</svg>
src/FlightMap/Images/ZoomPlus.svg
View file @
20f3f54c
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 19.1.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"0 0 72 72"
enable-background=
"new 0 0 72 72"
xml:space=
"preserve"
>
viewBox=
"-269 361 72 72"
style=
"enable-background:new -269 361 72 72;"
xml:space=
"preserve"
>
<circle
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"2"
stroke-miterlimit=
"10"
cx=
"29.573"
cy=
"30.04"
r=
"22.416"
/>
<style
type=
"text/css"
>
<line
fill=
"none"
stroke=
"#FFFFFF"
stroke-width=
"3"
stroke-miterlimit=
"10"
x1=
"64.8"
y1=
"64.83"
x2=
"45.801"
y2=
"45.765"
/>
.st0{fill:none;stroke:#FFFFFF;stroke-width:2;stroke-miterlimit:10;}
<path
fill=
"#FFFFFF"
d=
"M27.36,42.653V32.187H16.973v-4.374H27.36V17.426h4.426v10.387h10.387v4.374H31.786v10.466H27.36z"
/>
.st1{fill:none;stroke:#FFFFFF;stroke-width:3;stroke-miterlimit:10;}
.st2{fill:#FFFFFF;}
</style>
<circle
class=
"st0"
cx=
"-236.2"
cy=
"393.9"
r=
"11.2"
/>
<line
class=
"st1"
x1=
"-218.6"
y1=
"411.3"
x2=
"-228.1"
y2=
"401.8"
/>
<path
class=
"st2"
d=
"M-237.3,400.2V395h-5.2v-2.2h5.2v-5.2h2.2v5.2h5.2v2.2h-5.2v5.2H-237.3z"
/>
</svg>
</svg>
src/FlightMap/Images/attitudeInstrument.svg
View file @
20f3f54c
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 1
8.1.1
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 1
9.1.0
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
id=
"Layer_4"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
<svg
version=
"1.1"
id=
"Layer_4"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"0 0 288 288"
enable-background=
"new 0 0 288 288"
xml:space=
"preserve"
>
viewBox=
"-161 253 288 288"
style=
"enable-background:new -161 253 288 288;"
xml:space=
"preserve"
>
<path
fill=
"#333333"
d=
"M0-0.002v288h288v-288H0z M144,270c-69.588,0-126-56.412-126-126S74.412,18,144,18s126,56.412,126,126
<style
type=
"text/css"
>
S213.588,270,144,270z"
/>
.st0{fill:#202020;}
</style>
<path
class=
"st0"
d=
"M-161,253v288h288V253L-161,253L-161,253z M-17,523c-69.6,0-126-56.4-126-126s56.4-126,126-126
s126,56.4,126,126S52.6,523-17,523z"
/>
</svg>
</svg>
src/FlightMap/Images/buttonLeft.svg
View file @
20f3f54c
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 1
8.1.1
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 1
9.1.0
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"
0 0 288 288"
enable-background=
"new 0 0 288 288
"
xml:space=
"preserve"
>
viewBox=
"
-161 253 288 288"
style=
"enable-background:new -161 253 288 288;
"
xml:space=
"preserve"
>
<
g
id=
"Layer_1
"
>
<
style
type=
"text/css
"
>
<rect
fill=
"#58595B"
width=
"288"
height=
"288"
/>
.st0{fill:none;stroke:#231F20;stroke-width:24;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
</
g
>
</
style
>
<g
id=
"Layer_2"
>
<g
id=
"Layer_2"
>
<polyline
class=
"st0"
points=
"-59.8,282 -126.1,397 -59.8,512 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
<polyline
class=
"st0"
points=
"16.2,282 -50.2,397 16.2,512 "
/>
110.541,54 58.58,144 110.541,234 "
/>
<polyline
class=
"st0"
points=
"92.1,282 25.8,397 92.1,512 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
169.981,54 118.019,144 169.981,234 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
229.42,54 177.459,144 229.42,234 "
/>
</g>
</g>
</svg>
</svg>
src/FlightMap/Images/buttonRight.svg
View file @
20f3f54c
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 1
8.1.1
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!-- Generator: Adobe Illustrator 1
9.1.0
, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
version=
"1.1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
<svg
version=
"1.1"
id=
"Layer_1"
xmlns=
"http://www.w3.org/2000/svg"
xmlns:xlink=
"http://www.w3.org/1999/xlink"
x=
"0px"
y=
"0px"
viewBox=
"
0 0 288 288"
enable-background=
"new 0 0 288 288
"
xml:space=
"preserve"
>
viewBox=
"
-161 253 288 288"
style=
"enable-background:new -161 253 288 288;
"
xml:space=
"preserve"
>
<
g
id=
"Layer_1
"
>
<
style
type=
"text/css
"
>
<rect
fill=
"#58595B"
width=
"288"
height=
"288"
/>
.st0{fill:none;stroke:#231F20;stroke-width:24;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:10;}
</
g
>
</
style
>
<g
id=
"Layer_2"
>
<g
id=
"Layer_2"
>
<polyline
class=
"st0"
points=
"15.8,512 82.1,397 15.8,282 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
<polyline
class=
"st0"
points=
"-60.2,512 6.2,397 -60.2,282 "
/>
177.459,234 229.42,144 177.459,54 "
/>
<polyline
class=
"st0"
points=
"-136.1,512 -69.8,397 -136.1,282 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
118.019,234 169.981,144 118.019,54 "
/>
<polyline
fill=
"none"
stroke=
"#A7A9AC"
stroke-width=
"24"
stroke-linecap=
"round"
stroke-linejoin=
"round"
stroke-miterlimit=
"10"
points=
"
58.58,234 110.541,144 58.58,54 "
/>
</g>
</g>
</svg>
</svg>
src/FlightMap/MapItems/VehicleMapItem.qml
View file @
20f3f54c
...
@@ -33,8 +33,9 @@ import QGroundControl.Vehicle 1.0
...
@@ -33,8 +33,9 @@ import QGroundControl.Vehicle 1.0
/// Marker for displaying a vehicle location on the map
/// Marker for displaying a vehicle location on the map
MapQuickItem
{
MapQuickItem
{
property
var
vehicle
///< Vehicle object
property
var
vehicle
///< Vehicle object
property
bool
isSatellite
:
false
///< true: satellite map is showing
property
bool
isSatellite
:
false
///< true: satellite map is showing
property
real
size
:
ScreenTools
.
defaultFontPixelHeight
*
5
anchorPoint.x
:
vehicleIcon
.
width
/
2
anchorPoint.x
:
vehicleIcon
.
width
/
2
anchorPoint.y
:
vehicleIcon
.
height
/
2
anchorPoint.y
:
vehicleIcon
.
height
/
2
...
@@ -44,7 +45,7 @@ MapQuickItem {
...
@@ -44,7 +45,7 @@ MapQuickItem {
id
:
vehicleIcon
id
:
vehicleIcon
source
:
isSatellite
?
"
/qmlimages/airplaneOpaque.svg
"
:
"
/qmlimages/airplaneOutline.svg
"
source
:
isSatellite
?
"
/qmlimages/airplaneOpaque.svg
"
:
"
/qmlimages/airplaneOutline.svg
"
mipmap
:
true
mipmap
:
true
width
:
ScreenTools
.
defaultFontPixelHeight
*
5
width
:
size
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
transform
:
Rotation
{
transform
:
Rotation
{
...
...
src/FlightMap/Widgets/QGCAttitudeWidget.qml
View file @
20f3f54c
...
@@ -28,9 +28,11 @@ This file is part of the QGROUNDCONTROL project
...
@@ -28,9 +28,11 @@ This file is part of the QGROUNDCONTROL project
*/
*/
import
QtQuick
2.4
import
QtQuick
2.4
import
QtGraphicalEffects
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
QGCMovable
Item
{
Item
{
id
:
root
id
:
root
property
bool
active
:
false
///< true: actively connected to data provider, false: show inactive control
property
bool
active
:
false
///< true: actively connected to data provider, false: show inactive control
...
@@ -42,70 +44,91 @@ QGCMovableItem {
...
@@ -42,70 +44,91 @@ QGCMovableItem {
readonly
property
real
_defaultRollAngle
:
0
readonly
property
real
_defaultRollAngle
:
0
readonly
property
real
_defaultPitchAngle
:
0
readonly
property
real
_defaultPitchAngle
:
0
property
real
_rollAngle
:
active
?
rollAngle
:
_defaultRollAngle
property
real
_rollAngle
:
active
?
rollAngle
:
_defaultRollAngle
property
real
_pitchAngle
:
active
?
pitchAngle
:
_defaultPitchAngle
property
real
_pitchAngle
:
active
?
pitchAngle
:
_defaultPitchAngle
width
:
size
width
:
size
height
:
size
height
:
size
//----------------------------------------------------
Item
{
//-- Artificial Horizon
id
:
instrument
QGCArtificialHorizon
{
rollAngle
:
_rollAngle
pitchAngle
:
_pitchAngle
anchors.fill
:
parent
anchors.fill
:
parent
}
visible
:
false
//----------------------------------------------------
//-- Pointer
//----------------------------------------------------
Image
{
//-- Artificial Horizon
id
:
pointer
QGCArtificialHorizon
{
source
:
"
/qmlimages/attitudePointer.svg
"
rollAngle
:
_rollAngle
mipmap
:
true
pitchAngle
:
_pitchAngle
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
anchors.fill
:
parent
}
}
//----------------------------------------------------
//----------------------------------------------------
//-- Pointer
//-- Instrument Dial
Image
{
Image
{
id
:
pointer
id
:
instrumentDial
source
:
"
/qmlimages/attitudePointer.svg
"
source
:
"
/qmlimages/attitudeDial.svg
"
mipmap
:
true
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
anchors.fill
:
parent
}
transform
:
Rotation
{
//----------------------------------------------------
origin.x
:
root
.
width
/
2
//-- Instrument Dial
origin.y
:
root
.
height
/
2
Image
{
angle
:
-
_rollAngle
id
:
instrumentDial
source
:
"
/qmlimages/attitudeDial.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
transform
:
Rotation
{
origin.x
:
root
.
width
/
2
origin.y
:
root
.
height
/
2
angle
:
-
_rollAngle
}
}
//----------------------------------------------------
//-- Pitch
QGCPitchIndicator
{
id
:
pitchWidget
visible
:
root
.
showPitch
size
:
root
.
size
*
0.65
anchors.verticalCenter
:
parent
.
verticalCenter
pitchAngle
:
_pitchAngle
rollAngle
:
_rollAngle
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
}
//----------------------------------------------------
//-- Cross Hair
Image
{
id
:
crossHair
anchors.centerIn
:
parent
source
:
"
/qmlimages/crossHair.svg
"
mipmap
:
true
width
:
size
*
0.75
fillMode
:
Image
.
PreserveAspectFit
}
}
}
}
//----------------------------------------------------
//-- Pitch
Rectangle
{
QGCPitchIndicator
{
id
:
mask
id
:
pitchWidget
anchors.fill
:
instrument
visible
:
root
.
showPitch
radius
:
width
/
2
size
:
root
.
size
*
0.65
color
:
"
black
"
anchors.verticalCenter
:
parent
.
verticalCenter
visible
:
false
pitchAngle
:
_pitchAngle
rollAngle
:
_rollAngle
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
}
}
//----------------------------------------------------
//-- Cross Hair
OpacityMask
{
Image
{
anchors.fill
:
instrument
id
:
crossHair
source
:
instrument
anchors.centerIn
:
parent
maskSource
:
mask
source
:
"
/qmlimages/crossHair.svg
"
mipmap
:
true
width
:
size
*
0.75
fillMode
:
Image
.
PreserveAspectFit
}
}
//----------------------------------------------------
//-- Instrument Pannel
Rectangle
{
Image
{
id
:
borderRect
id
:
pannel
source
:
"
/qmlimages/attitudeInstrument.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
anchors.fill
:
parent
radius
:
width
/
2
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0
)
border.color
:
"
black
"
border.width
:
2
}
}
}
}
src/FlightMap/Widgets/QGCCompassWidget.qml
View file @
20f3f54c
...
@@ -28,59 +28,88 @@ This file is part of the QGROUNDCONTROL project
...
@@ -28,59 +28,88 @@ This file is part of the QGROUNDCONTROL project
*/
*/
import
QtQuick
2.4
import
QtQuick
2.4
import
QtGraphicalEffects
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
QGCMovable
Item
{
Item
{
id
:
root
id
:
root
property
real
heading
:
_defaultHeading
property
bool
active
:
false
///< true: actively connected to data provider, false: show inactive control
property
real
heading
:
0
property
real
size
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
property
real
size
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
property
int
_fontSize
:
ScreenTools
.
defaultFontPixelSize
readonly
property
real
_defaultHeading
:
0
property
int
_fontSize
:
ScreenTools
.
defaultFontPixelSize
*
0.8
width
:
size
width
:
size
height
:
size
height
:
size
Rectangle
{
Rectangle
{
id
:
compassBack
id
:
borderRect
anchors.fill
:
parent
anchors.fill
:
parent
color
:
"
#212121
"
radius
:
width
/
2
color
:
"
#202020
"
border.color
:
"
black
"
border.width
:
2
}
}
Image
{
id
:
pointer
Item
{
source
:
"
/qmlimages/compassInstrumentAirplane.svg
"
id
:
instrument
mipmap
:
true
anchors.fill
:
parent
width
:
size
*
0.75
visible
:
false
fillMode
:
Image
.
PreserveAspectFit
anchors.centerIn
:
parent
Image
{
transform
:
Rotation
{
id
:
pointer
origin.x
:
pointer
.
width
/
2
source
:
"
/qmlimages/compassInstrumentAirplane.svg
"
origin.y
:
pointer
.
height
/
2
mipmap
:
true
angle
:
heading
width
:
size
*
0.75
fillMode
:
Image
.
PreserveAspectFit
anchors.centerIn
:
parent
transform
:
Rotation
{
origin.x
:
pointer
.
width
/
2
origin.y
:
pointer
.
height
/
2
angle
:
heading
}
}
Image
{
id
:
compassDial
source
:
"
/qmlimages/compassInstrumentDial.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
}
Rectangle
{
anchors.centerIn
:
parent
width
:
size
*
0.35
height
:
size
*
0.2
border.color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.15
)
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.65
)
QGCLabel
{
text
:
active
?
heading
.
toFixed
(
0
)
:
"
OFF
"
font.weight
:
active
?
Font
.
DemiBold
:
Font
.
Light
font.pixelSize
:
_fontSize
<
1
?
1
:
_fontSize
;
color
:
"
white
"
anchors.centerIn
:
parent
}
}
}
}
}
Image
{
id
:
compassDial
source
:
"
/qmlimages/compassInstrumentDial.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.fill
:
parent
}
Rectangle
{
Rectangle
{
anchors.centerIn
:
root
id
:
mask
width
:
size
*
0.35
anchors.fill
:
instrument
height
:
size
*
0.2
radius
:
width
/
2
border.color
:
Qt
.
rgba
(
1
,
1
,
1
,
0.15
)
color
:
"
black
"
color
:
Qt
.
rgba
(
0
,
0
,
0
,
0.65
)
visible
:
false
QGCLabel
{
text
:
_heading
.
toFixed
(
0
)
font.weight
:
Font
.
DemiBold
font.pixelSize
:
_fontSize
<
1
?
1
:
_fontSize
;
color
:
"
white
"
anchors.centerIn
:
parent
visible
:
active
}
}
}
OpacityMask
{
anchors.fill
:
instrument
source
:
instrument
maskSource
:
mask
}
}
}
src/FlightMap/Widgets/QGCInstrumentWidget.qml
0 → 100644
View file @
20f3f54c
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
/**
* @file
* @brief QGC Compass Widget
* @author Gus Grubba <mavlink@grubba.com>
*/
import
QtQuick
2.4
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
Item
{
id
:
root
height
:
size
property
alias
heading
:
compass
.
heading
property
alias
rollAngle
:
attitude
.
rollAngle
property
alias
pitchAngle
:
attitude
.
pitchAngle
property
real
size
:
ScreenTools
.
defaultFontPixelSize
*
(
10
)
property
bool
isSatellite
:
false
property
bool
active
:
false
property
bool
_isVisible
:
true
//-- Instrument Pannel
Rectangle
{
id
:
instrumentPannel
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
height
:
root
.
size
width
:
instruments
.
width
+
ScreenTools
.
defaultFontPixelSize
radius
:
root
.
size
/
2
visible
:
_isVisible
color
:
isSatellite
?
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.5
)
Row
{
id
:
instruments
height
:
parent
.
height
spacing
:
ScreenTools
.
defaultFontPixelSize
/
2
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCAttitudeWidget
{
id
:
attitude
size
:
parent
.
height
*
0.9
active
:
root
.
active
anchors.verticalCenter
:
parent
.
verticalCenter
}
QGCCompassWidget
{
id
:
compass
size
:
parent
.
height
*
0.9
active
:
root
.
active
anchors.verticalCenter
:
parent
.
verticalCenter
}
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_isVisible
=
!
_isVisible
}
}
}
//-- Show Instruments
Rectangle
{
id
:
openButton
anchors.right
:
parent
.
right
anchors.bottom
:
parent
.
bottom
height
:
ScreenTools
.
defaultFontPixelSize
*
2
width
:
ScreenTools
.
defaultFontPixelSize
*
2
radius
:
ScreenTools
.
defaultFontPixelSize
/
3
visible
:
!
_isVisible
color
:
isSatellite
?
Qt
.
rgba
(
1
,
1
,
1
,
0.5
)
:
Qt
.
rgba
(
0
,
0
,
0
,
0.5
)
Image
{
width
:
parent
.
width
*
0.75
height
:
parent
.
height
*
0.75
source
:
"
/qmlimages/buttonLeft.svg
"
mipmap
:
true
fillMode
:
Image
.
PreserveAspectFit
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
_isVisible
=
!
_isVisible
}
}
}
}
src/FlightMap/Widgets/QGCPitchIndicator.qml
View file @
20f3f54c
...
@@ -34,13 +34,16 @@ import QGroundControl.Controls 1.0
...
@@ -34,13 +34,16 @@ import QGroundControl.Controls 1.0
Rectangle
{
Rectangle
{
property
real
pitchAngle
:
0
property
real
pitchAngle
:
0
property
real
rollAngle
:
0
property
real
rollAngle
:
0
property
real
size
:
120
property
real
size
:
_defaultSize
property
real
_reticleHeight
:
1
property
real
_reticleHeight
:
1
property
real
_reticleSpacing
:
size
*
0.15
property
real
_reticleSpacing
:
size
*
0.15
property
real
_reticleSlot
:
_reticleSpacing
+
_reticleHeight
property
real
_reticleSlot
:
_reticleSpacing
+
_reticleHeight
property
real
_longDash
:
size
*
0.40
property
real
_longDash
:
size
*
0.40
property
real
_shortDash
:
size
*
0.25
property
real
_shortDash
:
size
*
0.25
property
real
_fontSize
:
ScreenTools
.
defaultFontPixelSize
property
real
_fontSize
:
ScreenTools
.
defaultFontPixelSize
*
(
size
/
_defaultSize
)
property
real
_defaultSize
:
ScreenTools
.
isAndroid
?
300
:
100
height
:
size
*
0.9
height
:
size
*
0.9
width
:
size
width
:
size
radius
:
ScreenTools
.
defaultFontPixelSize
*
(
0.66
)
radius
:
ScreenTools
.
defaultFontPixelSize
*
(
0.66
)
...
...
src/FlightMap/qmldir
View file @
20f3f54c
...
@@ -13,12 +13,13 @@ QGCCompassHUD 1.0 QGCCompassHUD.qml
...
@@ -13,12 +13,13 @@ QGCCompassHUD 1.0 QGCCompassHUD.qml
QGCCompassWidget 1.0 QGCCompassWidget.qml
QGCCompassWidget 1.0 QGCCompassWidget.qml
QGCCurrentAltitude 1.0 QGCCurrentAltitude.qml
QGCCurrentAltitude 1.0 QGCCurrentAltitude.qml
QGCCurrentSpeed 1.0 QGCCurrentSpeed.qml
QGCCurrentSpeed 1.0 QGCCurrentSpeed.qml
QGCInstrumentWidget 1.0 QGCInstrumentWidget.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
QGCSlider 1.0 QGCSlider.qml
QGCSlider 1.0 QGCSlider.qml
QGCSpeedWidget 1.0 QGCSpeedWidget.qml
QGCSpeedWidget 1.0 QGCSpeedWidget.qml
# Map items
# Map items
VehicleMapItem 1.0 VehicleMapItem.qml
MissionItemIndicator 1.0 MissionItemIndicator.qml
MissionItemIndicator 1.0 MissionItemIndicator.qml
MissionItemView 1.0 MissionItemView.qml
MissionItemView 1.0 MissionItemView.qml
MissionLineView 1.0 MissionLineView.qml
MissionLineView 1.0 MissionLineView.qml
VehicleMapItem 1.0 VehicleMapItem.qml
src/MissionEditor/MissionEditor.qml
View file @
20f3f54c
This diff is collapsed.
Click to expand it.
src/MissionEditor/MissionEditorHelp.qml
0 → 100644
View file @
20f3f54c
/*=====================================================================
QGroundControl Open Source Ground Control Station
(c) 2009, 2015 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
This file is part of the QGROUNDCONTROL project
QGROUNDCONTROL is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
QGROUNDCONTROL is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with QGROUNDCONTROL. If not, see <http://www.gnu.org/licenses/>.
======================================================================*/
import
QtQuick
2.4
import
QtQuick
.
Controls
1.3
import
QtQuick
.
Dialogs
1.2
import
QGroundControl
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
Rectangle
{
visible
:
helpButton
.
checked
color
:
qgcPal
.
window
opacity
:
_rightPanelOpacity
radius
:
ScreenTools
.
defaultFontPixelHeight
z
:
QGroundControl
.
zOrderTopMost
readonly
property
real
margins
:
ScreenTools
.
defaultFontPixelHeight
Image
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
parent
.
top
anchors.right
:
parent
.
right
width
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
height
:
ScreenTools
.
defaultFontPixelHeight
*
1.5
source
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
/qmlimages/XDeleteBlack.svg
"
:
"
/qmlimages/XDelete.svg
"
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
MouseArea
{
anchors.fill
:
parent
onClicked
:
helpButton
.
checked
=
false
}
}
Item
{
anchors.margins
:
_margin
anchors.fill
:
parent
QGCLabel
{
id
:
helpTitle
font.pixelSize
:
ScreenTools
.
mediumFontPixelSize
text
:
"
Mission Planner
"
}
QGCLabel
{
id
:
helpIconLabel
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
helpTitle
.
bottom
width
:
parent
.
width
wrapMode
:
Text
.
WordWrap
text
:
"
Mission Planner tool buttons:
"
}
Image
{
id
:
addMissionItemsHelpIcon
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
helpIconLabel
.
bottom
width
:
ScreenTools
.
defaultFontPixelHeight
*
3
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
source
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
/qmlimages/MapAddMissionBlack.svg
"
:
"
/qmlimages/MapAddMission.svg
"
}
QGCLabel
{
id
:
addMissionItemsHelpText
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
mapTypeHelpIcon
.
right
anchors.right
:
parent
.
right
anchors.top
:
addMissionItemsHelpIcon
.
top
wrapMode
:
Text
.
WordWrap
text
:
"
<b>Add Mission Items</b><br>
"
+
"
When enabled, add mission items by clicking on the map.
"
}
Image
{
id
:
deleteHelpIcon
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
addMissionItemsHelpText
.
bottom
width
:
ScreenTools
.
defaultFontPixelHeight
*
3
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
source
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
/qmlimages/TrashDeleteBlack.svg
"
:
"
/qmlimages/TrashDelete.svg
"
}
QGCLabel
{
id
:
deleteHelpText
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
mapTypeHelpIcon
.
right
anchors.right
:
parent
.
right
anchors.top
:
deleteHelpIcon
.
top
wrapMode
:
Text
.
WordWrap
text
:
"
<b>Delete Mission Item</b><br>
"
+
"
Delete the currently selected mission item.
"
}
/*
Home Position Manager disabled
Image {
id: homePositionManagerHelpIcon
anchors.topMargin: ScreenTools.defaultFontPixelHeight
anchors.top: deleteHelpText.bottom
width: ScreenTools.defaultFontPixelHeight * 3
fillMode: Image.PreserveAspectFit
mipmap: true
smooth: true
source: (qgcPal.globalTheme === QGCPalette.Light) ? "/qmlimages/MapHomeBlack.svg" : "/qmlimages/MapHome.svg"
}
QGCLabel {
id: homePositionManagerHelpText
anchors.leftMargin: ScreenTools.defaultFontPixelHeight
anchors.left: mapTypeHelpIcon.right
anchors.right: parent.right
anchors.top: homePositionManagerHelpIcon.top
wrapMode: Text.WordWrap
text: "<b>Flying Field Manager</b><br>" +
"When enabled, allows you to select/add/update flying field locations. " +
"You can save multiple flying field locations for use while creating missions while you are not connected to your vehicle."
}
*/
Image
{
id
:
mapCenterHelpIcon
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
deleteHelpText
.
bottom
width
:
ScreenTools
.
defaultFontPixelHeight
*
3
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
source
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
/qmlimages/MapCenterBlack.svg
"
:
"
/qmlimages/MapCenter.svg
"
}
QGCLabel
{
id
:
mapCenterHelpText
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
mapTypeHelpIcon
.
right
anchors.right
:
parent
.
right
anchors.top
:
mapCenterHelpIcon
.
top
wrapMode
:
Text
.
WordWrap
text
:
"
<b>Map Center</b><br>
"
+
"
Options for centering the map.
"
}
Image
{
id
:
syncHelpIcon
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
mapCenterHelpText
.
bottom
width
:
ScreenTools
.
defaultFontPixelHeight
*
3
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
source
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
/qmlimages/MapSyncBlack.svg
"
:
"
/qmlimages/MapSync.svg
"
}
QGCLabel
{
id
:
syncHelpText
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
mapTypeHelpIcon
.
right
anchors.right
:
parent
.
right
anchors.top
:
syncHelpIcon
.
top
wrapMode
:
Text
.
WordWrap
text
:
"
<b>Sync</b><br>
"
+
"
Options for saving/loading mission items.
"
}
Image
{
id
:
mapTypeHelpIcon
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.top
:
syncHelpText
.
bottom
width
:
ScreenTools
.
defaultFontPixelHeight
*
3
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
source
:
(
qgcPal
.
globalTheme
===
QGCPalette
.
Light
)
?
"
/qmlimages/MapTypeBlack.svg
"
:
"
/qmlimages/MapType.svg
"
}
QGCLabel
{
id
:
mapTypeHelpText
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelHeight
anchors.left
:
mapTypeHelpIcon
.
right
anchors.right
:
parent
.
right
anchors.top
:
mapTypeHelpIcon
.
top
wrapMode
:
Text
.
WordWrap
text
:
"
<b>Map Type</b><br>
"
+
"
Map type options.
"
}
QGCCheckBox
{
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
anchors.margins
:
_margin
checked
:
!
_showHelp
text
:
"
Don't show me again
"
onClicked
:
QGroundControl
.
flightMapSettings
.
saveBoolMapSetting
(
editorMap
.
mapName
,
_showHelpKey
,
!
checked
)
}
}
}
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