2 * Copyright (C) 2016 The Qt Company Ltd.
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 import QtQuick.Layouts 1.1
19 import QtQuick.Controls 2.0
20 import QtQuick.Window 2.11
21 import AGL.Demo.Controls 1.0
28 width: container.width * container.scale
29 height: container.height * container.scale
33 language: binding.language
39 onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
40 onLanguageChanged: translator.language = language
45 anchors.centerIn: parent
54 anchors.topMargin: width / 10
55 anchors.bottomMargin: width / 10
57 Layout.fillHeight: true
58 Layout.alignment: Qt.AlignHCenter
60 source: './images/HMI_HVAC_Fan_Icon.svg'
63 width: container.width * 0.8
66 anchors.left: parent.left
67 anchors.right: parent.right
68 anchors.verticalCenter: parent.verticalCenter
73 binding.fanSpeed = value
77 anchors.left: fanSpeedSlider.left
78 anchors.top: fanSpeedSlider.bottom
80 text: translator.translate(qsTr('FAN SPEED'), translator.language)
85 Layout.fillHeight: true
86 Layout.fillWidth: true
87 Layout.alignment: Layout.Center
90 Layout.fillWidth: true
97 onCurrentItemChanged: {
98 console.log("Left Temp changed",degree)
99 binding.leftTemperature = degree
104 Layout.fillWidth: true
107 onImage: './images/HMI_HVAC_Active.svg'
108 offImage: './images/HMI_HVAC_Inactive.svg'
110 anchors.centerIn: parent
111 color: parent.checked ? '#00ADDC' : '#848286'
112 text: translator.translate(qsTr('A/C'), translator.language)
113 font.pixelSize: parent.height / 3
116 console.debug('A/C', checked)
120 onImage: './images/HMI_HVAC_Active.svg'
121 offImage: './images/HMI_HVAC_Inactive.svg'
123 anchors.centerIn: parent
124 color: parent.checked ? '#00ADDC' : '#848286'
125 text: translator.translate(qsTr('AUTO'), translator.language)
126 font.pixelSize: parent.height / 3
129 console.debug('AUTO', checked)
133 onImage: './images/HMI_HVAC_Circulation_Active.svg'
134 offImage: './images/HMI_HVAC_Circulation_Inactive.svg'
136 console.debug('Circulation', checked)
142 Layout.fillWidth: true
149 onCurrentItemChanged: {
150 console.log("Right Temp changed",degree)
151 binding.rightTemperature = degree
158 Layout.fillHeight: true
159 Layout.alignment: Qt.AlignHCenter
160 spacing: root.width / 20
162 model: ['AirDown', 'AirUp', 'AirRight', 'Rear', 'Front']
164 onImage: './images/HMI_HVAC_%1_Active.svg'.arg(model.modelData)
165 offImage: './images/HMI_HVAC_%1_Inactive.svg'.arg(model.modelData)
167 console.debug(model.modelData, checked)