|
|
@ -611,171 +611,178 @@ Rectangle { |
|
|
|
anchors.bottom: parent.bottom |
|
|
|
anchors.bottom: parent.bottom |
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth |
|
|
|
visible: false |
|
|
|
visible: false |
|
|
|
|
|
|
|
QGCFlickable { |
|
|
|
Column { |
|
|
|
id: infoScroll |
|
|
|
width: parent.width |
|
|
|
anchors.fill: parent |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
contentHeight: infoColumn.height |
|
|
|
Item { |
|
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
|
height: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
clip: true |
|
|
|
width: 1 |
|
|
|
Column { |
|
|
|
} |
|
|
|
id: infoColumn |
|
|
|
Rectangle { |
|
|
|
width: parent.width |
|
|
|
width: infoWidth |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
height: nameLabel.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
Item { |
|
|
|
color: __qgcPal.window |
|
|
|
height: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
width: 1 |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
id: nameLabel |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.name : "" |
|
|
|
|
|
|
|
font.pixelSize: ScreenTools.isAndroid ? ScreenTools.mediumFontPixelSize : ScreenTools.largeFontPixelSize |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Rectangle { |
|
|
|
QGCLabel { |
|
|
|
width: infoWidth |
|
|
|
id: descLabel |
|
|
|
height: nameLabel.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.description : "" |
|
|
|
color: __qgcPal.window |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
} |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
Rectangle { |
|
|
|
|
|
|
|
id: infoRect |
|
|
|
|
|
|
|
width: infoWidth |
|
|
|
|
|
|
|
height: infoGrid.height + (ScreenTools.defaultFontPixelHeight * 4) |
|
|
|
|
|
|
|
color: __qgcPal.window |
|
|
|
|
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
GridLayout { |
|
|
|
|
|
|
|
id: infoGrid |
|
|
|
|
|
|
|
columns: 2 |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
|
|
|
|
rowSpacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
columnSpacing: ScreenTools.defaultFontPixelHeight * 2 |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Map Type:" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.mapTypeStr : "" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Min Zoom:" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.minZoom : "" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Max Zoom:" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.maxZoom : "" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: isDefaultSet ? "Default Set Size:" : "Total Size:" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.tilesSizeStr : "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: isDefaultSet ? "Default Set Tile Count:" : "Total Tile Count:" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.numTilesStr : "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: isDefaultSet ? "Total Size (All Sets):" : "Downloaded Size:" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.savedSizeStr : "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: isDefaultSet ? "Total Count (All Sets):" : "Downloaded Count:" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.savedTilesStr : "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Error Count:" |
|
|
|
|
|
|
|
visible: !isDefaultSet && _offlineMapRoot._currentSelection && !_offlineMapRoot._currentSelection.complete |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
QGCLabel { |
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.errorCountStr : "" |
|
|
|
id: nameLabel |
|
|
|
visible: !isDefaultSet && _offlineMapRoot._currentSelection && !_offlineMapRoot._currentSelection.complete |
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.name : "" |
|
|
|
|
|
|
|
font.pixelSize: ScreenTools.isAndroid ? ScreenTools.mediumFontPixelSize : ScreenTools.largeFontPixelSize |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
QGCLabel { |
|
|
|
Item { |
|
|
|
id: descLabel |
|
|
|
height: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.description : "" |
|
|
|
width: 1 |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
} |
|
|
|
} |
|
|
|
Row { |
|
|
|
Rectangle { |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
id: infoRect |
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
width: infoWidth |
|
|
|
QGCButton { |
|
|
|
height: infoGrid.height + (ScreenTools.defaultFontPixelHeight * 4) |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
color: __qgcPal.window |
|
|
|
text: "Delete" |
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
enabled: _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.deleting) |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
onClicked: { |
|
|
|
GridLayout { |
|
|
|
if(_offlineMapRoot._currentSelection) |
|
|
|
id: infoGrid |
|
|
|
deleteDialog.visible = true |
|
|
|
columns: 2 |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
|
|
|
|
rowSpacing: ScreenTools.defaultFontPixelWidth |
|
|
|
|
|
|
|
columnSpacing: ScreenTools.defaultFontPixelHeight * 2 |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Map Type:" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.mapTypeStr : "" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Min Zoom:" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.minZoom : "" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Max Zoom:" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.maxZoom : "" |
|
|
|
|
|
|
|
visible: !isDefaultSet |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: isDefaultSet ? "Default Set Size:" : "Total Size:" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.tilesSizeStr : "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: isDefaultSet ? "Default Set Tile Count:" : "Total Tile Count:" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.numTilesStr : "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: isDefaultSet ? "Total Size (All Sets):" : "Downloaded Size:" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.savedSizeStr : "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: isDefaultSet ? "Total Count (All Sets):" : "Downloaded Count:" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.savedTilesStr : "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Error Count:" |
|
|
|
|
|
|
|
visible: !isDefaultSet && _offlineMapRoot._currentSelection && !_offlineMapRoot._currentSelection.complete |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: _offlineMapRoot._currentSelection ? _offlineMapRoot._currentSelection.errorCountStr : "" |
|
|
|
|
|
|
|
visible: !isDefaultSet && _offlineMapRoot._currentSelection && !_offlineMapRoot._currentSelection.complete |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
MessageDialog { |
|
|
|
} |
|
|
|
id: deleteDialog |
|
|
|
Item { |
|
|
|
visible: false |
|
|
|
height: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
icon: StandardIcon.Warning |
|
|
|
width: 1 |
|
|
|
standardButtons: StandardButton.Yes | StandardButton.No |
|
|
|
} |
|
|
|
title: "Delete Tile Set" |
|
|
|
Row { |
|
|
|
text: { |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
if(_offlineMapRoot._currentSelection) { |
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
var blurb = "Delete " + _offlineMapRoot._currentSelection.name + " and all its tiles.\nIs this really what you want?" |
|
|
|
QGCButton { |
|
|
|
if(_offlineMapRoot._currentSelection.defaultSet) |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
return blurb + "\nNote that deleteting the Default Set deletes all tiles from all sets." |
|
|
|
text: "Delete" |
|
|
|
else |
|
|
|
enabled: _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.deleting) |
|
|
|
return blurb |
|
|
|
onClicked: { |
|
|
|
|
|
|
|
if(_offlineMapRoot._currentSelection) |
|
|
|
|
|
|
|
deleteDialog.visible = true |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
MessageDialog { |
|
|
|
|
|
|
|
id: deleteDialog |
|
|
|
|
|
|
|
visible: false |
|
|
|
|
|
|
|
icon: StandardIcon.Warning |
|
|
|
|
|
|
|
standardButtons: StandardButton.Yes | StandardButton.No |
|
|
|
|
|
|
|
title: "Delete Tile Set" |
|
|
|
|
|
|
|
text: { |
|
|
|
|
|
|
|
if(_offlineMapRoot._currentSelection) { |
|
|
|
|
|
|
|
var blurb = "Delete " + _offlineMapRoot._currentSelection.name + " and all its tiles.\nIs this really what you want?" |
|
|
|
|
|
|
|
if(_offlineMapRoot._currentSelection.defaultSet) |
|
|
|
|
|
|
|
return blurb + "\nNote that deleteting the Default Set deletes all tiles from all sets." |
|
|
|
|
|
|
|
else |
|
|
|
|
|
|
|
return blurb |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return "" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
onYes: { |
|
|
|
|
|
|
|
if(_offlineMapRoot._currentSelection) |
|
|
|
|
|
|
|
QGroundControl.mapEngineManager.deleteTileSet(_offlineMapRoot._currentSelection) |
|
|
|
|
|
|
|
deleteDialog.visible = false |
|
|
|
|
|
|
|
showList() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
onNo: { |
|
|
|
|
|
|
|
deleteDialog.visible = false |
|
|
|
} |
|
|
|
} |
|
|
|
return "" |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
onYes: { |
|
|
|
} |
|
|
|
|
|
|
|
QGCButton { |
|
|
|
|
|
|
|
text: "Resume Download" |
|
|
|
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
|
|
|
|
enabled: _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.deleting && !_offlineMapRoot._currentSelection.downloading) |
|
|
|
|
|
|
|
visible: !isDefaultSet && _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.complete && !_offlineMapRoot._currentSelection.downloading) |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
if(_offlineMapRoot._currentSelection) |
|
|
|
if(_offlineMapRoot._currentSelection) |
|
|
|
QGroundControl.mapEngineManager.deleteTileSet(_offlineMapRoot._currentSelection) |
|
|
|
_offlineMapRoot._currentSelection.resumeDownloadTask() |
|
|
|
deleteDialog.visible = false |
|
|
|
|
|
|
|
showList() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
onNo: { |
|
|
|
|
|
|
|
deleteDialog.visible = false |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
QGCButton { |
|
|
|
QGCButton { |
|
|
|
text: "Cancel Download" |
|
|
|
text: "Resume Download" |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
enabled: _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.deleting && _offlineMapRoot._currentSelection.downloading) |
|
|
|
enabled: _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.deleting && !_offlineMapRoot._currentSelection.downloading) |
|
|
|
visible: !isDefaultSet && _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.complete && _offlineMapRoot._currentSelection.downloading) |
|
|
|
visible: !isDefaultSet && _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.complete && !_offlineMapRoot._currentSelection.downloading) |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
if(_offlineMapRoot._currentSelection) |
|
|
|
if(_offlineMapRoot._currentSelection) |
|
|
|
_offlineMapRoot._currentSelection.cancelDownloadTask() |
|
|
|
_offlineMapRoot._currentSelection.resumeDownloadTask() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
QGCButton { |
|
|
|
QGCButton { |
|
|
|
text: "Back" |
|
|
|
text: "Cancel Download" |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
onClicked: showList() |
|
|
|
enabled: _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.deleting && _offlineMapRoot._currentSelection.downloading) |
|
|
|
|
|
|
|
visible: !isDefaultSet && _offlineMapRoot._currentSelection && (!_offlineMapRoot._currentSelection.complete && _offlineMapRoot._currentSelection.downloading) |
|
|
|
|
|
|
|
onClicked: { |
|
|
|
|
|
|
|
if(_offlineMapRoot._currentSelection) |
|
|
|
|
|
|
|
_offlineMapRoot._currentSelection.cancelDownloadTask() |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
QGCButton { |
|
|
|
|
|
|
|
text: "Back" |
|
|
|
|
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
|
|
|
|
onClicked: showList() |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -794,113 +801,121 @@ Rectangle { |
|
|
|
maxCacheMemSize.text = QGroundControl.mapEngineManager.maxMemCache |
|
|
|
maxCacheMemSize.text = QGroundControl.mapEngineManager.maxMemCache |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Column { |
|
|
|
QGCFlickable { |
|
|
|
width: parent.width |
|
|
|
id: optionsScroll |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
anchors.fill: parent |
|
|
|
Item { |
|
|
|
contentHeight: optionsColumn.height |
|
|
|
height: ScreenTools.defaultFontPixelHeight |
|
|
|
flickableDirection: Flickable.VerticalFlick |
|
|
|
width: 1 |
|
|
|
clip: true |
|
|
|
} |
|
|
|
Column { |
|
|
|
Rectangle { |
|
|
|
id: optionsColumn |
|
|
|
width: infoWidth |
|
|
|
width: parent.width |
|
|
|
height: optionsLabel.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
spacing: ScreenTools.defaultFontPixelHeight |
|
|
|
color: __qgcPal.window |
|
|
|
Item { |
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
height: ScreenTools.defaultFontPixelHeight |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
width: 1 |
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
id: optionsLabel |
|
|
|
|
|
|
|
text: "Offline Map Options" |
|
|
|
|
|
|
|
font.pixelSize: ScreenTools.isAndroid ? ScreenTools.mediumFontPixelSize : ScreenTools.largeFontPixelSize |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Rectangle { |
|
|
|
Rectangle { |
|
|
|
width: infoWidth |
|
|
|
id: optionsRect |
|
|
|
height: optionsLabel.height + (ScreenTools.defaultFontPixelHeight * 2) |
|
|
|
width: optionsGrid.width + (ScreenTools.defaultFontPixelWidth * 4) |
|
|
|
color: __qgcPal.window |
|
|
|
height: optionsGrid.height + (ScreenTools.defaultFontPixelHeight * 4) |
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
color: __qgcPal.window |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
GridLayout { |
|
|
|
|
|
|
|
id: optionsGrid |
|
|
|
|
|
|
|
columns: 2 |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
|
|
|
|
rowSpacing: ScreenTools.defaultFontPixelWidth * 1.5 |
|
|
|
|
|
|
|
columnSpacing: ScreenTools.defaultFontPixelHeight * 2 |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Max Cache Disk Size (MB):" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCTextField { |
|
|
|
|
|
|
|
id: maxCacheSize |
|
|
|
|
|
|
|
maximumLength: 6 |
|
|
|
|
|
|
|
inputMethodHints: Qt.ImhDigitsOnly |
|
|
|
|
|
|
|
validator: IntValidator {bottom: 1; top: 262144;} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
QGCLabel { |
|
|
|
text: "Max Cache Memory Size (MB):" |
|
|
|
id: optionsLabel |
|
|
|
} |
|
|
|
text: "Offline Map Options" |
|
|
|
QGCTextField { |
|
|
|
font.pixelSize: ScreenTools.isAndroid ? ScreenTools.mediumFontPixelSize : ScreenTools.largeFontPixelSize |
|
|
|
id: maxCacheMemSize |
|
|
|
anchors.centerIn: parent |
|
|
|
maximumLength: 4 |
|
|
|
|
|
|
|
inputMethodHints: Qt.ImhDigitsOnly |
|
|
|
|
|
|
|
validator: IntValidator {bottom: 1; top: 4096;} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
Item { |
|
|
|
} |
|
|
|
Layout.columnSpan: 2 |
|
|
|
Rectangle { |
|
|
|
Layout.fillWidth: true |
|
|
|
id: optionsRect |
|
|
|
implicitHeight: ScreenTools.defaultFontPixelHeight * 1.5 |
|
|
|
width: optionsGrid.width + (ScreenTools.defaultFontPixelWidth * 4) |
|
|
|
|
|
|
|
height: optionsGrid.height + (ScreenTools.defaultFontPixelHeight * 4) |
|
|
|
|
|
|
|
color: __qgcPal.window |
|
|
|
|
|
|
|
radius: ScreenTools.defaultFontPixelHeight * 0.5 |
|
|
|
|
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
|
|
|
|
GridLayout { |
|
|
|
|
|
|
|
id: optionsGrid |
|
|
|
|
|
|
|
columns: 2 |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
anchors.margins: ScreenTools.defaultFontPixelWidth * 2 |
|
|
|
|
|
|
|
rowSpacing: ScreenTools.defaultFontPixelWidth * 1.5 |
|
|
|
|
|
|
|
columnSpacing: ScreenTools.defaultFontPixelHeight * 2 |
|
|
|
QGCLabel { |
|
|
|
QGCLabel { |
|
|
|
anchors.centerIn: parent |
|
|
|
text: "Max Cache Disk Size (MB):" |
|
|
|
text: "Memory cache changes require a restart to take effect." |
|
|
|
} |
|
|
|
font.pixelSize: ScreenTools.defaultFontPixelSize * 0.85 |
|
|
|
QGCTextField { |
|
|
|
|
|
|
|
id: maxCacheSize |
|
|
|
|
|
|
|
maximumLength: 6 |
|
|
|
|
|
|
|
inputMethodHints: Qt.ImhDigitsOnly |
|
|
|
|
|
|
|
validator: IntValidator {bottom: 1; top: 262144;} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "Max Cache Memory Size (MB):" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCTextField { |
|
|
|
|
|
|
|
id: maxCacheMemSize |
|
|
|
|
|
|
|
maximumLength: 4 |
|
|
|
|
|
|
|
inputMethodHints: Qt.ImhDigitsOnly |
|
|
|
|
|
|
|
validator: IntValidator {bottom: 1; top: 4096;} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Item { |
|
|
|
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
implicitHeight: ScreenTools.defaultFontPixelHeight * 1.5 |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
text: "Memory cache changes require a restart to take effect." |
|
|
|
|
|
|
|
font.pixelSize: ScreenTools.defaultFontPixelSize * 0.85 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
implicitHeight: 1 |
|
|
|
|
|
|
|
color: __qgcPal.text |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
Rectangle { |
|
|
|
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
implicitHeight: 1 |
|
|
|
|
|
|
|
color: __qgcPal.text |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
text: "MapBox Access Token" |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
QGCTextField { |
|
|
|
|
|
|
|
id: mapBoxToken |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
maximumLength: 256 |
|
|
|
|
|
|
|
implicitWidth : ScreenTools.defaultFontPixelWidth * 30 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Item { |
|
|
|
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
implicitHeight: ScreenTools.defaultFontPixelHeight * 1.5 |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
QGCLabel { |
|
|
|
anchors.centerIn: parent |
|
|
|
text: "MapBox Access Token" |
|
|
|
text: "With an access token, you can use MapBox Maps." |
|
|
|
} |
|
|
|
font.pixelSize: ScreenTools.defaultFontPixelSize * 0.85 |
|
|
|
QGCTextField { |
|
|
|
|
|
|
|
id: mapBoxToken |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
maximumLength: 256 |
|
|
|
|
|
|
|
implicitWidth : ScreenTools.defaultFontPixelWidth * 30 |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
Item { |
|
|
|
|
|
|
|
Layout.columnSpan: 2 |
|
|
|
|
|
|
|
Layout.fillWidth: true |
|
|
|
|
|
|
|
implicitHeight: ScreenTools.defaultFontPixelHeight * 1.5 |
|
|
|
|
|
|
|
QGCLabel { |
|
|
|
|
|
|
|
anchors.centerIn: parent |
|
|
|
|
|
|
|
text: "With an access token, you can use MapBox Maps." |
|
|
|
|
|
|
|
font.pixelSize: ScreenTools.defaultFontPixelSize * 0.85 |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
Row { |
|
|
|
Row { |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
anchors.horizontalCenter: parent.horizontalCenter |
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
spacing: ScreenTools.defaultFontPixelWidth |
|
|
|
QGCButton { |
|
|
|
QGCButton { |
|
|
|
text: "Save" |
|
|
|
text: "Save" |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
QGroundControl.mapEngineManager.mapboxToken = mapBoxToken.text |
|
|
|
QGroundControl.mapEngineManager.mapboxToken = mapBoxToken.text |
|
|
|
QGroundControl.mapEngineManager.maxDiskCache = parseInt(maxCacheSize.text) |
|
|
|
QGroundControl.mapEngineManager.maxDiskCache = parseInt(maxCacheSize.text) |
|
|
|
QGroundControl.mapEngineManager.maxMemCache = parseInt(maxCacheMemSize.text) |
|
|
|
QGroundControl.mapEngineManager.maxMemCache = parseInt(maxCacheMemSize.text) |
|
|
|
showList() |
|
|
|
showList() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
QGCButton { |
|
|
|
QGCButton { |
|
|
|
text: "Cancel" |
|
|
|
text: "Cancel" |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
width: ScreenTools.defaultFontPixelWidth * 18 |
|
|
|
onClicked: { |
|
|
|
onClicked: { |
|
|
|
showList() |
|
|
|
showList() |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|