Add more sensor delegates to ZoneView and allow opening the thing view

This commit is contained in:
Michael Zanetti 2023-02-18 12:42:09 +01:00
parent a19809f3d8
commit a08270698f

View File

@ -155,11 +155,37 @@ Item {
rowSpacing: 0
columnSpacing: 0
Repeater {
model: zoneWrapper.thermostats
delegate: SensorListDelegate {
Layout.fillWidth: true
thing: zoneWrapper.thermostats.get(index)
onClicked: {
var page = NymeaUtils.interfaceListToDevicePage(thing.thingClass.interfaces);
pageStack.push(Qt.resolvedUrl("/ui/devicepages/" + page), {thing: thing})
}
}
}
Repeater {
model: zoneWrapper.indoorSensors
delegate: SensorListDelegate {
Layout.fillWidth: true
thing: zoneWrapper.indoorSensors.get(index)
onClicked: {
var page = NymeaUtils.interfaceListToDevicePage(thing.thingClass.interfaces);
pageStack.push(Qt.resolvedUrl("/ui/devicepages/" + page), {thing: thing})
}
}
}
Repeater {
model: zoneWrapper.windowSensors
delegate: SensorListDelegate {
Layout.fillWidth: true
thing: zoneWrapper.windowSensors.get(index)
onClicked: {
var page = NymeaUtils.interfaceListToDevicePage(thing.thingClass.interfaces);
pageStack.push(Qt.resolvedUrl("/ui/devicepages/" + page), {thing: thing})
}
}
}
}