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
27 width: container.width * container.scale
28 height: container.height * container.scale
32 language: binding.language
38 onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
39 onLanguageChanged: translator.language = language
44 anchors.centerIn: parent
47 scale: screenInfo.scale_factor()
51 anchors.topMargin: width / 10
52 anchors.bottomMargin: width / 10
54 Layout.fillHeight: true
55 Layout.alignment: Qt.AlignHCenter
57 source: './images/HMI_HVAC_Fan_Icon.svg'
60 width: container.width * 0.8
63 anchors.left: parent.left
64 anchors.right: parent.right
65 anchors.verticalCenter: parent.verticalCenter
70 binding.fanSpeed = value
74 anchors.left: fanSpeedSlider.left
75 anchors.top: fanSpeedSlider.bottom
77 text: translator.translate(qsTr('FAN SPEED'), translator.language)
82 Layout.fillHeight: true
83 Layout.fillWidth: true
84 Layout.alignment: Layout.Center
87 Layout.fillWidth: true
94 onCurrentItemChanged: {
95 console.log("Left Temp changed",degree)
96 binding.leftTemperature = degree
101 Layout.fillWidth: true
104 onImage: './images/HMI_HVAC_Active.svg'
105 offImage: './images/HMI_HVAC_Inactive.svg'
107 anchors.centerIn: parent
108 color: parent.checked ? '#00ADDC' : '#848286'
109 text: translator.translate(qsTr('A/C'), translator.language)
110 font.pixelSize: parent.height / 3
113 console.debug('A/C', checked)
117 onImage: './images/HMI_HVAC_Active.svg'
118 offImage: './images/HMI_HVAC_Inactive.svg'
120 anchors.centerIn: parent
121 color: parent.checked ? '#00ADDC' : '#848286'
122 text: translator.translate(qsTr('AUTO'), translator.language)
123 font.pixelSize: parent.height / 3
126 console.debug('AUTO', checked)
130 onImage: './images/HMI_HVAC_Circulation_Active.svg'
131 offImage: './images/HMI_HVAC_Circulation_Inactive.svg'
133 console.debug('Circulation', checked)
139 Layout.fillWidth: true
146 onCurrentItemChanged: {
147 console.log("Right Temp changed",degree)
148 binding.rightTemperature = degree
155 Layout.fillHeight: true
156 Layout.alignment: Qt.AlignHCenter
157 spacing: root.width / 20
159 model: ['AirDown', 'AirUp', 'AirRight', 'Rear', 'Front']
161 onImage: './images/HMI_HVAC_%1_Active.svg'.arg(model.modelData)
162 offImage: './images/HMI_HVAC_%1_Inactive.svg'.arg(model.modelData)
164 console.debug(model.modelData, checked)