Commit a5e8264b authored by Gus Grubba's avatar Gus Grubba

Make it possible to have a build without Airmap

parent f55279d9
......@@ -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
}
#-------------------------------------------------------------------------------------
......
Module QGroundControl.Airmap
Module
QGroundControl.Airmap
AirspaceControl 1.0 AirspaceControl.qml
AirspaceRegulation 1.0 AirspaceRegulation.qml
import QtQuick 2.3
Item {
property bool colapsed: true
property bool showColapse: false
}
Module QGroundControl.Airmap
AirspaceControl 1.0 AirspaceControl.qml
AirspaceRegulation 1.0 AirspaceRegulation.qml
<RCC>
<qresource prefix="/qml">
<file alias="QGroundControl/Airmap/qmldir">QGroundControl.Airmap.qmldir</file>
<file alias="QGroundControl/Airmap/AirspaceControl.qml">AirspaceControl.qml</file>
<file alias="QGroundControl/Airmap/AirspaceRegulation.qml">AirspaceRegulation.qml</file>
</qresource>
</RCC>
......@@ -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
......
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