Logo Search packages:      
Sourcecode: bangarang version File versions  Download package

Playlist Class Reference

#include <playlist.h>

List of all members.


Detailed Description

This class provides MediaItemModels for a playlist and a queue. It additionally provides an interface to playback MediaItems in the playlist or the queue, shuffle and repeat. It also provides a MediaItemModel containing the currently playing MediaItem.

The queue MediaItemModel contains MediaItems in the order they will be played. The playlist MediaItemModel is the model from which MediaItems are added to the queue according to the Playlist::Mode.

Definition at line 42 of file playlist.h.


Public Types

enum  Mode { Normal = 0, Shuffle = 1 }
enum  Model { PlaylistModel = 0, QueueModel = 1 }
enum  State { Finished = 0, Loading = 1, Playing = 2 }

Public Slots

void playNext ()
void playPrevious ()
void start ()
void stop ()

Signals

void loading ()
void playlistFinished ()

Public Member Functions

void addMediaItem (const MediaItem &mediaItem)
void addMediaList (const QList< MediaItem > &mediaList)
void clearPlaylist ()
Phonon::MediaObject * mediaObject ()
Playlist::Mode mode ()
MediaItemModelnowPlayingModel ()
void playItemAt (int row, Playlist::Model model=Playlist::PlaylistModel)
 Playlist (QObject *parent, Phonon::MediaObject *mediaObject)
MediaItemModelplaylistModel ()
void playMediaList (const QList< MediaItem > &mediaList)
MediaItemModelqueueModel ()
void removeMediaItemAt (int row)
int rowOfNowPlaying ()
void setMediaObject (Phonon::MediaObject *mediaObject)
void setMode (Playlist::Mode mode)
void setRepeat (bool repeat)
Playlist::State state ()
 ~Playlist ()

Private Slots

void confirmPlaylistFinished ()
void currentSourceChanged (const Phonon::MediaSource &newSource)
void metaDataChanged ()
void playlistChanged ()
void queueNextPlaylistItem ()
void stateChanged (Phonon::State newstate, Phonon::State oldstate)
void titleChanged (int newTitle)
void updatePlaybackInfo (qint64 time)

Private Member Functions

void addToQueue ()
void buildQueueFrom (int playlistRow)
void createUrlHistoryFromIndices ()
void orderByPlaylist ()
void shuffle ()
void updateNowPlaying ()

Private Attributes

MediaItemModelm_currentPlaylist
bool m_hadVideo
Phonon::MediaController * m_mediaController
MediaIndexerm_mediaIndexer
Phonon::MediaObject * m_mediaObject
Playlist::Mode m_mode
bool m_nepomukInited
MediaItemModelm_nowPlaying
int m_oldPlaylistLength
QObject * m_parent
bool m_playbackInfoWritten
bool m_playlistFinished
QList< int > m_playlistIndices
QList< int > m_playlistIndicesHistory
QList< QString > m_playlistUrlHistory
MediaItemModelm_queue
int m_queueDepth
int m_repeat
Playlist::State m_state
bool playWhenPlaylistChanges

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

Generated by  Doxygen 1.6.0   Back to index