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
23ad3af0
Commit
23ad3af0
authored
Apr 05, 2017
by
Don Gagne
Committed by
GitHub
Apr 05, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #4925 from DonLakeFlyer/Bugs
Bugs
parents
dcc5642d
fa23e1d0
Changes
8
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
155 additions
and
116 deletions
+155
-116
FlightDisplayViewMap.qml
src/FlightDisplay/FlightDisplayViewMap.qml
+7
-8
MissionLineView.qml
src/FlightMap/MapItems/MissionLineView.qml
+1
-1
MissionItemEditor.qml
src/PlanView/MissionItemEditor.qml
+18
-3
SectionHeader.qml
src/PlanView/SectionHeader.qml
+36
-28
QGCComboBox.qml
src/QmlControls/QGCComboBox.qml
+4
-1
QGroundControlQmlGlobal.h
src/QmlControls/QGroundControlQmlGlobal.h
+14
-6
ToolStrip.qml
src/QmlControls/ToolStrip.qml
+64
-58
OfflineMap.qml
src/QtLocationPlugin/QMLControl/OfflineMap.qml
+11
-11
No files found.
src/FlightDisplay/FlightDisplayViewMap.qml
View file @
23ad3af0
...
...
@@ -46,7 +46,6 @@ FlightMap {
property
bool
_disableVehicleTracking
:
false
property
bool
_keepVehicleCentered
:
_mainIsMap
?
false
:
true
// Track last known map position and zoom from Fly view in settings
onZoomLevelChanged
:
QGroundControl
.
flightMapZoom
=
zoomLevel
onCenterChanged
:
QGroundControl
.
flightMapPosition
=
center
...
...
@@ -209,11 +208,11 @@ FlightMap {
// Add trajectory points to the map
MapItemView
{
model
:
_mainIsMap
?
_activeVehicle
?
_activeVehicle
.
trajectoryPoints
:
0
:
0
delegate
:
MapPolyline
{
delegate
:
MapPolyline
{
line.width
:
3
line.color
:
"
red
"
z
:
QGroundControl
.
zOrder
MapItems
-
2
z
:
QGroundControl
.
zOrder
TrajectoryLines
path
:
[
object
.
coordinate1
,
object
.
coordinate2
,
...
...
@@ -224,13 +223,13 @@ FlightMap {
// Add the vehicles to the map
MapItemView
{
model
:
QGroundControl
.
multiVehicleManager
.
vehicles
delegate
:
VehicleMapItem
{
delegate
:
VehicleMapItem
{
vehicle
:
object
coordinate
:
object
.
coordinate
isSatellite
:
flightMap
.
isSatelliteMap
size
:
_mainIsMap
?
ScreenTools
.
defaultFontPixelHeight
*
3
:
ScreenTools
.
defaultFontPixelHeight
z
:
QGroundControl
.
zOrder
MapItems
-
1
z
:
QGroundControl
.
zOrder
Vehicles
}
}
...
...
@@ -246,7 +245,7 @@ FlightMap {
// Add lines between waypoints
MissionLineView
{
model
:
_mainIsMap
?
missionController
.
waypointLines
:
0
model
:
_mainIsMap
?
missionController
.
waypointLines
:
0
}
GeoFenceMapVisuals
{
...
...
src/FlightMap/MapItems/MissionLineView.qml
View file @
23ad3af0
...
...
@@ -24,7 +24,7 @@ MapItemView {
delegate
:
MapPolyline
{
line.width
:
3
line.color
:
"
#be781c
"
// Hack, can't get palette to work in here
z
:
QGroundControl
.
zOrder
MapItems
-
1
// Under item indicator
s
z
:
QGroundControl
.
zOrder
WaypointLine
s
path
:
[
object
.
coordinate1
,
...
...
src/PlanView/MissionItemEditor.qml
View file @
23ad3af0
...
...
@@ -45,9 +45,17 @@ Rectangle {
colorGroupEnabled
:
enabled
}
MouseArea
{
FocusScope
{
id
:
currentItemScope
anchors.fill
:
parent
onClicked
:
_root
.
clicked
()
MouseArea
{
anchors.fill
:
parent
onClicked
:
{
currentItemScope
.
focus
=
true
_root
.
clicked
()
}
}
}
QGCLabel
{
...
...
@@ -76,7 +84,14 @@ Rectangle {
QGCMouseArea
{
fillItem
:
hamburger
visible
:
hamburger
.
visible
onClicked
:
_waypointsOnlyMode
?
waypointsOnlyMenu
.
popup
()
:
normalMenu
.
popup
()
onClicked
:
{
currentItemScope
.
focus
=
true
if
(
_waypointsOnlyMode
)
{
waypointsOnlyMenu
.
popup
()
}
else
{
normalMenu
.
popup
()
}
}
Menu
{
id
:
normalMenu
...
...
src/PlanView/SectionHeader.qml
View file @
23ad3af0
...
...
@@ -6,12 +6,11 @@ import QtGraphicalEffects 1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Palette
1.0
QGCMouseArea
{
FocusScope
{
id
:
_root
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
column
.
height
onClicked
:
checked
=
!
checked
property
alias
text
:
label
.
text
property
bool
checked
:
true
...
...
@@ -27,38 +26,47 @@ QGCMouseArea {
QGCPalette
{
id
:
qgcPal
;
colorGroupEnabled
:
true
}
ColumnLayout
{
id
:
column
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
QGCMouseArea
{
anchors.fill
:
parent
Item
{
height
:
_sectionSpacer
width
:
1
visible
:
showSpacer
onClicked
:
{
_root
.
focus
=
true
checked
=
!
checked
}
QGCLabel
{
id
:
label
Layout.fillWidth
:
true
ColumnLayout
{
id
:
column
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
QGCColoredImage
{
id
:
image
width
:
label
.
height
/
2
height
:
width
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
source
:
"
/qmlimages/arrow-down.png
"
color
:
qgcPal
.
text
visible
:
!
_root
.
checked
Item
{
height
:
_sectionSpacer
width
:
1
visible
:
showSpacer
}
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
1
color
:
qgcPal
.
text
QGCLabel
{
id
:
label
Layout.fillWidth
:
true
QGCColoredImage
{
id
:
image
width
:
label
.
height
/
2
height
:
width
anchors.right
:
parent
.
right
anchors.verticalCenter
:
parent
.
verticalCenter
source
:
"
/qmlimages/arrow-down.png
"
color
:
qgcPal
.
text
visible
:
!
_root
.
checked
}
}
Rectangle
{
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
1
color
:
qgcPal
.
text
}
}
}
}
src/QmlControls/QGCComboBox.qml
View file @
23ad3af0
...
...
@@ -68,7 +68,10 @@ Button {
}
}
onClicked
:
popup
.
toggleShow
()
onClicked
:
{
combo
.
focus
=
true
popup
.
toggleShow
()
}
Component.onCompleted
:
{
if
(
currentIndex
===
-
1
)
{
...
...
src/QmlControls/QGroundControlQmlGlobal.h
View file @
23ad3af0
...
...
@@ -51,9 +51,13 @@ public:
Q_PROPERTY
(
int
supportedFirmwareCount
READ
supportedFirmwareCount
CONSTANT
)
Q_PROPERTY
(
qreal
zOrderTopMost
READ
zOrderTopMost
CONSTANT
)
///< z order for top most items, toolbar, main window sub view
Q_PROPERTY
(
qreal
zOrderWidgets
READ
zOrderWidgets
CONSTANT
)
///< z order value to widgets, for example: zoom controls, hud widgetss
Q_PROPERTY
(
qreal
zOrderMapItems
READ
zOrderMapItems
CONSTANT
)
///< z order value for map items, for example: mission item indicators
Q_PROPERTY
(
qreal
zOrderTopMost
READ
zOrderTopMost
CONSTANT
)
///< z order for top most items, toolbar, main window sub view
Q_PROPERTY
(
qreal
zOrderWidgets
READ
zOrderWidgets
CONSTANT
)
///< z order value to widgets, for example: zoom controls, hud widgetss
Q_PROPERTY
(
qreal
zOrderMapItems
READ
zOrderMapItems
CONSTANT
)
Q_PROPERTY
(
qreal
zOrderVehicles
READ
zOrderVehicles
CONSTANT
)
Q_PROPERTY
(
qreal
zOrderWaypointIndicators
READ
zOrderWaypointIndicators
CONSTANT
)
Q_PROPERTY
(
qreal
zOrderTrajectoryLines
READ
zOrderTrajectoryLines
CONSTANT
)
Q_PROPERTY
(
qreal
zOrderWaypointLines
READ
zOrderWaypointLines
CONSTANT
)
//-------------------------------------------------------------------------
// MavLink Protocol
...
...
@@ -135,9 +139,13 @@ public:
static
QGeoCoordinate
flightMapPosition
();
static
double
flightMapZoom
();
qreal
zOrderTopMost
()
{
return
1000
;
}
qreal
zOrderWidgets
()
{
return
100
;
}
qreal
zOrderMapItems
()
{
return
50
;
}
qreal
zOrderTopMost
()
{
return
1000
;
}
qreal
zOrderWidgets
()
{
return
100
;
}
qreal
zOrderMapItems
()
{
return
50
;
}
qreal
zOrderWaypointIndicators
()
{
return
50
;
}
qreal
zOrderVehicles
()
{
return
49
;
}
qreal
zOrderTrajectoryLines
()
{
return
48
;
}
qreal
zOrderWaypointLines
()
{
return
47
;
}
bool
isVersionCheckEnabled
()
{
return
_toolbox
->
mavlinkProtocol
()
->
versionCheckEnabled
();
}
int
mavlinkSystemID
()
{
return
_toolbox
->
mavlinkProtocol
()
->
getSystemId
();
}
...
...
src/QmlControls/ToolStrip.qml
View file @
23ad3af0
...
...
@@ -163,71 +163,77 @@ Rectangle {
visible
:
index
==
0
?
_showOptionalElements
:
true
}
Rectangle
{
FocusScope
{
id
:
scope
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
height
:
width
color
:
checked
?
_repeaterPal
.
buttonHighlight
:
_repeaterPal
.
button
QGCColoredImage
{
id
:
button
anchors.fill
:
parent
source
:
_source
sourceSize.height
:
parent
.
height
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
color
:
checked
?
_repeaterPal
.
buttonHighlightText
:
_repeaterPal
.
buttonText
RotationAnimation
on
rotation
{
id
:
imageRotation
loops
:
Animation
.
Infinite
from
:
0
to
:
360
duration
:
500
running
:
false
}
NumberAnimation
on
opacity
{
id
:
opacityAnimation
running
:
false
from
:
0
to
:
1.0
loops
:
Animation
.
Infinite
duration
:
2000
Rectangle
{
anchors.fill
:
parent
color
:
checked
?
_repeaterPal
.
buttonHighlight
:
_repeaterPal
.
button
QGCColoredImage
{
id
:
button
anchors.fill
:
parent
source
:
_source
sourceSize.height
:
parent
.
height
fillMode
:
Image
.
PreserveAspectFit
mipmap
:
true
smooth
:
true
color
:
checked
?
_repeaterPal
.
buttonHighlightText
:
_repeaterPal
.
buttonText
RotationAnimation
on
rotation
{
id
:
imageRotation
loops
:
Animation
.
Infinite
from
:
0
to
:
360
duration
:
500
running
:
false
}
NumberAnimation
on
opacity
{
id
:
opacityAnimation
running
:
false
from
:
0
to
:
1.0
loops
:
Animation
.
Infinite
duration
:
2000
}
}
}
QGCMouseArea
{
// Size of mouse area is expanded to make touch easier
anchors.leftMargin
:
-
buttonStripColumn
.
anchors
.
margins
anchors.rightMargin
:
-
buttonStripColumn
.
anchors
.
margins
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
height
:
parent
.
height
+
(
_showOptionalElements
?
buttonLabel
.
height
+
buttonColumn
.
spacing
:
0
)
visible
:
_buttonEnabled
preventStealing
:
true
onClicked
:
{
if
(
modelData
.
dropPanelComponent
===
undefined
)
{
dropPanel
.
hide
()
if
(
modelData
.
toggle
===
true
)
{
checked
=
!
checked
}
else
{
// dropPanel.hide above will close panel, but we need to do this to clear toggles
uncheckAll
()
}
_root
.
clicked
(
index
,
checked
)
}
else
{
if
(
checked
)
{
dropPanel
.
hide
()
// hide affects checked, so this needs to be duplicated inside not outside if
QGCMouseArea
{
// Size of mouse area is expanded to make touch easier
anchors.leftMargin
:
-
buttonStripColumn
.
anchors
.
margins
anchors.rightMargin
:
-
buttonStripColumn
.
anchors
.
margins
anchors.left
:
parent
.
left
anchors.right
:
parent
.
right
anchors.top
:
parent
.
top
height
:
parent
.
height
+
(
_showOptionalElements
?
buttonLabel
.
height
+
buttonColumn
.
spacing
:
0
)
visible
:
_buttonEnabled
preventStealing
:
true
onClicked
:
{
scope
.
focus
=
true
if
(
modelData
.
dropPanelComponent
===
undefined
)
{
dropPanel
.
hide
()
if
(
modelData
.
toggle
===
true
)
{
checked
=
!
checked
}
else
{
// dropPanel.hide above will close panel, but we need to do this to clear toggles
uncheckAll
()
}
_root
.
clicked
(
index
,
checked
)
}
else
{
dropPanel
.
hide
()
// hide affects checked, so this needs to be duplicated inside not outside if
uncheckAll
()
checked
=
true
var
panelEdgeTopPoint
=
mapToItem
(
_root
,
width
,
0
)
dropPanel
.
show
(
panelEdgeTopPoint
,
height
,
modelData
.
dropPanelComponent
)
if
(
checked
)
{
dropPanel
.
hide
()
// hide affects checked, so this needs to be duplicated inside not outside if
}
else
{
dropPanel
.
hide
()
// hide affects checked, so this needs to be duplicated inside not outside if
uncheckAll
()
checked
=
true
var
panelEdgeTopPoint
=
mapToItem
(
_root
,
width
,
0
)
dropPanel
.
show
(
panelEdgeTopPoint
,
height
,
modelData
.
dropPanelComponent
)
}
}
}
}
...
...
src/QtLocationPlugin/QMLControl/OfflineMap.qml
View file @
23ad3af0
...
...
@@ -345,17 +345,6 @@ QGCView {
anchors.fill
:
parent
}
CenterMapDropButton
{
anchors.margins
:
_margins
anchors.left
:
parent
.
left
anchors.top
:
parent
.
top
map
:
_map
z
:
QGroundControl
.
zOrderTopMost
showMission
:
false
showAllItems
:
false
visible
:
addNewSetView
.
visible
}
MapScale
{
anchors.leftMargin
:
ScreenTools
.
defaultFontPixelWidth
/
2
anchors.bottomMargin
:
anchors
.
leftMargin
...
...
@@ -602,6 +591,17 @@ QGCView {
}
// Map
}
}
// Item - Add new set view
CenterMapDropButton
{
topMargin
:
0
anchors.margins
:
_margins
anchors.left
:
map
.
left
anchors.top
:
map
.
top
map
:
_map
showMission
:
false
showAllItems
:
false
visible
:
addNewSetView
.
visible
}
}
// Map
//-- Add new set dialog
...
...
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