QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
SectionHeader.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Controls
3import QtQuick.Layouts
4
5import QGroundControl
6import QGroundControl.Controls
7
8CheckBox {
9 id: control
10 focusPolicy: Qt.ClickFocus
11 checked: true
12 leftPadding: 0
13
14 property var color: qgcPal.text
15 property bool showSpacer: true
16 property ButtonGroup buttonGroup: null
17
18 property real _sectionSpacer: ScreenTools.defaultFontPixelWidth / 2 // spacing between section headings
19
20 onButtonGroupChanged: {
21 if (buttonGroup) {
22 buttonGroup.addButton(control)
23 }
24 }
25
26 QGCPalette { id: qgcPal; colorGroupEnabled: enabled }
27
28 contentItem: ColumnLayout {
29 Item {
30 Layout.preferredHeight: control._sectionSpacer
31 width: 1
32 visible: control.showSpacer
33 }
34
35 QGCLabel {
36 text: control.text
37 color: control.color
38 Layout.fillWidth: true
39
40 QGCColoredImage {
41 anchors.right: parent.right
42 anchors.verticalCenter: parent.verticalCenter
43 width: parent.height / 2
44 height: width
45 source: "/qmlimages/arrow-down.png"
46 color: qgcPal.text
47 visible: !control.checked
48 }
49 }
50
51 Rectangle {
52 Layout.fillWidth: true
53 height: 1
54 color: qgcPal.text
55 }
56 }
57
58 indicator: Item {}
59}