Files
Nebula-OS/Bigscreen/qml/views/HomeView.qml
T
andrew f8632e40e7 Add Qt Bigscreen (QML/CMake), remove Tauri
Add a native Qt "Bigscreen" shell: CMakeLists, C++ entry (main.cpp, InputRouter), QML module (Theme, ShellWindow, views and components) and a Bigscreen/.gitignore; update top-level .gitignore and README with Qt build/run instructions. Remove the legacy Tauri/web prototype files (package.json, package-lock.json, src-tauri and many web assets) as part of the migration to the Qt/CMake-based shell.
2026-05-23 21:19:24 +12:00

60 lines
1.3 KiB
QML

import QtQuick
import QtQuick.Layouts
import Nebula.Bigscreen
ColumnLayout {
id: root
property var homeTiles: [
{ label: "Library", meta: "Games and apps", icon: "📚", route: "library" },
{ label: "Settings", meta: "System controls", icon: "⚙", route: "settings" },
{ label: "Power", meta: "Sleep and sessions", icon: "⏻", route: "power" }
]
signal navigate(string route)
spacing: 28
Text {
text: "Home"
font: Theme.brandFont
color: Theme.textPrimary
Layout.leftMargin: 40
}
TileRail {
id: rail
Layout.fillWidth: true
tiles: root.homeTiles
onTileActivated: function(index) {
const route = root.homeTiles[index].route
if (route === "power") {
root.navigate("power")
} else {
root.navigate(route)
}
}
}
function handleInput(action) {
switch (action) {
case InputRouter.Left:
rail.moveFocus(-1)
break
case InputRouter.Right:
rail.moveFocus(1)
break
case InputRouter.Accept:
rail.activateFocused()
break
default:
break
}
}
function accentFocus() {
return rail.accentFocus
}
}