feat: Visual upgrades, Dallas sensor backend, and docs

This commit is contained in:
2026-01-14 14:44:01 +01:00
commit 7a79e48378
11 changed files with 1291 additions and 0 deletions

63
main.qml Normal file
View File

@@ -0,0 +1,63 @@
import QtQuick
import QtQuick.Controls
Window {
width: 480
height: 480
visible: true
title: "Volvo Display"
// For a circular display, we might want to hide the window frame
// if running full screen, but for now we keep it standard.
// flags: Qt.FramelessWindowHint
Loader {
id: mainLoader
anchors.fill: parent
sourceComponent: introComponent
onStatusChanged: {
if (status === Loader.Ready) console.log("Loader: Loaded " + source)
if (status === Loader.Error) console.log("Loader: Error loading " + source)
}
Binding {
target: mainLoader.item
property: "currentTemp"
value: backend.leftTemp
when: mainLoader.status === Loader.Ready && mainLoader.source.toString().includes("TemperatureGauge.qml")
}
Binding {
target: mainLoader.item
property: "currentRightTemp"
value: backend.rightTemp
when: mainLoader.status === Loader.Ready && mainLoader.source.toString().includes("TemperatureGauge.qml")
}
}
Component {
id: introComponent
Rectangle {
id: bg
anchors.fill: parent
color: "white"
Text {
anchors.centerIn: parent
text: "Hello Pi"
color: "black"
}
}
}
Timer {
interval: 5000
running: true
repeat: false
onTriggered: {
console.log("Timer triggered. Switching to TemperatureGauge.qml")
mainLoader.source = "TemperatureGauge.qml"
}
}
}