Debian Codegraph @

src/GUI/qml/SettingLineEdit.qml

raw
1 import QtQuick 2.4
2 import FlightGear 1.0
3
4 SettingControl {
5 id: root
6
7 implicitHeight: edit.implicitHeight + Style.margin + description.implicitHeight
8
9 property alias placeholder: edit.placeholder
10 property alias validation: edit.validator
11 property alias value: edit.text
12 property alias suggestedWidthString: edit.suggestedWidthString
13 property alias useFullWidth: edit.useFullWidth
14 property string defaultValue: ""
15
16 function apply()
17 {
18 if (option != "") {
19 _config.setArg(option, value)
20 }
21 }
22
23 LineEdit {
24 id: edit
25 label: root.label
26 width: parent.width
27 enabled: root.enabled
28 }
29
30 SettingDescription {
31 id: description
32 enabled: root.enabled
33 text: root.description
34 anchors.top: edit.bottom
35 anchors.topMargin: Style.margin
36 width: parent.width
37 }
38 }