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 AGL.Demo.Controls 1.0
26 width: container.width * container.scale
27 height: container.height * container.scale
36 onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
37 onLanguageChanged: translator.language = language
42 anchors.centerIn: parent
45 scale: screenInfo.scale_factor()
49 anchors.topMargin: width / 10
50 anchors.bottomMargin: width / 10
52 Layout.fillHeight: true
53 Layout.alignment: Qt.AlignHCenter
55 source: './images/HMI_HVAC_Fan_Icon.svg'
58 width: container.width * 0.8
61 anchors.left: parent.left
62 anchors.right: parent.right
63 anchors.verticalCenter: parent.verticalCenter
72 anchors.left: fanSpeedSlider.left
73 anchors.top: fanSpeedSlider.bottom
75 text: translator.translate(qsTr('FAN SPEED'), translator.language)
80 Layout.fillHeight: true
81 Layout.fillWidth: true
82 Layout.alignment: Layout.Center
85 Layout.fillWidth: true
92 onCurrentItemChanged: {
93 console.log("Left Temp changed",degree)
94 hvac.leftTemperature = degree
99 Layout.fillWidth: true
102 onImage: './images/HMI_HVAC_Active.svg'
103 offImage: './images/HMI_HVAC_Inactive.svg'
105 anchors.centerIn: parent
106 color: parent.checked ? '#00ADDC' : '#848286'
107 text: translator.translate(qsTr('A/C'), translator.language)
108 font.pixelSize: parent.height / 3
111 console.debug('A/C', checked)
115 onImage: './images/HMI_HVAC_Active.svg'
116 offImage: './images/HMI_HVAC_Inactive.svg'
118 anchors.centerIn: parent
119 color: parent.checked ? '#00ADDC' : '#848286'
120 text: translator.translate(qsTr('AUTO'), translator.language)
121 font.pixelSize: parent.height / 3
124 console.debug('AUTO', checked)
128 onImage: './images/HMI_HVAC_Circulation_Active.svg'
129 offImage: './images/HMI_HVAC_Circulation_Inactive.svg'
131 console.debug('Circulation', checked)
137 Layout.fillWidth: true
144 onCurrentItemChanged: {
145 console.log("Right Temp changed",degree)
146 hvac.rightTemperature = degree
153 Layout.fillHeight: true
154 Layout.alignment: Qt.AlignHCenter
155 spacing: root.width / 20
157 model: ['AirDown', 'AirUp', 'AirRight', 'Rear', 'Front']
159 onImage: './images/HMI_HVAC_%1_Active.svg'.arg(model.modelData)
160 offImage: './images/HMI_HVAC_%1_Inactive.svg'.arg(model.modelData)
162 console.debug(model.modelData, checked)