X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=app%2FHVAC.qml;h=317ef708ae460985d0de39b6a278fe0a0cd86b1d;hb=refs%2Fheads%2Fsandbox%2Fzheng_wenlong%2Fals2019_horizontal;hp=b1925dd0b9b3283957910b3b605e72ecdf3ec039;hpb=bdc6eaee726a91301153c5e67b55f9324cacae85;p=apps%2Fhvac.git diff --git a/app/HVAC.qml b/app/HVAC.qml index b1925dd..317ef70 100644 --- a/app/HVAC.qml +++ b/app/HVAC.qml @@ -24,22 +24,36 @@ import 'api' as API ApplicationWindow { id: root + width: container.width * container.scale + height: container.height * container.scale + Translator { id: translator language: binding.language } - API.Binding { - id: binding - url: bindingAddress - onFanSpeedChanged: fanSpeedSlider.value = fanSpeed - onLanguageChanged: translator.language = language - } + API.Binding { + id: binding + url: bindingAddress + onFanSpeedChanged: fanSpeedSlider.value = fanSpeed + onLanguageChanged: translator.language = language + } + + Item { + id: container +// anchors.centerIn: parent + x: 555 + y: -465 + width: 720 + height: 1920 + rotation: -90 + scale: screenInfo.scale_factor() ColumnLayout { anchors.fill: parent anchors.topMargin: width / 10 anchors.bottomMargin: width / 10 + RowLayout { Layout.fillHeight: true Layout.alignment: Qt.AlignHCenter @@ -47,7 +61,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 @@ -71,7 +85,8 @@ ApplicationWindow { RowLayout { Layout.fillHeight: true Layout.fillWidth: true - Layout.alignment: Layout.Center + Layout.alignment: Qt.AlignHCenter + rotation: 90 spacing: 20 ColumnLayout { Layout.fillWidth: true @@ -82,8 +97,8 @@ ApplicationWindow { } HeatDegree { onCurrentItemChanged: { - console.log("Left Temp changed",degree) - binding.leftTemperature = degree + console.log("Left Temp changed",degree) + binding.leftTemperature = degree } } } @@ -140,16 +155,15 @@ ApplicationWindow { } } } - RowLayout { Layout.fillHeight: true Layout.alignment: Qt.AlignHCenter - spacing: root.width / 20 Repeater { model: ['AirDown', 'AirUp', 'AirRight', 'Rear', 'Front'] ToggleButton { onImage: './images/HMI_HVAC_%1_Active.svg'.arg(model.modelData) offImage: './images/HMI_HVAC_%1_Inactive.svg'.arg(model.modelData) + rotation: 90 onCheckedChanged: { console.debug(model.modelData, checked) } @@ -158,3 +172,4 @@ ApplicationWindow { } } } +}