X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2FHVAC.qml;h=1a3916724fdb9b2ca189e5b17c468e776bebba4a;hb=611a430a2457eed24cee182c073189653c55a793;hp=26101640fe9a10c3f9537dd726b1033fd2f69a57;hpb=f18741520f54365141d997fe7a7a40d0b8f9bc5e;p=apps%2Fhvac.git diff --git a/app/HVAC.qml b/app/HVAC.qml index 2610164..1a39167 100644 --- a/app/HVAC.qml +++ b/app/HVAC.qml @@ -17,25 +17,34 @@ import QtQuick 2.6 import QtQuick.Layouts 1.1 import QtQuick.Controls 2.0 +import QtQuick.Window 2.11 import AGL.Demo.Controls 1.0 import Translator 1.0 -import 'api' as API ApplicationWindow { id: root + width: container.width * container.scale + height: container.height * container.scale + Translator { id: translator - language: binding.language + language: "en_US" } - API.Binding { - id: binding - url: bindingAddress + Connections { + target: hvac onFanSpeedChanged: fanSpeedSlider.value = fanSpeed onLanguageChanged: translator.language = language } + Item { + id: container + anchors.centerIn: parent + width: Screen.width + height: Screen.height + scale: 1 + ColumnLayout { anchors.fill: parent anchors.topMargin: width / 10 @@ -47,7 +56,7 @@ ApplicationWindow { source: './images/HMI_HVAC_Fan_Icon.svg' } Item { - width: root.width * 0.8 + width: container.width * 0.8 Slider { id: fanSpeedSlider anchors.left: parent.left @@ -57,7 +66,7 @@ ApplicationWindow { to: 255.0 stepSize: 1.0 onValueChanged: { - binding.fanSpeed = value + hvac.fanSpeed = value } } Label { @@ -83,7 +92,7 @@ ApplicationWindow { HeatDegree { onCurrentItemChanged: { console.log("Left Temp changed",degree) - binding.leftTemperature = degree + hvac.leftTemperature = degree } } } @@ -135,7 +144,7 @@ ApplicationWindow { HeatDegree { onCurrentItemChanged: { console.log("Right Temp changed",degree) - binding.rightTemperature = degree + hvac.rightTemperature = degree } } } @@ -158,3 +167,4 @@ ApplicationWindow { } } } +}