QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
PlanPanelRow.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7/// Selectable list row. Children are laid out in a row.
8Rectangle {
9 id: root
10
11 default property alias rowContent: contentLayout.data
12
13 property bool selected: false
14
15 signal clicked
16
17 implicitHeight: Math.max(ScreenTools.defaultFontPixelHeight * 2.2, ScreenTools.isMobile ? ScreenTools.minTouchPixels : 0)
18 radius: ScreenTools.defaultBorderRadius
19 color: selected ? qgcPal.accentSubtle : "transparent"
20 border.width: selected ? 1 : 0
21 border.color: qgcPal.accent
22
23 QGCPalette { id: qgcPal }
24
25 RowLayout {
26 id: contentLayout
27
28 anchors.fill: parent
29 anchors.leftMargin: ScreenTools.defaultFontPixelWidth
30 anchors.rightMargin: ScreenTools.defaultFontPixelWidth
31 spacing: ScreenTools.defaultFontPixelWidth
32 }
33
34 MouseArea {
35 anchors.fill: parent
36 onClicked: root.clicked()
37 }
38}