Code Review
/
apps
/
hvac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
[ALS2018]: enable PWM fan demo by lin transceiver
[apps/hvac.git]
/
app
/
HVAC.qml
diff --git
a/app/HVAC.qml
b/app/HVAC.qml
index
b3be443
..
be16e3f
100644
(file)
--- a/
app/HVAC.qml
+++ b/
app/HVAC.qml
@@
-18,15
+18,22
@@
import QtQuick 2.6
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import AGL.Demo.Controls 1.0
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import AGL.Demo.Controls 1.0
+import Translator 1.0
import 'api' as API
ApplicationWindow {
id: root
import 'api' as API
ApplicationWindow {
id: root
+ Translator {
+ id: translator
+ language: binding.language
+ }
+
API.Binding {
id: binding
url: bindingAddress
onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
API.Binding {
id: binding
url: bindingAddress
onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
+ onLanguageChanged: translator.language = language
}
ColumnLayout {
}
ColumnLayout {
@@
-57,7
+64,7
@@
ApplicationWindow {
anchors.left: fanSpeedSlider.left
anchors.top: fanSpeedSlider.bottom
font.pixelSize: 32
anchors.left: fanSpeedSlider.left
anchors.top: fanSpeedSlider.bottom
font.pixelSize: 32
- text:
'FAN SPEED'
+ text:
translator.translate(qsTr('FAN SPEED'), translator.language)
}
}
}
}
}
}
@@
-89,7
+96,7
@@
ApplicationWindow {
Label {
anchors.centerIn: parent
color: parent.checked ? '#00ADDC' : '#848286'
Label {
anchors.centerIn: parent
color: parent.checked ? '#00ADDC' : '#848286'
- text:
'A/C'
+ text:
translator.translate(qsTr('A/C'), translator.language)
font.pixelSize: parent.height / 3
}
onCheckedChanged: {
font.pixelSize: parent.height / 3
}
onCheckedChanged: {
@@
-102,7
+109,7
@@
ApplicationWindow {
Label {
anchors.centerIn: parent
color: parent.checked ? '#00ADDC' : '#848286'
Label {
anchors.centerIn: parent
color: parent.checked ? '#00ADDC' : '#848286'
- text:
'AUTO'
+ text:
translator.translate(qsTr('AUTO'), translator.language)
font.pixelSize: parent.height / 3
}
onCheckedChanged: {
font.pixelSize: parent.height / 3
}
onCheckedChanged: {
@@
-131,6
+138,8
@@
ApplicationWindow {
binding.rightTemperature = degree
}
}
binding.rightTemperature = degree
}
}
+
+
}
}
}
}