QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
MissionItemList.qml
Go to the documentation of this file.
1import QtQuick
2
3import QGroundControl
4import QGroundControl.Controls
5
6/// List of the mission's visual items. Selecting a row makes it the current plan view item.
7QGCListView {
8 id: root
9
10 required property var missionController
11
12 signal itemActivated
13
14 objectName: "planPanel_missionList"
15 model: missionController.visualItems
16 spacing: ScreenTools.defaultFontPixelHeight * 0.1
17 clip: true
18 currentIndex: missionController.currentPlanViewVIIndex
19
20 onCurrentIndexChanged: positionViewAtIndex(currentIndex, ListView.Contain)
21
22 delegate: MissionItemRow {
23 required property var model
24
25 width: root.width
26 object: model.object
27
28 onClicked: {
29 if (!mainWindow.allowViewSwitch()) {
30 return
31 }
32 root.missionController.setCurrentPlanViewSeqNum(object.sequenceNumber, false)
33 root.itemActivated()
34 }
35 }
36}