Full-parity port of the Slint QConnect integration per the contract at qbz-nix-docs/qt-frontend/2026-08-01-qconnect-port/00-CONTRACT.md (three adversarial review rounds on the spec, §12 trap sign-off PASS on both halves, RFB-verified incl. a real cloud connect, live session owner-tested). The shared crates are consumed verbatim — zero backend changes. - adapter quartet: qconnect_transport_qt (credentials, identity on the shared qconnect_settings.db), qconnect_engine_qt (start_track_stream fallback chain + feeder helpers + CMAF cursor sync), qconnect_event_sink_qt, qconnect_qt (the facade: connect/disconnect recipe, controller routing, echo guards, offline parking B12, startup auto-connect) - QbzQConnect bridge singleton + on_session_entered wiring; one shared flyout for both bars (tooltip on the large bar only), Developer > Connect diagnostics modal, device-row glyphs, settings rows live - poll loop: peer-reflection branch before cast, ~2 s renderer reports, sync-on-add on every Qobuz-castable add path - routing: cast → QConnect → local (mute QConnect-first), play arms after the set_queue funnel, reorder cloud arm with no local fallback, volume/mute/seek remote-first - touchpoints: lyrics remote anchor, scrobble guarded / Discord unguarded, cast suspend/resume, volume-lock lifted when remote km
39 lines
1.5 KiB
QML
39 lines
1.5 KiB
QML
// NowPlayingBar SHELL — the mode seam (NowPlayingBar.slint, phase 18):
|
|
// mounts NowPlayingBarSmall for mode 2 (Small) and the full PlayerBar for
|
|
// modes 0 (New) / 1 (Classic) / 3 (Large). AppShell pins the height
|
|
// mode-aware (42px Small / 112px otherwise).
|
|
|
|
import QtQuick
|
|
import com.blitzfc.qbz
|
|
|
|
Item {
|
|
id: root
|
|
|
|
// The shell's shared hover-tooltip overlay (controls/QbzTooltip.qml),
|
|
// fed in by AppShell (same pattern as Sidebar.tooltip). Forwarded into
|
|
// the loaded bar below. Only the FULL bar consumes it — the Qobuz
|
|
// Connect button's "Qobuz Connect: On/Off" bubble (contract §8: the
|
|
// small bar's button has no tooltip in the reference).
|
|
property Item tooltip: null
|
|
|
|
Loader {
|
|
id: barLoader
|
|
anchors.fill: parent
|
|
source: QbzShell.npbMode === 2 ? "NowPlayingBarSmall.qml" : "PlayerBar.qml"
|
|
}
|
|
|
|
// Same shape as AppShell's viewLoader "kind" Binding: applies the moment
|
|
// the item exists, re-applies on a mode switch, RestoreNone because the
|
|
// target is DESTROYED on unload. The `when` source guard keeps it off
|
|
// NowPlayingBarSmall, which declares no `tooltip` property (a grouped
|
|
// assignment against a missing property would fail the load).
|
|
Binding {
|
|
target: barLoader.item
|
|
property: "tooltip"
|
|
value: root.tooltip
|
|
when: barLoader.item !== null
|
|
&& barLoader.source.toString().indexOf("PlayerBar.qml") !== -1
|
|
restoreMode: Binding.RestoreNone
|
|
}
|
|
}
|