Browse Source

Merge pull request #1810 from DonLakeFlyer/FlightMap

Restructuring flight map code
QGC4.4
Don Gagne 10 years ago
parent
commit
5a18381d5e
  1. 73
      qgroundcontrol.qrc
  2. 2
      src/FlightMap/FlightMap.qml
  3. 0
      src/FlightMap/Images/attitudeDial.svg
  4. 0
      src/FlightMap/Images/attitudeInstrument.svg
  5. 0
      src/FlightMap/Images/attitudePointer.svg
  6. 0
      src/FlightMap/Images/buttonHome.svg
  7. 0
      src/FlightMap/Images/buttonLeft.svg
  8. 0
      src/FlightMap/Images/buttonMore.svg
  9. 0
      src/FlightMap/Images/buttonRight.svg
  10. 0
      src/FlightMap/Images/compass.svg
  11. 0
      src/FlightMap/Images/compassInstrumentAirplane.svg
  12. 0
      src/FlightMap/Images/compassInstrumentDial.svg
  13. 0
      src/FlightMap/Images/compassNeedle.svg
  14. 0
      src/FlightMap/Images/crossHair.svg
  15. 0
      src/FlightMap/Images/rollDialWhite.svg
  16. 0
      src/FlightMap/Images/rollPointerWhite.svg
  17. 0
      src/FlightMap/Images/scale.png
  18. 0
      src/FlightMap/Images/scale_end.png
  19. 0
      src/FlightMap/MapItems/QGCWaypoint.qml
  20. 0
      src/FlightMap/MapItems/VehicleMapItem.qml
  21. 0
      src/FlightMap/QGCVideoBackground.qml
  22. 0
      src/FlightMap/Widgets/QGCAltitudeWidget.qml
  23. 0
      src/FlightMap/Widgets/QGCArtificialHorizon.qml
  24. 0
      src/FlightMap/Widgets/QGCAttitudeHUD.qml
  25. 0
      src/FlightMap/Widgets/QGCAttitudeWidget.qml
  26. 0
      src/FlightMap/Widgets/QGCCompassHUD.qml
  27. 0
      src/FlightMap/Widgets/QGCCompassWidget.qml
  28. 0
      src/FlightMap/Widgets/QGCCurrentAltitude.qml
  29. 0
      src/FlightMap/Widgets/QGCCurrentSpeed.qml
  30. 0
      src/FlightMap/Widgets/QGCHudMessage.qml
  31. 0
      src/FlightMap/Widgets/QGCMapToolButton.qml
  32. 0
      src/FlightMap/Widgets/QGCPitchIndicator.qml
  33. 0
      src/FlightMap/Widgets/QGCSlider.qml
  34. 0
      src/FlightMap/Widgets/QGCSpeedWidget.qml
  35. 0
      src/FlightMap/Widgets/QGCWaypointEditor.qml
  36. 13
      src/FlightMap/qmldir
  37. 4
      src/ui/flightdisplay/FlightDisplay.qml
  38. 4
      src/ui/mapdisplay/MapDisplay.qml

73
qgroundcontrol.qrc

