Sayonara Player
|
Global handler for playlists. More...
#include <PlaylistHandler.h>
Public Slots | |
void | closePlaylist (int playlistIndex) |
close playlist More... | |
Signals | |
void | sigNewPlaylistAdded (int playlistIndex) |
emitted when new playlist has been added More... | |
void | sigPlaylistNameChanged (int playlistIndex) |
emitted when playlist name has changed More... | |
void | sigCurrentPlaylistChanged (int playlistIndex) |
emitted when tracks were added/removed or have changed More... | |
void | sigActivePlaylistChanged (int playlistIndex) |
void | sigTrackDeletionRequested (const MetaDataList &tracks, Library::TrackDeletionMode deletion_mode) |
emitted when a track deletion was triggered over the Ui More... | |
void | sigPlaylistClosed (int playlistIndex) |
Public Member Functions | |
Handler (PlayManager *playManager, std::shared_ptr<::Playlist::Loader > playlistLoader) | |
void | shutdown () |
Call this before the program stops. Singletons and Destructors don't work out so well. | |
int | count () const override |
Returns number of playlists. More... | |
PlaylistPtr | playlist (int playlistIndex) override |
get specific playlist at given index More... | |
PlaylistPtr | playlistById (int playlistId) override |
int | activeIndex () const override |
PlaylistPtr | activePlaylist () override |
int | currentIndex () const override |
void | setCurrentIndex (int playlistIndex) override |
QString | requestNewPlaylistName (const QString &prefix=QString()) const override |
Request a new name for the playlist (usually New %1 is returned). If the prefix differs, instead of New, the prefix is chosen. E.g. "File system 2" for tracks added by the file manager. More... | |
int | createPlaylist (const MetaDataList &tracks, const QString &name=QString(), bool temporary=true) override |
create a new playlist More... | |
int | createPlaylist (const QStringList &pathList, const QString &name=QString(), bool temporary=true) override |
create a new playlist (overloaded) More... | |
int | createCommandLinePlaylist (const QStringList &pathList) override |
int | createPlaylist (const CustomPlaylist &customPlaylist) override |
create a new playlist (overloaded) More... | |
int | createEmptyPlaylist (bool override=false) override |
create a new empty playlist More... | |
Global handler for playlists.
|
overridevirtual |
Implements PlaylistAccessor.
|
overridevirtual |
Implements PlaylistAccessor.
|
slot |
close playlist
playlistIndex | playlist index |
|
overridevirtual |
|
overridevirtual |
Implements PlaylistCreator.
|
overridevirtual |
create a new empty playlist
name | new playlist name. If no name given, current playlist will be overwritten |
Implements PlaylistCreator.
|
overridevirtual |
create a new playlist (overloaded)
customPlaylist | a CustomPlaylist object fetched from database |
Implements PlaylistCreator.
|
overridevirtual |
create a new playlist
tracks | track list |
name | new playlist name. If no name given, current playlist will be overwritten |
temporary | is the playlist temporary or persistent? |
type | deprecated |
Implements PlaylistCreator.
|
overridevirtual |
create a new playlist (overloaded)
pathlist | paths, may contain files or directories |
name | new playlist name. If no name given, current playlist will be overwritten |
temporary | is the playlist temporary or persistent? |
type | deprecated |
Implements PlaylistCreator.
|
overridevirtual |
Implements PlaylistAccessor.
|
overridevirtual |
get specific playlist at given index
playlistIndex | playlist index |
Implements PlaylistAccessor.
|
overridevirtual |
Implements PlaylistAccessor.
|
overridevirtual |
Request a new name for the playlist (usually New %1 is returned). If the prefix differs, instead of New, the prefix is chosen. E.g. "File system 2" for tracks added by the file manager.
The | prefix is a localized "New" by default. |
Implements PlaylistCreator.
|
overridevirtual |
Implements PlaylistAccessor.
|
signal |
emitted when tracks were added/removed or have changed
playlistIndex | playlist index |
|
signal |
emitted when new playlist has been added
playlistIndex | reference to new playlist |
|
signal |
emitted when playlist name has changed
playlistIndex | index of playlist |
|
signal |
emitted when a track deletion was triggered over the Ui
tracks | which tracks should be deleted |
deletion_mode |