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
52 anchors.topMargin: width / 10
53 anchors.bottomMargin: width / 10
55 Layout.fillHeight: true
56 Layout.alignment: Qt.AlignHCenter
58 source: './images/HMI_HVAC_Fan_Icon.svg'
61 width: container.width * 0.8
64 anchors.left: parent.left
65 anchors.right: parent.right
66 anchors.verticalCenter: parent.verticalCenter
71 binding.fanSpeed = value
75 anchors.left: fanSpeedSlider.left
76 anchors.top: fanSpeedSlider.bottom
78 text: translator.translate(qsTr('FAN SPEED'), translator.language)
83 Layout.fillHeight: true
84 Layout.fillWidth: true
85 Layout.alignment: Layout.Center
88 Layout.fillWidth: true
95 onCurrentItemChanged: {
96 console.log("Left Temp changed",degree)
97 binding.leftTemperature = degree
102 Layout.fillWidth: true
105 onImage: './images/HMI_HVAC_Active.svg'
106 offImage: './images/HMI_HVAC_Inactive.svg'
108 anchors.centerIn: parent
109 color: parent.checked ? '#00ADDC' : '#848286'
110 text: translator.translate(qsTr('A/C'), translator.language)
111 font.pixelSize: parent.height / 3
114 console.debug('A/C', checked)
118 onImage: './images/HMI_HVAC_Active.svg'
119 offImage: './images/HMI_HVAC_Inactive.svg'
121 anchors.centerIn: parent
122 color: parent.checked ? '#00ADDC' : '#848286'
123 text: translator.translate(qsTr('AUTO'), translator.language)
124 font.pixelSize: parent.height / 3
127 console.debug('AUTO', checked)
131 onImage: './images/HMI_HVAC_Circulation_Active.svg'
132 offImage: './images/HMI_HVAC_Circulation_Inactive.svg'
134 console.debug('Circulation', checked)
140 Layout.fillWidth: true
147 onCurrentItemChanged: {
148 console.log("Right Temp changed",degree)
149 binding.rightTemperature = degree
156 Layout.fillHeight: true
157 Layout.alignment: Qt.AlignHCenter
158 spacing: root.width / 20
160 model: ['AirDown', 'AirUp', 'AirRight', 'Rear', 'Front']
162 onImage: './images/HMI_HVAC_%1_Active.svg'.arg(model.modelData)
163 offImage: './images/HMI_HVAC_%1_Inactive.svg'.arg(model.modelData)
165 console.debug(model.modelData, checked)