@ -43,22 +43,22 @@ @@ -43,22 +43,22 @@
<file alias="PowerComponentBattery_04cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_04cell.svg</file>
<file alias="PowerComponentBattery_05cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_05cell.svg</file>
<file alias="PowerComponentBattery_06cell.svg">src/AutoPilotPlugins/PX4/Images/PowerComponentBattery_06cell.svg</file>
<file alias="attitudeDial.svg">src/ui/qmlcommon/attitudeDial.svg</file>
<file alias="attitudeInstrument.svg">src/ui/qmlcommon/attitudeInstrument.svg</file>
<file alias="attitudePointer.svg">src/ui/qmlcommon/attitudePointer.svg</file>
<file alias="buttonHome.svg">src/ui/qmlcommon/buttonHome.svg</file>
<file alias="buttonLeft.svg">src/ui/qmlcommon/buttonLeft.svg</file>
<file alias="buttonMore.svg">src/ui/qmlcommon/buttonMore.svg</file>
<file alias="buttonRight.svg">src/ui/qmlcommon/buttonRight.svg</file>
<file alias="compass.svg">src/ui/qmlcommon/compass.svg</file>
<file alias="compassInstrumentAirplane.svg">src/ui/qmlcommon/compassInstrumentAirplane.svg</file>
<file alias="compassInstrumentDial.svg">src/ui/qmlcommon/compassInstrumentDial.svg</file>
<file alias="compassNeedle.svg">src/ui/qmlcommon/compassNeedle.svg</file>
<file alias="crossHair.svg">src/ui/qmlcommon/crossHair.svg</file>
<file alias="rollDialWhite.svg">src/ui/qmlcommon/rollDialWhite.svg</file>
<file alias="rollPointerWhite.svg">src/ui/qmlcommon/rollPointerWhite.svg</file>
<file alias="scale.png">src/ui/qmlcommon/scale.png</file>
<file alias="scale_end.png">src/ui/qmlcommon/scale_end.png</file>
<file alias="attitudeDial.svg">src/FlightMap/Images/attitudeDial.svg</file>
<file alias="attitudeInstrument.svg">src/FlightMap/Images/attitudeInstrument.svg</file>
<file alias="attitudePointer.svg">src//FlightMap/Images/attitudePointer.svg</file>
<file alias="buttonHome.svg">src/FlightMap/Images/buttonHome.svg</file>
<file alias="buttonLeft.svg">src/FlightMap/Images/buttonLeft.svg</file>
<file alias="buttonMore.svg">src/FlightMap/Images/buttonMore.svg</file>
<file alias="buttonRight.svg">src/FlightMap/Images/buttonRight.svg</file>
<file alias="compass.svg">src/FlightMap/Images/compass.svg</file>
<file alias="compassInstrumentAirplane.svg">src/FlightMap/Images/compassInstrumentAirplane.svg</file>
<file alias="compassInstrumentDial.svg">src/FlightMap/Images/compassInstrumentDial.svg</file>
<file alias="compassNeedle.svg">src/FlightMap/Images/compassNeedle.svg</file>
<file alias="crossHair.svg">src/FlightMap/Images/crossHair.svg</file>
<file alias="rollDialWhite.svg">src/FlightMap/Images/rollDialWhite.svg</file>
<file alias="rollPointerWhite.svg">src/FlightMap/Images/rollPointerWhite.svg</file>
<file alias="scale.png">src/FlightMap/Images/scale.png</file>
<file alias="scale_end.png">src/FlightMap/Images/scale_end.png</file>
</qresource>
<qresource prefix="/qml">
<file alias="test.qml">src/test.qml</file>
@ -118,25 +118,28 @@ @@ -118,25 +118,28 @@
<file alias="MainToolBar.qml">src/ui/toolbar/MainToolBar.qml</file>
<file alias="FlightDisplay.qml">src/ui/flightdisplay/FlightDisplay.qml</file>
<file alias="MapDisplay.qml">src/ui/mapdisplay/MapDisplay.qml</file>
<file alias="QGroundControl/FlightControls/QGCAltitudeWidget.qml">src/ui/qmlcommon/QGCAltitudeWidget.qml</file>
<file alias="QGroundControl/FlightControls/QGCArtificialHorizon.qml">src/ui/qmlcommon/QGCArtificialHorizon.qml</file>
<file alias="QGroundControl/FlightControls/QGCAttitudeWidget.qml">src/ui/qmlcommon/QGCAttitudeWidget.qml</file>
<file alias="QGroundControl/FlightControls/QGCAttitudeHUD.qml">src/ui/qmlcommon/QGCAttitudeHUD.qml</file>
<file alias="QGroundControl/FlightControls/QGCCompassWidget.qml">src/ui/qmlcommon/QGCCompassWidget.qml</file>
<file alias="QGroundControl/FlightControls/QGCCompassHUD.qml">src/ui/qmlcommon/QGCCompassHUD.qml</file>
<file alias="QGroundControl/FlightControls/QGCCurrentAltitude.qml">src/ui/qmlcommon/QGCCurrentAltitude.qml</file>
<file alias="QGroundControl/FlightControls/QGCCurrentSpeed.qml">src/ui/qmlcommon/QGCCurrentSpeed.qml</file>
<file alias="QGroundControl/FlightControls/QGCHudMessage.qml">src/ui/qmlcommon/QGCHudMessage.qml</file>
<file alias="QGroundControl/FlightControls/QGCMapBackground.qml">src/ui/qmlcommon/QGCMapBackground.qml</file>
<file alias="QGroundControl/FlightControls/QGCMapToolButton.qml">src/ui/qmlcommon/QGCMapToolButton.qml</file>
<file alias="QGroundControl/FlightControls/QGCPitchIndicator.qml">src/ui/qmlcommon/QGCPitchIndicator.qml</file>
<file alias="QGroundControl/FlightControls/QGCSlider.qml">src/ui/qmlcommon/QGCSlider.qml</file>
<file alias="QGroundControl/FlightControls/QGCSpeedWidget.qml">src/ui/qmlcommon/QGCSpeedWidget.qml</file>
<file alias="QGroundControl/FlightControls/QGCVideoBackground.qml">src/ui/qmlcommon/QGCVideoBackground.qml</file>
<file alias="QGroundControl/FlightControls/QGCWaypointEditor.qml">src/ui/qmlcommon/QGCWaypointEditor.qml</file>
<file alias="QGroundControl/FlightControls/qmldir">src/ui/qmlcommon/qmldir</file>
<file alias="QGroundControl/FlightControls/QGCWaypoint.qml">src/ui/qmlcommon/QGCWaypoint.qml</file>
<file alias="QGroundControl/FlightControls/VehicleMapItem.qml">src/ui/qmlcommon/VehicleMapItem.qml</file>
<!-- FlightMap module -->
<file alias="QGroundControl/FlightMap/qmldir">src/FlightMap/qmldir</file>
<file alias="QGroundControl/FlightMap/FlightMap.qml">src/FlightMap/FlightMap.qml</file>
<file alias="QGroundControl/FlightMap/QGCVideoBackground.qml">src/FlightMap/QGCVideoBackground.qml</file>
<file alias="QGroundControl/FlightMap/QGCAltitudeWidget.qml">src/FlightMap/Widgets/QGCAltitudeWidget.qml</file>
<file alias="QGroundControl/FlightMap/QGCArtificialHorizon.qml">src/FlightMap/Widgets/QGCArtificialHorizon.qml</file>
<file alias="QGroundControl/FlightMap/QGCAttitudeWidget.qml">src/FlightMap/Widgets/QGCAttitudeWidget.qml</file>
<file alias="QGroundControl/FlightMap/QGCAttitudeHUD.qml">src/FlightMap/Widgets/QGCAttitudeHUD.qml</file>
<file alias="QGroundControl/FlightMap/QGCCompassWidget.qml">src/FlightMap/Widgets/QGCCompassWidget.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/QGCCurrentSpeed.qml">src/FlightMap/Widgets/QGCCurrentSpeed.qml</file>
<file alias="QGroundControl/FlightMap/QGCHudMessage.qml">src/FlightMap/Widgets/QGCHudMessage.qml</file>
<file alias="QGroundControl/FlightMap/QGCMapToolButton.qml">src/FlightMap/Widgets/QGCMapToolButton.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/QGCSpeedWidget.qml">src/FlightMap/Widgets/QGCSpeedWidget.qml</file>
<file alias="QGroundControl/FlightMap/QGCWaypointEditor.qml">src/FlightMap/Widgets/QGCWaypointEditor.qml</file>
<file alias="QGroundControl/FlightMap/QGCWaypoint.qml">src/FlightMap/MapItems/QGCWaypoint.qml</file>
<file alias="QGroundControl/FlightMap/VehicleMapItem.qml">src/FlightMap/MapItems/VehicleMapItem.qml</file>
</qresource>
<qresource prefix="/res">
<file alias="LeftArrow">resources/LeftArrow.svg</file>

