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
d90dd924
Commit
d90dd924
authored
Jan 19, 2017
by
Don Gagne
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MultiVehicle List supports flight mode change
parent
4bb4412f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
72 additions
and
4 deletions
+72
-4
qgroundcontrol.qrc
qgroundcontrol.qrc
+1
-0
MultiVehicleList.qml
src/FlightDisplay/MultiVehicleList.qml
+4
-4
FlightModeMenu.qml
src/QmlControls/FlightModeMenu.qml
+66
-0
QGroundControl.Controls.qmldir
src/QmlControls/QGroundControl.Controls.qmldir
+1
-0
No files found.
qgroundcontrol.qrc
View file @
d90dd924
...
...
@@ -48,6 +48,7 @@
<file alias="QGroundControl/Controls/ExclusiveGroupItem.qml">src/QmlControls/ExclusiveGroupItem.qml</file>
<file alias="QGroundControl/Controls/FactSliderPanel.qml">src/QmlControls/FactSliderPanel.qml</file>
<file alias="QGroundControl/Controls/FlightModeDropdown.qml">src/QmlControls/FlightModeDropdown.qml</file>
<file alias="QGroundControl/Controls/FlightModeMenu.qml">src/QmlControls/FlightModeMenu.qml</file>
<file alias="QGroundControl/Controls/GuidedBar.qml">src/QmlControls/GuidedBar.qml</file>
<file alias="QGroundControl/Controls/IndicatorButton.qml">src/QmlControls/IndicatorButton.qml</file>
<file alias="QGroundControl/Controls/JoystickThumbPad.qml">src/QmlControls/JoystickThumbPad.qml</file>
...
...
src/FlightDisplay/MultiVehicleList.qml
View file @
d90dd924
...
...
@@ -77,10 +77,10 @@ QGCListView {
color
:
_textColor
}
QGCLabel
{
text
:
_vehicle
.
flightMode
FlightModeMenu
{
font.pointSize
:
ScreenTools
.
largeFontPointSize
color
:
_textColor
activeVehicle
:
_vehicle
}
}
...
...
src/QmlControls/FlightModeMenu.qml
0 → 100644
View file @
d90dd924
/****************************************************************************
*
* (c) 2009-2016 QGROUNDCONTROL PROJECT <http://www.qgroundcontrol.org>
*
* QGroundControl is licensed according to the terms in the file
* COPYING.md in the root of the source code directory.
*
****************************************************************************/
import
QtQuick
2.5
import
QtQuick
.
Controls
1.2
import
QGroundControl
1.0
import
QGroundControl
.
Controls
1.0
import
QGroundControl
.
ScreenTools
1.0
// Label control whichs pop up a flight mode change menu when clicked
QGCLabel
{
id
:
flightModeMenuLabel
text
:
activeVehicle
?
activeVehicle
.
flightMode
:
qsTr
(
"
N/A
"
,
"
No data to display
"
)
property
var
activeVehicle
:
QGroundControl
.
multiVehicleManager
.
activeVehicle
Menu
{
id
:
flightModesMenu
}
Component
{
id
:
flightModeMenuItemComponent
MenuItem
{
onTriggered
:
activeVehicle
.
flightMode
=
text
}
}
property
var
flightModesMenuItems
:
[]
function
updateFlightModesMenu
()
{
if
(
activeVehicle
&&
activeVehicle
.
flightModeSetAvailable
)
{
// Remove old menu items
for
(
var
i
=
0
;
i
<
flightModesMenuItems
.
length
;
i
++
)
{
flightModesMenu
.
removeItem
(
flightModesMenuItems
[
i
])
}
flightModesMenuItems
.
length
=
0
// Add new items
for
(
var
i
=
0
;
i
<
activeVehicle
.
flightModes
.
length
;
i
++
)
{
var
menuItem
=
flightModeMenuItemComponent
.
createObject
(
null
,
{
"
text
"
:
activeVehicle
.
flightModes
[
i
]
})
flightModesMenuItems
.
push
(
menuItem
)
flightModesMenu
.
insertItem
(
i
,
menuItem
)
}
}
}
Component.onCompleted
:
flightModeMenuLabel
.
updateFlightModesMenu
()
Connections
{
target
:
QGroundControl
.
multiVehicleManager
onActiveVehicleChanged
:
flightModeMenuLabel
.
updateFlightModesMenu
()
}
MouseArea
{
visible
:
activeVehicle
&&
activeVehicle
.
flightModeSetAvailable
anchors.fill
:
parent
onClicked
:
flightModesMenu
.
popup
()
}
}
src/QmlControls/QGroundControl.Controls.qmldir
View file @
d90dd924
...
...
@@ -7,6 +7,7 @@ DropButton 1.0 DropButton.qml
ExclusiveGroupItem 1.0 ExclusiveGroupItem.qml
FactSliderPanel 1.0 FactSliderPanel.qml
FlightModeDropdown 1.0 FlightModeDropdown.qml
FlightModeMenu 1.0 FlightModeMenu.qml
GuidedBar 1.0 GuidedBar.qml
IndicatorButton 1.0 IndicatorButton.qml
JoystickThumbPad 1.0 JoystickThumbPad.qml
...
...
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