diff --git a/QGCApplication.pro b/QGCApplication.pro
index c14700d13ed94341b895a10f4132987dd605de2d..5b98331782ef57b43e3d66704de20728c8db3911 100644
--- a/QGCApplication.pro
+++ b/QGCApplication.pro
@@ -218,7 +218,6 @@ HEADERS += \
src/comm/QGCMAVLink.h \
src/comm/TCPLink.h \
src/comm/UDPLink.h \
- src/FlightDisplay/FlightDisplayWidget.h \
src/FlightDisplay/FlightDisplayViewController.h \
src/FlightMap/FlightMapSettings.h \
src/GAudioOutput.h \
@@ -336,7 +335,6 @@ SOURCES += \
src/comm/MockLinkMissionItemHandler.cc \
src/comm/TCPLink.cc \
src/comm/UDPLink.cc \
- src/FlightDisplay/FlightDisplayWidget.cc \
src/FlightDisplay/FlightDisplayViewController.cc \
src/FlightMap/FlightMapSettings.cc \
src/GAudioOutput.cc \
diff --git a/qgcresources.qrc b/qgcresources.qrc
index 6090d483d1d45df0e2c7f62f684b9a5a5a04a7c0..9e4454aa0ed353dd745254a95385ac38bdad7ec2 100644
--- a/qgcresources.qrc
+++ b/qgcresources.qrc
@@ -47,10 +47,8 @@
src/FlightMap/Images/buttonLeft.svg
src/FlightMap/Images/buttonMore.svg
src/FlightMap/Images/buttonRight.svg
- src/FlightMap/Images/compass.svg
src/FlightMap/Images/compassInstrumentAirplane.svg
src/FlightMap/Images/compassInstrumentDial.svg
- src/FlightMap/Images/compassNeedle.svg
src/FlightMap/Images/crossHair.svg
src/FlightMap/Images/rollDialWhite.svg
src/FlightMap/Images/rollPointerWhite.svg
diff --git a/qgroundcontrol.qrc b/qgroundcontrol.qrc
index 8e1db1b2191794f75b0a81e755238993002fe848..5f2cf7f1797c0b369f2368e1cf66b402e6316c93 100644
--- a/qgroundcontrol.qrc
+++ b/qgroundcontrol.qrc
@@ -75,7 +75,6 @@
src/AutoPilotPlugins/PX4/AirframeComponent.qml
src/ui/toolbar/MainToolBar.qml
src/FlightDisplay/FlightDisplayView.qml
- src/FlightDisplay/FlightDisplayWidget.qml
src/MissionEditor/MissionEditor.qml
src/MissionEditor/MissionEditorHelp.qml
@@ -90,18 +89,13 @@
src/FlightMap/qmldir
src/FlightMap/FlightMap.qml
src/FlightMap/QGCVideoBackground.qml
- src/FlightMap/Widgets/QGCAltitudeWidget.qml
src/FlightMap/Widgets/QGCArtificialHorizon.qml
src/FlightMap/Widgets/QGCAttitudeWidget.qml
src/FlightMap/Widgets/QGCAttitudeHUD.qml
src/FlightMap/Widgets/QGCCompassWidget.qml
- 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
src/FlightMap/MapItems/MissionItemIndicator.qml
src/FlightMap/MapItems/VehicleMapItem.qml
src/FlightMap/MapItems/MissionItemView.qml
diff --git a/src/FlightDisplay/FlightDisplayWidget.cc b/src/FlightDisplay/FlightDisplayWidget.cc
deleted file mode 100644
index 86b6194e7f161f75e5658935c4cfaaa959128b6d..0000000000000000000000000000000000000000
--- a/src/FlightDisplay/FlightDisplayWidget.cc
+++ /dev/null
@@ -1,109 +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 .
-
-======================================================================*/
-
-#include
-#include
-#include
-
-#include
-#include
-#include "VideoReceiver.h"
-
-#include "ScreenToolsController.h"
-#include "FlightDisplayWidget.h"
-
-const char* kMainFlightDisplayWidgetGroup = "FlightDisplayWidget";
-
-FlightDisplayWidget::FlightDisplayWidget(const QString& title, QAction* action, QWidget *parent)
- : QGCQmlWidgetHolder(title, action, parent)
-{
- setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding);
- setObjectName("FlightDisplayWidget");
- // Get rid of layout default margins
- QLayout* pl = layout();
- if(pl) {
- pl->setContentsMargins(0,0,0,0);
- }
- setMinimumWidth(300);
- setMinimumHeight(300);
- setContextPropertyObject("flightDisplay", this);
-
- /*
- * This is the receiving end of an UDP RTP stream. The sender can be setup with this command:
- *
- * gst-launch-1.0 uvch264src initial-bitrate=1000000 average-bitrate=1000000 iframe-period=1000 name=src auto-start=true src.vidsrc ! \
- * video/x-h264,width=1280,height=720,framerate=24/1 ! h264parse ! rtph264pay ! udpsink host=192.168.1.9 port=5000
- *
- * Where the main parameters are:
- *
- * uvch264src: Your h264 video source (the example above uses a Logitech C920 on an Raspberry PI 2+ or Odroid C1
- * host=192.168.1.9 This is the IP address of QGC. You can use Avahi/Zeroconf to find QGC using the "_qgroundcontrol._udp" service.
- *
- * Advanced settings (you should probably read the gstreamer documentation before changing these):
- *
- * initial-bitrate=1000000 average-bitrate=1000000
- * The bit rate to use. The greater, the better quality at the cost of higher bandwidth.
- *
- * width=1280,height=720,framerate=24/1
- * The video resolution and frame rate. This depends on the camera used.
- *
- * iframe-period=1000
- * Interval between iFrames. The greater the interval the lesser bandwidth at the cost of a longer time to recover from lost packets.
- *
- * Do not change anything else unless you know what you are doing. Any other change will require a matching change on the receiving end.
- *
- */
- VideoSurface* pSurface = new VideoSurface;
- setContextPropertyObject("videoDisplay", pSurface);
- VideoReceiver* pReceiver = new VideoReceiver(this);
- pReceiver->setUri(QLatin1Literal("udp://0.0.0.0:5000"));
-#if defined(QGC_GST_STREAMING)
- pReceiver->setVideoSink(pSurface->videoSink());
-#endif
- setContextPropertyObject("videoReceiver", pReceiver);
-
- setSource(QUrl::fromUserInput("qrc:/qml/FlightDisplayWidget.qml"));
- setVisible(true);
-
- loadSettings();
-}
-
-FlightDisplayWidget::~FlightDisplayWidget()
-{
-}
-
-void FlightDisplayWidget::saveSetting(const QString &name, const QString& value)
-{
- QSettings settings;
- QString key(kMainFlightDisplayWidgetGroup);
- key += "/" + name;
- settings.setValue(key, value);
-}
-
-QString FlightDisplayWidget::loadSetting(const QString &name, const QString& defaultValue)
-{
- QSettings settings;
- QString key(kMainFlightDisplayWidgetGroup);
- key += "/" + name;
- return settings.value(key, defaultValue).toString();
-}
diff --git a/src/FlightDisplay/FlightDisplayWidget.h b/src/FlightDisplay/FlightDisplayWidget.h
deleted file mode 100644
index ccecbc449a523a7b18d49123fccaefd13b4b87ef..0000000000000000000000000000000000000000
--- a/src/FlightDisplay/FlightDisplayWidget.h
+++ /dev/null
@@ -1,55 +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 .
-
-======================================================================*/
-
-#ifndef FlightDisplayWidget_H
-#define FlightDisplayWidget_H
-
-#include "QGCQmlWidgetHolder.h"
-
-class FlightDisplayWidget : public QGCQmlWidgetHolder
-{
- Q_OBJECT
-public:
- FlightDisplayWidget(const QString& title, QAction* action, QWidget* parent = NULL);
- ~FlightDisplayWidget();
-
- /// @brief Invokes the Flight Display Options menu
- void showOptionsMenu() { emit showOptionsMenuChanged(); }
-
- Q_PROPERTY(bool hasVideo READ hasVideo CONSTANT)
-
- Q_INVOKABLE void saveSetting (const QString &key, const QString& value);
- Q_INVOKABLE QString loadSetting (const QString &key, const QString& defaultValue);
-
-#if defined(QGC_GST_STREAMING)
- bool hasVideo () { return true; }
-#else
- bool hasVideo () { return false; }
-#endif
-
-signals:
- void showOptionsMenuChanged ();
-
-};
-
-#endif
diff --git a/src/FlightDisplay/FlightDisplayWidget.qml b/src/FlightDisplay/FlightDisplayWidget.qml
deleted file mode 100644
index 1e6603c884853bc45816f87c592dcbaf56d43753..0000000000000000000000000000000000000000
--- a/src/FlightDisplay/FlightDisplayWidget.qml
+++ /dev/null
@@ -1,208 +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 QGroundControl.FlightMap 1.0
-import QGroundControl.ScreenTools 1.0
-import QGroundControl.Controls 1.0
-import QGroundControl.Palette 1.0
-
-/// Flight Display Widget
-Item {
- id: root
-
- property var __qgcPal: QGCPalette { colorGroupEnabled: enabled }
-
- property var activeVehicle: multiVehicleManager.activeVehicle
-
- readonly property real defaultLatitude: 37.803784
- readonly property real defaultLongitude: -122.462276
- readonly property real defaultRoll: 0
- readonly property real defaultPitch: 0
- readonly property real defaultHeading: 0
- readonly property real defaultAltitudeWGS84: 0
- readonly property real defaultGroundSpeed: 0
- readonly property real defaultAirSpeed: 0
- readonly property real defaultClimbRate: 0
-
- property real roll: activeVehicle ? (isNaN(activeVehicle.roll) ? defaultRoll : activeVehicle.roll) : defaultRoll
- property real pitch: activeVehicle ? (isNaN(activeVehicle.pitch) ? defaultPitch : activeVehicle.pitch) : defaultPitch
- property real latitude: activeVehicle ? ((activeVehicle.latitude === 0) ? defaultLatitude : activeVehicle.latitude) : defaultLatitude
- property real longitude: activeVehicle ? ((activeVehicle.longitude === 0) ? defaultLongitude : activeVehicle.longitude) : defaultLongitude
- property real heading: activeVehicle ? (isNaN(activeVehicle.heading) ? defaultHeading : activeVehicle.heading) : defaultHeading
- property real altitudeWGS84: activeVehicle ? activeVehicle.altitudeWGS84 : defaultAltitudeWGS84
- property real groundSpeed: activeVehicle ? activeVehicle.groundSpeed : defaultGroundSpeed
- property real airSpeed: activeVehicle ? activeVehicle.airSpeed : defaultAirSpeed
- property real climbRate: activeVehicle ? activeVehicle.climbRate : defaultClimbRate
-
- property bool showPitchIndicator: true
-
- function getBool(value) {
- return value === '0' ? false : true;
- }
-
- function setBool(value) {
- return value ? "1" : "0";
- }
-
- function enforceExclusiveOption(setWidget, alternateWidget, defaultSetting, alternateSetting) {
- setWidget.visible = !setWidget.visible;
- flightDisplay.saveSetting(defaultSetting, setBool(setWidget.visible));
- alternateWidget.visible = setWidget.visible ? false : alternateWidget.visible;
- flightDisplay.saveSetting(alternateSetting, setBool(alternateWidget.visible));
- }
-
- Connections {
- target: flightDisplay
- onShowOptionsMenuChanged: {
- contextMenu.popup();
- }
- }
-
- Component.onCompleted:
- {
- videoBackground.visible = getBool(flightDisplay.loadSetting("showVideoBackground", "0"));
-
- // Disable video if we don't have support for it
- if(!flightDisplay.hasVideo) {
- videoBackground.visible = false;
- flightDisplay.saveSetting("showVideoBackground", setBool(videoBackground.visible));
- }
- // Enable/Disable menu accordingly
- videoMenu.enabled = flightDisplay.hasVideo;
- }
-
- Menu {
- id: contextMenu
-
- MenuItem {
- id: videoMenu
- text: "Video Background"
- checkable: true
- checked: videoBackground.visible
- onToggled: videoBackground.visible = checked
- }
- }
-
- // Video and Map backgrounds are exclusive. If one is enabled the other is disabled.
-
- QGCVideoBackground {
- id: videoBackground
- anchors.fill: parent
- display: videoDisplay
- receiver: videoReceiver
- z: 10
- }
-
- // HUD (lower middle) Compass
-
- 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: root.heading
- active: multiVehicleManager.activeVehicleAvailable
- z: 70
- }
-
- // Sky/Ground background (visible when no Map or Video is enabled)
-
- QGCArtificialHorizon {
- id: artificialHoriz
- anchors.fill: parent
- rollAngle: roll
- pitchAngle: pitch
- visible: !videoBackground.visible
- }
-
- // HUD (center) Attitude Indicator
-
- QGCAttitudeHUD {
- id: attitudeHUD
- rollAngle: roll
- pitchAngle: pitch
- showPitch: showPitchIndicator
- width: ScreenTools.defaultFontPixelSize * (30)
- height: ScreenTools.defaultFontPixelSize * (30)
- active: multiVehicleManager.activeVehicleAvailable
- z: 20
- }
-
- QGCAltitudeWidget {
- id: altitudeWidget
- anchors.right: parent.right
- width: ScreenTools.defaultFontPixelSize * (5)
- height: parent.height * 0.65 > ScreenTools.defaultFontPixelSize * (23.4) ? ScreenTools.defaultFontPixelSize * (23.4) : parent.height * 0.65
- altitude: root.altitudeWGS84
- z: 30
- }
-
- QGCSpeedWidget {
- id: speedWidget
- 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: root.groundSpeed
- z: 40
- }
-
- QGCCurrentSpeed {
- id: currentSpeed
- anchors.left: parent.left
- width: ScreenTools.defaultFontPixelSize * (6.25)
- airspeed: root.airSpeed
- groundspeed: root.groundSpeed
- active: multiVehicleManager.activeVehicleAvailable
- showAirSpeed: true
- showGroundSpeed: true
- visible: (currentSpeed.showGroundSpeed || currentSpeed.showAirSpeed)
- z: 50
- }
-
- QGCCurrentAltitude {
- id: currentAltitude
- anchors.right: parent.right
- width: ScreenTools.defaultFontPixelSize * (6.25)
- altitude: root.altitudeWGS84
- vertZ: root.climbRate
- showAltitude: true
- showClimbRate: true
- active: multiVehicleManager.activeVehicleAvailable
- visible: (currentAltitude.showAltitude || currentAltitude.showClimbRate)
- z: 60
- }
-
- QGCButton {
- anchors.margins: ScreenTools.defaultFontPixelWidth
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- text: "Options"
- menu: contextMenu
- }
-}
diff --git a/src/FlightMap/Images/compass.svg b/src/FlightMap/Images/compass.svg
deleted file mode 100644
index 0f388c131436939fc2a06018d93a262250ba4010..0000000000000000000000000000000000000000
--- a/src/FlightMap/Images/compass.svg
+++ /dev/null
@@ -1,12825 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-]>
-
diff --git a/src/FlightMap/Images/compassNeedle.svg b/src/FlightMap/Images/compassNeedle.svg
deleted file mode 100644
index 9da7ae17debb20862a80bae9976849cd2c49496a..0000000000000000000000000000000000000000
--- a/src/FlightMap/Images/compassNeedle.svg
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-
diff --git a/src/FlightMap/Widgets/QGCAltitudeWidget.qml b/src/FlightMap/Widgets/QGCAltitudeWidget.qml
deleted file mode 100644
index 9b2cf7ef85ca7ec2c215efaa58219df6f23bf6f6..0000000000000000000000000000000000000000
--- a/src/FlightMap/Widgets/QGCAltitudeWidget.qml
+++ /dev/null
@@ -1,112 +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 .
-
-======================================================================*/
-
-/**
- * @file
- * @brief QGC Altitude Indicator
- * @author Gus Grubba
- */
-
-import QtQuick 2.4
-import QGroundControl.Controls 1.0
-import QGroundControl.ScreenTools 1.0
-
-Rectangle {
- id: root
- property real altitude: 50
- property real _reticleSpacing: ScreenTools.defaultFontPixelSize * (1.33)
- property real _reticleHeight: ScreenTools.defaultFontPixelSize * (0.166)
- property real _reticleSlot: _reticleSpacing + _reticleHeight
- property var _speedArray: []
- property int _currentCenter: 0
- property int _currentStart: -100
-
- function updateArray() {
- var tmpArray = [];
- _currentCenter = Math.floor(altitude / 5) * 5;
- _currentStart = _currentCenter + 100;
- for(var i = 0; i < 40; i++) {
- tmpArray[i] = _currentStart - (i * 5);
- }
- _speedArray = tmpArray;
- }
-
- Component.onCompleted:
- {
- updateArray() ;
- }
-
- onAltitudeChanged: {
- if(Math.abs(_currentCenter - altitude) > 50) {
- updateArray() ;
- }
- }
-
- anchors.verticalCenter: parent.verticalCenter
- smooth: true
- radius: ScreenTools.defaultFontPixelSize * (0.42)
- border.color: Qt.rgba(1,1,1,0.25)
- gradient: Gradient {
- GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0.65) }
- GradientStop { position: 0.5; color: Qt.rgba(0,0,0,0.25) }
- GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.65) }
- }
- Rectangle {
- id: clipRect
- height: parent.height - ScreenTools.defaultFontPixelSize * (0.42)
- width: parent.width
- clip: true
- color: Qt.rgba(0,0,0,0);
- anchors.verticalCenter: parent.verticalCenter
- Column{
- id: col
- width: parent.width
- anchors.verticalCenter: parent.verticalCenter
- spacing: _reticleSpacing
- Repeater {
- model: _speedArray
- anchors.left: parent.left
- Rectangle {
- property int _alt: modelData
- width: (_alt % 10 === 0) ? ScreenTools.defaultFontPixelSize * (0.83) : ScreenTools.defaultFontPixelSize * (1.25)
- height: _reticleHeight
- color: Qt.rgba(1,1,1,0.35)
- QGCLabel {
- visible: (_alt % 10 === 0)
- x: ScreenTools.defaultFontPixelSize * (1.66)
- anchors.verticalCenter: parent.verticalCenter
- antialiasing: true
- font.weight: Font.DemiBold
- text: _alt
- color: _alt < 0 ? "#f8983a" : "white"
- style: Text.Outline
- styleColor: Qt.rgba(0,0,0,0.25)
- }
- }
- }
- transform: Translate {
- y: ((altitude - _currentCenter) * _reticleSlot / 5) - (_reticleSlot / 2)
- }
- }
- }
-}
diff --git a/src/FlightMap/Widgets/QGCCompassHUD.qml b/src/FlightMap/Widgets/QGCCompassHUD.qml
deleted file mode 100644
index 6a191b0662891fae9ebfa568b7ab722b403473d7..0000000000000000000000000000000000000000
--- a/src/FlightMap/Widgets/QGCCompassHUD.qml
+++ /dev/null
@@ -1,84 +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 .
-
-======================================================================*/
-
-/**
- * @file
- * @brief QGC Compass HUD
- * @author Gus Grubba
- */
-
-import QtQuick 2.4
-import QGroundControl.Controls 1.0
-import QGroundControl.ScreenTools 1.0
-
-Item {
- id: root
-
- property bool active: false ///< true: actively connected to data provider, false: show inactive control
- property real heading: _defaultHeading
-
- readonly property real _defaultHeading: 0
-
- property real _heading: active ? heading : _defaultHeading
-
- Image {
- id: compass
- anchors.centerIn: parent
- source: "/qmlimages/compass.svg"
- mipmap: true
- width: root.width
- fillMode: Image.PreserveAspectFit
-
- transform: Rotation {
- origin.x: compass.width / 2
- origin.y: compass.height / 2
- angle: -_heading
- }
- }
-
- Image {
- id: pointer
- anchors.bottom: compass.top
- anchors.horizontalCenter: root.horizontalCenter
- source: "/qmlimages/compassNeedle.svg"
- smooth: true
- width: compass.width * 0.1
- fillMode: Image.PreserveAspectFit
- }
-
- Rectangle {
- anchors.centerIn: compass
- width: ScreenTools.defaultFontPixelSize * (3.33)
- height: ScreenTools.defaultFontPixelSize * (2.08)
- border.color: Qt.rgba(1,1,1,0.15)
- color: Qt.rgba(0,0,0,0.25)
-
- QGCLabel {
- text: _heading.toFixed(0)
- font.weight: Font.DemiBold
- color: "white"
- anchors.centerIn: parent
- visible: active
- }
- }
-}
diff --git a/src/FlightMap/Widgets/QGCCurrentAltitude.qml b/src/FlightMap/Widgets/QGCCurrentAltitude.qml
deleted file mode 100644
index d58632a5adc66841cf0ae836cc16589a2dd5c2f4..0000000000000000000000000000000000000000
--- a/src/FlightMap/Widgets/QGCCurrentAltitude.qml
+++ /dev/null
@@ -1,67 +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 .
-
-======================================================================*/
-
-/**
- * @file
- * @brief QGC Current Altitude Indicator
- * @author Gus Grubba
- */
-
-import QtQuick 2.1
-import QGroundControl.Controls 1.0
-import QGroundControl.ScreenTools 1.0
-
-Rectangle {
- id: root
-
- property bool active: false ///< true: actively connected to data provider, false: show inactive control
- property real altitude: 0
- property real vertZ: 0
- property bool showAltitude: true
- property bool showClimbRate: true
-
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width
- height: (showAltitude && showClimbRate) ? ScreenTools.defaultFontPixelSize * (4.16) : ScreenTools.defaultFontPixelSize * (2.08)
- color: "black"
- border.color: Qt.rgba(1,1,1,0.25)
- opacity: 1.0
- Column{
- anchors.centerIn: parent
- spacing: ScreenTools.defaultFontPixelSize * (0.33)
- QGCLabel {
- text: 'h: ' + (active ? altitude.toFixed(0) : "")
- font.weight: Font.DemiBold
- color: "white"
- anchors.right: parent.right
- visible: showAltitude
- }
- QGCLabel {
- text: 'vZ: ' + (active ? vertZ.toFixed(0) : "")
- color: "white"
- font.weight: showAltitude ? Font.Normal : Font.DemiBold
- anchors.right: parent.right
- visible: showClimbRate
- }
- }
-}
diff --git a/src/FlightMap/Widgets/QGCCurrentSpeed.qml b/src/FlightMap/Widgets/QGCCurrentSpeed.qml
deleted file mode 100644
index 6969b07d94d0d72c28b406238b5398b3a4ef5555..0000000000000000000000000000000000000000
--- a/src/FlightMap/Widgets/QGCCurrentSpeed.qml
+++ /dev/null
@@ -1,67 +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 .
-
-======================================================================*/
-
-/**
- * @file
- * @brief QGC Current Speed Indicator
- * @author Gus Grubba
- */
-
-import QtQuick 2.1
-import QGroundControl.Controls 1.0
-import QGroundControl.ScreenTools 1.0
-
-Rectangle {
- id: root
-
- property bool active: false ///< true: actively connected to data provider, false: show inactive control
- property real airspeed: 0
- property real groundspeed: 0
- property bool showAirSpeed: true
- property bool showGroundSpeed: true
-
- anchors.verticalCenter: parent.verticalCenter
- width: parent.width
- height: (showAirSpeed && showGroundSpeed) ? ScreenTools.defaultFontPixelSize * (4.16) : ScreenTools.defaultFontPixelSize * (2.08)
- color: "black"
- border.color: Qt.rgba(1,1,1,0.25)
- opacity: 1.0
- Column{
- anchors.centerIn: parent
- spacing: ScreenTools.defaultFontPixelSize * (0.33)
- QGCLabel {
- text: 'GS: ' + (active ? groundspeed.toFixed(0) : "")
- font.weight: Font.DemiBold
- color: "white"
- anchors.right: parent.right
- visible: showGroundSpeed
- }
- QGCLabel {
- text: 'AS: ' + (active ? airspeed.toFixed(0) : "")
- color: "white"
- anchors.right: parent.right
- font.weight: showAirSpeed ? Font.Normal : Font.DemiBold
- visible: showAirSpeed
- }
- }
-}
diff --git a/src/FlightMap/Widgets/QGCSpeedWidget.qml b/src/FlightMap/Widgets/QGCSpeedWidget.qml
deleted file mode 100644
index 000c48d01e468146dfeb4f17fe7eab5f1452e2ac..0000000000000000000000000000000000000000
--- a/src/FlightMap/Widgets/QGCSpeedWidget.qml
+++ /dev/null
@@ -1,89 +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 .
-
-======================================================================*/
-
-/**
- * @file
- * @brief QGC Speed Indicator
- * @author Gus Grubba
- */
-
-import QtQuick 2.4
-import QGroundControl.ScreenTools 1.0
-import QGroundControl.Controls 1.0
-
-Rectangle {
- id: root
- property real speed: 0
- property real _reticleSpacing: ScreenTools.defaultFontPixelSize * (0.83)
- property real _reticleHeight: ScreenTools.defaultFontPixelSize * (0.166)
- property real _reticleSlot: _reticleSpacing + _reticleHeight
- anchors.verticalCenter: parent.verticalCenter
- z:10
- smooth: true
- radius: ScreenTools.defaultFontPixelSize * (0.42)
- border.color: Qt.rgba(1,1,1,0.25)
- gradient: Gradient {
- GradientStop { position: 0.0; color: Qt.rgba(0,0,0,0.65) }
- GradientStop { position: 0.5; color: Qt.rgba(0,0,0,0.25) }
- GradientStop { position: 1.0; color: Qt.rgba(0,0,0,0.65) }
- }
- Rectangle {
- id: clipRect
- height: parent.height - ScreenTools.defaultFontPixelSize * (0.42)
- width: parent.width
- clip: true
- color: Qt.rgba(0,0,0,0);
- anchors.verticalCenter: parent.verticalCenter
- Column{
- id: col
- width: parent.width
- anchors.verticalCenter: parent.verticalCenter
- spacing: _reticleSpacing
- Repeater {
- model: 40
- Rectangle {
- property int _speed: -(index - 20)
- width: (_speed % 5 === 0) ? ScreenTools.defaultFontPixelSize * (0.83) : ScreenTools.defaultFontPixelSize * (1.25)
- anchors.right: parent.right
- height: _reticleHeight
- color: Qt.rgba(1,1,1,0.35)
- QGCLabel {
- visible: (_speed % 5 === 0)
- anchors.horizontalCenter: parent.horizontalCenter
- anchors.horizontalCenterOffset: ScreenTools.defaultFontPixelSize * (-2.5)
- anchors.verticalCenter: parent.verticalCenter
- antialiasing: true
- font.weight: Font.DemiBold
- text: _speed
- color: _speed < 0 ? "#f8983a" : "white"
- style: Text.Outline
- styleColor: Qt.rgba(0,0,0,0.25)
- }
- }
- }
- transform: Translate {
- y: (speed * _reticleSlot) - (_reticleSlot / 2)
- }
- }
- }
-}
diff --git a/src/FlightMap/qmldir b/src/FlightMap/qmldir
index c5493a2ba6e66158cb434aaedd0a0877e243c3ce..db985b1d37da44be97a61c1d484e7ae29bbeb56c 100644
--- a/src/FlightMap/qmldir
+++ b/src/FlightMap/qmldir
@@ -5,18 +5,13 @@ FlightMap 1.0 FlightMap.qml
QGCVideoBackground 1.0 QGCVideoBackground.qml
# Widgets
-QGCAltitudeWidget 1.0 QGCAltitudeWidget.qml
QGCArtificialHorizon 1.0 QGCArtificialHorizon.qml
QGCAttitudeHUD 1.0 QGCAttitudeHUD.qml
QGCAttitudeWidget 1.0 QGCAttitudeWidget.qml
-QGCCompassHUD 1.0 QGCCompassHUD.qml
QGCCompassWidget 1.0 QGCCompassWidget.qml
-QGCCurrentAltitude 1.0 QGCCurrentAltitude.qml
-QGCCurrentSpeed 1.0 QGCCurrentSpeed.qml
QGCInstrumentWidget 1.0 QGCInstrumentWidget.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
QGCSlider 1.0 QGCSlider.qml
-QGCSpeedWidget 1.0 QGCSpeedWidget.qml
# Map items
MissionItemIndicator 1.0 MissionItemIndicator.qml
diff --git a/src/QGCConfig.h b/src/QGCConfig.h
index 517ec21126c2c6f9e5718fe131189666e4320a7e..9de60c3bf8678fab133fce7f9c7922257e6bd10d 100644
--- a/src/QGCConfig.h
+++ b/src/QGCConfig.h
@@ -12,7 +12,7 @@
// If you need to make an incompatible changes to stored settings, bump this version number
// up by 1. This will caused store settings to be cleared on next boot.
-#define QGC_SETTINGS_VERSION 6
+#define QGC_SETTINGS_VERSION 7
#define QGC_APPLICATION_NAME "QGroundControl"
#define QGC_ORG_NAME "QGroundControl.org"
diff --git a/src/ui/MainWindow.cc b/src/ui/MainWindow.cc
index 645375d597f2d8f5213ceab56f2296e39b3588b5..cf5e46b73c72fa3e864fc4d6dd36ac9a5b9c2889 100644
--- a/src/ui/MainWindow.cc
+++ b/src/ui/MainWindow.cc
@@ -63,7 +63,6 @@ This file is part of the QGROUNDCONTROL project
#include "UASRawStatusView.h"
#include "CustomCommandWidget.h"
#include "QGCDockWidget.h"
-#include "FlightDisplayWidget.h"
#include "UASInfoWidget.h"
#include "HILDockWidget.h"
#endif
@@ -89,7 +88,6 @@ const char* MainWindow::_mavlinkDockWidgetName = "MAVLink Inspector";
const char* MainWindow::_customCommandWidgetName = "Custom Command";
const char* MainWindow::_filesDockWidgetName = "Onboard Files";
const char* MainWindow::_uasStatusDetailsDockWidgetName = "Status Details";
-const char* MainWindow::_pfdDockWidgetName = "Primary Flight Display";
const char* MainWindow::_uasInfoViewDockWidgetName = "Info View";
const char* MainWindow::_hilDockWidgetName = "HIL Config";
const char* MainWindow::_analyzeDockWidgetName = "Analyze";
@@ -180,7 +178,7 @@ MainWindow::MainWindow()
_buildCommonWidgets();
emit initStatusChanged(tr("Building common actions"), Qt::AlignLeft | Qt::AlignBottom, QColor(62, 93, 141));
#endif
-
+
// Create actions
connectCommonActions();
// Connect user interface devices
@@ -290,7 +288,7 @@ MainWindow::MainWindow()
qd.close();
#endif
}
-
+
#ifndef __mobile__
_loadVisibleWidgetsSettings();
#endif
@@ -325,7 +323,6 @@ void MainWindow::_buildCommonWidgets(void)
_customCommandWidgetName,
_filesDockWidgetName,
_uasStatusDetailsDockWidgetName,
- _pfdDockWidgetName,
_uasInfoViewDockWidgetName,
_hilDockWidgetName,
_analyzeDockWidgetName,
@@ -334,14 +331,14 @@ void MainWindow::_buildCommonWidgets(void)
for (size_t i=0; isetCheckable(true);
action->setData(pDockWidgetName);
connect(action, &QAction::triggered, this, &MainWindow::_showDockWidgetAction);
_ui.menuWidgets->addAction(action);
-
+
_mapName2Action[pDockWidgetName] = action;
}
}
@@ -353,13 +350,13 @@ void MainWindow::_showDockWidget(const QString& name, bool show)
if (!_mapName2DockWidget.contains(name)) {
_createInnerDockWidget(name);
}
-
+
Q_ASSERT(_mapName2DockWidget.contains(name));
QGCDockWidget* dockWidget = _mapName2DockWidget[name];
Q_ASSERT(dockWidget);
-
+
dockWidget->setVisible(show);
-
+
Q_ASSERT(_mapName2Action.contains(name));
_mapName2Action[name]->setChecked(show);
}
@@ -368,7 +365,7 @@ void MainWindow::_showDockWidget(const QString& name, bool show)
void MainWindow::_createInnerDockWidget(const QString& widgetName)
{
QGCDockWidget* widget = NULL;
-
+
if (widgetName == _mavlinkDockWidgetName) {
widget = new QGCMAVLinkInspector(widgetName, _mapName2Action[widgetName], MAVLinkProtocol::instance(),this);
} else if (widgetName == _customCommandWidgetName) {
@@ -377,8 +374,6 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName)
widget = new QGCUASFileViewMulti(widgetName, _mapName2Action[widgetName], this);
} else if (widgetName == _uasStatusDetailsDockWidgetName) {
widget = new UASInfoWidget(widgetName, _mapName2Action[widgetName], this);
- } else if (widgetName == _pfdDockWidgetName) {
- widget = new FlightDisplayWidget(widgetName, _mapName2Action[widgetName], this);
} else if (widgetName == _hilDockWidgetName) {
widget = new HILDockWidget(widgetName, _mapName2Action[widgetName], this);
} else if (widgetName == _analyzeDockWidgetName) {
@@ -389,9 +384,9 @@ void MainWindow::_createInnerDockWidget(const QString& widgetName)
widget = pInfoView;
} else {
qWarning() << "Attempt to create unknown Inner Dock Widget" << widgetName;
- return;
+ return;
}
-
+
_mapName2DockWidget[widgetName] = widget;
}
@@ -436,13 +431,13 @@ void MainWindow::closeEvent(QCloseEvent *event)
tr("There are still active connections to vehicles. Do you want to disconnect these before closing?"),
QMessageBox::Yes | QMessageBox::Cancel,
QMessageBox::Cancel);
- if (button == QMessageBox::Yes) {
- LinkManager::instance()->disconnectAll();
- // The above disconnect causes a flurry of activity as the vehicle components are removed. This in turn
- // causes the Windows Version of Qt to crash if you allow the close event to be accepted. In order to prevent
- // the crash, we ignore the close event and setup a delayed timer to close the window after things settle down.
- QTimer::singleShot(1500, this, &MainWindow::_closeWindow);
- }
+ if (button == QMessageBox::Yes) {
+ LinkManager::instance()->disconnectAll();
+ // The above disconnect causes a flurry of activity as the vehicle components are removed. This in turn
+ // causes the Windows Version of Qt to crash if you allow the close event to be accepted. In order to prevent
+ // the crash, we ignore the close event and setup a delayed timer to close the window after things settle down.
+ QTimer::singleShot(1500, this, &MainWindow::_closeWindow);
+ }
event->ignore();
return;
@@ -450,7 +445,7 @@ void MainWindow::closeEvent(QCloseEvent *event)
// This will process any remaining flight log save dialogs
qgcApp()->processEvents(QEventLoop::ExcludeUserInputEvents);
-
+
// Should not be any active connections
Q_ASSERT(!LinkManager::instance()->anyConnectedLinks());
@@ -486,7 +481,7 @@ void MainWindow::storeSettings()
settings.setValue("SHOW_STATUSBAR", _showStatusBar);
settings.endGroup();
settings.setValue(_getWindowGeometryKey(), saveGeometry());
-
+
#ifndef __mobile__
_storeVisibleWidgetsSettings();
#endif
@@ -578,7 +573,7 @@ void MainWindow::_storeCurrentViewState(void)
dockWidget->saveSettings();
}
#endif
-
+
settings.setValue(_getWindowGeometryKey(), saveGeometry());
}
@@ -638,12 +633,12 @@ void MainWindow::_showQmlTestWidget(void)
void MainWindow::_loadVisibleWidgetsSettings(void)
{
QSettings settings;
-
+
QString widgets = settings.value(_visibleWidgetsKey).toString();
-
+
if (!widgets.isEmpty()) {
QStringList nameList = widgets.split(",");
-
+
foreach (const QString &name, nameList) {
_showDockWidget(name, true);
}
@@ -654,7 +649,7 @@ void MainWindow::_storeVisibleWidgetsSettings(void)
{
QString widgetNames;
bool firstWidget = true;
-
+
foreach (const QString &name, _mapName2DockWidget.keys()) {
if (_mapName2DockWidget[name]->isVisible()) {
if (!firstWidget) {
@@ -662,13 +657,13 @@ void MainWindow::_storeVisibleWidgetsSettings(void)
} else {
firstWidget = false;
}
-
+
widgetNames += name;
}
}
-
+
QSettings settings;
-
+
settings.setValue(_visibleWidgetsKey, widgetNames);
}
#endif
diff --git a/src/ui/MainWindow.h b/src/ui/MainWindow.h
index 60af67ac1a010d9334352f6e4e98cdfaf905d18e..5f767decd36b4913bf51c8f390ae47d396b5757a 100644
--- a/src/ui/MainWindow.h
+++ b/src/ui/MainWindow.h
@@ -203,13 +203,13 @@ protected:
private slots:
void _linkStateChange(LinkInterface*);
- void _closeWindow(void) { close(); }
+ void _closeWindow(void) { close(); }
void _vehicleAdded(Vehicle* vehicle);
#ifndef __mobile__
void _showDockWidgetAction(bool show);
#endif
-
+
#ifdef UNITTEST_BUILD
void _showQmlTestWidget(void);
#endif
@@ -232,7 +232,6 @@ private:
static const char* _customCommandWidgetName;
static const char* _filesDockWidgetName;
static const char* _uasStatusDetailsDockWidgetName;
- static const char* _pfdDockWidgetName;
static const char* _uasInfoViewDockWidgetName;
static const char* _hilDockWidgetName;
static const char* _analyzeDockWidgetName;
@@ -251,7 +250,7 @@ private:
void _showDockWidget(const QString &name, bool show);
void _loadVisibleWidgetsSettings(void);
void _storeVisibleWidgetsSettings(void);
-
+
static const char* _visibleWidgetsKey;
#endif