2
src/ui/qmlcommon/QGCMapBackground.qml → src/FlightMap/FlightMap.qml

@ -33,7 +33,7 @@ import QtLocation 5.3 @@ -33,7 +33,7 @@ import QtLocation 5.3
import QtPositioning 5.3
import QGroundControl.Controls 1.0
import QGroundControl.FlightControls 1.0
import QGroundControl.FlightMap 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.MavManager 1.0
import QGroundControl.MultiVehicleManager 1.0

0
src/ui/qmlcommon/attitudeDial.svg → src/FlightMap/Images/attitudeDial.svg

Before

Width:  |  Height:  |  Size: 1.3 KiB

After

Width:  |  Height:  |  Size: 1.3 KiB

0
src/ui/qmlcommon/attitudeInstrument.svg → src/FlightMap/Images/attitudeInstrument.svg

Before

Width:  |  Height:  |  Size: 505 B

After

Width:  |  Height:  |  Size: 505 B

0
src/ui/qmlcommon/attitudePointer.svg → src/FlightMap/Images/attitudePointer.svg

Before

Width:  |  Height:  |  Size: 482 B

After

Width:  |  Height:  |  Size: 482 B

0
src/ui/qmlcommon/buttonHome.svg → src/FlightMap/Images/buttonHome.svg

