[vlc-devel] [PATCH 00/15] Playlist media interactions and revamped D&D
Benjamin Arnaud
benjamin.arnaud at videolabs.io
Thu Mar 11 09:16:44 UTC 2021
This patch is a first implementation of playlist (not playqueue) media interactions along with a refactor of the QML drag and drop.
It contains the following:
- medialibrary: Playlist insert, move and remove support.
- qml: Insert, move and remove support for the playlist view.
- qml: A revamped DragItem and improved drag and drop support.
- qml: A generic TableViewDelegate and a specific PlaylistMediaDelegate
Currently, the MLPlaylistModel does a complete refresh every time we insert, move or remove an item. That's because we rely on VLC_ML_EVENT_PLAYLIST_UPDATED single handedly. This can be solved once we have more detailed playlist events.
Benjamin Arnaud (15):
medialibrary: Add playlist insert, move and remove
qt: Create QmlInputItem
qt/mlplaylistmodel: Add insert, move and remove support
qt/PlaylistMediaContextMenu: Add 'Remove Selected' action
qt/playlist_controller: Add the 'insert' function
qt/mlbasemodel: Add the 'getItemsForIndexes' function
qt/playlist_model: Add the 'getItemsForIndexes' function
qt/network*: Add the 'getItemsForIndexes' function
qml/KeyNavigableTableView: Add 'delegate' and 'contentY' aliases
qml: Create TableViewDelegate
qml: Create PlaylistMediaDelegate
qml: Update the drag and drop implementation
qml/PlaylistMedia: Add drag and drop support
qml/PlaylistMediaDisplay: Cancel drag when resetting the model
qml/PlaylistMediaDisplay: Add keyboard delete support
include/vlc_media_library.h | 31 ++-
modules/gui/qt/Makefile.am | 5 +-
modules/gui/qt/maininterface/mainui.cpp | 3 +
modules/gui/qt/medialibrary/mlbasemodel.cpp | 64 ++++-
modules/gui/qt/medialibrary/mlbasemodel.hpp | 29 ++-
.../gui/qt/medialibrary/mlplaylistmodel.cpp | 134 +++++++++++
.../gui/qt/medialibrary/mlplaylistmodel.hpp | 10 +
.../gui/qt/medialibrary/qml/MusicAlbums.qml | 4 +-
.../gui/qt/medialibrary/qml/MusicArtist.qml | 8 +-
.../medialibrary/qml/MusicArtistsDisplay.qml | 4 +-
.../gui/qt/medialibrary/qml/MusicGenres.qml | 4 +-
.../medialibrary/qml/MusicTracksDisplay.qml | 4 +-
.../gui/qt/medialibrary/qml/PlaylistMedia.qml | 103 +++++++-
.../qml/PlaylistMediaDelegate.qml | 81 +++++++
.../medialibrary/qml/PlaylistMediaDisplay.qml | 28 ++-
.../qt/medialibrary/qml/PlaylistMediaList.qml | 8 +-
modules/gui/qt/medialibrary/qml/VideoAll.qml | 5 +-
modules/gui/qt/menus/qml_menu_wrapper.cpp | 10 +
modules/gui/qt/network/networkdevicemodel.cpp | 24 +-
modules/gui/qt/network/networkdevicemodel.hpp | 2 +
modules/gui/qt/network/networkmediamodel.cpp | 24 ++
modules/gui/qt/network/networkmediamodel.hpp | 2 +
.../qt/network/qml/NetworkBrowseDisplay.qml | 4 +-
.../gui/qt/playlist/playlist_controller.cpp | 19 ++
.../gui/qt/playlist/playlist_controller.hpp | 2 +
modules/gui/qt/playlist/playlist_model.cpp | 31 +++
modules/gui/qt/playlist/playlist_model.hpp | 2 +
.../gui/qt/playlist/qml/PlaylistDroppable.qml | 31 ---
.../gui/qt/playlist/qml/PlaylistListView.qml | 48 ++--
modules/gui/qt/util/qmlinputitem.hpp | 59 +++++
modules/gui/qt/vlc.qrc | 3 +-
modules/gui/qt/widgets/qml/DragItem.qml | 102 +++++---
.../qt/widgets/qml/KeyNavigableTableView.qml | 128 +---------
.../gui/qt/widgets/qml/TableViewDelegate.qml | 222 ++++++++++++++++++
modules/misc/medialibrary/medialibrary.cpp | 32 +++
po/POTFILES.in | 1 +
36 files changed, 1019 insertions(+), 252 deletions(-)
create mode 100644 modules/gui/qt/medialibrary/qml/PlaylistMediaDelegate.qml
delete mode 100644 modules/gui/qt/playlist/qml/PlaylistDroppable.qml
create mode 100644 modules/gui/qt/util/qmlinputitem.hpp
create mode 100644 modules/gui/qt/widgets/qml/TableViewDelegate.qml
--
2.25.1
More information about the vlc-devel
mailing list