diff --git a/qgroundcontrol.pro b/qgroundcontrol.pro index e856f8c360e7c640ae80386fc1299940efc6cd19..70436ad6a6111cf304de5c01b1913ab9d38bfe88 100644 --- a/qgroundcontrol.pro +++ b/qgroundcontrol.pro @@ -1075,6 +1075,9 @@ contains (DEFINES, QGC_AIRMAP_ENABLED) { src/Airmap/AirspaceManagement.cc \ src/Airmap/AirspaceController.cc \ src/Airmap/AirMapSettings.cc +} else { + RESOURCES += \ + src/Airmap/dummy/airmap_dummy.qrc } #------------------------------------------------------------------------------------- diff --git a/src/Airmap/QGroundControl.Airmap.qmldir b/src/Airmap/QGroundControl.Airmap.qmldir index 116917dfddfea92440f489592f6f50be96565a64..a6cf465b22edf0485104cf438d26b43d07355287 100644 --- a/src/Airmap/QGroundControl.Airmap.qmldir +++ b/src/Airmap/QGroundControl.Airmap.qmldir @@ -1,4 +1,6 @@ -Module QGroundControl.Airmap +Module + +QGroundControl.Airmap AirspaceControl 1.0 AirspaceControl.qml AirspaceRegulation 1.0 AirspaceRegulation.qml diff --git a/src/Airmap/dummy/AirspaceControl.qml b/src/Airmap/dummy/AirspaceControl.qml new file mode 100644 index 0000000000000000000000000000000000000000..4a3fbc6ba2f223a57e34078bf344a0a0dd070de3 --- /dev/null +++ b/src/Airmap/dummy/AirspaceControl.qml @@ -0,0 +1,5 @@ +import QtQuick 2.3 +Item { + property bool colapsed: true + property bool showColapse: false +} diff --git a/src/Airmap/dummy/AirspaceRegulation.qml b/src/Airmap/dummy/AirspaceRegulation.qml new file mode 100644 index 0000000000000000000000000000000000000000..9009b3fa17a6b27579c3d7003bd9ddd06bd90c3f --- /dev/null +++ b/src/Airmap/dummy/AirspaceRegulation.qml @@ -0,0 +1,3 @@ +import QtQuick 2.3 +Item { +} diff --git a/src/Airmap/dummy/QGroundControl.Airmap.qmldir b/src/Airmap/dummy/QGroundControl.Airmap.qmldir new file mode 100644 index 0000000000000000000000000000000000000000..116917dfddfea92440f489592f6f50be96565a64 --- /dev/null +++ b/src/Airmap/dummy/QGroundControl.Airmap.qmldir @@ -0,0 +1,4 @@ +Module QGroundControl.Airmap + +AirspaceControl 1.0 AirspaceControl.qml +AirspaceRegulation 1.0 AirspaceRegulation.qml diff --git a/src/Airmap/dummy/airmap_dummy.qrc b/src/Airmap/dummy/airmap_dummy.qrc new file mode 100644 index 0000000000000000000000000000000000000000..173e9aa06668e5f3de41d74a32425034dc0a39a6 --- /dev/null +++ b/src/Airmap/dummy/airmap_dummy.qrc @@ -0,0 +1,7 @@ + + + QGroundControl.Airmap.qmldir + AirspaceControl.qml + AirspaceRegulation.qml + + diff --git a/src/PlanView/PlanView.qml b/src/PlanView/PlanView.qml index e19564ea8c7f2e9b19dfea768bed30f9efc2530f..49da675e43fc5470654e8a052f9ace019bcabad3 100644 --- a/src/PlanView/PlanView.qml +++ b/src/PlanView/PlanView.qml @@ -96,9 +96,13 @@ QGCView { } on_EnableAirMapChanged: { - if(_enableAirMap) { - planControlColapsed = true - airspaceControl.colapsed = false + if(QGroundControl.airmapSupported) { + if(_enableAirMap) { + planControlColapsed = true + airspaceControl.colapsed = false + } else { + planControlColapsed = false + } } else { planControlColapsed = false } @@ -565,14 +569,16 @@ QGCView { width: height height: ScreenTools.defaultFontPixelWidth * 2.5 sourceSize.height: height - source: "qrc:/airmap/expand.svg" + source: QGroundControl.airmapSupported ? "qrc:/airmap/expand.svg" : "" color: "white" + visible: QGroundControl.airmapSupported anchors.right: parent.right anchors.rightMargin: ScreenTools.defaultFontPixelWidth anchors.verticalCenter: parent.verticalCenter } MouseArea { anchors.fill: parent + enabled: QGroundControl.airmapSupported onClicked: { airspaceControl.colapsed = true planControlColapsed = false