PlaylistEditorDialog Class Reference

Dialog for browsing and editing playlist. More...

#include <PlaylistEditorDialog.h>

Inheritance diagram for PlaylistEditorDialog:

daySpecificPlaylistEditorDialog

List of all members.

Public Slots

void PreviousRequested ()
void NextRequested ()
void CurrentRequested ()
void itemDoubleclicked (QTreeWidgetItem *item, int column)
virtual void OpenClicked ()
void RemoveSelectedClicked ()
void AddFolderClicked ()
void RandomPlayOrderToggled (bool checked)
void Append (const QString &fileName, const QString &FullPath)
void RemoveItem (QTreeWidgetItem *item)

Signals

void PlayFile (const QString &fullName)
void ListGotContent ()
void ListWasEmptied ()

Public Member Functions

 PlaylistEditorDialog (QWidget *aParent)
void PopulateList (const QStringList &fileNameList, const QStringList &FullPathList)
 Empty existing list and create a new list from given strings.
virtual bool LoadPlaylist (const QString &fullPlaylistPath)
 Load playlist from a file.
virtual bool SavePlaylist (const QString &fullPlaylistPath)
 Save playlist to a file.
bool getNext (QString &absoluteFileName, bool checkRandom=true)
bool getPrevious (QString &absoluteFileName, bool checkRandom=true)
QString getCurrent ()
 Get the file pointed by iNowPlayingIndex from the playlist.
unsigned getResumeValue ()
unsigned getNowPlayingIndex ()
void setNowPlayingIndex (unsigned val)
void setResumeValue (unsigned value)
virtual void StopThreads ()
void HandleUiLanguageChange ()

Public Attributes

Ui_GlobalPlaylistEditorDialog ui
 UI of the dialog.
QGridLayout * iListLayout
PlaylistTreeWidget * iPlayListtreeWidget

Protected Member Functions

bool getRandomFile (QString &absoluteFileName)
bool getPreviousRandomFile (QString &absoluteFileName)

Protected Attributes

int iPreviousSongs [MAX_REMEMBERED_RANDOM_PREVIOUS_SONGS]
int iPreviousSongsIndexCounter
PlaylistChildThreadsTracker * iChildThreadTracker
int iNowPlayingIndex
unsigned iResumePlayingLocation


Detailed Description

Dialog for browsing and editing playlist.

Member Function Documentation

QString PlaylistEditorDialog::getCurrent (  ) 

Get the file pointed by iNowPlayingIndex from the playlist.

Returns:
Filename with absoulte path. Could be other than the one pointed by iNowPlayingIndex if
  • Length of the list has changed and iNowPlayingIndex is pointing past the end of the list
  • The file pointed by iNowPlayingIndex does not exist.

empty QString if playlist is empty or all of the files in playlist are non existent.

bool PlaylistEditorDialog::LoadPlaylist ( const QString &  fullPlaylistPath  )  [virtual]

Load playlist from a file.

Parameters:
fullPlaylistPath name of playlist file with full path.
Loads a playlist from a text file that contains a list of files with full paths.

Returns:
true if loading was a succesfull one.

false if loading failed for some reason.

Reimplemented in daySpecificPlaylistEditorDialog.

void PlaylistEditorDialog::PopulateList ( const QStringList &  fileNameList,
const QStringList &  FullPathList 
)

Empty existing list and create a new list from given strings.

Parameters:
fileNameList list containing only filenames.
FullPathList list containing filenames with full paths.

bool PlaylistEditorDialog::SavePlaylist ( const QString &  fullPlaylistPath  )  [virtual]

Save playlist to a file.

Parameters:
fullPlaylistPath name of playlist file with full path.
Saves a playlist to a text file that contains a list of files with full paths.

Returns:
true if saving was a succesfull one.

false if saving failed for some reason.

Reimplemented in daySpecificPlaylistEditorDialog.


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

Generated on Thu Mar 3 17:42:04 2011 for Xiaoning's Diary by  doxygen 1.5.9