Code Review
/
apps
/
hvac.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
review
|
tree
raw
|
inline
| side by side
Desktop PC development support
[apps/hvac.git]
/
app
/
HVAC.qml
diff --git
a/app/HVAC.qml
b/app/HVAC.qml
index
565b108
..
b3be443
100644
(file)
--- a/
app/HVAC.qml
+++ b/
app/HVAC.qml
@@
-18,10
+18,17
@@
import QtQuick 2.6
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import AGL.Demo.Controls 1.0
import QtQuick.Layouts 1.1
import QtQuick.Controls 2.0
import AGL.Demo.Controls 1.0
+import 'api' as API
ApplicationWindow {
id: root
ApplicationWindow {
id: root
+ API.Binding {
+ id: binding
+ url: bindingAddress
+ onFanSpeedChanged: fanSpeedSlider.value = fanSpeed
+ }
+
ColumnLayout {
anchors.fill: parent
anchors.topMargin: width / 10
ColumnLayout {
anchors.fill: parent
anchors.topMargin: width / 10
@@
-35,17
+42,20
@@
ApplicationWindow {
Item {
width: root.width * 0.8
Slider {
Item {
width: root.width * 0.8
Slider {
- id: fanSpeed
+ id: fanSpeed
Slider
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
anchors.left: parent.left
anchors.right: parent.right
anchors.verticalCenter: parent.verticalCenter
+ from: 0.0
+ to: 255.0
+ stepSize: 1.0
onValueChanged: {
onValueChanged: {
- console.debug('Fan', value)
+ binding.fanSpeed = value
}
}
Label {
}
}
Label {
- anchors.left: fanSpeed.left
- anchors.top: fanSpeed.bottom
+ anchors.left: fanSpeed
Slider
.left
+ anchors.top: fanSpeed
Slider
.bottom
font.pixelSize: 32
text: 'FAN SPEED'
}
font.pixelSize: 32
text: 'FAN SPEED'
}
@@
-64,7
+74,10
@@
ApplicationWindow {
side: 'Left'
}
HeatDegree {
side: 'Left'
}
HeatDegree {
- enabled: leftSeat.headLevel > 0
+ onCurrentItemChanged: {
+ console.log("Left Temp changed",degree)
+ binding.leftTemperature = degree
+ }
}
}
ColumnLayout {
}
}
ColumnLayout {
@@
-75,7
+88,7
@@
ApplicationWindow {
offImage: './images/HMI_HVAC_Inactive.svg'
Label {
anchors.centerIn: parent
offImage: './images/HMI_HVAC_Inactive.svg'
Label {
anchors.centerIn: parent
- color: parent.checked ? '#
66FF99
' : '#848286'
+ color: parent.checked ? '#
00ADDC
' : '#848286'
text: 'A/C'
font.pixelSize: parent.height / 3
}
text: 'A/C'
font.pixelSize: parent.height / 3
}
@@
-88,7
+101,7
@@
ApplicationWindow {
offImage: './images/HMI_HVAC_Inactive.svg'
Label {
anchors.centerIn: parent
offImage: './images/HMI_HVAC_Inactive.svg'
Label {
anchors.centerIn: parent
- color: parent.checked ? '#
66FF99
' : '#848286'
+ color: parent.checked ? '#
00ADDC
' : '#848286'
text: 'AUTO'
font.pixelSize: parent.height / 3
}
text: 'AUTO'
font.pixelSize: parent.height / 3
}
@@
-113,7
+126,10
@@
ApplicationWindow {
side: 'Right'
}
HeatDegree {
side: 'Right'
}
HeatDegree {
- enabled: rightSeat.headLevel > 0
+ onCurrentItemChanged: {
+ console.log("Right Temp changed",degree)
+ binding.rightTemperature = degree
+ }
}
}
}
}
}
}