Qmmp
Loading...
Searching...
No Matches
PlayListManager Class Reference

#include <qmmpui/playlistmanager.h>

Public Slots

void selectPlayList (PlayListModel *model)
void selectPlayListIndex (int index)
void selectPlayListName (const QString &name)
void selectNextPlayList ()
void selectPreviousPlayList ()
void activatePlayList (PlayListModel *model)
void activatePlayListIndex (int index)
void activateSelectedPlayList ()
PlayListModelcreatePlayList (const QString &name=QString())
void removePlayList (PlayListModel *model)
void removePlayListIndex (int index)
void move (int i, int j)
void clear ()
void clearSelection ()
void removeSelected ()
void removeUnselected ()
void removeTrack (int i)
void removeTrack (PlayListTrack *item)
void invertSelection ()
void selectAll ()
void showDetails ()
void addTracks (const QList< PlayListTrack * > &tracks)
void addPath (const QString &path)
void addPaths (const QStringList &paths)
void randomizeList ()
void reverseList ()
void sortSelection (PlayListModel::SortMode mode)
void sort (PlayListModel::SortMode mode)
void addToQueue ()
void removeInvalidTracks ()
void removeDuplicates ()
void refresh ()
void clearQueue ()
void stopAfterSelected ()
void rebuildGroups ()

Signals

void currentPlayListChanged (PlayListModel *current, PlayListModel *previous)
void selectedPlayListChanged (PlayListModel *selected, PlayListModel *previous)
void playListAdded (int index)
void playListRemoved (int index)
void playListMoved (int i, int j)
void playListsChanged ()
void currentTrackRemoved ()

Public Member Functions

 PlayListManager (QObject *parent)
 ~PlayListManager ()
QList< PlayListModel * > playLists () const
QStringList playListNames () const
PlayListModelselectedPlayList () const
PlayListModelcurrentPlayList () const
int selectedPlayListIndex () const
int currentPlayListIndex () const
int count () const
int indexOf (PlayListModel *model) const
PlayListModelplayListAt (int i) const
PlayListHeaderModelheaderModel ()

Static Public Member Functions

static PlayListManagerinstance ()

Detailed Description

The PlayListManager class is used to handle multiple playlists.

Author
Ilya Kotov forko.nosp@m.tov0.nosp@m.2@ya..nosp@m.ru

Constructor & Destructor Documentation

◆ PlayListManager()

PlayListManager ( QObject * parent)
explicit

Constructor.

Parameters
parentParent object.

◆ ~PlayListManager()

Destructor.

Member Function Documentation

◆ activatePlayList

void activatePlayList ( PlayListModel * model)
slot

Sets current playlist to model.

◆ activatePlayListIndex

void activatePlayListIndex ( int index)
slot

Sets current playlist with index index.

◆ activateSelectedPlayList

void activateSelectedPlayList ( )
slot

Sets selected playlist as current.

◆ addPath

void addPath ( const QString & path)
slot

This is a convenience function and is the same as calling selectedPlayList()->addPath(path)

◆ addPaths

void addPaths ( const QStringList & paths)
slot

This is a convenience function and is the same as calling selectedPlayList()->addPaths(paths)

◆ addToQueue

void addToQueue ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->addToQueue()

◆ addTracks

void addTracks ( const QList< PlayListTrack * > & tracks)
slot

This is a convenience function and is the same as calling selectedPlayList()->addTracks(tracks)

◆ clear

void clear ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->clear()

◆ clearQueue

void clearQueue ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->clearQueue()

◆ clearSelection

void clearSelection ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->clearSelection()

◆ count()

int count ( ) const

Returns a number of playlists.

◆ createPlayList

PlayListModel * createPlayList ( const QString & name = QString())
slot

Creates and selects new playlist with the given name name.

◆ currentPlayList()

PlayListModel * currentPlayList ( ) const

Returns active playlist.

◆ currentPlayListChanged

void currentPlayListChanged ( PlayListModel * current,
PlayListModel * previous )
signal

Emitted when current playlist changes.

Parameters
currentCurrent playlist.
previousPrevious playlist.

◆ currentPlayListIndex()

