summary |
shortlog |
log |
commit | commitdiff |
review |
tree
raw |
patch |
inline | side by side (from parent 1:
7055094)
Change-Id: I12130b4a1c5c6dad9658972d32b4b9e362a8d1cc
Signed-off-by: Loïc Collignon <loic.collignon@iot.bzh>
Translator {
id: translator
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
property real fanSpeed: 0.0
property real leftTemperature: 21.0
property real rightTemperature: 21.0
property real fanSpeed: 0.0
property real leftTemperature: 21.0
property real rightTemperature: 21.0
+ property string language: "en_US"
property Connections c : Connections {
target: root
property Connections c : Connections {
target: root
console.debug(JSON.stringify(json))
sendTextMessage(JSON.stringify(json))
}
console.debug(JSON.stringify(json))
sendTextMessage(JSON.stringify(json))
}
+ onLanguageChanged: {
+ var json = [MessageId.call, '9999', 'hvac/set', {'Language': language}]
+ console.debug(JSON.stringify(json))
+ sendTextMessage(JSON.stringify(json))
+ }
}
onTextMessageReceived: {
}
onTextMessageReceived: {
case MessageId.event:
if (json[1] == "hvac/language")
console.log("HVAC event received: ",json[2])
case MessageId.event:
if (json[1] == "hvac/language")
console.log("HVAC event received: ",json[2])
- ApplicationWindow.root.translator.language = json[2].data
+ root.language = json[2].data
root.statusString = "Language changed to "+language
break
}
root.statusString = "Language changed to "+language
break
}