import QtQuick 2.6
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
+import QtQuick.Window 2.11
import AGL.Demo.Controls 1.0
import Translator 1.0
-import 'api' as API
ApplicationWindow {
id: root
+ width: container.width * container.scale
+ height: container.height * container.scale
+
Translator {
id: translator
- language: binding.language
+ language: "en_US"
}
- API.Binding {
- id: binding
- url: bindingAddress
+ Connections {
+ target: hvac
onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
onLanguageChanged: translator.language = language
}
+ Item {
+ id: container
+ anchors.centerIn: parent
+ width: Window.width
+ height: Window.height
+ scale: Window.scale
+
ColumnLayout {
anchors.fill: parent
anchors.topMargin: width / 10
source: './images/HMI_HVAC_Fan_Icon.svg'
}
Item {
- width: root.width * 0.8
+ width: 1080 * 0.8
Slider {
id: fanSpeedSlider
anchors.left: parent.left
to: 255.0
stepSize: 1.0
onValueChanged: {
- binding.fanSpeed = value
+ hvac.fanSpeed = value
}
}
Label {
HeatDegree {
onCurrentItemChanged: {
console.log("Left Temp changed",degree)
- binding.leftTemperature = degree
+ hvac.leftTemperature = degree
}
}
}
HeatDegree {
onCurrentItemChanged: {
console.log("Right Temp changed",degree)
- binding.rightTemperature = degree
+ hvac.rightTemperature = degree
}
}
}
}
}
}
+}