@ -37,6 +37,7 @@ QGCView {
@@ -37,6 +37,7 @@ QGCView {
property real savedZoom: 3
property string savedMapType: ""
property bool _showPreview : true
property bool _defaultSet : offlineMapView && offlineMapView . _currentSelection && offlineMapView . _currentSelection . defaultSet
property bool _saveRealEstate : ScreenTools . isTinyScreen || ScreenTools . isShortScreen
property real _adjustableFontPointSize : _saveRealEstate ? ScreenTools.smallFontPointSize : ScreenTools . defaultFontPointSize
@ -46,7 +47,7 @@ QGCView {
@@ -46,7 +47,7 @@ QGCView {
readonly property real minZoomLevel: 3
readonly property real maxZoomLevel: 20
readonly property int _maxTilesForDownload : 6 0000
readonly property int _maxTilesForDownload : 10 0000
QGCPalette { id: qgcPal }
@ -98,7 +99,6 @@ QGCView {
@@ -98,7 +99,6 @@ QGCView {
_map . visible = true
_tileSetList . visible = false
infoView . visible = false
defaultInfoView . visible = false
addNewSetView . visible = true
}
@ -107,7 +107,6 @@ QGCView {
@@ -107,7 +107,6 @@ QGCView {
_map . visible = false
_tileSetList . visible = true
infoView . visible = false
defaultInfoView . visible = false
addNewSetView . visible = false
}
@ -140,13 +139,12 @@ QGCView {
@@ -140,13 +139,12 @@ QGCView {
}
function enterInfoView ( ) {
var isDefaultSet = offlineMapView . _currentSelection . defaultSet
_map . visible = true
isMapInteractive = false
savedCenter = _map . toCoordinate ( Qt . point ( _map . width / 2 , _map . height / 2 ) )
savedZoom = _map . zoomLevel
savedMapType = mapType
if ( ! isD efaultSet) {
if ( ! offlineMapView . _currentSelection . d efaultSet) {
mapType = offlineMapView . _currentSelection . mapTypeStr
_map . center = midPoint ( offlineMapView . _currentSelection . topleftLat , offlineMapView . _currentSelection . bottomRightLat , offlineMapView . _currentSelection . topleftLon , offlineMapView . _currentSelection . bottomRightLon )
/ / - - D e l i n e a t e S e t R e g i o n
@ -157,16 +155,15 @@ QGCView {
@@ -157,16 +155,15 @@ QGCView {
mapBoundary . topLeft = QtPositioning . coordinate ( y0 , x0 )
mapBoundary . bottomRight = QtPositioning . coordinate ( y1 , x1 )
mapBoundary . visible = true
/ / S o m e t i m e s , f o r w h a t e v e r r e a s o n , t h e b o u n d i n g b o x i s c o r r e c t ( a r o u n d E T H f o r i n s t a n c e ) , b u t t h e r e c t a n g l e i s d r a w n a c r o s s t h e p l a n e t .
/ / W h e n t h a t h a p p e n s , t h e " _ m a p . f i t V i e w p o r t T o M a p I t e m s ( ) " b e l o w m a k e s t h e m a p t o z o o m t o t h e e n t i r e e a r t h .
/ / c o n s o l e . l o g ( " M a p b o u n d a r y : " + m a p B o u n d a r y . t o p L e f t + " " + m a p B o u n d a r y . b o t t o m R i g h t )
_map . fitViewportToMapItems ( )
}
_tileSetList . visible = false
addNewSetView . visible = false
if ( isDefaultSet ) {
defaultInfoView . visible = true
} else {
infoView . visible = true
}
}
function leaveInfoView ( ) {
mapBoundary . visible = false
@ -277,30 +274,17 @@ QGCView {
@@ -277,30 +274,17 @@ QGCView {
Component {
id: deleteConfirmationDialogComponent
QGCViewMessage {
id: deleteConfirmationDialog
message: qsTr ( "Delete %1 and all its tiles.\n\nIs this really what you want?" ) . arg ( offlineMapView . _currentSelection . name )
function accept ( ) {
QGroundControl . mapEngineManager . deleteTileSet ( offlineMapView . _currentSelection )
deleteConfirmationDialog . hideDialog ( )
leaveInfoView ( )
showList ( )
}
message: {
if ( offlineMapView . _currentSelection . defaultSet )
return qsTr ( "This will delete all tiles INCLUDING the tile sets you have created yourself.\n\nIs this really what you want?" ) ;
else
return qsTr ( "Delete %1 and all its tiles.\n\nIs this really what you want?" ) . arg ( offlineMapView . _currentSelection . name ) ;
}
}
Component {
id: deleteSystemSetConfirmationDialogComponent
QGCViewMessage {
id: deleteSystemSetConfirmationDialog
message: qsTr ( "This will delete all tiles INCLUDING the tile sets you have created yourself.\n\nIs this really what you want?" )
function accept ( ) {
QGroundControl . mapEngineManager . deleteTileSet ( offlineMapView . _currentSelection )
deleteSystemSet ConfirmationDialog . hideDialog ( )
deleteConfirmationDialog . hideDialog ( )
leaveInfoView ( )
showList ( )
}
@ -351,35 +335,26 @@ QGCView {
@@ -351,35 +335,26 @@ QGCView {
mapControl: _map
}
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / - - S h o w S e t I n f o
Rectangle {
id: infoView
anchors.margins: ScreenTools . defaultFontPixelWidth
y: Math . max ( anchors . margins , ( parent . height - ( anchors . margins * 2 ) - height ) / 2 )
anchors.margins: ScreenTools . defaultFontPixelHeight
anchors.right: parent . right
width: Math . max ( ScreenTools . defaultFontPixelWidth * 20 , controlInfoFlickable . width + ( infoView . _margins * 2 ) )
height: Math . min ( parent . height - ( anchors . margins * 2 ) , controlInfoFlickable . y + controlInfoColumn . height + ScreenTools . defaultFontPixelHeight )
color: qgcPal . window
opacity: 0.85
anchors.verticalCenter: parent . verticalCenter
width: tileInfoColumn . width + ( ScreenTools . defaultFontPixelWidth * 2 )
height: tileInfoColumn . height + ( ScreenTools . defaultFontPixelHeight * 2 )
color: Qt . rgba ( qgcPal . window . r , qgcPal . window . g , qgcPal . window . b , 0.85 )
radius: ScreenTools . defaultFontPixelWidth * 0.5
visible: false
readonly property real _margins : ScreenTools . defaultFontPixelHeight / 2
QGCLabel {
anchors.margins: ScreenTools . defaultFontPixelHeight / 4
anchors.top: parent . top
anchors.right: parent . right
text: "X"
}
property bool _extraButton : ! _defaultSet && ( ( ! offlineMapView . _currentSelection . complete && ! offlineMapView . _currentSelection . downloading ) || ( ! offlineMapView . _currentSelection . complete && offlineMapView . _currentSelection . downloading ) )
property real _labelWidth : ScreenTools . defaultFontPixelWidth * 10
property real _valueWidth : ScreenTools . defaultFontPixelWidth * 14
Column {
id: titleColumn
anchors.margins: infoView . _margins
anchors.top: parent . top
anchors.left: parent . left
anchors.right: parent . right
id: tileInfoColumn
anchors.margins: ScreenTools . defaultFontPixelHeight * 0.5
spacing: ScreenTools . defaultFontPixelHeight * 0.5
anchors.centerIn: parent
QGCLabel {
anchors.left: parent . left
anchors.right: parent . right
@ -388,222 +363,113 @@ QGCView {
@@ -388,222 +363,113 @@ QGCView {
font.pointSize: _saveRealEstate ? ScreenTools.defaultFontPointSize : ScreenTools . mediumFontPointSize
horizontalAlignment: Text . AlignHCenter
}
QGCLabel {
anchors.left: parent . left
anchors.right: parent . right
wrapMode: Text . WordWrap
text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.description : ""
visible: text !== qsTr ( "Description" )
horizontalAlignment: Text . AlignHCenter
text: {
if ( offlineMapView . _currentSelection ) {
if ( offlineMapView . _currentSelection . defaultSet )
return qsTr ( "System Wide Tile Cache" ) ;
else
return "(" + offlineMapView . _currentSelection . mapTypeStr + ")"
} else
return "" ;
}
QGCLabel {
anchors.left: parent . left
anchors.right: parent . right
wrapMode: Text . WordWrap
text: offlineMapView . _currentSelection ? "(" + offlineMapView . _currentSelection . mapTypeStr + ")" : ""
horizontalAlignment: Text . AlignHCenter
}
/ / - - T i l e S e t s
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
visible: ! _defaultSet
QGCLabel { text: qsTr ( "Zoom Levels:" ) ; width: infoView . _labelWidth ; }
QGCLabel { text: offlineMapView . _currentSelection ? ( offlineMapView . _currentSelection . minZoom + " - " + offlineMapView . _currentSelection . maxZoom ) : "" ; horizontalAlignment: Text . AlignRight ; width: infoView . _valueWidth ; }
}
MouseArea {
anchors.fill: titleColumn
preventStealing: true
onClicked: {
leaveInfoView ( )
showList ( )
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
visible: ! _defaultSet
QGCLabel { text: qsTr ( "Total:" ) ; width: infoView . _labelWidth ; }
QGCLabel { text: ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.totalTileCountStr : "" ) + " (" + ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.totalTilesSizeStr : "" ) + ")" ; horizontalAlignment: Text . AlignRight ; width: infoView . _valueWidth ; }
}
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
visible: offlineMapView && offlineMapView . _currentSelection && ! _defaultSet && offlineMapView . _currentSelection . uniqueTileCount > 0
QGCLabel { text: qsTr ( "Unique:" ) ; width: infoView . _labelWidth ; }
QGCLabel { text: ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.uniqueTileCountStr : "" ) + " (" + ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.uniqueTileSizeStr : "" ) + ")" ; horizontalAlignment: Text . AlignRight ; width: infoView . _valueWidth ; }
}
QGCFlickable {
id: controlInfoFlickable
anchors.margins: infoView . _margins
anchors.top: titleColumn . bottom
anchors.bottom: parent . bottom
anchors.left: parent . left
width: controlInfoColumn . width
clip: true
contentHeight: controlInfoColumn . height
Column {
id: controlInfoColumn
spacing: ScreenTools . defaultFontPixelHeight
GridLayout {
columns: 2
rowSpacing: 0
QGCLabel { text: qsTr ( "Min Zoom:" ) }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.minZoom : "" }
QGCLabel { text: qsTr ( "Max Zoom:" ) }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.maxZoom : "" }
QGCLabel { text: qsTr ( "Total:" ) }
QGCLabel { text: ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.numTilesStr : "" ) + " (" + ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.tilesSizeStr : "" ) + ")" }
QGCLabel {
text: qsTr ( "Downloaded:" )
visible: offlineMapView . _currentSelection && ! offlineMapView . _currentSelection . complete
}
QGCLabel {
text: ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.savedTilesStr : "" ) + " (" + ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.savedSizeStr : "" ) + ")"
visible: offlineMapView . _currentSelection && ! offlineMapView . _currentSelection . complete
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
visible: offlineMapView && offlineMapView . _currentSelection && ! _defaultSet && ! offlineMapView . _currentSelection . complete
QGCLabel { text: qsTr ( "Downloaded:" ) ; width: infoView . _labelWidth ; }
QGCLabel { text: ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.savedTileCountStr : "" ) + " (" + ( offlineMapView . _currentSelection ? offlineMapView._currentSelection.savedTileSizeStr : "" ) + ")" ; horizontalAlignment: Text . AlignRight ; width: infoView . _valueWidth ; }
}
QGCLabel {
text: qsTr ( "Error Count:" )
visible: offlineMapView . _currentSelection && ! offlineMapView . _currentSelection . complete
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
visible: offlineMapView && offlineMapView . _currentSelection && ! _defaultSet && ! offlineMapView . _currentSelection . complete && offlineMapView . _currentSelection . errorCount > 0
QGCLabel { text: qsTr ( "Error Count:" ) ; width: infoView . _labelWidth ; }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.errorCountStr : "" ; horizontalAlignment: Text . AlignRight ; width: infoView . _valueWidth ; }
}
QGCLabel {
text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.errorCountStr : ""
visible: offlineMapView . _currentSelection && ! offlineMapView . _currentSelection . complete
/ / - - D e f a u l t T i l e S e t
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
visible: _defaultSet
QGCLabel { text: qsTr ( "Size:" ) ; width: infoView . _labelWidth ; }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.savedTileSizeStr : "" ; horizontalAlignment: Text . AlignRight ; width: infoView . _valueWidth ; }
}
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
visible: _defaultSet
QGCLabel { text: qsTr ( "Tile Count:" ) ; width: infoView . _labelWidth ; }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.savedTileCountStr : "" ; horizontalAlignment: Text . AlignRight ; width: infoView . _valueWidth ; }
}
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
QGCButton {
text: qsTr ( "Resume Download" )
visible: offlineMapView . _currentSelection && ( ! offlineMapView . _currentSelection . complete && ! offlineMapView . _currentSelection . downloading )
visible: offlineMapView . _currentSelection && offlineMapView . _currentSelection && ! _defaultSet && ( ! offlineMapView . _currentSelection . complete && ! offlineMapView . _currentSelection . downloading )
width: ScreenTools . defaultFontPixelWidth * 16
onClicked: {
if ( offlineMapView . _currentSelection )
offlineMapView . _currentSelection . resumeDownloadTask ( )
}
}
QGCButton {
text: qsTr ( "Cancel Download" )
visible: offlineMapView . _currentSelection && ( ! offlineMapView . _currentSelection . complete && offlineMapView . _currentSelection . downloading )
visible: offlineMapView . _currentSelection && offlineMapView . _currentSelection && ! _defaultSet && ( ! offlineMapView . _currentSelection . complete && offlineMapView . _currentSelection . downloading )
width: ScreenTools . defaultFontPixelWidth * 16
onClicked: {
if ( offlineMapView . _currentSelection )
offlineMapView . _currentSelection . cancelDownloadTask ( )
}
}
QGCButton {
text: qsTr ( "Delete" )
width: ScreenTools . defaultFontPixelWidth * ( infoView . _extraButton ? 6 : 10 )
onClicked: showDialog ( deleteConfirmationDialogComponent , qsTr ( "Confirm Delete" ) , qgcView . showDialogDefaultWidth , StandardButton . Yes | StandardButton . No )
}
} / / C o l u m n
} / / Q G C F l i c k a b l e
} / / R e c t a n g l e - i n f o V i e w
/ / - - S h o w D e f a u l t S e t I n f o
Rectangle {
id: defaultInfoView
anchors.margins: ScreenTools . defaultFontPixelWidth
y: Math . max ( anchors . margins , ( parent . height - ( anchors . margins * 2 ) - height ) / 2 )
anchors.right: parent . right
width: ScreenTools . defaultFontPixelWidth * 20
height: Math . min ( parent . height - ( anchors . margins * 2 ) , defaultControlInfoFlickable . y + defaultControlInfoColumn . height + ScreenTools . defaultFontPixelHeight )
color: qgcPal . window
opacity: 0.85
radius: ScreenTools . defaultFontPixelWidth * 0.5
visible: false
QGCLabel {
anchors.margins: ScreenTools . defaultFontPixelHeight / 4
anchors.top: parent . top
anchors.right: parent . right
text: "X"
}
Column {
id: defaultTitleColumn
anchors.margins: ScreenTools . defaultFontPixelHeight / 2
anchors.top: parent . top
anchors.left: parent . left
anchors.right: parent . right
QGCLabel {
anchors.left: parent . left
anchors.right: parent . right
wrapMode: Text . WordWrap
text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.name : ""
font.pointSize: _saveRealEstate ? ScreenTools.defaultFontPointSize : ScreenTools . mediumFontPointSize
horizontalAlignment: Text . AlignHCenter
}
QGCLabel {
anchors.left: parent . left
anchors.right: parent . right
wrapMode: Text . WordWrap
text: qsTr ( "System Wide Tile Cache" )
horizontalAlignment: Text . AlignHCenter
}
}
MouseArea {
anchors.fill: defaultTitleColumn
preventStealing: true
QGCButton {
text: qsTr ( "Close" )
width: ScreenTools . defaultFontPixelWidth * ( infoView . _extraButton ? 6 : 10 )
onClicked: {
leaveInfoView ( )
showList ( )
}
}
QGCFlickable {
id: defaultControlInfoFlickable
anchors.margins: ScreenTools . defaultFontPixelHeight
anchors.top: defaultTitleColumn . bottom
anchors.left: parent . left
anchors.right: parent . right
anchors.bottom: parent . bottom
clip: true
contentHeight: defaultControlInfoColumn . height
Column {
id: defaultControlInfoColumn
anchors.left: parent . left
anchors.right: parent . right
spacing: ScreenTools . defaultFontPixelHeight
GridLayout {
columns: 2
rowSpacing: 0
QGCLabel {
Layout.columnSpan: 2
text: qsTr ( "System Cache" )
}
QGCLabel { text: qsTr ( "Size:" ) }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.tilesSizeStr : "" }
QGCLabel { text: qsTr ( "Tile Count:" ) }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.numTilesStr : "" }
Item {
width: 1
height: ScreenTools . defaultFontPixelHeight
Layout.columnSpan: 2
}
QGCLabel {
Layout.columnSpan: 2
text: qsTr ( "All Sets" )
}
QGCLabel { text: qsTr ( "Size:" ) }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.savedSizeStr : "" }
QGCLabel { text: qsTr ( "Tile Count:" ) }
QGCLabel { text: offlineMapView . _currentSelection ? offlineMapView._currentSelection.savedTilesStr : "" }
}
QGCButton {
text: qsTr ( "Delete All" )
onClicked: showDialog ( deleteSystemSetConfirmationDialogComponent , qsTr ( "Confirm Delete All" ) , qgcView . showDialogDefaultWidth , StandardButton . Yes | StandardButton . No )
}
} / / C o l u m n
} / / Q G C F l i c k a b l e
} / / R e c t a n g l e - d e f a u l t I n f o V i e w
} / / R e c t a n g l e - i n f o V i e w
/ / - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
/ / - - A d d n e w s e t
Item {
id: addNewSetView
anchors.fill: parent
@ -667,14 +533,15 @@ QGCView {
@@ -667,14 +533,15 @@ QGCView {
border.color: _mapAdjustedColor
color: "transparent"
visible: _showPreview
QGCLabel {
anchors.fill: parent
horizontalAlignment: Text . AlignHCenter
verticalAlignment: Text . AlignVCenter
anchors.centerIn: parent
color: _mapAdjustedColor
text: qsTr ( "Min Zoom: %1" ) . arg ( sliderMinZoom . value )
}
MouseArea {
anchors.fill: parent
onClicked: _showPreview = false
}
}
Rectangle {
@ -682,26 +549,15 @@ QGCView {
@@ -682,26 +549,15 @@ QGCView {
border.color: _mapAdjustedColor
color: "transparent"
visible: _showPreview
QGCLabel {
anchors.fill: parent
horizontalAlignment: Text . AlignHCenter
verticalAlignment: Text . AlignVCenter
anchors.centerIn: parent
color: _mapAdjustedColor
text: qsTr ( "Max Zoom: %1" ) . arg ( sliderMaxZoom . value )
}
}
MouseArea {
anchors.fill: minZoomPreview
visible: _showPreview
anchors.fill: parent
onClicked: _showPreview = false
}
MouseArea {
anchors.fill: maxZoomPreview
visible: _showPreview
onClicked: _showPreview = false
}
QGCButton {
@ -715,22 +571,14 @@ QGCView {
@@ -715,22 +571,14 @@ QGCView {
/ / - - A d d n e w s e t d i a l o g
Rectangle {
anchors.margins: ScreenTools . defaultFontPixelWidth
y: Math . max ( anchors . margins , ( parent . height - ( anchors . margins * 2 ) - height ) / 2 )
anchors.verticalCenter: parent . verticalCenter
anchors.right: parent . right
width: ScreenTools . defaultFontPixelWidth * 20
width: ScreenTools . defaultFontPixelWidth * 24
height: Math . min ( parent . height - ( anchors . margins * 2 ) , addNewSetFlickable . y + addNewSetColumn . height + ScreenTools . defaultFontPixelHeight )
color: qgcPal . window
opacity: 0.85
color: Qt . rgba ( qgcPal . window . r , qgcPal . window . g , qgcPal . window . b , 0.85 )
radius: ScreenTools . defaultFontPixelWidth * 0.5
QGCLabel {
anchors.margins: ScreenTools . defaultFontPixelHeight / 4
anchors.top: parent . top
anchors.right: parent . right
text: "X"
}
QGCLabel {
id: addNewSetLabel
anchors.margins: ScreenTools . defaultFontPixelHeight / 2
anchors.top: parent . top
@ -742,12 +590,6 @@ QGCView {
@@ -742,12 +590,6 @@ QGCView {
horizontalAlignment: Text . AlignHCenter
}
MouseArea {
anchors.fill: addNewSetLabel
preventStealing: true
onClicked: showList ( )
}
QGCFlickable {
id: addNewSetFlickable
anchors.leftMargin: ScreenTools . defaultFontPixelWidth
@ -770,9 +612,7 @@ QGCView {
@@ -770,9 +612,7 @@ QGCView {
Column {
anchors.left: parent . left
anchors.right: parent . right
QGCLabel { text: qsTr ( "Name:" ) }
QGCTextField {
id: setName
anchors.left: parent . left
@ -783,25 +623,21 @@ QGCView {
@@ -783,25 +623,21 @@ QGCView {
Column {
anchors.left: parent . left
anchors.right: parent . right
QGCLabel {
text: qsTr ( "Map type:" )
visible: ! _saveRealEstate
}
QGCComboBox {
id: mapCombo
anchors.left: parent . left
anchors.right: parent . right
model: QGroundControl . mapEngineManager . mapList
onActivated: {
mapType = textAt ( index )
if ( _dropButtonsExclusiveGroup . current )
_dropButtonsExclusiveGroup . current . checked = false
_dropButtonsExclusiveGroup . current = null
}
Component.onCompleted: {
var index = mapCombo . find ( mapType )
if ( index === - 1 ) {
@ -823,7 +659,7 @@ QGCView {
@@ -823,7 +659,7 @@ QGCView {
Column {
id: zoomColumn
anchors.margins: ScreenTools . defaultFontPixelHeight / 4
anchors.margins: ScreenTools . defaultFontPixelHeight * 0.25
anchors.top: parent . top
anchors.left: parent . left
anchors.right: parent . right
@ -842,11 +678,8 @@ QGCView {
@@ -842,11 +678,8 @@ QGCView {
maximumValue: maxZoomLevel
stepSize: 1
updateValueWhileDragging: true
property real _savedZoom
Component.onCompleted: sliderMinZoom . value = _map . zoomLevel - 2
Component.onCompleted: Math . max ( sliderMinZoom . value = _map . zoomLevel - 4 , 2 )
onValueChanged: {
if ( sliderMinZoom . value > sliderMaxZoom . value ) {
sliderMaxZoom . value = sliderMinZoom . value
@ -869,11 +702,8 @@ QGCView {
@@ -869,11 +702,8 @@ QGCView {
maximumValue: maxZoomLevel
stepSize: 1
updateValueWhileDragging: true
property real _savedZoom
Component.onCompleted: sliderMaxZoom . value = _map . zoomLevel + 2
Component.onCompleted: Math . min ( sliderMaxZoom . value = _map . zoomLevel + 2 , 20 )
onValueChanged: {
if ( sliderMaxZoom . value < sliderMinZoom . value ) {
sliderMinZoom . value = sliderMaxZoom . value
@ -885,9 +715,8 @@ QGCView {
@@ -885,9 +715,8 @@ QGCView {
GridLayout {
columns: 2
rowSpacing: 0
QGCLabel {
text: qsTr ( "Tile Count" )
text: qsTr ( "Count: " )
font.pointSize: _adjustableFontPointSize
}
QGCLabel {
@ -896,7 +725,7 @@ QGCView {
@@ -896,7 +725,7 @@ QGCView {
}
QGCLabel {
text: qsTr ( "Set Size (Est) " )
text: qsTr ( "Est Size: " )
font.pointSize: _adjustableFontPointSize
}
QGCLabel {
@ -907,27 +736,30 @@ QGCView {
@@ -907,27 +736,30 @@ QGCView {
} / / C o l u m n - Z o o m i n f o
} / / R e c t a n g l e - Z o o m i n f o
Row {
spacing: ScreenTools . defaultFontPixelWidth
anchors.horizontalCenter: parent . horizontalCenter
QGCButton {
text: _tooManyTiles ? qsTr ( "Too many tiles" ) : qsTr ( "Download" )
enabled: ! _tooManyTiles && setName . text . length > 0
anchors.horizontalCenter: parent . horizontalCenter
property bool _tooManyTiles : QGroundControl . mapEngineManager . tileCount > _maxTilesForDownload
onClicked: {
if ( QGroundControl . mapEngineManager . findName ( setName . text ) ) {
duplicateName . visible = true
} else {
/ * T h i s d o e s n o t w o r k i f h o s t e d b y Q Q u i c k W i d g e t . W a i t i n g u n t i l w e ' r e 1 0 0 % Q t Q u i c k
var mapImage
_map . grabToImage ( function ( result ) { mapImage = result ; } )
QGroundControl . mapEngineManager . startDownload ( setName . text , "Description" , mapType , mapImage ) ;
* /
QGroundControl . mapEngineManager . startDownload ( setName . text , "Description" /* Description */ , mapType ) ;
QGroundControl . mapEngineManager . startDownload ( setName . text , mapType ) ;
showList ( )
}
}
}
QGCButton {
text: qsTr ( "Cancel" )
onClicked: {
showList ( )
}
}
}
} / / C o l u m n
} / / Q G C F l i c k a b l e
} / / R e c t a n g l e - A d d n e w s e t d i a l o g
@ -965,6 +797,7 @@ QGCView {
@@ -965,6 +797,7 @@ QGCView {
delegate: OfflineMapButton {
text: object . name
size: object . downloadStatus
tiles: object . totalTileCount
complete: object . complete
width: firstButton . width
height: ScreenTools . defaultFontPixelHeight * 2