QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
LabelledFactTextField.qml
Go to the documentation of this file.
1import QtQuick
2import QtQuick.Layouts
3
4import QGroundControl
5import QGroundControl.Controls
6import QGroundControl.FactControls
7
8GridLayout {
9 property string label: fact ? fact.shortDescription : ""
10 property alias fact: _factTextField.fact
11 property real textFieldPreferredWidth: -1
12 property alias textFieldUnitsLabel: _factTextField.unitsLabel
13 property alias textFieldShowUnits: _factTextField.showUnits
14 property alias textFieldShowHelp: _factTextField.showHelp
15 property alias textField: _factTextField
16 property bool vertical: false ///< true: label above the text field
17
18 columns: vertical ? 1 : 2
19 columnSpacing: ScreenTools.defaultFontPixelWidth * 2
20 rowSpacing: 0
21
22 QGCLabel {
23 Layout.fillWidth: !vertical
24 Layout.minimumWidth: implicitWidth
25 text: label
26 visible: label !== ""
27 }
28
29 FactTextField {
30 id: _factTextField
31 Layout.preferredWidth: textFieldPreferredWidth
32 }
33}