Before

Width:  |  Height:  |  Size: 838 B

After

Width:  |  Height:  |  Size: 838 B

0
src/ui/qmlcommon/buttonLeft.svg → src/FlightMap/Images/buttonLeft.svg

Before

Width:  |  Height:  |  Size: 990 B

After

Width:  |  Height:  |  Size: 990 B

0
src/ui/qmlcommon/buttonMore.svg → src/FlightMap/Images/buttonMore.svg

Before

Width:  |  Height:  |  Size: 886 B

After

Width:  |  Height:  |  Size: 886 B

0
src/ui/qmlcommon/buttonRight.svg → src/FlightMap/Images/buttonRight.svg

Before

Width:  |  Height:  |  Size: 989 B

After

Width:  |  Height:  |  Size: 989 B

0
src/ui/qmlcommon/compass.svg → src/FlightMap/Images/compass.svg

Before

Width:  |  Height:  |  Size: 939 KiB

After

Width:  |  Height:  |  Size: 939 KiB

0
src/ui/qmlcommon/compassInstrumentAirplane.svg → src/FlightMap/Images/compassInstrumentAirplane.svg

Before

Width:  |  Height:  |  Size: 778 B

After

Width:  |  Height:  |  Size: 778 B

0
src/ui/qmlcommon/compassInstrumentDial.svg → src/FlightMap/Images/compassInstrumentDial.svg

Before

Width:  |  Height:  |  Size: 9.1 KiB

After

Width:  |  Height:  |  Size: 9.1 KiB

0
src/ui/qmlcommon/compassNeedle.svg → src/FlightMap/Images/compassNeedle.svg

Before

Width:  |  Height:  |  Size: 404 B

After

Width:  |  Height:  |  Size: 404 B

0
src/ui/qmlcommon/crossHair.svg → src/FlightMap/Images/crossHair.svg

Before

Width:  |  Height:  |  Size: 789 B

After

Width:  |  Height:  |  Size: 789 B

0
src/ui/qmlcommon/rollDialWhite.svg → src/FlightMap/Images/rollDialWhite.svg

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

0
src/ui/qmlcommon/rollPointerWhite.svg → src/FlightMap/Images/rollPointerWhite.svg

Before

Width:  |  Height:  |  Size: 1.6 KiB

After

Width:  |  Height:  |  Size: 1.6 KiB

0
src/ui/qmlcommon/scale.png → src/FlightMap/Images/scale.png

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

0
src/ui/qmlcommon/scale_end.png → src/FlightMap/Images/scale_end.png

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

0
src/ui/qmlcommon/QGCWaypoint.qml → src/FlightMap/MapItems/QGCWaypoint.qml

0
src/ui/qmlcommon/VehicleMapItem.qml → src/FlightMap/MapItems/VehicleMapItem.qml

0
src/ui/qmlcommon/QGCVideoBackground.qml → src/FlightMap/QGCVideoBackground.qml

0
src/ui/qmlcommon/QGCAltitudeWidget.qml → src/FlightMap/Widgets/QGCAltitudeWidget.qml

0
src/ui/qmlcommon/QGCArtificialHorizon.qml → src/FlightMap/Widgets/QGCArtificialHorizon.qml

0
src/ui/qmlcommon/QGCAttitudeHUD.qml → src/FlightMap/Widgets/QGCAttitudeHUD.qml

0
src/ui/qmlcommon/QGCAttitudeWidget.qml → src/FlightMap/Widgets/QGCAttitudeWidget.qml

