QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
ConfigSection.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6
7ColumnLayout {
8 id: control
9 spacing: ScreenTools.defaultFontPixelHeight / 3
10
11 default property alias contentItem: _controlsColumn.data
12
13 property string heading
14 property string iconSource
15
16 property real _margins: ScreenTools.defaultFontPixelHeight / 2
17
18 QGCPalette { id: qgcPal; colorGroupEnabled: true }
19
20 QGCLabel {
21 text: control.heading
22 font.pointSize: ScreenTools.largeFontPointSize
23 visible: control.heading !== ""
24 }
25
26 Rectangle {
27 implicitWidth: _contentRow.implicitWidth + _margins * 2
28 implicitHeight: _contentRow.implicitHeight + _margins * 2
29 Layout.fillWidth: true
30 color: qgcPal.windowShade
31 radius: ScreenTools.defaultFontPixelHeight / 4
32
33 RowLayout {
34 id: _contentRow
35 y: _margins
36 anchors.left: parent.left
37 anchors.right: parent.right
38 anchors.leftMargin: _margins
39 anchors.rightMargin: _margins
40 spacing: ScreenTools.defaultFontPixelWidth * 2
41
42 QGCColoredImage {
43 Layout.preferredWidth: ScreenTools.defaultFontPixelHeight * 3
44 Layout.preferredHeight: ScreenTools.defaultFontPixelHeight * 1.5
45 source: control.iconSource
46 color: qgcPal.text
47 fillMode: Image.PreserveAspectFit
48 visible: control.iconSource !== ""
49 }
50
51 ColumnLayout {
52 id: _controlsColumn
53 Layout.fillWidth: true
54 spacing: ScreenTools.defaultFontPixelHeight / 2
55 }
56 }
57 }
58}