6import QGroundControl.Controls
10 text: fact ? fact.valueString : ""
11 unitsLabel: fact ? fact.units : ""
14 numericValuesOnly: fact && !fact.typeIsString
15 maximumLength: fact && fact.maxStringLength > 0 ? fact.maxStringLength : 32767 // 32767 is the TextInput default (no limit)
19 property Fact fact: null
21 onEditingFinished: _onEditingFinished()
23 function _onEditingFinished() {
24 // Focus loss also lands here; writing back the unedited, rounded display text would change the value
25 if (text === fact.valueString) {
26 clearValidationError()
29 var errorString = fact.validate(text, false /* convertOnly */)
30 if (errorString === "") {
31 clearValidationError()
35 showValidationError(errorString, fact.valueString)
39 onHelpClicked: helpDialogFactory.open()
41 QGCPopupDialogFactory {
44 dialogComponent: helpDialogComponent
48 id: helpDialogComponent
50 ParameterEditorDialog {
51 title: qsTr("Value Details")