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
50 scale: screenInfo.scale_factor()
54 anchors.topMargin: width / 10
55 anchors.bottomMargin: width / 10
58 Layout.fillHeight: true
59 Layout.alignment: Qt.AlignHCenter
61 source: './images/HMI_HVAC_Fan_Icon.svg'
64 width: container.width * 0.8
67 anchors.left: parent.left
68 anchors.right: parent.right
69 anchors.verticalCenter: parent.verticalCenter
74 binding.fanSpeed = value
78 anchors.left: fanSpeedSlider.left
79 anchors.top: fanSpeedSlider.bottom
81 text: translator.translate(qsTr('FAN SPEED'), translator.language)
86 Layout.fillHeight: true
87 Layout.fillWidth: true
88 Layout.alignment: Qt.AlignHCenter
92 Layout.fillWidth: true
99 onCurrentItemChanged: {
100 console.log("Left Temp changed",degree)
101 binding.leftTemperature = degree
106 Layout.fillWidth: true
109 onImage: './images/HMI_HVAC_Active.svg'
110 offImage: './images/HMI_HVAC_Inactive.svg'
112 anchors.centerIn: parent
113 color: parent.checked ? '#00ADDC' : '#848286'
114 text: translator.translate(qsTr('A/C'), translator.language)
115 font.pixelSize: parent.height / 3
118 console.debug('A/C', checked)
122 onImage: './images/HMI_HVAC_Active.svg'
123 offImage: './images/HMI_HVAC_Inactive.svg'
125 anchors.centerIn: parent
126 color: parent.checked ? '#00ADDC' : '#848286'
127 text: translator.translate(qsTr('AUTO'), translator.language)
128 font.pixelSize: parent.height / 3
131 console.debug('AUTO', checked)
135 onImage: './images/HMI_HVAC_Circulation_Active.svg'
136 offImage: './images/HMI_HVAC_Circulation_Inactive.svg'
138 console.debug('Circulation', checked)
144 Layout.fillWidth: true
151 onCurrentItemChanged: {
152 console.log("Right Temp changed",degree)
153 binding.rightTemperature = degree
159 Layout.fillHeight: true
160 Layout.alignment: Qt.AlignHCenter
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)
168 console.debug(model.modelData, checked)