Files
TNCcat/qml/Main.qml
T
JulianandClaude Opus 5 403ac30b3a Add a coffee break
Every so often a mug appears at the cat's nose, it sits down, dips its head in
and takes a few slow sips while steam rises. M01, optional stop.

The mug lives in its own click-through window like the chip, or inside the
overlay on Wayland. It goes away as soon as the cat is petted, dragged, sent to
sleep or moves on to something else, so no mug is ever left standing.

Also renames OverlayWindow's mode flag, which shadowed QWindow::active.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
2026-09-10 23:00:22 +02:00

49 lines
1.3 KiB
QML

pragma ComponentBehavior: Bound
import QtQuick
import TNCat
// Root is not a window: which windows exist depends on the platform.
QtObject {
id: app
required property CatController cat
required property AppSettings settings
function openSettings() {
settingsWindow.show()
settingsWindow.raise()
settingsWindow.requestActivate()
}
readonly property CatWindow catWindow: CatWindow {
cat: app.cat
settings: app.settings
visible: !Platform.overlayMode
onSettingsRequested: app.openSettings()
}
readonly property ChipWindow chipWindow: ChipWindow {
cat: app.cat
settings: app.settings
visible: !Platform.overlayMode && app.cat.chipVisible
}
readonly property CupWindow cupWindow: CupWindow {
cat: app.cat
settings: app.settings
visible: !Platform.overlayMode && app.cat.cupVisible
}
readonly property OverlayWindow overlayWindow: OverlayWindow {
cat: app.cat
settings: app.settings
overlayActive: Platform.overlayMode
onSettingsRequested: app.openSettings()
}
readonly property SettingsWindow settingsWindow: SettingsWindow {
cat: app.cat
settings: app.settings
}
}