Commit ac99b3fe authored by Gus Grubba's avatar Gus Grubba

Enable/Disable Offline maps import/export.

parent d5440994
......@@ -955,7 +955,7 @@ QGCView {
QGCButton {
text: qsTr("Import")
width: _buttonSize
visible: !ScreenTools.isMobile
visible: QGroundControl.corePlugin.options.showOfflineMapImport
onClicked: {
QGroundControl.mapEngineManager.importAction = QGCMapEngineManager.ActionNone
rootLoader.sourceComponent = importDialog
......@@ -964,7 +964,7 @@ QGCView {
QGCButton {
text: qsTr("Export")
width: _buttonSize
visible: !ScreenTools.isMobile
visible: QGroundControl.corePlugin.options.showOfflineMapExport
enabled: QGroundControl.mapEngineManager.tileSets.count > 1
onClicked: showExport()
}
......
......@@ -42,6 +42,8 @@ public:
Q_PROPERTY(bool guidedBarShowOrbit READ guidedBarShowOrbit NOTIFY guidedBarShowOrbitChanged)
Q_PROPERTY(bool missionWaypointsOnly READ missionWaypointsOnly NOTIFY missionWaypointsOnlyChanged)
Q_PROPERTY(bool multiVehicleEnabled READ multiVehicleEnabled NOTIFY multiVehicleEnabledChanged)
Q_PROPERTY(bool showOfflineMapExport READ showOfflineMapExport NOTIFY showOfflineMapExportChanged)
Q_PROPERTY(bool showOfflineMapImport READ showOfflineMapImport NOTIFY showOfflineMapImportChanged)
/// Should QGC hide its settings menu and colapse it into one single menu (Settings and Vehicle Setup)?
/// @return true if QGC should consolidate both menus into one.
......@@ -75,6 +77,14 @@ public:
virtual bool missionWaypointsOnly () const { return false; } ///< true: Only allow waypoints and complex items in Plan
virtual bool multiVehicleEnabled () const { return true; } ///< false: multi vehicle support is disabled
#if defined(__mobile__)
virtual bool showOfflineMapExport () const { return false; }
virtual bool showOfflineMapImport () const { return false; }
#else
virtual bool showOfflineMapExport () const { return true; }
virtual bool showOfflineMapImport () const { return true; }
#endif
/// If returned QString in non-empty it means that firmware upgrade will run in a mode which only
/// supports downloading a single firmware file from the URL. It also supports custom install through
/// the Advanced options.
......@@ -91,6 +101,8 @@ signals:
void guidedBarShowOrbitChanged (bool show);
void missionWaypointsOnlyChanged (bool missionWaypointsOnly);
void multiVehicleEnabledChanged (bool multiVehicleEnabled);
void showOfflineMapExportChanged ();
void showOfflineMapImportChanged ();
private:
CustomInstrumentWidget* _defaultInstrumentWidget;
......
......@@ -294,7 +294,8 @@ QGCView {
//-----------------------------------------------------------------
//-- Battery talker
Row {
spacing: ScreenTools.defaultFontPixelWidth
spacing: ScreenTools.defaultFontPixelWidth
visible: QGroundControl.settingsManager.appSettings.batteryPercentRemainingAnnounce.visible
QGCCheckBox {
id: announcePercentCheckbox
text: qsTr("Announce battery lower than:")
......
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