diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index ac6c0333ed2d2c5b4059859b27e4eb7684c09a43..168d5d7cc6ccbd149bf4d817d755375781a4d165 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -81,8 +81,7 @@
src/FlightDisplay/qmldir
src/FlightDisplay/FlightDisplayView.qml
- src/FlightDisplay/FlightDisplayViewDelayLoadInner.qml
- src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml
+ src/FlightDisplay/FlightDisplayViewDelayLoad.qml
src/FlightMap/qmldir
@@ -96,6 +95,7 @@
src/FlightMap/Widgets/QGCCompassHUD.qml
src/FlightMap/Widgets/QGCCurrentAltitude.qml
src/FlightMap/Widgets/QGCCurrentSpeed.qml
+ src/FlightMap/Widgets/QGCInstrumentWidget.qml
src/FlightMap/Widgets/QGCPitchIndicator.qml
src/FlightMap/Widgets/QGCSlider.qml
src/FlightMap/Widgets/QGCSpeedWidget.qml
diff --git a/src/FlightDisplay/FlightDisplayView.qml b/src/FlightDisplay/FlightDisplayView.qml
index c39f3065745cb838a8e49af1f06676926911b06c..6e6d823927753cd73c0d9270c485ab21052565d8 100644
--- a/src/FlightDisplay/FlightDisplayView.qml
+++ b/src/FlightDisplay/FlightDisplayView.qml
@@ -96,7 +96,7 @@ Item {
// Validate _showMap setting
Component.onCompleted: {
- delayLoader.source = "FlightDisplayViewDelayLoadOuter.qml"
+ delayLoader.source = "FlightDisplayViewDelayLoad.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.
@@ -133,14 +133,13 @@ Item {
onRootVehicleCoordinateChanged: updateMapPosition(false /* force */)
- 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"
@@ -190,11 +189,6 @@ Item {
model: _missionController.waypointLines
}
- Loader {
- id: flightMapDelayLoader
- anchors.fill: parent
- }
-
// Used to make pinch zoom work
MouseArea {
anchors.fill: parent
diff --git a/src/FlightDisplay/FlightDisplayViewDelayLoadInner.qml b/src/FlightDisplay/FlightDisplayViewDelayLoad.qml
similarity index 66%
rename from src/FlightDisplay/FlightDisplayViewDelayLoadInner.qml
rename to src/FlightDisplay/FlightDisplayViewDelayLoad.qml
index 50fb3239fa2964c07150895ab284da691d8ba08b..de2e8a559ad06c430e9dc5469d247a8387df790f 100644
--- a/src/FlightDisplay/FlightDisplayViewDelayLoadInner.qml
+++ b/src/FlightDisplay/FlightDisplayViewDelayLoad.qml
@@ -35,10 +35,39 @@ import QGroundControl.Palette 1.0
import QGroundControl.Vehicle 1.0
import QGroundControl.FlightMap 1.0
-/// This component is used to delay load the controls which are children of the inner FlightMap
-/// control of FlightDisplayView.
-// Vehicle GPS lock display
+/// 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
+ }
+ }
+
+ //-- Vehicle GPS lock display
Column {
id: gpsLockColumn
y: (parent.height - height) / 2
@@ -58,27 +87,19 @@ Item {
}
}
- QGCCompassWidget {
- anchors.leftMargin: ScreenTools.defaultFontPixelHeight
- anchors.topMargin: topMargin
- anchors.left: parent.left
- anchors.top: parent.top
- size: ScreenTools.defaultFontPixelSize * (13.3)
- heading: _heading
- z: QGroundControl.zOrderWidgets
- }
-
- QGCAttitudeWidget {
+ //-- Instrument Pannel
+ QGCInstrumentWidget {
anchors.margins: ScreenTools.defaultFontPixelHeight
anchors.left: parent.left
anchors.bottom: parent.bottom
- size: ScreenTools.defaultFontPixelSize * (13.3)
+ size: ScreenTools.defaultFontPixelSize * (9)
+ heading: _heading
rollAngle: _roll
pitchAngle: _pitch
- active: multiVehicleManager.activeVehicleAvailable
z: QGroundControl.zOrderWidgets
}
+ //-- Map Center Control
DropButton {
id: centerMapDropButton
anchors.rightMargin: ScreenTools.defaultFontPixelHeight
@@ -123,6 +144,7 @@ Item {
}
}
+ //-- Map Type Control
DropButton {
id: mapTypeButton
anchors.topMargin: topMargin
@@ -156,4 +178,45 @@ Item {
}
}
}
+
+ //-- Temporary Options Button
+ 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)
+ }
+ }
+ }
+
}
diff --git a/src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml b/src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml
deleted file mode 100644
index b57e36906c49b729317767dc6b7126f371c2ad06..0000000000000000000000000000000000000000
--- a/src/FlightDisplay/FlightDisplayViewDelayLoadOuter.qml
+++ /dev/null
@@ -1,145 +0,0 @@
-/*=====================================================================
-
-QGroundControl Open Source Ground Control Station
-
-(c) 2009, 2015 QGROUNDCONTROL PROJECT
-
-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 .
-
-======================================================================*/
-
-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)
- }
- }
- }
-}
diff --git a/src/FlightDisplay/qmldir b/src/FlightDisplay/qmldir
index 31f93cdf6389a24b3e2e6c063e49c6923420ba70..94ca787073c7f5e567d29e1da7f3843f1dc69979 100644
--- a/src/FlightDisplay/qmldir
+++ b/src/FlightDisplay/qmldir
@@ -1,6 +1,5 @@
Module QGroundControl.FlightDisplay
-FlightDisplayView 1.0 FlightDisplayView.qml
-FlightDisplayViewDelayLoadInner 1.0 FlightDisplayViewDelayLoadInner.qml
-FlightDisplayViewDelayLoadOuter 1.0 FlightDisplayViewDelayLoadOuter.qml
+FlightDisplayView 1.0 FlightDisplayView.qml
+FlightDisplayViewDelayLoad 1.0 FlightDisplayViewDelayLoad.qml
diff --git a/src/FlightMap/Images/attitudeInstrument.svg b/src/FlightMap/Images/attitudeInstrument.svg
index b5a4940d902c2887ff71d6ac61cc9193ba427d41..1b0563f14d5ad9b8a53da93ac66db1a6a599f061 100644
--- a/src/FlightMap/Images/attitudeInstrument.svg
+++ b/src/FlightMap/Images/attitudeInstrument.svg
@@ -1,7 +1,10 @@
-
+
diff --git a/src/FlightMap/Images/buttonLeft.svg b/src/FlightMap/Images/buttonLeft.svg
index 8219d4ffef5357be9acf51322d578dff980d6100..c238ffebac6ae905d8bf7c9a976188606ad748b2 100644
--- a/src/FlightMap/Images/buttonLeft.svg
+++ b/src/FlightMap/Images/buttonLeft.svg
@@ -1,19 +1,13 @@
-
-