0
src/ui/qmlcommon/QGCCompassHUD.qml → src/FlightMap/Widgets/QGCCompassHUD.qml

0
src/ui/qmlcommon/QGCCompassWidget.qml → src/FlightMap/Widgets/QGCCompassWidget.qml

0
src/ui/qmlcommon/QGCCurrentAltitude.qml → src/FlightMap/Widgets/QGCCurrentAltitude.qml

0
src/ui/qmlcommon/QGCCurrentSpeed.qml → src/FlightMap/Widgets/QGCCurrentSpeed.qml

0
src/ui/qmlcommon/QGCHudMessage.qml → src/FlightMap/Widgets/QGCHudMessage.qml

0
src/ui/qmlcommon/QGCMapToolButton.qml → src/FlightMap/Widgets/QGCMapToolButton.qml

0
src/ui/qmlcommon/QGCPitchIndicator.qml → src/FlightMap/Widgets/QGCPitchIndicator.qml

0
src/ui/qmlcommon/QGCSlider.qml → src/FlightMap/Widgets/QGCSlider.qml

0
src/ui/qmlcommon/QGCSpeedWidget.qml → src/FlightMap/Widgets/QGCSpeedWidget.qml

0
src/ui/qmlcommon/QGCWaypointEditor.qml → src/FlightMap/Widgets/QGCWaypointEditor.qml

13
src/ui/qmlcommon/qmldir → src/FlightMap/qmldir

@ -1,5 +1,10 @@ @@ -1,5 +1,10 @@
Module QGroundControl.FlightControls
Module QGroundControl.FlightMap
# Main view controls
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
@ -9,12 +14,12 @@ QGCCompassWidget 1.0 QGCCompassWidget.qml @@ -9,12 +14,12 @@ QGCCompassWidget 1.0 QGCCompassWidget.qml
QGCCurrentAltitude 1.0 QGCCurrentAltitude.qml
QGCCurrentSpeed 1.0 QGCCurrentSpeed.qml
QGCHudMessage 1.0 QGCHudMessage.qml
QGCMapBackground 1.0 QGCMapBackground.qml
QGCMapToolButton 1.0 QGCMapToolButton.qml
QGCPitchIndicator 1.0 QGCPitchIndicator.qml
QGCSlider 1.0 QGCSlider.qml
QGCSpeedWidget 1.0 QGCSpeedWidget.qml
QGCVideoBackground 1.0 QGCVideoBackground.qml
QGCWaypoint 1.0 QGCWaypoint.qml
QGCWaypointEditor 1.0 QGCWaypointEditor.qml
# MapQuickItems
VehicleMapItem 1.0 VehicleMapItem.qml
QGCWaypoint 1.0 QGCWaypoint.qml

4
src/ui/flightdisplay/FlightDisplay.qml

@ -32,7 +32,7 @@ import QtQuick.Controls 1.3 @@ -32,7 +32,7 @@ import QtQuick.Controls 1.3
import QtQuick.Controls.Styles 1.2
import QtQuick.Dialogs 1.2
import QGroundControl.FlightControls 1.0
import QGroundControl.FlightMap 1.0
import QGroundControl.MavManager 1.0
import QGroundControl.ScreenTools 1.0
import QGroundControl.Controls 1.0
@ -336,7 +336,7 @@ Item { @@ -336,7 +336,7 @@ Item {
z: 10
}
QGCMapBackground {
FlightMap {
id: mapBackground
anchors.fill: parent
mapName: 'MainFlightDisplay'

4
src/ui/mapdisplay/MapDisplay.qml

@ -34,7 +34,7 @@ import QtQuick.Layouts 1.1 @@ -34,7 +34,7 @@ import QtQuick.Layouts 1.1
import QGroundControl.Palette 1.0
import QGroundControl.Controls 1.0
import QGroundControl.FlightControls 1.0
import QGroundControl.FlightMap 1.0
Rectangle {
QGCPalette { id: __palette; colorGroupEnabled: true }
@ -60,7 +60,7 @@ Rectangle { @@ -60,7 +60,7 @@ Rectangle {
//----------------------------------------------------------------------------------------
// Map View
QGCMapBackground {
FlightMap {
id: mapBackground
Layout.fillWidth: true
Layout.minimumWidth: 300

Loading…
Cancel
Save