|
@@ -144,21 +144,13 @@ Item {
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
Component.onCompleted: root.textWidth = Math.max(root.textWidth, contentWidth)
|
|
|
}
|
|
|
- OptionInput {
|
|
|
- id: intervalValue
|
|
|
+ SpinBox {
|
|
|
Layout.minimumWidth: implicitWidth
|
|
|
Layout.fillWidth: true
|
|
|
- inputMethodHints: Qt.ImhDigitsOnly
|
|
|
- validator: IntValidator { bottom: 0 }
|
|
|
value: base.loader ? base.loader.interval : 1
|
|
|
- type: "int"
|
|
|
-
|
|
|
- onTextChanged: {
|
|
|
- if (activeFocus && text && root.locale) {
|
|
|
- var value = Number.fromLocaleString(root.locale, text);
|
|
|
- if (value) base.loader.interval = value;
|
|
|
- }
|
|
|
- }
|
|
|
+ suffix: " " + (value > 1 ? i18n("seconds") : i18n("second"))
|
|
|
+ minimumValue: 1.0
|
|
|
+ onValueChanged: base.loader.interval = value
|
|
|
}
|
|
|
}
|
|
|
RowLayout {
|
|
@@ -171,21 +163,16 @@ Item {
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
Component.onCompleted: root.textWidth = Math.max(root.textWidth, contentWidth)
|
|
|
}
|
|
|
- OptionInput {
|
|
|
- id: minTempValue
|
|
|
+ SpinBox {
|
|
|
+ id: minTempBox
|
|
|
Layout.minimumWidth: implicitWidth
|
|
|
Layout.fillWidth: true
|
|
|
- inputMethodHints: Qt.ImhFormattedNumbersOnly
|
|
|
- validator: DoubleValidator { top: base.maxTemp }
|
|
|
+ decimals: 2
|
|
|
+ maximumValue: maxTempBox.value
|
|
|
+ minimumValue: Units.fromKelvin(0, base.unit)
|
|
|
value: Units.fromCelsius(base.minTemp, base.unit)
|
|
|
- type: "double"
|
|
|
-
|
|
|
- onTextChanged: {
|
|
|
- if (activeFocus && text && root.locale) {
|
|
|
- var value = Units.toCelsius(Number.fromLocaleString(locale, text), base.unit);
|
|
|
- if (value) base.minTemp = value;
|
|
|
- }
|
|
|
- }
|
|
|
+ suffix: base.unit == 0 ? i18n("°C") : base.unit == 1 ? i18n("K") : i18n("°F")
|
|
|
+ onValueChanged: base.minTemp = value
|
|
|
}
|
|
|
}
|
|
|
RowLayout {
|
|
@@ -198,21 +185,16 @@ Item {
|
|
|
horizontalAlignment: Text.AlignRight
|
|
|
Component.onCompleted: root.textWidth = Math.max(root.textWidth, contentWidth)
|
|
|
}
|
|
|
- OptionInput {
|
|
|
- id: maxTempValue
|
|
|
+ SpinBox {
|
|
|
+ id: maxTempBox
|
|
|
Layout.minimumWidth: implicitWidth
|
|
|
Layout.fillWidth: true
|
|
|
- inputMethodHints: Qt.ImhFormattedNumbersOnly
|
|
|
- validator: DoubleValidator { bottom: base.minTemp }
|
|
|
+ decimals: 2
|
|
|
+ maximumValue: Number.POSITIVE_INFINITY
|
|
|
+ minimumValue: minTempBox.value
|
|
|
value: Units.fromCelsius(base.maxTemp, base.unit)
|
|
|
- type: "double"
|
|
|
-
|
|
|
- onTextChanged: {
|
|
|
- if (activeFocus && text && root.locale) {
|
|
|
- var value = Units.toCelsius(Number.fromLocaleString(locale, text), base.unit);
|
|
|
- if (value) base.maxTemp = value;
|
|
|
- }
|
|
|
- }
|
|
|
+ suffix: base.unit == 0 ? i18n("°C") : base.unit == 1 ? i18n("K") : i18n("°F")
|
|
|
+ onValueChanged: base.maxTemp = value
|
|
|
}
|
|
|
}
|
|
|
RowLayout {
|
|
@@ -230,7 +212,6 @@ Item {
|
|
|
Layout.fillWidth: true
|
|
|
color: base.systemdCom.serviceExists ? "green" : "red"
|
|
|
value: base.serviceName
|
|
|
- type: "string"
|
|
|
onTextChanged: base.serviceName = text
|
|
|
}
|
|
|
}
|