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
a50d4184
Commit
a50d4184
authored
Sep 04, 2019
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
parent
b397e0be
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
50 additions
and
21 deletions
+50
-21
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+1
-1
MapScale.qml
src/FlightMap/MapScale.qml
+30
-11
PlanView.qml
src/PlanView/PlanView.qml
+18
-8
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+1
-1
No files found.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
a50d4184
...
...
@@ -470,7 +470,7 @@ FlightMap {
anchors.topMargin
:
ScreenTools
.
defaultFontPixelHeight
*
(
0.33
)
+
state
===
"
bottomMode
"
?
0
:
ScreenTools
.
toolbarHeight
anchors.bottomMargin
:
ScreenTools
.
defaultFontPixelHeight
*
(
0.33
)
mapControl
:
flightMap
zoomButtonsOnLeft
:
false
buttonsOnLeft
:
false
visible
:
!
ScreenTools
.
isTinyScreen
&&
QGroundControl
.
corePlugin
.
options
.
enableMapScale
state
:
"
bottomMode
"
states
:
[
...
...
src/FlightMap/MapScale.qml
View file @
a50d4184
...
...
@@ -18,17 +18,22 @@ import QGroundControl.SettingsManager 1.0
/// Map scale control
Item
{
id
:
scale
width
:
zoomB
uttonsOnLeft
||
!
_zoomButtonsVisible
?
rightEnd
.
x
+
rightEnd
.
width
:
zoomDownButton
.
x
+
zoomDownButton
.
width
width
:
b
uttonsOnLeft
||
!
_zoomButtonsVisible
?
rightEnd
.
x
+
rightEnd
.
width
:
zoomDownButton
.
x
+
zoomDownButton
.
width
height
:
rightEnd
.
y
+
rightEnd
.
height
property
var
mapControl
///< Map control for which this scale control is being used
property
bool
zoomButtonsVisible
:
true
property
bool
zoomButtonsOnLeft
:
true
///< Zoom buttons to left/right of scale bar
property
var
mapControl
///< Map control for which this scale control is being used
property
bool
terrainButtonVisible
:
false
property
alias
terrainButtonChecked
:
terrainButton
.
checked
property
bool
zoomButtonsVisible
:
true
property
bool
buttonsOnLeft
:
true
///< Buttons to left/right of scale bar
signal
terrainButtonClicked
property
variant
_scaleLengthsMeters
:
[
5
,
10
,
25
,
50
,
100
,
150
,
250
,
500
,
1000
,
2000
,
5000
,
10000
,
20000
,
50000
,
100000
,
200000
,
500000
,
1000000
,
2000000
]
property
variant
_scaleLengthsFeet
:
[
10
,
25
,
50
,
100
,
250
,
500
,
1000
,
2000
,
3000
,
4000
,
5280
,
5280
*
2
,
5280
*
5
,
5280
*
10
,
5280
*
25
,
5280
*
50
,
5280
*
100
,
5280
*
250
,
5280
*
500
,
5280
*
1000
]
property
bool
_zoomButtonsVisible
:
zoomButtonsVisible
&&
!
ScreenTools
.
isMobile
// Zoom buttons don't show on mobile since finger pinch works fine
property
bool
_zoomButtonsVisible
:
zoomButtonsVisible
&&
!
ScreenTools
.
isMobile
property
bool
_terrainButtonVisible
:
terrainButtonVisible
&&
!
ScreenTools
.
isMobile
property
var
_color
:
mapControl
.
isSatelliteMap
?
"
white
"
:
"
black
"
...
...
@@ -155,8 +160,8 @@ Item {
Rectangle
{
id
:
leftEnd
anchors.top
:
scaleText
.
bottom
anchors.leftMargin
:
zoomB
uttonsOnLeft
&&
_zoomButtonsVisible
?
ScreenTools
.
defaultFontPixelWidth
/
2
:
0
anchors.left
:
zoomB
uttonsOnLeft
&&
_zoomButtonsVisible
?
zoomDownButton
.
right
:
parent
.
left
anchors.leftMargin
:
b
uttonsOnLeft
&&
_zoomButtonsVisible
?
ScreenTools
.
defaultFontPixelWidth
/
2
:
0
anchors.left
:
b
uttonsOnLeft
&&
_zoomButtonsVisible
?
zoomDownButton
.
right
:
parent
.
left
width
:
2
height
:
ScreenTools
.
defaultFontPixelHeight
color
:
_color
...
...
@@ -180,12 +185,25 @@ Item {
color
:
_color
}
QGCButton
{
id
:
terrainButton
anchors.top
:
scaleText
.
top
anchors.bottom
:
rightEnd
.
bottom
anchors.leftMargin
:
buttonsOnLeft
?
0
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.left
:
buttonsOnLeft
?
parent
.
left
:
rightEnd
.
right
text
:
qsTr
(
"
T
"
)
width
:
height
opacity
:
0.75
visible
:
_terrainButtonVisible
onClicked
:
terrainButtonClicked
()
}
QGCButton
{
id
:
zoomUpButton
anchors.top
:
scaleText
.
top
anchors.bottom
:
rightEnd
.
bottom
anchors.leftMargin
:
zoomButtonsOnLeft
?
0
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.left
:
zoomButtonsOnLeft
?
parent
.
left
:
rightEnd
.
righ
t
anchors.leftMargin
:
terrainButton
.
visible
?
ScreenTools
.
defaultFontPixelWidth
/
2
:
0
anchors.left
:
terrainButton
.
visible
?
terrainButton
.
right
:
terrainButton
.
lef
t
text
:
qsTr
(
"
+
"
)
width
:
height
opacity
:
0.75
...
...
@@ -195,11 +213,12 @@ Item {
QGCButton
{
id
:
zoomDownButton
anchors.top
:
scaleText
.
top
anchors.bottom
:
rightEnd
.
bottom
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.left
:
zoomUpButton
.
right
text
:
qsTr
(
"
-
"
)
height
:
zoomUpButton
.
height
width
:
zoomUpButton
.
width
width
:
height
opacity
:
0.75
visible
:
_zoomButtonsVisible
onClicked
:
mapControl
.
zoomLevel
-=
0.5
...
...
src/PlanView/PlanView.qml
View file @
a50d4184
...
...
@@ -819,13 +819,17 @@ Item {
}
MapScale
{
id
:
mapScale
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
(
0.66
)
anchors.bottom
:
waypointValuesDisplay
.
visible
?
waypointValuesDisplay
.
top
:
parent
.
bottom
anchors.left
:
parent
.
left
mapControl
:
editorMap
zoomButtonsOnLeft
:
true
visible
:
_toolStripBottom
<
y
id
:
mapScale
anchors.margins
:
ScreenTools
.
defaultFontPixelHeight
*
(
0.66
)
anchors.bottom
:
waypointValuesDisplay
.
visible
?
waypointValuesDisplay
.
top
:
parent
.
bottom
anchors.left
:
parent
.
left
mapControl
:
editorMap
buttonsOnLeft
:
true
terrainButtonVisible
:
true
visible
:
_toolStripBottom
<
y
&&
_editingLayer
===
_layerMission
terrainButtonChecked
:
waypointValuesDisplay
.
visible
onTerrainButtonClicked
:
waypointValuesDisplay
.
toggleVisible
()
}
MissionItemStatus
{
...
...
@@ -836,7 +840,13 @@ Item {
maxWidth
:
parent
.
width
-
rightPanel
.
width
-
x
anchors.bottom
:
parent
.
bottom
missionItems
:
_missionController
.
visualItems
visible
:
_editingLayer
===
_layerMission
&&
(
_toolStripBottom
+
mapScale
.
height
)
<
y
&&
QGroundControl
.
corePlugin
.
options
.
showMissionStatus
visible
:
_internalVisible
&&
_editingLayer
===
_layerMission
&&
(
_toolStripBottom
+
mapScale
.
height
)
<
y
&&
QGroundControl
.
corePlugin
.
options
.
showMissionStatus
property
bool
_internalVisible
:
false
function
toggleVisible
()
{
_internalVisible
=
!
_internalVisible
}
}
}
...
...
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
a50d4184
...
...
@@ -400,7 +400,7 @@ Item {
anchors.left
:
parent
.
left
anchors.bottom
:
parent
.
bottom
mapControl
:
_map
zoomButtonsOnLeft
:
true
buttonsOnLeft
:
true
}
//-----------------------------------------------------------------
...
...
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