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.
This commit is contained in:
@@ -0,0 +1,140 @@
|
||||
import QtQuick
|
||||
import QtQuick.Controls
|
||||
import Nebula.Bigscreen
|
||||
|
||||
ApplicationWindow {
|
||||
id: window
|
||||
|
||||
width: 1280
|
||||
height: 720
|
||||
visible: true
|
||||
title: "Nebula Bigscreen"
|
||||
color: Theme.backgroundDeep
|
||||
|
||||
property string currentView: "home"
|
||||
property bool powerOverlayVisible: false
|
||||
property string signedInUser: "Player"
|
||||
|
||||
NebulaBackground {
|
||||
anchors.fill: parent
|
||||
}
|
||||
|
||||
Column {
|
||||
anchors.fill: parent
|
||||
spacing: 0
|
||||
|
||||
TopBar {
|
||||
id: topBar
|
||||
width: parent.width
|
||||
userName: window.signedInUser
|
||||
accentFocus: contentLoader.item && contentLoader.item.accentFocus !== undefined
|
||||
? contentLoader.item.accentFocus()
|
||||
: 0
|
||||
}
|
||||
|
||||
Loader {
|
||||
id: contentLoader
|
||||
width: parent.width
|
||||
height: parent.height - topBar.height
|
||||
sourceComponent: viewComponentFor(window.currentView)
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: contentLoader.item
|
||||
ignoreUnknownSignals: true
|
||||
function onNavigate(route) {
|
||||
window.onChildNavigate(route)
|
||||
}
|
||||
function onGoBack() {
|
||||
window.onChildGoBack()
|
||||
}
|
||||
}
|
||||
|
||||
PowerOverlay {
|
||||
id: powerOverlay
|
||||
visible: window.powerOverlayVisible
|
||||
z: 10
|
||||
|
||||
onDismissed: window.powerOverlayVisible = false
|
||||
onActionChosen: function(actionId) {
|
||||
console.log("Power action:", actionId)
|
||||
window.powerOverlayVisible = false
|
||||
}
|
||||
}
|
||||
|
||||
Connections {
|
||||
target: InputRouter
|
||||
function onActionTriggered(action) {
|
||||
if (window.powerOverlayVisible) {
|
||||
window.handlePowerInput(action)
|
||||
return
|
||||
}
|
||||
if (action === InputRouter.Menu) {
|
||||
window.powerOverlayVisible = true
|
||||
return
|
||||
}
|
||||
if (contentLoader.item && contentLoader.item.handleInput) {
|
||||
contentLoader.item.handleInput(action)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: homeComponent
|
||||
HomeView {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: libraryComponent
|
||||
LibraryView {}
|
||||
}
|
||||
|
||||
Component {
|
||||
id: settingsComponent
|
||||
SettingsView {}
|
||||
}
|
||||
|
||||
function viewComponentFor(viewId) {
|
||||
switch (viewId) {
|
||||
case "library":
|
||||
return libraryComponent
|
||||
case "settings":
|
||||
return settingsComponent
|
||||
default:
|
||||
return homeComponent
|
||||
}
|
||||
}
|
||||
|
||||
function onChildNavigate(route) {
|
||||
if (route === "power") {
|
||||
window.powerOverlayVisible = true
|
||||
return
|
||||
}
|
||||
window.currentView = route
|
||||
}
|
||||
|
||||
function onChildGoBack() {
|
||||
window.currentView = "home"
|
||||
}
|
||||
|
||||
function handlePowerInput(action) {
|
||||
switch (action) {
|
||||
case InputRouter.Up:
|
||||
powerOverlay.moveFocus(-1)
|
||||
break
|
||||
case InputRouter.Down:
|
||||
powerOverlay.moveFocus(1)
|
||||
break
|
||||
case InputRouter.Accept:
|
||||
powerOverlay.activateFocused()
|
||||
break
|
||||
case InputRouter.Back:
|
||||
window.powerOverlayVisible = false
|
||||
break
|
||||
default:
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user