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
fa4e7a2c
Commit
fa4e7a2c
authored
Sep 07, 2015
by
Don Gagne
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1847 from DonLakeFlyer/ControlReorg
Restructure map controls for better reusability
parents
4719c514
d1285c18
Changes
4
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
192 additions
and
271 deletions
+192
-271
FlightDisplayView.qml
src/FlightDisplay/FlightDisplayView.qml
+66
-4
FlightMap.qml
src/FlightMap/FlightMap.qml
+122
-264
VehicleMapItem.qml
src/FlightMap/MapItems/VehicleMapItem.qml
+3
-3
Vehicle.cc
src/Vehicle/Vehicle.cc
+1
-0
No files found.
src/FlightDisplay/FlightDisplayView.qml
View file @
fa4e7a2c
...
@@ -25,12 +25,13 @@ import QtQuick 2.4
...
@@ -25,12 +25,13 @@ import QtQuick 2.4
import
QtQuick
.
Controls
1.3
import
QtQuick
.
Controls
1.3
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Controls
.
Styles
1.2
import
QtQuick
.
Dialogs
1.2
import
QtQuick
.
Dialogs
1.2
import
QtLocation
5.3
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
FlightMap
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Palette
1.0
import
QGroundControl
.
Vehicle
1.0
/// Flight Display View
/// Flight Display View
Item
{
Item
{
...
@@ -76,9 +77,70 @@ Item {
...
@@ -76,9 +77,70 @@ Item {
mapName
:
"
FlightDisplayView
"
mapName
:
"
FlightDisplayView
"
latitude
:
parent
.
_latitude
latitude
:
parent
.
_latitude
longitude
:
parent
.
_longitude
longitude
:
parent
.
_longitude
z
:
10
showVehicles
:
true
// Add the vehicles to the map
showMissionItems
:
true
MapItemView
{
model
:
multiVehicleManager
.
vehicles
delegate
:
VehicleMapItem
{
vehicle
:
object
coordinate
:
object
.
coordinate
isSatellite
:
flightMap
.
isSatelliteMap
}
}
// Add the mission items to the map
MapItemView
{
model
:
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
missionItems
:
0
delegate
:
MissionMapItem
{
missionItem
:
object
}
}
// Vehicle GPS lock display
Column
{
id
:
gpsLockColumn
y
:
(
parent
.
height
-
height
)
/
2
width
:
parent
.
width
Repeater
{
model
:
multiVehicleManager
.
vehicles
delegate
:
QGCLabel
{
width
:
gpsLockColumn
.
width
horizontalAlignment
:
Text
.
AlignHCenter
visible
:
object
.
satelliteLock
<
2
text
:
"
No GPS Lock for Vehicle #
"
+
object
.
id
}
}
}
// Mission item list
ListView
{
id
:
missionItemSummaryList
anchors.margins
:
ScreenTools
.
defaultFontPixelWidth
anchors.left
:
parent
.
left
anchors.right
:
flightMap
.
mapWidgets
.
left
anchors.bottom
:
parent
.
bottom
height
:
ScreenTools
.
defaultFontPixelHeight
*
7
spacing
:
ScreenTools
.
defaultFontPixelWidth
/
2
opacity
:
0.75
orientation
:
ListView
.
Horizontal
model
:
multiVehicleManager
.
activeVehicle
?
multiVehicleManager
.
activeVehicle
.
missionItems
:
0
property
real
_maxItemHeight
:
0
delegate
:
MissionItemSummary
{
opacity
:
0.75
missionItem
:
object
}
}
// ListView - Mission item list
}
}
QGCCompassWidget
{
QGCCompassWidget
{
...
...
src/FlightMap/FlightMap.qml
View file @
fa4e7a2c
This diff is collapsed.
Click to expand it.
src/FlightMap/MapItems/VehicleMapItem.qml
View file @
fa4e7a2c
...
@@ -24,8 +24,9 @@ This file is part of the QGROUNDCONTROL project
...
@@ -24,8 +24,9 @@ This file is part of the QGROUNDCONTROL project
/// @file
/// @file
/// @author Don Gagne <don@thegagnes.com>
/// @author Don Gagne <don@thegagnes.com>
import
QtQuick
2.4
import
QtQuick
2.4
import
QtLocation
5.3
import
QtLocation
5.3
import
QtPositioning
5.3
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
ScreenTools
1.0
import
QGroundControl
.
Vehicle
1.0
import
QGroundControl
.
Vehicle
1.0
...
@@ -37,7 +38,6 @@ MapQuickItem {
...
@@ -37,7 +38,6 @@ MapQuickItem {
anchorPoint.x
:
vehicleIcon
.
width
/
2
anchorPoint.x
:
vehicleIcon
.
width
/
2
anchorPoint.y
:
vehicleIcon
.
height
/
2
anchorPoint.y
:
vehicleIcon
.
height
/
2
coordinate
:
vehicle
.
coordinate
visible
:
vehicle
.
satelliteLock
>=
2
// 2D lock
visible
:
vehicle
.
satelliteLock
>=
2
// 2D lock
sourceItem
:
Image
{
sourceItem
:
Image
{
...
...
src/Vehicle/Vehicle.cc
View file @
fa4e7a2c
...
@@ -729,6 +729,7 @@ void Vehicle::_waypointViewOnlyListChanged()
...
@@ -729,6 +729,7 @@ void Vehicle::_waypointViewOnlyListChanged()
for
(
int
i
=
0
;
i
<
newMisionItems
.
count
();
i
++
)
{
for
(
int
i
=
0
;
i
<
newMisionItems
.
count
();
i
++
)
{
MissionItem
*
itemToCopy
=
newMisionItems
[
i
];
MissionItem
*
itemToCopy
=
newMisionItems
[
i
];
MissionItem
*
item
=
new
MissionItem
(
*
itemToCopy
);
MissionItem
*
item
=
new
MissionItem
(
*
itemToCopy
);
item
->
setParent
(
this
);
_missionItems
.
append
(
item
);
_missionItems
.
append
(
item
);
}
}
}
}
...
...
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