Commit 08a65225 authored by Don Gagne's avatar Don Gagne

Restructure map controls for better reusability

parent 4719c514
......@@ -25,12 +25,13 @@ 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 QGroundControl.FlightMap 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
/// Flight Display View
Item {
......@@ -76,9 +77,70 @@ Item {
mapName: "FlightDisplayView"
latitude: parent._latitude
longitude: parent._longitude
z: 10
showVehicles: true
showMissionItems: true
// Add the vehicles to the map
MapItemView {
model: multiVehicleManager.vehicles
delegate:
VehicleMapItem {
coordinate: object.coordinate
heading: object.heading
isSatellite: isSatelliteMap
}
}
// Add the mission items to the map
MapItemView {
model: multiVehicleManager.activeVehicle ? multiVehicleManager.activeVehicle.missionItems : 0
delegate:
MissionMapItem {
missionItem: object
}
}
// Vehicle GPS lock display
Column {
id: gpsLockColumn
y: (parent.height - height) / 2
width: parent.width
Repeater {
model: multiVehicleManager.vehicles
delegate:
QGCLabel {
width: gpsLockColumn.width
horizontalAlignment: Text.AlignHCenter
visible: object.satelliteLock < 2
text: "No GPS Lock for Vehicle #" + object.id
}
}
}
// Mission item list
ListView {
id: missionItemSummaryList
anchors.margins: ScreenTools.defaultFontPixelWidth
anchors.left: parent.left
anchors.right: mapWidgets.left
anchors.bottom: parent.bottom
height: ScreenTools.defaultFontPixelHeight * 7
spacing: ScreenTools.defaultFontPixelWidth / 2
opacity: 0.75
orientation: ListView.Horizontal
model: multiVehicleManager.activeVehicle ? multiVehicleManager.activeVehicle.missionItems : 0
property real _maxItemHeight: 0
delegate:
MissionItemSummary {
opacity: 0.75
missionItem: object
}
} // ListView - Mission item list
}
QGCCompassWidget {
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment