|
|
@ -7,11 +7,11 @@ |
|
|
|
* |
|
|
|
* |
|
|
|
****************************************************************************/ |
|
|
|
****************************************************************************/ |
|
|
|
|
|
|
|
|
|
|
|
import QtQuick 2.3 |
|
|
|
import QtQuick 2.11 |
|
|
|
import QtQuick.Controls 1.2 |
|
|
|
import QtQuick.Controls 2.4 |
|
|
|
import QtQuick.Controls.Styles 1.4 |
|
|
|
import QtQuick.Layouts 1.11 |
|
|
|
import QtQuick.Dialogs 1.3 |
|
|
|
import QtQuick.Dialogs 1.3 |
|
|
|
import QtQuick.Layouts 1.2 |
|
|
|
import QtQuick.Controls.Styles 1.4 |
|
|
|
import QtLocation 5.3 |
|
|
|
import QtLocation 5.3 |
|
|
|
import QtPositioning 5.3 |
|
|
|
import QtPositioning 5.3 |
|
|
|
|
|
|
|
|
|
|
@ -33,10 +33,10 @@ Item { |
|
|
|
property string mapKey: "lastMapType" |
|
|
|
property string mapKey: "lastMapType" |
|
|
|
|
|
|
|
|
|
|
|
property var _settingsManager: QGroundControl.settingsManager |
|
|
|
property var _settingsManager: QGroundControl.settingsManager |
|
|
|
property var _settings: _settingsManager.offlineMapsSettings |
|
|
|
property var _settings: _settingsManager ? _settingsManager.offlineMapsSettings : null |
|
|
|
property var _fmSettings: _settingsManager.flightMapSettings |
|
|
|
property var _fmSettings: _settingsManager ? _settingsManager.flightMapSettings : null |
|
|
|
property Fact _mapboxFact: _settingsManager.appSettings.mapboxToken |
|
|
|
property Fact _mapboxFact: _settingsManager ? _settingsManager.appSettings.mapboxToken : null |
|
|
|
property Fact _esriFact: _settingsManager.appSettings.esriToken |
|
|
|
property Fact _esriFact: _settingsManager ? _settingsManager.appSettings.esriToken : null |
|
|
|
|
|
|
|
|
|
|
|
property string mapType: _fmSettings.mapProvider.enumStringValue + " " + _fmSettings.mapType.enumStringValue |
|
|
|
property string mapType: _fmSettings.mapProvider.enumStringValue + " " + _fmSettings.mapType.enumStringValue |
|
|
|
property bool isMapInteractive: false |
|
|
|
property bool isMapInteractive: false |
|
|
@ -79,8 +79,6 @@ Item { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExclusiveGroup { id: setGroup } |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function handleChanges() { |
|
|
|
function handleChanges() { |
|
|
|
if(isMapInteractive) { |
|
|
|
if(isMapInteractive) { |
|
|
|
var xl = 0 |
|
|
|
var xl = 0 |
|
|
@ -203,10 +201,6 @@ Item { |
|
|
|
_map.zoomLevel = QGroundControl.flightMapZoom |
|
|
|
_map.zoomLevel = QGroundControl.flightMapZoom |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExclusiveGroup { |
|
|
|
|
|
|
|
id: _dropButtonsExclusiveGroup |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
onMapTypeChanged: { |
|
|
|
onMapTypeChanged: { |
|
|
|
updateMap() |
|
|
|
updateMap() |
|
|
|
if(isMapInteractive) { |
|
|
|
if(isMapInteractive) { |
|
|
@ -222,7 +216,7 @@ Item { |
|
|
|
|
|
|
|
|
|
|
|
onAcceptedForSave: { |
|
|
|
onAcceptedForSave: { |
|
|
|
if (QGroundControl.mapEngineManager.exportSets(file)) { |
|
|
|
if (QGroundControl.mapEngineManager.exportSets(file)) { |
|
|
|
rootLoader.sourceComponent = exportToDiskProgress |
|
|
|
exportToDiskProgress.open() |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
showList() |
|
|
|
showList() |
|
|
|
} |
|
|
|
} |
|
|
@ -754,9 +748,6 @@ Item { |
|
|
|
model: QGroundControl.mapEngineManager.mapList |
|
|
|
model: QGroundControl.mapEngineManager.mapList |
|
|
|
onActivated: { |
|
|
|
onActivated: { |
|
|
|
mapType = textAt(index) |
|
|
|
mapType = textAt(index) |
|
|
|
if(_dropButtonsExclusiveGroup.current) |
|
|
|
|
|
|
|
_dropButtonsExclusiveGroup.current.checked = false |
|
|
|
|
|
|
|
_dropButtonsExclusiveGroup.current = null |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
Component.onCompleted: { |
|
|
|
Component.onCompleted: { |
|
|
|
var index = mapCombo.find(mapType) |
|
|
|
var index = mapCombo.find(mapType) |
|
|
@ -806,18 +797,15 @@ Item { |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.right: parent.right |
|
|
|
anchors.right: parent.right |
|
|
|
height: sliderTouchArea * 1.25 |
|
|
|
height: sliderTouchArea * 1.25 |
|
|
|
minimumValue: minZoomLevel |
|
|
|
from: minZoomLevel |
|
|
|
maximumValue: maxZoomLevel |
|
|
|
to: maxZoomLevel |
|
|
|
stepSize: 1 |
|
|
|
stepSize: 1 |
|
|
|
updateValueWhileDragging: true |
|
|
|
live: true |
|
|
|
|
|
|
|
|
|
|
|
property bool _updateSetting: false |
|
|
|
property bool _updateSetting: false |
|
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: { |
|
|
|
Component.onCompleted: { |
|
|
|
sliderMinZoom.value = _settings.minZoomLevelDownload.rawValue |
|
|
|
sliderMinZoom.value = _settings.minZoomLevelDownload.rawValue |
|
|
|
_updateSetting = true |
|
|
|
_updateSetting = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onValueChanged: { |
|
|
|
onValueChanged: { |
|
|
|
if(sliderMinZoom.value > sliderMaxZoom.value) { |
|
|
|
if(sliderMinZoom.value > sliderMaxZoom.value) { |
|
|
|
sliderMaxZoom.value = sliderMinZoom.value |
|
|
|
sliderMaxZoom.value = sliderMinZoom.value |
|
|
@ -828,21 +816,15 @@ Item { |
|
|
|
} |
|
|
|
} |
|
|
|
handleChanges() |
|
|
|
handleChanges() |
|
|
|
} |
|
|
|
} |
|
|
|
style: SliderStyle { |
|
|
|
|
|
|
|
groove: Rectangle { |
|
|
|
|
|
|
|
implicitWidth: sliderMinZoom.width |
|
|
|
|
|
|
|
implicitHeight: 4 |
|
|
|
|
|
|
|
color: qgcPal.colorBlue |
|
|
|
|
|
|
|
radius: 4 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
handle: Rectangle { |
|
|
|
handle: Rectangle { |
|
|
|
anchors.centerIn: parent |
|
|
|
x: sliderMinZoom.leftPadding + sliderMinZoom.visualPosition * (sliderMinZoom.availableWidth - width) |
|
|
|
color: qgcPal.button |
|
|
|
y: sliderMinZoom.topPadding + sliderMinZoom.availableHeight * 0.5 - height * 0.5 |
|
|
|
border.color: qgcPal.buttonText |
|
|
|
|
|
|
|
border.width: 1 |
|
|
|
|
|
|
|
implicitWidth: sliderTouchArea |
|
|
|
implicitWidth: sliderTouchArea |
|
|
|
implicitHeight: sliderTouchArea |
|
|
|
implicitHeight: sliderTouchArea |
|
|
|
radius: sliderTouchArea * 0.5 |
|
|
|
radius: sliderTouchArea * 0.5 |
|
|
|
|
|
|
|
color: qgcPal.button |
|
|
|
|
|
|
|
border.width: 1 |
|
|
|
|
|
|
|
border.color: qgcPal.buttonText |
|
|
|
Label { |
|
|
|
Label { |
|
|
|
text: sliderMinZoom.value |
|
|
|
text: sliderMinZoom.value |
|
|
|
anchors.centerIn: parent |
|
|
|
anchors.centerIn: parent |
|
|
@ -851,7 +833,6 @@ Item { |
|
|
|
color: qgcPal.buttonText |
|
|
|
color: qgcPal.buttonText |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} // Slider - min zoom |
|
|
|
} // Slider - min zoom |
|
|
|
|
|
|
|
|
|
|
|
Slider { |
|
|
|
Slider { |
|
|
@ -859,18 +840,15 @@ Item { |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.right: parent.right |
|
|
|
anchors.right: parent.right |
|
|
|
height: sliderTouchArea * 1.25 |
|
|
|
height: sliderTouchArea * 1.25 |
|
|
|
minimumValue: minZoomLevel |
|
|
|
from: minZoomLevel |
|
|
|
maximumValue: maxZoomLevel |
|
|
|
to: maxZoomLevel |
|
|
|
stepSize: 1 |
|
|
|
stepSize: 1 |
|
|
|
updateValueWhileDragging: true |
|
|
|
live: true |
|
|
|
|
|
|
|
|
|
|
|
property bool _updateSetting: false |
|
|
|
property bool _updateSetting: false |
|
|
|
|
|
|
|
|
|
|
|
Component.onCompleted: { |
|
|
|
Component.onCompleted: { |
|
|
|
sliderMaxZoom.value = _settings.maxZoomLevelDownload.rawValue |
|
|
|
sliderMaxZoom.value = _settings.maxZoomLevelDownload.rawValue |
|
|
|
_updateSetting = true |
|
|
|
_updateSetting = true |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
onValueChanged: { |
|
|
|
onValueChanged: { |
|
|
|
if(sliderMaxZoom.value < sliderMinZoom.value) { |
|
|
|
if(sliderMaxZoom.value < sliderMinZoom.value) { |
|
|
|
sliderMinZoom.value = sliderMaxZoom.value |
|
|
|
sliderMinZoom.value = sliderMaxZoom.value |
|
|
@ -881,21 +859,15 @@ Item { |
|
|
|
} |
|
|
|
} |
|
|
|
handleChanges() |
|
|
|
handleChanges() |
|
|
|
} |
|
|
|
} |
|
|
|
style: SliderStyle { |
|
|
|
|
|
|
|
groove: Rectangle { |
|
|
|
|
|
|
|
implicitWidth: sliderMaxZoom.width |
|
|
|
|
|
|
|
implicitHeight: 4 |
|
|
|
|
|
|
|
color: qgcPal.colorBlue |
|
|
|
|
|
|
|
radius: 4 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
handle: Rectangle { |
|
|
|
handle: Rectangle { |
|
|
|
anchors.centerIn: parent |
|
|
|
x: sliderMaxZoom.leftPadding + sliderMaxZoom.visualPosition * (sliderMaxZoom.availableWidth - width) |
|
|
|
color: qgcPal.button |
|
|
|
y: sliderMaxZoom.topPadding + sliderMaxZoom.availableHeight * 0.5 - height * 0.5 |
|
|
|
border.color: qgcPal.buttonText |
|
|
|
|
|
|
|
border.width: 1 |
|
|
|
|
|
|
|
implicitWidth: sliderTouchArea |
|
|
|
implicitWidth: sliderTouchArea |
|
|
|
implicitHeight: sliderTouchArea |
|
|
|
implicitHeight: sliderTouchArea |
|
|
|
radius: sliderTouchArea * 0.5 |
|
|
|
radius: sliderTouchArea * 0.5 |
|
|
|
|
|
|
|
color: qgcPal.button |
|
|
|
|
|
|
|
border.width: 1 |
|
|
|
|
|
|
|
border.color: qgcPal.buttonText |
|
|
|
Label { |
|
|
|
Label { |
|
|
|
text: sliderMaxZoom.value |
|
|
|
text: sliderMaxZoom.value |
|
|
|
anchors.centerIn: parent |
|
|
|
anchors.centerIn: parent |
|
|
@ -904,7 +876,6 @@ Item { |
|
|
|
color: qgcPal.buttonText |
|
|
|
color: qgcPal.buttonText |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} // Slider - max zoom |
|
|
|
} // Slider - max zoom |
|
|
|
|
|
|
|
|
|
|
|
GridLayout { |
|
|
|
GridLayout { |
|
|
@ -977,22 +948,24 @@ Item { |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.left: parent.left |
|
|
|
anchors.right: parent.right |
|
|
|
anchors.right: parent.right |
|
|
|
contentHeight: _cacheList.height |
|
|
|
contentHeight: _cacheList.height |
|
|
|
|
|
|
|
ButtonGroup { |
|
|
|
|
|
|
|
id: buttonGroup |
|
|
|
|
|
|
|
buttons: _cacheList.children |
|
|
|
|
|
|
|
} |
|
|
|
Column { |
|
|
|
Column { |
|
|
|
id: _cacheList |
|
|
|
id: _cacheList |
|
|
|
width: Math.min(_tileSetList.width, (ScreenTools.defaultFontPixelWidth * 50).toFixed(0)) |
|
|
|
width: Math.min(_tileSetList.width, (ScreenTools.defaultFontPixelWidth * 50).toFixed(0)) |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
ExclusiveGroup { id: selectionGroup } |
|
|
|
|
|
|
|
OfflineMapButton { |
|
|
|
OfflineMapButton { |
|
|
|
id: firstButton |
|
|
|
id: firstButton |
|
|
|
text: qsTr("Add New Set") |
|
|
|
text: qsTr("Add New Set") |
|
|
|
width: _cacheList.width |
|
|
|
width: _cacheList.width |
|
|
|
height: ScreenTools.defaultFontPixelHeight * (ScreenTools.isMobile ? 3 : 2) |
|
|
|
height: ScreenTools.defaultFontPixelHeight * (ScreenTools.isMobile ? 3 : 2) |
|
|
|
currentSet: _currentSelection |
|
|
|
currentSet: _currentSelection |
|
|
|
exclusiveGroup: selectionGroup |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
offlineMapView._currentSelection = null |
|
|
|
offlineMapView._currentSelection = null |
|
|
|
|
|
|
|
checked = true |
|
|
|
addNewSet() |
|
|
|
addNewSet() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1005,11 +978,11 @@ Item { |
|
|
|
complete: object.complete |
|
|
|
complete: object.complete |
|
|
|
width: firstButton.width |
|
|
|
width: firstButton.width |
|
|
|
height: ScreenTools.defaultFontPixelHeight * (ScreenTools.isMobile ? 3 : 2) |
|
|
|
height: ScreenTools.defaultFontPixelHeight * (ScreenTools.isMobile ? 3 : 2) |
|
|
|
exclusiveGroup: selectionGroup |
|
|
|
|
|
|
|
currentSet: _currentSelection |
|
|
|
currentSet: _currentSelection |
|
|
|
tileSet: object |
|
|
|
tileSet: object |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
offlineMapView._currentSelection = object |
|
|
|
offlineMapView._currentSelection = object |
|
|
|
|
|
|
|
checked = true |
|
|
|
showInfo() |
|
|
|
showInfo() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -1029,7 +1002,7 @@ Item { |
|
|
|
visible: QGroundControl.corePlugin.options.showOfflineMapImport |
|
|
|
visible: QGroundControl.corePlugin.options.showOfflineMapImport |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
QGroundControl.mapEngineManager.importAction = QGCMapEngineManager.ActionNone |
|
|
|
QGroundControl.mapEngineManager.importAction = QGCMapEngineManager.ActionNone |
|
|
|
rootLoader.sourceComponent = importDialog |
|
|
|
importDialog.open() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
QGCButton { |
|
|
|
QGCButton { |
|
|
@ -1118,20 +1091,22 @@ Item { |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
Popup { |
|
|
|
id: exportToDiskProgress |
|
|
|
id: exportToDiskProgress |
|
|
|
Rectangle { |
|
|
|
width: mainWindow.width * 0.666 |
|
|
|
width: mainWindow.width |
|
|
|
height: mainWindow.height * 0.333 |
|
|
|
height: mainWindow.height |
|
|
|
modal: true |
|
|
|
color: "black" |
|
|
|
focus: true |
|
|
|
anchors.centerIn: parent |
|
|
|
parent: Overlay.overlay |
|
|
|
Rectangle { |
|
|
|
x: Math.round((mainWindow.width - width) * 0.5) |
|
|
|
width: parent.width * 0.5 |
|
|
|
y: Math.round((mainWindow.height - height) * 0.5) |
|
|
|
height: exportCol.height * 1.25 |
|
|
|
closePolicy: Popup.NoAutoClose |
|
|
|
radius: ScreenTools.defaultFontPixelWidth |
|
|
|
background: Rectangle { |
|
|
|
|
|
|
|
anchors.fill: parent |
|
|
|
color: qgcPal.windowShadeDark |
|
|
|
color: qgcPal.windowShadeDark |
|
|
|
border.color: qgcPal.text |
|
|
|
border.color: qgcPal.text |
|
|
|
anchors.centerIn: parent |
|
|
|
radius: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
} |
|
|
|
Column { |
|
|
|
Column { |
|
|
|
id: exportCol |
|
|
|
id: exportCol |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
@ -1144,9 +1119,9 @@ Item { |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
} |
|
|
|
} |
|
|
|
ProgressBar { |
|
|
|
ProgressBar { |
|
|
|
id: progressBar |
|
|
|
|
|
|
|
width: parent.width * 0.45 |
|
|
|
width: parent.width * 0.45 |
|
|
|
maximumValue: 100 |
|
|
|
from: 0 |
|
|
|
|
|
|
|
to: 100 |
|
|
|
value: QGroundControl.mapEngineManager.actionProgress |
|
|
|
value: QGroundControl.mapEngineManager.actionProgress |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
} |
|
|
|
} |
|
|
@ -1164,28 +1139,28 @@ Item { |
|
|
|
visible: !QGroundControl.mapEngineManager.exporting |
|
|
|
visible: !QGroundControl.mapEngineManager.exporting |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
rootLoader.sourceComponent = null |
|
|
|
exportToDiskProgress.close() |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
Component { |
|
|
|
Popup { |
|
|
|
id: importDialog |
|
|
|
id: importDialog |
|
|
|
Rectangle { |
|
|
|
width: mainWindow.width * 0.666 |
|
|
|
width: mainWindow.width |
|
|
|
|
|
|
|
height: mainWindow.height |
|
|
|
|
|
|
|
color: "black" |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
|
|
|
width: parent.width * 0.5 |
|
|
|
|
|
|
|
height: importCol.height * 1.5 |
|
|
|
height: importCol.height * 1.5 |
|
|
|
radius: ScreenTools.defaultFontPixelWidth |
|
|
|
modal: true |
|
|
|
|
|
|
|
focus: true |
|
|
|
|
|
|
|
parent: Overlay.overlay |
|
|
|
|
|
|
|
x: Math.round((mainWindow.width - width) * 0.5) |
|
|
|
|
|
|
|
y: Math.round((mainWindow.height - height) * 0.5) |
|
|
|
|
|
|
|
closePolicy: Popup.NoAutoClose |
|
|
|
|
|
|
|
background: Rectangle { |
|
|
|
|
|
|
|
anchors.fill: parent |
|
|
|
color: qgcPal.windowShadeDark |
|
|
|
color: qgcPal.windowShadeDark |
|
|
|
border.color: qgcPal.text |
|
|
|
border.color: qgcPal.text |
|
|
|
anchors.centerIn: parent |
|
|
|
radius: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
} |
|
|
|
Column { |
|
|
|
Column { |
|
|
|
id: importCol |
|
|
|
id: importCol |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
@ -1206,9 +1181,9 @@ Item { |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
} |
|
|
|
} |
|
|
|
ProgressBar { |
|
|
|
ProgressBar { |
|
|
|
id: progressBar |
|
|
|
|
|
|
|
width: parent.width * 0.45 |
|
|
|
width: parent.width * 0.45 |
|
|
|
maximumValue: 100 |
|
|
|
from: 0 |
|
|
|
|
|
|
|
to: 100 |
|
|
|
visible: QGroundControl.mapEngineManager.importAction === QGCMapEngineManager.ActionImporting |
|
|
|
visible: QGroundControl.mapEngineManager.importAction === QGCMapEngineManager.ActionImporting |
|
|
|
value: QGroundControl.mapEngineManager.actionProgress |
|
|
|
value: QGroundControl.mapEngineManager.actionProgress |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
@ -1220,20 +1195,21 @@ Item { |
|
|
|
height: width |
|
|
|
height: width |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
} |
|
|
|
} |
|
|
|
ExclusiveGroup { id: radioGroup } |
|
|
|
ButtonGroup { |
|
|
|
|
|
|
|
buttons: mapSetButtons.children |
|
|
|
|
|
|
|
} |
|
|
|
Column { |
|
|
|
Column { |
|
|
|
|
|
|
|
id: mapSetButtons |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 24 |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 24 |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
QGCRadioButton { |
|
|
|
QGCRadioButton { |
|
|
|
exclusiveGroup: radioGroup |
|
|
|
|
|
|
|
text: qsTr("Append to existing set") |
|
|
|
text: qsTr("Append to existing set") |
|
|
|
checked: !QGroundControl.mapEngineManager.importReplace |
|
|
|
checked: !QGroundControl.mapEngineManager.importReplace |
|
|
|
onClicked: QGroundControl.mapEngineManager.importReplace = !checked |
|
|
|
onClicked: QGroundControl.mapEngineManager.importReplace = !checked |
|
|
|
visible: QGroundControl.mapEngineManager.importAction === QGCMapEngineManager.ActionNone |
|
|
|
visible: QGroundControl.mapEngineManager.importAction === QGCMapEngineManager.ActionNone |
|
|
|
} |
|
|
|
} |
|
|
|
QGCRadioButton { |
|
|
|
QGCRadioButton { |
|
|
|
exclusiveGroup: radioGroup |
|
|
|
|
|
|
|
text: qsTr("Replace existing set") |
|
|
|
text: qsTr("Replace existing set") |
|
|
|
checked: QGroundControl.mapEngineManager.importReplace |
|
|
|
checked: QGroundControl.mapEngineManager.importReplace |
|
|
|
onClicked: QGroundControl.mapEngineManager.importReplace = checked |
|
|
|
onClicked: QGroundControl.mapEngineManager.importReplace = checked |
|
|
@ -1247,7 +1223,7 @@ Item { |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
showList(); |
|
|
|
showList(); |
|
|
|
rootLoader.sourceComponent = null |
|
|
|
importDialog.close() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Row { |
|
|
|
Row { |
|
|
@ -1258,7 +1234,7 @@ Item { |
|
|
|
text: qsTr("Import") |
|
|
|
text: qsTr("Import") |
|
|
|
width: _bigButtonSize * 1.25 |
|
|
|
width: _bigButtonSize * 1.25 |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
rootLoader.sourceComponent = null |
|
|
|
importDialog.close() |
|
|
|
fileDialog.title = qsTr("Import Tile Set") |
|
|
|
fileDialog.title = qsTr("Import Tile Set") |
|
|
|
fileDialog.selectExisting = true |
|
|
|
fileDialog.selectExisting = true |
|
|
|
fileDialog.openForLoad() |
|
|
|
fileDialog.openForLoad() |
|
|
@ -1269,9 +1245,7 @@ Item { |
|
|
|
width: _bigButtonSize * 1.25 |
|
|
|
width: _bigButtonSize * 1.25 |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
showList(); |
|
|
|
showList(); |
|
|
|
rootLoader.sourceComponent = null |
|
|
|
importDialog.close() |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|