6import QGroundControl.Controls
7import QGroundControl.FactControls
11 height: _currentItem ? valuesRect.y + valuesRect.height + _innerMargin : titleLayout.y + titleLayout.height + _margin
12 color: _currentItem ? qgcPal.buttonHighlight : qgcPal.windowShade
15 property var rallyPoint ///< RallyPoint object associated with editor
16 property var controller ///< RallyPointController
18 property bool _currentItem: rallyPoint ? rallyPoint === controller.currentRallyPoint : false
19 property color _outerTextColor: qgcPal.text
21 readonly property real _margin: ScreenTools.defaultFontPixelWidth / 2
22 readonly property real _innerMargin: 2
23 readonly property real _radius: ScreenTools.defaultFontPixelWidth / 2
24 readonly property real _titleHeight: ScreenTools.implicitComboBoxHeight + ScreenTools.defaultFontPixelWidth
26 QGCPalette { id: qgcPal; colorGroupEnabled: true }
30 anchors.margins: _margin
31 anchors.left: parent.left
32 anchors.rightMargin: _margin * 2
33 anchors.right: parent.right
35 spacing: ScreenTools.defaultFontPixelWidth
38 text: qsTr("Rally Point")
39 color: _outerTextColor
44 Layout.alignment: Qt.AlignRight
45 Layout.preferredWidth: ScreenTools.defaultFontPixelHeight * 0.5
46 Layout.preferredHeight: Layout.preferredWidth
47 source: "/res/XDelete.svg"
48 color: _outerTextColor
54 anchors.top: titleLayout.top
55 anchors.bottomMargin: -_margin
56 anchors.bottom: titleLayout.bottom
57 anchors.left: titleLayout.left
58 anchors.right: titleLayout.right
60 if (mainWindow.allowViewSwitch()) {
61 controller.currentRallyPoint = rallyPoint
67 anchors.top: selectMouseArea.top
68 anchors.bottom: selectMouseArea.bottom
69 anchors.right: selectMouseArea.right
72 if (mainWindow.allowViewSwitch()) {
73 controller.removePoint(rallyPoint)
80 anchors.margins: _innerMargin
81 anchors.left: parent.left
82 anchors.right: parent.right
83 anchors.top: titleLayout.bottom
84 height: valuesLayout.height + (_margin * 2)
85 color: qgcPal.windowShadeDark
91 anchors.margins: _margin
92 anchors.left: parent.left
93 anchors.right: parent.right
94 anchors.top: parent.top
98 model: rallyPoint ? rallyPoint.textFieldFacts : 0
100 LabelledFactTextField {
101 Layout.fillWidth: true
102 label: modelData.shortDescription