Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qgroundcontrol
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Valentin Platzgummer
qgroundcontrol
Commits
019e06d4
Commit
019e06d4
authored
Mar 17, 2017
by
Gus Grubba
Committed by
GitHub
Mar 17, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4789 from dogmaphobic/offlineTiles
JavaScript exception and minor UI tweaks.
parents
989a0d7b
24aa97f1
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
28 additions
and
12 deletions
+28
-12
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+28
-12
No files found.
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
019e06d4
...
...
@@ -37,12 +37,13 @@ QGCView {
property
string
savedMapType
:
""
property
bool
_showPreview
:
true
property
bool
_defaultSet
:
offlineMapView
&&
offlineMapView
.
_currentSelection
&&
offlineMapView
.
_currentSelection
.
defaultSet
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
real
_margins
:
ScreenTools
.
defaultFontPixelWidth
/
2
property
bool
_saveRealEstate
:
ScreenTools
.
isTinyScreen
||
ScreenTools
.
isShortScreen
property
real
_adjustableFontPointSize
:
_saveRealEstate
?
ScreenTools
.
smallFontPointSize
:
ScreenTools
.
defaultFontPointSize
property
var
_mapAdjustedColor
:
_map
.
isSatelliteMap
?
"
white
"
:
"
black
"
property
var
_mapAdjustedColor
:
_map
.
isSatelliteMap
?
"
white
"
:
"
black
"
property
bool
_tooManyTiles
:
QGroundControl
.
mapEngineManager
.
tileCount
>
_maxTilesForDownload
readonly
property
real
minZoomLevel
:
3
readonly
property
real
maxZoomLevel
:
20
...
...
@@ -358,7 +359,14 @@ QGCView {
color
:
Qt
.
rgba
(
qgcPal
.
window
.
r
,
qgcPal
.
window
.
g
,
qgcPal
.
window
.
b
,
0.85
)
radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
visible
:
false
property
bool
_extraButton
:
!
_defaultSet
&&
((
!
offlineMapView
.
_currentSelection
.
complete
&&
!
offlineMapView
.
_currentSelection
.
downloading
)
||
(
!
offlineMapView
.
_currentSelection
.
complete
&&
offlineMapView
.
_currentSelection
.
downloading
))
property
bool
_extraButton
:
{
if
(
!
offlineMapView
.
_currentSelection
)
return
false
;
var
curSel
=
offlineMapView
.
_currentSelection
;
return
!
_defaultSet
&&
((
!
curSel
.
complete
&&
!
curSel
.
downloading
)
||
(
!
curSel
.
complete
&&
curSel
.
downloading
));
}
property
real
_labelWidth
:
ScreenTools
.
defaultFontPixelWidth
*
10
property
real
_valueWidth
:
ScreenTools
.
defaultFontPixelWidth
*
14
Column
{
...
...
@@ -582,7 +590,7 @@ QGCView {
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.verticalCenter
:
parent
.
verticalCenter
anchors.right
:
parent
.
right
width
:
ScreenTools
.
defaultFontPixelWidth
*
24
width
:
ScreenTools
.
defaultFontPixelWidth
*
(
ScreenTools
.
isTinyScreen
?
24
:
28
)
height
:
Math
.
min
(
parent
.
height
-
(
anchors
.
margins
*
2
),
addNewSetFlickable
.
y
+
addNewSetColumn
.
height
+
addNewSetLabel
.
anchors
.
margins
)
color
:
Qt
.
rgba
(
qgcPal
.
window
.
r
,
qgcPal
.
window
.
g
,
qgcPal
.
window
.
b
,
0.85
)
radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
...
...
@@ -616,9 +624,9 @@ QGCView {
id
:
addNewSetColumn
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
spacing
:
ScreenTools
.
defaultFontPixelHeight
/
(
ScreenTools
.
isTinyScreen
?
4
:
2
)
spacing
:
ScreenTools
.
defaultFontPixelHeight
*
(
ScreenTools
.
isTinyScreen
?
0.25
:
0.5
)
Column
{
spacing
:
ScreenTools
.
isTinyScreen
?
0
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
QGCLabel
{
text
:
qsTr
(
"
Name:
"
)
}
...
...
@@ -628,8 +636,8 @@ QGCView {
anchors.right
:
parent
.
right
}
}
Column
{
spacing
:
ScreenTools
.
isTinyScreen
?
0
:
ScreenTools
.
defaultFontPixelHeight
*
0.25
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
QGCLabel
{
...
...
@@ -661,7 +669,7 @@ QGCView {
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
zoomColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
/
2
height
:
zoomColumn
.
height
+
ScreenTools
.
defaultFontPixelHeight
*
0.5
color
:
qgcPal
.
window
border.color
:
qgcPal
.
text
radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
...
...
@@ -723,7 +731,7 @@ QGCView {
GridLayout
{
columns
:
2
rowSpacing
:
0
rowSpacing
:
ScreenTools
.
isTinyScreen
?
0
:
ScreenTools
.
defaultFontPixelHeight
*
0.5
QGCLabel
{
text
:
qsTr
(
"
Count:
"
)
font.pointSize
:
_adjustableFontPointSize
...
...
@@ -745,13 +753,20 @@ QGCView {
}
// Column - Zoom info
}
// Rectangle - Zoom info
QGCLabel
{
text
:
qsTr
(
"
Too many tiles
"
)
visible
:
_tooManyTiles
color
:
qgcPal
.
warningText
anchors.horizontalCenter
:
parent
.
horizontalCenter
}
Row
{
spacing
:
ScreenTools
.
defaultFontPixelWidth
anchors.horizontalCenter
:
parent
.
horizontalCenter
QGCButton
{
text
:
_tooManyTiles
?
qsTr
(
"
Too many tiles
"
)
:
qsTr
(
"
Download
"
)
id
:
downloadButton
text
:
qsTr
(
"
Download
"
)
enabled
:
!
_tooManyTiles
&&
setName
.
text
.
length
>
0
property
bool
_tooManyTiles
:
QGroundControl
.
mapEngineManager
.
tileCount
>
_maxTilesForDownload
onClicked
:
{
if
(
QGroundControl
.
mapEngineManager
.
findName
(
setName
.
text
))
{
duplicateName
.
visible
=
true
...
...
@@ -762,7 +777,8 @@ QGCView {
}
}
QGCButton
{
text
:
qsTr
(
"
Cancel
"
)
text
:
qsTr
(
"
Cancel
"
)
width
:
downloadButton
.
width
onClicked
:
{
showList
()
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a 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