5import QGroundControl.Controls
7/// List of the rally points of the Rally Points tab
11 required property var page
15 objectName: "planPanel_rallyList"
17 spacing: ScreenTools.defaultFontPixelHeight * 0.1
20 delegate: PlanPanelRow {
23 required property var object
24 required property int index
26 objectName: "planPanel_rallyRow_" + index
28 selected: object === root.page.current
31 if (!mainWindow.allowViewSwitch()) {
34 root.page.select(object)
39 Layout.preferredWidth: ScreenTools.defaultFontPixelHeight * 1.5
40 Layout.preferredHeight: Layout.preferredWidth
42 color: row.selected ? qgcPal.accent : "transparent"
44 border.color: row.selected ? qgcPal.accent : qgcPal.textPrimary
47 anchors.centerIn: parent
48 text: String(row.index + 1)
49 font.pointSize: ScreenTools.smallFontPointSize
51 color: row.selected ? qgcPal.accentText : qgcPal.textPrimary
56 Layout.fillWidth: true
57 elide: Text.ElideRight
58 text: qsTr("%1, %2").arg(row.object.coordinate.latitude.toFixed(5)).arg(row.object.coordinate.longitude.toFixed(5))
62 color: qgcPal.textSecondary
63 font.pointSize: ScreenTools.smallFontPointSize
64 text: qsTr("%1 %2").arg(QGroundControl.unitsConversion.metersToAppSettingsVerticalDistanceUnitsString(row.object.coordinate.altitude))
65 .arg(QGroundControl.altitudeFrameExtraUnits(row.object.altitudeFrame))
69 QGCPalette { id: qgcPal }