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
27 width: container.width * container.scale
28 height: container.height * container.scale
37 onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
38 onLanguageChanged: translator.language = language
43 anchors.centerIn: parent
50 anchors.topMargin: width / 10
51 anchors.bottomMargin: width / 10
53 Layout.fillHeight: true
54 Layout.alignment: Qt.AlignHCenter
56 source: './images/HMI_HVAC_Fan_Icon.svg'
62 anchors.left: parent.left
63 anchors.right: parent.right
64 anchors.verticalCenter: parent.verticalCenter
73 anchors.left: fanSpeedSlider.left
74 anchors.top: fanSpeedSlider.bottom
76 text: translator.translate(qsTr('FAN SPEED'), translator.language)
81 Layout.fillHeight: true
82 Layout.fillWidth: true
83 Layout.alignment: Layout.Center
86 Layout.fillWidth: true
93 onCurrentItemChanged: {
94 console.log("Left Temp changed",degree)
95 hvac.leftTemperature = degree
100 Layout.fillWidth: true
103 onImage: './images/HMI_HVAC_Active.svg'
104 offImage: './images/HMI_HVAC_Inactive.svg'
106 anchors.centerIn: parent
107 color: parent.checked ? '#00ADDC' : '#848286'
108 text: translator.translate(qsTr('A/C'), translator.language)
109 font.pixelSize: parent.height / 3
112 console.debug('A/C', checked)
116 onImage: './images/HMI_HVAC_Active.svg'
117 offImage: './images/HMI_HVAC_Inactive.svg'
119 anchors.centerIn: parent
120 color: parent.checked ? '#00ADDC' : '#848286'
121 text: translator.translate(qsTr('AUTO'), translator.language)
122 font.pixelSize: parent.height / 3
125 console.debug('AUTO', checked)
129 onImage: './images/HMI_HVAC_Circulation_Active.svg'
130 offImage: './images/HMI_HVAC_Circulation_Inactive.svg'
132 console.debug('Circulation', checked)
138 Layout.fillWidth: true
145 onCurrentItemChanged: {
146 console.log("Right Temp changed",degree)
147 hvac.rightTemperature = degree
154 Layout.fillHeight: true
155 Layout.alignment: Qt.AlignHCenter
156 spacing: root.width / 20
158 model: ['AirDown', 'AirUp', 'AirRight', 'Rear', 'Front']
160 onImage: './images/HMI_HVAC_%1_Active.svg'.arg(model.modelData)
161 offImage: './images/HMI_HVAC_%1_Inactive.svg'.arg(model.modelData)
163 console.debug(model.modelData, checked)