1
/***************************************************************************
2
copyright : (C) 2004 by Scott Wheeler
3
email : wheeler@kde.org
4
***************************************************************************/
6
/***************************************************************************
8
* This program is free software; you can redistribute it and/or modify *
9
* it under the terms of the GNU General Public License as published by *
10
* the Free Software Foundation; either version 2 of the License, or *
11
* (at your option) any later version. *
13
***************************************************************************/
15
#include "folderplaylist.h"
16
#include "playlistcollection.h"
17
#include "juk-exception.h"
21
////////////////////////////////////////////////////////////////////////////////
23
////////////////////////////////////////////////////////////////////////////////
25
FolderPlaylist::FolderPlaylist(PlaylistCollection *collection, const QString &folder,
26
const QString &name) :
27
Playlist(collection, name, "folder"),
30
QTimer::singleShot(0, this, SLOT(slotReload()));
33
FolderPlaylist::~FolderPlaylist()
38
QString FolderPlaylist::folder() const
43
void FolderPlaylist::setFolder(const QString &s)
46
QTimer::singleShot(0, this, SLOT(slotReload()));
49
////////////////////////////////////////////////////////////////////////////////
51
////////////////////////////////////////////////////////////////////////////////
53
void FolderPlaylist::slotReload()
55
if(!m_folder.isEmpty())
56
addFiles(QStringList(m_folder));
59
////////////////////////////////////////////////////////////////////////////////
61
////////////////////////////////////////////////////////////////////////////////
63
QDataStream &operator<<(QDataStream &s, const FolderPlaylist &p)
70
QDataStream &operator>>(QDataStream &s, FolderPlaylist &p)
77
if(folder.isEmpty() || name.isEmpty())
78
throw BICStreamException();
85
#include "folderplaylist.moc"
87
// vim: set et sw=4 tw=0 sta: