Bug 263563 - Add ability to drag titles to re-arrange them in queue manager
Summary: Add ability to drag titles to re-arrange them in queue manager
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR wishlist
Target Milestone: 2.4.1
Assignee: Amarok Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-18 17:59 UTC by Kai Uwe Broulik
Modified: 2024-04-09 19:29 UTC (History)
4 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments
A patch to move UI implementation from .ui to .cpp file (6.66 KB, text/plain)
2013-02-10 21:27 UTC, Bartosz Szreder
Details
proper patch (10.19 KB, patch)
2013-02-10 21:32 UTC, Bartosz Szreder
Details
Add dragging capability in queue editor (7.69 KB, patch)
2013-02-10 21:50 UTC, Bartosz Szreder
Details
Add dragging capability in queue editor, v.2 (8.22 KB, patch)
2013-02-10 22:46 UTC, Bartosz Szreder
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Kai Uwe Broulik 2011-01-18 17:59:46 UTC
Version:           unspecified (using KDE 4.5.95) 
OS:                Linux

A good thing is that now not-shown songs don‘t get removed from queue but re-arranging songs in that queue list is just nod goot.
Having up and down arrows is so 1990‘s. You should be able to just drag them like you can in the KDE-wide tool bar settings.

Reproducible: Always
Comment 1 Bartosz Szreder 2013-02-10 21:13:36 UTC
This is among the last missing pieces of functionality from Amarok 1. A series of two patches will follow.
Comment 2 Bartosz Szreder 2013-02-10 21:27:36 UTC
Created attachment 77108 [details]
A patch to move UI implementation from .ui to .cpp file

I need to create a specialized QListWidget implementation. Thus it seems easier to move the rather limited part of UI into the .cpp file and cleanly add another class with the desired modifications than to dig into .ui files with nonstandard classes.

This patch shouldn't introduce any changes in behavior yet. It's only purpose is to prepare ground for the next patch.
Comment 3 Bartosz Szreder 2013-02-10 21:32:27 UTC
Created attachment 77113 [details]
proper patch

Please disregard the previous attachment. This one is corrent.
Comment 4 Bartosz Szreder 2013-02-10 21:50:21 UTC
Created attachment 77116 [details]
Add dragging capability in queue editor

The new ListWidget supports drag'n'drop of self-contained ListItems to itself. On successful dropEvent a signal is emitted, which is intercepted by a new slot reloadQueue() in PlaylistQueueEditor.

Things to consider in future:
- dragging from the playlist into the queue editor
- making the whole operation more efficient than clearing and recreating whole queue on each dropEvent
- possibly less hacky way of implementing things? maybe some backend interface would need to be added/exposed for the queue editor? any advice from a seasoned Amarok developer would be very valuable

If this isn't going to be accepted as-is into Amarok codebase then I'm willing to put some time into reworking the solution.
Comment 5 Bartosz Szreder 2013-02-10 22:46:02 UTC
Created attachment 77117 [details]
Add dragging capability in queue editor, v.2

Corrected a stupid mistake (lack of entry in CMakeLists.txt for the new .cpp file) resulting in linker errors.
Comment 6 Myriam Schweingruber 2013-02-11 09:03:41 UTC
(In reply to comment #5)
> Created attachment 77117 [details]
> Add dragging capability in queue editor, v.2
> 
> Corrected a stupid mistake (lack of entry in CMakeLists.txt for the new .cpp
> file) resulting in linker errors.

Thank you for your patch. Please submit it to http://reviewboard.kde.org, you will need an account on http://identity.kde.org for that.
Comment 7 Bartosz Szreder 2013-02-11 10:47:12 UTC
Review requests posted at:
https://git.reviewboard.kde.org/r/108905/
https://git.reviewboard.kde.org/r/108906/
Comment 8 Bug Janitor Service 2024-04-09 19:20:07 UTC
A possibly relevant merge request was started @ https://invent.kde.org/multimedia/amarok/-/merge_requests/83
Comment 9 Tuomas Nurmi 2024-04-09 19:29:59 UTC
Git commit f557d759e57a8a5f9479be96e63b342fbd573826 by Tuomas Nurmi.
Committed on 09/04/2024 at 19:21.
Pushed by nurmi into branch 'master'.

Add drag rearranging in queue manager

QListWidget nowadays makes it pretty easy.

M  +1    -0    ChangeLog
M  +20   -0    src/playlist/PlaylistQueueEditor.cpp
M  +1    -0    src/playlist/PlaylistQueueEditor.h

https://invent.kde.org/multimedia/amarok/-/commit/f557d759e57a8a5f9479be96e63b342fbd573826