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
1dbacddf
Commit
1dbacddf
authored
Aug 10, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
New PlanMapItems control
Used to display items associated with Flight Plan on Map
parent
fcf2d7a0
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
81 additions
and
13 deletions
+81
-13
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+5
-13
PlanMapItems.qml
src/FlightMap/MapItems/PlanMapItems.qml
+74
-0
qmldir
src/FlightMap/qmldir
+1
-0
No files found.
qgroundcontrol.qrc
View file @
1dbacddf
...
...
@@ -152,6 +152,7 @@
<file alias="QGroundControl/FlightMap/MissionItemIndicatorDrag.qml">src/FlightMap/MapItems/MissionItemIndicatorDrag.qml</file>
<file alias="QGroundControl/FlightMap/MissionItemView.qml">src/FlightMap/MapItems/MissionItemView.qml</file>
<file alias="QGroundControl/FlightMap/MissionLineView.qml">src/FlightMap/MapItems/MissionLineView.qml</file>
<file alias="QGroundControl/FlightMap/PlanMapItems.qml">src/FlightMap/MapItems/PlanMapItems.qml</file>
<file alias="QGroundControl/FlightMap/PolygonEditor.qml">src/FlightMap/MapItems/PolygonEditor.qml</file>
<file alias="QGroundControl/FlightMap/QGCArtificialHorizon.qml">src/FlightMap/Widgets/QGCArtificialHorizon.qml</file>
<file alias="QGroundControl/FlightMap/QGCAttitudeHUD.qml">src/FlightMap/Widgets/QGCAttitudeHUD.qml</file>
...
...
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
1dbacddf
...
...
@@ -206,19 +206,11 @@ FlightMap {
}
}
// Add the mission item visuals to the map
Repeater
{
model
:
_mainIsMap
?
_missionController
.
visualItems
:
0
delegate
:
MissionItemMapVisual
{
map
:
flightMap
onClicked
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionSetWaypoint
,
Math
.
max
(
object
.
sequenceNumber
,
1
))
}
}
// Add lines between waypoints
MissionLineView
{
model
:
_mainIsMap
?
_missionController
.
waypointLines
:
0
// Add the items associated with the flight place to the map
PlanMapItems
{
map
:
flightMap
largeMapView
:
_mainIsMap
masterController
:
_planMasterController
}
GeoFenceMapVisuals
{
...
...
src/FlightMap/MapItems/PlanMapItems.qml
0 → 100644
View file @
1dbacddf
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.3
import
QtLocation
5.3
import
QtPositioning
5.3
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
FlightMap
1.0
// Adds visual items associated with the Flight Plan to the map
Item
{
id
:
_root
property
var
map
///< Map control to show items on
property
bool
largeMapView
///< true: map takes up entire view, false: map is in small window
property
var
masterController
///< Reference to PlanMasterController for vehicle
property
var
_map
:
map
property
var
_missionController
:
masterController
.
missionController
property
var
_geoFenceController
:
masterController
.
geoFenceController
property
var
_rallyPointController
:
masterController
.
rallyPointController
property
var
_missionLineViewComponent
// Add the mission item visuals to the map
Repeater
{
model
:
largeMapView
?
_missionController
.
visualItems
:
0
delegate
:
MissionItemMapVisual
{
map
:
_map
onClicked
:
guidedActionsController
.
confirmAction
(
guidedActionsController
.
actionSetWaypoint
,
Math
.
max
(
object
.
sequenceNumber
,
1
))
}
}
// Waypiont lines
Instantiator
{
model
:
largeMapView
?
_missionController
.
waypointLines
:
0
Item
{
property
var
_missionLineViewComponent
Component.onCompleted
:
{
_missionLineViewComponent
=
missionLineViewComponent
.
createObject
(
map
,
{
"
object
"
:
object
})
if
(
_missionLineViewComponent
.
status
===
Component
.
Error
)
console
.
log
(
_missionLineViewComponent
.
errorString
())
map
.
addMapItem
(
_missionLineViewComponent
)
}
Component.onDestruction
:
{
_missionLineViewComponent
.
destroy
()
}
}
}
Component
{
id
:
missionLineViewComponent
MapPolyline
{
line.width
:
3
line.color
:
"
#be781c
"
// Hack, can't get palette to work in here
z
:
QGroundControl
.
zOrderWaypointLines
path
:
object
?
[
object
.
coordinate1
,
object
.
coordinate2
]
:
undefined
property
var
object
}
}
}
src/FlightMap/qmldir
View file @
1dbacddf
...
...
@@ -27,5 +27,6 @@ MissionItemIndicator 1.0 MissionItemIndicator.qml
MissionItemIndicatorDrag 1.0 MissionItemIndicatorDrag.qml
MissionItemView 1.0 MissionItemView.qml
MissionLineView 1.0 MissionLineView.qml
PlanMapItems 1.0 PlanMapItems.qml
PolygonEditor 1.0 PolygonEditor.qml
VehicleMapItem 1.0 VehicleMapItem.qml
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