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
78e229b2
Commit
78e229b2
authored
Jun 13, 2016
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add preview and zoom numbers
parent
88b9c9cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
280 additions
and
168 deletions
+280
-168
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+280
-168
No files found.
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
78e229b2
...
...
@@ -36,10 +36,13 @@ QGCView {
property
var
savedCenter
:
undefined
property
real
savedZoom
:
3
property
string
savedMapType
:
""
property
bool
_showPreview
:
true
property
bool
_saveRealEstate
:
ScreenTools
.
isTinyScreen
||
ScreenTools
.
isShortScreen
property
real
_adjustableFontPointSize
:
_saveRealEstate
?
ScreenTools
.
smallFontPointSize
:
ScreenTools
.
defaultFontPointSize
property
var
_mapAdjustedColor
:
_map
.
isSatelliteMap
?
"
white
"
:
"
black
"
readonly
property
real
minZoomLevel
:
3
readonly
property
real
maxZoomLevel
:
20
...
...
@@ -315,6 +318,8 @@ QGCView {
visible
:
false
gesture.flickDeceleration
:
3000
property
bool
isSatelliteMap
:
activeMapType
.
name
.
indexOf
(
"
Satellite
"
)
>
-
1
||
activeMapType
.
name
.
indexOf
(
"
Hybrid
"
)
>
-
1
plugin
:
Plugin
{
name
:
"
QGroundControl
"
}
MapRectangle
{
...
...
@@ -599,9 +604,116 @@ QGCView {
}
// QGCFlickable
}
// Rectangle - defaultInfoView
//-- Add New Set View
Rectangle
{
Item
{
id
:
addNewSetView
anchors.fill
:
parent
visible
:
false
Map
{
id
:
minZoomPreview
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.topMargin
:
anchors
.
leftMargin
anchors.top
:
parent
.
top
anchors.left
:
parent
.
left
width
:
parent
.
width
/
4
height
:
parent
.
height
/
4
center
:
_map
.
center
activeMapType
:
_map
.
activeMapType
zoomLevel
:
sliderMinZoom
.
value
gesture.enabled
:
false
visible
:
_showPreview
property
bool
isSatelliteMap
:
activeMapType
.
name
.
indexOf
(
"
Satellite
"
)
>
-
1
||
activeMapType
.
name
.
indexOf
(
"
Hybrid
"
)
>
-
1
plugin
:
Plugin
{
name
:
"
QGroundControl
"
}
MapScale
{
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.bottomMargin
:
anchors
.
leftMargin
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
mapControl
:
parent
}
}
Map
{
id
:
maxZoomPreview
anchors.topMargin
:
minZoomPreview
.
anchors
.
topMargin
anchors.left
:
minZoomPreview
.
left
anchors.top
:
minZoomPreview
.
bottom
width
:
minZoomPreview
.
width
height
:
minZoomPreview
.
height
center
:
_map
.
center
activeMapType
:
_map
.
activeMapType
zoomLevel
:
sliderMaxZoom
.
value
gesture.enabled
:
false
visible
:
_showPreview
property
bool
isSatelliteMap
:
activeMapType
.
name
.
indexOf
(
"
Satellite
"
)
>
-
1
||
activeMapType
.
name
.
indexOf
(
"
Hybrid
"
)
>
-
1
plugin
:
Plugin
{
name
:
"
QGroundControl
"
}
MapScale
{
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.bottomMargin
:
anchors
.
leftMargin
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
mapControl
:
parent
}
}
Rectangle
{
anchors.fill
:
minZoomPreview
border.color
:
_mapAdjustedColor
color
:
"
transparent
"
visible
:
_showPreview
QGCLabel
{
anchors.fill
:
parent
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
color
:
_mapAdjustedColor
text
:
qsTr
(
"
Min Zoom: %1
"
).
arg
(
sliderMinZoom
.
value
)
}
}
Rectangle
{
anchors.fill
:
maxZoomPreview
border.color
:
_mapAdjustedColor
color
:
"
transparent
"
visible
:
_showPreview
QGCLabel
{
anchors.fill
:
parent
horizontalAlignment
:
Text
.
AlignHCenter
verticalAlignment
:
Text
.
AlignVCenter
color
:
_mapAdjustedColor
text
:
qsTr
(
"
Max Zoom: %1
"
).
arg
(
sliderMaxZoom
.
value
)
}
}
MouseArea
{
anchors.fill
:
minZoomPreview
visible
:
_showPreview
onClicked
:
_showPreview
=
false
}
MouseArea
{
anchors.fill
:
maxZoomPreview
visible
:
_showPreview
onClicked
:
_showPreview
=
false
}
QGCButton
{
anchors.left
:
minZoomPreview
.
left
anchors.top
:
minZoomPreview
.
top
text
:
"
Show zoom previews
"
visible
:
!
_showPreview
onClicked
:
_showPreview
=
!
_showPreview
}
//-- Add new set dialog
Rectangle
{
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
y
:
Math
.
max
(
anchors
.
margins
,
(
parent
.
height
-
(
anchors
.
margins
*
2
)
-
height
)
/
2
)
anchors.right
:
parent
.
right
...
...
@@ -610,7 +722,6 @@ QGCView {
color
:
qgcPal
.
window
opacity
:
0.85
radius
:
ScreenTools
.
defaultFontPixelWidth
*
0.5
visible
:
false
QGCLabel
{
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
/
4
...
...
@@ -718,7 +829,7 @@ QGCView {
anchors.right
:
parent
.
right
QGCLabel
{
text
:
qsTr
(
"
Min Zoom:
"
)
text
:
qsTr
(
"
Min Zoom: %1
"
).
arg
(
sliderMinZoom
.
value
)
font.pointSize
:
_adjustableFontPointSize
}
...
...
@@ -745,7 +856,7 @@ QGCView {
}
// Slider - min zoom
QGCLabel
{
text
:
qsTr
(
"
Max Zoom:
"
)
text
:
qsTr
(
"
Max Zoom: %1
"
).
arg
(
sliderMaxZoom
.
value
)
font.pointSize
:
_adjustableFontPointSize
}
...
...
@@ -819,7 +930,8 @@ QGCView {
}
}
// Column
}
// QGCFlickable
}
// Rectangle - addNewSetView
}
// Rectangle - Add new set dialog
}
// Item - Add new set view
}
// Map
QGCFlickable
{
...
...
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