int currentPlayListIndex ( ) const

Returns active playlist index.

◆ currentTrackRemoved

void currentTrackRemoved ( )
signal

Emitted when the current track of the current playlist is removed.

◆ headerModel()

PlayListHeaderModel * headerModel ( )

Returns playlist header model.

◆ indexOf()

int indexOf ( PlayListModel * model) const

Returns the index position of the playlist model.

◆ instance()

PlayListManager * instance ( )
static

Returns a pointer to the object's instance.

◆ invertSelection

void invertSelection ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->invertSelection()

◆ move

void move ( int i,
int j )
slot

Moves playlist with index i to index j.

◆ playListAdded

void playListAdded ( int index)
signal

Emitted when the playlist with index index is added.

◆ playListAt()

PlayListModel * playListAt ( int i) const

Returns the playlist at index position i in the list. i must be a valid index position in the list (i.e., 0 <= i < count()).

◆ playListMoved

void playListMoved ( int i,
int j )
signal

Emitted when playlist changes its position from i to j.

◆ playListNames()

QStringList playListNames ( ) const

Returns a names of all playlists.

◆ playListRemoved

void playListRemoved ( int index)
signal

Emitted when the playlist with index index is removed.

◆ playLists()

QList< PlayListModel * > playLists ( ) const

Returns a list of all playlists.

◆ playListsChanged

void playListsChanged ( )
signal

Emitted when the list of playlists is changed.

◆ randomizeList

void randomizeList ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->randomizeList()

◆ rebuildGroups

void rebuildGroups ( )
slot

Rebuilds groups for all playlists.

◆ refresh

void refresh ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->refresh()

◆ removeDuplicates

void removeDuplicates ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->removeDuplicates()

◆ removeInvalidTracks

void removeInvalidTracks ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->clearInvalidItems()

◆ removePlayList

void removePlayList ( PlayListModel * model)
slot

Removes playlist model.

◆ removePlayListIndex

void removePlayListIndex ( int index)
slot

Removes playlist with index index.

◆ removeSelected

void removeSelected ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->removeSelected()

◆ removeTrack [1/2]

void removeTrack ( int i)
slot

This is a convenience function and is the same as calling selectedPlayList()->removeAt(i)

◆ removeTrack [2/2]

void removeTrack ( PlayListTrack * item)
slot

This is a convenience function and is the same as calling selectedPlayList()->removeTrack(item)

◆ removeUnselected

void removeUnselected ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->removeUnselected()

◆ reverseList

void reverseList ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->reverseList()

◆ selectAll

void selectAll ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->selectAll()

◆ selectedPlayList()

PlayListModel * selectedPlayList ( ) const

Returns selected playlist.

◆ selectedPlayListChanged

void selectedPlayListChanged ( PlayListModel * selected,
PlayListModel * previous )
signal

Emitted when selected playlist changes.

Parameters
selectedSelected playlist.
previousPrevious selected playlist.

◆ selectedPlayListIndex()

int selectedPlayListIndex ( ) const

Returns selected playlist index.

◆ selectNextPlayList

void selectNextPlayList ( )
slot

Selects next playlist if possible.

◆ selectPlayList

void selectPlayList ( PlayListModel * model)
slot

Selects playlist model.

◆ selectPlayListIndex

void selectPlayListIndex ( int index)
slot

Selects playlist with index index.

◆ selectPlayListName

void selectPlayListName ( const QString & name)
slot

Selects playlist with name name.

◆ selectPreviousPlayList

void selectPreviousPlayList ( )
slot

Selects previous playlist if possible.

◆ showDetails

void showDetails ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->showDetails()

◆ sort

void sort ( PlayListModel::SortMode mode)
slot

This is a convenience function and is the same as calling selectedPlayList()->sort(mode)

◆ sortSelection

void sortSelection ( PlayListModel::SortMode mode)
slot

This is a convenience function and is the same as calling selectedPlayList()->sortSelection(mode)

◆ stopAfterSelected

void stopAfterSelected ( )
slot

This is a convenience function and is the same as calling selectedPlayList()->stopAfterSelected()


The documentation for this class was generated from the following file: