MythTV  master
Public Member Functions | Private Member Functions | Private Attributes | List of all members
PlaylistContainer Class Reference

#include <playlistcontainer.h>

Collaboration diagram for PlaylistContainer:
Collaboration graph
[legend]

Public Member Functions

 PlaylistContainer (AllMusic *all_music)
 
 ~PlaylistContainer ()
 
void load ()
 
void resync (void)
 
void describeYourself (void) const
 
PlaylistgetActive (void)
 
PlaylistgetPlaylist (int id)
 
PlaylistgetPlaylist (const QString &name)
 
PlaylistgetStreamPlaylist (void)
 
void save ()
 
void createNewPlaylist (QString name)
 
void copyNewPlaylist (QString name)
 
void copyToActive (int index)
 
QString getPlaylistName (int index, bool &reference)
 
void deletePlaylist (int kill_me)
 
void renamePlaylist (int index, QString new_name)
 
bool nameIsUnique (const QString &a_name, int which_id)
 
void clearActive ()
 
bool doneLoading ()
 
bool cleanOutThreads ()
 
void FillIntelliWeights (int &rating, int &playcount, int &lastplay, int &random)
 
QList< Playlist * > * getPlaylists (void)
 
QStringList getPlaylistNames (void)
 

Private Member Functions

 Q_DECLARE_TR_FUNCTIONS (PlaylistContainer)
 

Private Attributes

Playlistm_activePlaylist {nullptr}
 
Playlistm_streamPlaylist {nullptr}
 
QList< Playlist * > * m_allPlaylists {nullptr}
 
PlaylistLoadingThreadm_playlistsLoader {nullptr}
 
bool m_doneLoading {false}
 
QString m_myHost
 
int m_ratingWeight {2}
 
int m_playCountWeight {2}
 
int m_lastPlayWeight {2}
 
int m_randomWeight {2}
 

Detailed Description

Definition at line 33 of file playlistcontainer.h.

Constructor & Destructor Documentation

◆ PlaylistContainer()

PlaylistContainer::PlaylistContainer ( AllMusic all_music)
explicit

Definition at line 29 of file playlistcontainer.cpp.

◆ ~PlaylistContainer()

PlaylistContainer::~PlaylistContainer ( )

Definition at line 41 of file playlistcontainer.cpp.

Member Function Documentation

◆ Q_DECLARE_TR_FUNCTIONS()

PlaylistContainer::Q_DECLARE_TR_FUNCTIONS ( PlaylistContainer  )
private

◆ load()

void PlaylistContainer::load ( )

Definition at line 69 of file playlistcontainer.cpp.

Referenced by PlaylistLoadingThread::run().

◆ resync()

void PlaylistContainer::resync ( void  )

Definition at line 117 of file playlistcontainer.cpp.

Referenced by MusicData::reloadMusic().

◆ describeYourself()

void PlaylistContainer::describeYourself ( void  ) const

Definition at line 128 of file playlistcontainer.cpp.

◆ getActive()

Playlist* PlaylistContainer::getActive ( void  )
inline

◆ getPlaylist() [1/2]

Playlist * PlaylistContainer::getPlaylist ( int  id)

◆ getPlaylist() [2/2]

Playlist * PlaylistContainer::getPlaylist ( const QString &  name)

Definition at line 159 of file playlistcontainer.cpp.

◆ getStreamPlaylist()

Playlist* PlaylistContainer::getStreamPlaylist ( void  )
inline

◆ save()

void PlaylistContainer::save ( void  )

Definition at line 175 of file playlistcontainer.cpp.

Referenced by mythplugin_destroy().

◆ createNewPlaylist()

void PlaylistContainer::createNewPlaylist ( QString  name)

Definition at line 188 of file playlistcontainer.cpp.

◆ copyNewPlaylist()

void PlaylistContainer::copyNewPlaylist ( QString  name)

Definition at line 199 of file playlistcontainer.cpp.

Referenced by MusicCommon::customEvent().

