Commit ae6862f3 authored by Scott Wheeler's avatar Scott Wheeler

Fixed restoring of "internal" playlists. Added some API documentation.

svn path=/trunk/kdemultimedia/juk/; revision=192637
parent f1fc4e6a
......@@ -107,6 +107,7 @@ void Playlist::save(bool autoGenerateFileName)
{
if(autoGenerateFileName && playlistFileName == QString::null) {
QString dataDir = KGlobal::dirs()->saveLocation("appdata");
kdDebug() << "Playlist::save() - name() == " << name() << endl;
playlistFileName = dataDir + name() + "." + splitter->playlistExtensions().first();
}
else if(!autoGenerateFileName && (internalFile || playlistFileName == QString::null))
......@@ -437,8 +438,6 @@ void Playlist::setup()
setAcceptDrops(true);
allowDuplicates = false;
playlistName = QString::null;
}
////////////////////////////////////////////////////////////////////////////////
......
......@@ -89,7 +89,16 @@ public:
void setInternal(bool internal);
QString fileName() const;
void setFileName(const QString &n);
/**
* If playlistName has no value -- i.e. the name has not been set to
* something other than the filename, this returns the filename less the
* extension. If playlistName does have a value, this returns that.
*/
QString name() const;
/**
* This sets a name for the playlist that is \e different from the file name.
*/
void setName(const QString &n);
PlaylistBoxItem *playlistBoxItem() const;
......@@ -125,6 +134,11 @@ private:
*/
bool internalFile;
QString playlistFileName;
/**
* This is only defined if the playlist name is something other than the
* file name.
*/
QString playlistName;
PlaylistSplitter *splitter;
PlaylistBoxItem *boxItem;
......@@ -152,6 +166,11 @@ signals:
* primarily to notify the TagEditor of the new data.
*/
void selectionChanged(const PlaylistItemList &selection);
/**
* This is connected to the PlaylistBoxItem to let it know when the
* playlist's name has changed.
*/
void nameChanged(const QString &fileName);
};
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment