feat(qbz-qt): phase 17 — PlaylistView 1:1 + drag & drop as Slint

Full playlist surface: header with owner/foreign gating, play/shuffle,
favorite/follow optimistic, copy-to-library, pin, rename, delete,
per-row remove for owners, search filter, full sort set, custom-order
drag reorder persisted per user. Sidebar and every playlist card
navigate; card overlay/menu actions un-stubbed. Drag & drop per the
Slint gesture: row-body press-drag (>6px) from album/playlist/search/
library rows, window-top ghost pill, sidebar playlist rows drop-hot
highlight, drop -> add_tracks_to_playlist + reload reconcile; in-list
release reorders. Round-trip proven end-to-end on a throwaway playlist
(create -> drag -> drop -> refetch shows track -> delete).

km
This commit is contained in:
vicrodh committed 2026-07-28 03:39:35 -06:00
1 parent 22e65e939b
commit 8c1ff34205
28 files changed
+2365 -17

No files matched your search

+24 -2
View File
@@ -254,7 +254,7 @@ Rectangle {
MouseArea {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
// Playlist view: out of scope (POC-NOTE — inert).
onClicked: QbzBridge.openPlaylist(card.id)
}
}
Item { width: 1; height: 6 }
@@ -290,12 +290,34 @@ Rectangle {
radius: 6
color: strArea.containsMouse ? theme.surfaceHover : "transparent"
property bool dragging: false
property point downPos: Qt.point(0, 0)
MouseArea {
id: strArea
anchors.fill: parent
hoverEnabled: true
cursorShape: Qt.PointingHandCursor
onClicked: QbzBridge.playTrack(item.id)
onPressed: function (mouse) { parent.downPos = Qt.point(mouse.x, mouse.y) }
onPositionChanged: function (mouse) {
if (!pressed) return
const g = mapToItem(null, mouse.x, mouse.y)
if (!parent.dragging
&& (Math.abs(mouse.x - parent.downPos.x) > 6
|| Math.abs(mouse.y - parent.downPos.y) > 6)) {
parent.dragging = true
QbzBridge.dragStart(item.id, item.title,
item.artist + " · " + item.album, g.x, g.y)
}
if (parent.dragging) QbzBridge.dragMove(g.x, g.y)
}
onReleased: function (mouse) {
if (parent.dragging) {
QbzBridge.dragEnd()
parent.dragging = false
} else {
QbzBridge.playTrack(item.id)
}
}
}
Row {
anchors.fill: parent