◆ copyToActive()

void PlaylistContainer::copyToActive ( int  index)

Definition at line 211 of file playlistcontainer.cpp.

◆ getPlaylistName()

QString PlaylistContainer::getPlaylistName ( int  index,
bool reference 
)

Definition at line 258 of file playlistcontainer.cpp.

◆ deletePlaylist()

void PlaylistContainer::deletePlaylist ( int  kill_me)

Definition at line 234 of file playlistcontainer.cpp.

Referenced by PlaylistEditorView::deletePlaylist().

◆ renamePlaylist()

void PlaylistContainer::renamePlaylist ( int  index,
QString  new_name 
)

Definition at line 224 of file playlistcontainer.cpp.

◆ nameIsUnique()

bool PlaylistContainer::nameIsUnique ( const QString &  a_name,
int  which_id 
)

Definition at line 282 of file playlistcontainer.cpp.

◆ clearActive()

void PlaylistContainer::clearActive ( )

Definition at line 320 of file playlistcontainer.cpp.

◆ doneLoading()

bool PlaylistContainer::doneLoading ( )
inline

Definition at line 65 of file playlistcontainer.h.

Referenced by MusicData::loadMusic().

◆ cleanOutThreads()

bool PlaylistContainer::cleanOutThreads ( )

Definition at line 310 of file playlistcontainer.cpp.

Referenced by mythplugin_destroy().

◆ FillIntelliWeights()

void PlaylistContainer::FillIntelliWeights ( int &  rating,
int &  playcount,
int &  lastplay,
int &  random 
)

Definition at line 60 of file playlistcontainer.cpp.

Referenced by Playlist::shuffleTracks().

◆ getPlaylists()

QList<Playlist*>* PlaylistContainer::getPlaylists ( void  )
inline

Definition at line 71 of file playlistcontainer.h.

Referenced by PlaylistEditorView::getPlaylists().

◆ getPlaylistNames()

QStringList PlaylistContainer::getPlaylistNames ( void  )

Definition at line 297 of file playlistcontainer.cpp.

Referenced by MusicCommon::customEvent().

Member Data Documentation

◆ m_activePlaylist

Playlist* PlaylistContainer::m_activePlaylist {nullptr}
private

◆ m_streamPlaylist

Playlist* PlaylistContainer::m_streamPlaylist {nullptr}
private

Definition at line 76 of file playlistcontainer.h.

Referenced by getStreamPlaylist(), load(), save(), and ~PlaylistContainer().

◆ m_allPlaylists

QList<Playlist*>* PlaylistContainer::m_allPlaylists {nullptr}
private

◆ m_playlistsLoader

PlaylistLoadingThread* PlaylistContainer::m_playlistsLoader {nullptr}
private

Definition at line 79 of file playlistcontainer.h.

Referenced by cleanOutThreads(), PlaylistContainer(), and ~PlaylistContainer().

◆ m_doneLoading

bool PlaylistContainer::m_doneLoading {false}
private

Definition at line 80 of file playlistcontainer.h.

Referenced by doneLoading(), and load().

◆ m_myHost

QString PlaylistContainer::m_myHost
private

Definition at line 81 of file playlistcontainer.h.

Referenced by copyNewPlaylist(), createNewPlaylist(), load(), and save().

◆ m_ratingWeight

int PlaylistContainer::m_ratingWeight {2}
private

Definition at line 83 of file playlistcontainer.h.

◆ m_playCountWeight

int PlaylistContainer::m_playCountWeight {2}
private

Definition at line 84 of file playlistcontainer.h.

Referenced by FillIntelliWeights().

◆ m_lastPlayWeight

int PlaylistContainer::m_lastPlayWeight {2}
private

Definition at line 85 of file playlistcontainer.h.

Referenced by FillIntelliWeights().

◆ m_randomWeight

int PlaylistContainer::m_randomWeight {2}
private

Definition at line 86 of file playlistcontainer.h.

Referenced by FillIntelliWeights().


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