Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
fbdc2ca7
Commit
fbdc2ca7
authored
Mar 28, 2017
by
Gus Grubba
Browse files
Tweaks with the offline maps slider.
parent
a3129aa1
Changes
1
Show whitespace changes
Inline
Side-by-side
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
fbdc2ca7
...
...
@@ -51,6 +51,7 @@ QGCView {
readonly
property
real
minZoomLevel
:
3
readonly
property
real
maxZoomLevel
:
20
readonly
property
real
sliderTouchArea
:
ScreenTools
.
isMobile
?
ScreenTools
.
defaultFontPixelWidth
*
5
:
ScreenTools
.
defaultFontPixelWidth
*
3
readonly
property
int
_maxTilesForDownload
:
100000
...
...
@@ -641,6 +642,7 @@ QGCView {
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
(
ScreenTools
.
isTinyScreen
?
0.25
:
0.5
)
Column
{
spacing
:
ScreenTools
.
isTinyScreen
?
0
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
anchors.left
:
parent
.
left
...
...
@@ -652,6 +654,7 @@ QGCView {
anchors.right
:
parent
.
right
}
}
Column
{
spacing
:
ScreenTools
.
isTinyScreen
?
0
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
anchors.left
:
parent
.
left
...
...
@@ -692,21 +695,23 @@ QGCView {
Column
{
id
:
zoomColumn
spacing
:
ScreenTools
.
isTinyScreen
?
0
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
QGCLabel
{
text
:
qsTr
(
"
Min Zoom
: %1
"
).
arg
(
sliderMinZoom
.
value
)
text
:
qsTr
(
"
Min
/Max
Zoom
Levels
"
)
font.pointSize
:
_adjustableFontPointSize
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Slider
{
id
:
sliderMinZoom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
s
etName
.
height
height
:
s
liderTouchArea
*
1.25
minimumValue
:
minZoomLevel
maximumValue
:
maxZoomLevel
stepSize
:
1
...
...
@@ -719,18 +724,37 @@ QGCView {
}
handleChanges
()
}
}
// Slider - min zoom
QGCLabel
{
text
:
qsTr
(
"
Max Zoom: %1
"
).
arg
(
sliderMaxZoom
.
value
)
font.pointSize
:
_adjustableFontPointSize
style
:
SliderStyle
{
groove
:
Rectangle
{
implicitWidth
:
sliderMinZoom
.
width
implicitHeight
:
4
color
:
qgcPal
.
colorBlue
radius
:
4
}
handle
:
Rectangle
{
anchors.centerIn
:
parent
color
:
qgcPal
.
button
border.color
:
qgcPal
.
buttonText
border.width
:
1
implicitWidth
:
sliderTouchArea
implicitHeight
:
sliderTouchArea
radius
:
sliderTouchArea
*
0.5
Label
{
text
:
sliderMinZoom
.
value
anchors.centerIn
:
parent
font.family
:
ScreenTools
.
normalFontFamily
font.pointSize
:
ScreenTools
.
smallFontPointSize
color
:
qgcPal
.
buttonText
}
}
}
}
// Slider - min zoom
Slider
{
id
:
sliderMaxZoom
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
s
etName
.
height
height
:
s
liderTouchArea
*
1.25
minimumValue
:
minZoomLevel
maximumValue
:
maxZoomLevel
stepSize
:
1
...
...
@@ -743,13 +767,37 @@ QGCView {
}
handleChanges
()
}
style
:
SliderStyle
{
groove
:
Rectangle
{
implicitWidth
:
sliderMaxZoom
.
width
implicitHeight
:
4
color
:
qgcPal
.
colorBlue
radius
:
4
}
handle
:
Rectangle
{
anchors.centerIn
:
parent
color
:
qgcPal
.
button
border.color
:
qgcPal
.
buttonText
border.width
:
1
implicitWidth
:
sliderTouchArea
implicitHeight
:
sliderTouchArea
radius
:
sliderTouchArea
*
0.5
Label
{
text
:
sliderMaxZoom
.
value
anchors.centerIn
:
parent
font.family
:
ScreenTools
.
normalFontFamily
font.pointSize
:
ScreenTools
.
smallFontPointSize
color
:
qgcPal
.
buttonText
}
}
}
}
// Slider - max zoom
GridLayout
{
columns
:
2
rowSpacing
:
ScreenTools
.
isTinyScreen
?
0
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
QGCLabel
{
text
:
qsTr
(
"
Count:
"
)
text
:
qsTr
(
"
Tile
Count:
"
)
font.pointSize
:
_adjustableFontPointSize
}
QGCLabel
{
...
...
@@ -777,11 +825,12 @@ QGCView {
}
Row
{
id
:
addButtonRow
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCButton
{
id
:
downloadButton
text
:
qsTr
(
"
Download
"
)
width
:
(
addNewSetColumn
.
width
*
0.5
)
-
(
addButtonRow
.
spacing
*
0.5
)
enabled
:
!
_tooManyTiles
&&
setName
.
text
.
length
>
0
onClicked
:
{
if
(
QGroundControl
.
mapEngineManager
.
findName
(
setName
.
text
))
{
...
...
@@ -794,7 +843,7 @@ QGCView {
}
QGCButton
{
text
:
qsTr
(
"
Cancel
"
)
width
:
downlo
adButton
.
width
width
:
(
addNewSetColumn
.
width
*
0.5
)
-
(
ad
d
Button
Row
.
spacing
*
0.5
)
onClicked
:
{
showList
()
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment