PlaylistItemData Class Reference
Playlist item data. More...
#include <playlist.h>
Public Member Functions | |
| PlaylistItemData () | |
| virtual | ~PlaylistItemData () |
| virtual QString | property (const QString &key, const QString &def=0) const =0 |
| virtual void | setProperty (const QString &key, const QString &property)=0 |
| virtual void | clearProperty (const QString &key)=0 |
| virtual QStringList | properties () const =0 |
| virtual bool | isProperty (const QString &key) const =0 |
| virtual QString | title () const |
| virtual KURL | url () const |
| virtual void | setUrl (const KURL &url) |
| virtual QCString | mimetype () const |
| virtual QCString | playObject () const |
| virtual QString | file () const |
| virtual int | length () const |
| virtual void | setLength (int ms) |
| QString | lengthString () const |
| virtual bool | operator== (const PlaylistItemData &d) const |
| virtual bool | operator!= (const PlaylistItemData &d) const |
| virtual void | remove ()=0 |
| bool | streamable () const |
| void | added () |
| void | removed () |
| void | modified () |
| void | addRef () |
| void | removeRef () |
Detailed Description
Playlist item data.If you're not coding a playlist, ignore this class.
The backend. Since PlaylistItemData is refcounted, this contains the data, the PlaylistItem is the "reference"
PlaylistItem m=new PlaylistItemData;Of course, you're supposed to inherit from PlaylistItemData in your Playlist, since there are pure virtuals.
You can create these objects on demand.
- Author:
- Charles Samuels
- Version:
- 2.3
Definition at line 29 of file playlist.h.
Constructor & Destructor Documentation
|
|
|
|
|
|
Member Function Documentation
|
|
Call this when you want to signal the given item has been added to the list |
|
|
Have the reference counter never delete this This is useful for when you want to keep all your items hanging around Definition at line 177 of file playlist.h. |
|
|
remove the item with given key |
|
|
return the filename to send to the playobject Definition at line 106 of file playlist.h. References url(). Referenced by PlaylistItem::file(). |
|
|
return whether if the given key exists Referenced by PlaylistItem::isProperty(), and streamable(). |
|
|
what's the length of the song, in milliseconds? Referenced by PlaylistItem::length(). |
|
|
returns a friendly representation of the length of this file Referenced by PlaylistItem::lengthString(). |
|
|
first, this checks for the property "mimetype", else it'l ask KMimeType based on file() Referenced by PlaylistItem::mimetype(). |
|
|
Your playlist must call this when the file is modified |
|
|
this is implemented as !(*this==d), you may have a faster way to implement this |
|
|
compare yourself with the given PlaylistItemData This is implemented in the slow fashion of comparing all the properties. You may have a much faster way of implementing this if this==&d, this will not be called, normally |
|
|
first, checks for the property "playObject", else, it'l ask aRts Referenced by PlaylistItem::playObject(). |
|
|
return a list of property keys Referenced by PlaylistItem::properties(). |
|
||||||||||||
|
Noatun asks your playlist for properties. It is your responsiblity to store the information. But usually a QMap<QString,QString> is enough. If you return the default value, the default should not be written. This returns the property, or def if such a property doesn't exist Referenced by PlaylistItem::property(), and url(). |
|
|
remove this item from the list Referenced by PlaylistItem::remove(). |
|
|
Your playlist must call this when the file is removed from the playlist |
|
|
Definition at line 178 of file playlist.h. |
|
|
sets the length of the song, in milliseconds Referenced by PlaylistItem::setLength(). |
|
||||||||||||
|
This sets the property with the given key and value. Important: If you use a QMap, you'll have to remove the current item before adding a new one Referenced by setUrl(). |
|
|
set the true filename of the song, remote or local Definition at line 89 of file playlist.h. References setProperty(). |
|
|
Playlists should not download files if this is true Definition at line 148 of file playlist.h. References isProperty(). Referenced by PlaylistItem::streamable(). |
|
|
return the title of the song. By default, this will use the following by default, in order of priority property("realtitle") property("title") url().filename() you shouldn't need to override this. Referenced by PlaylistItem::title(). |
|
|
the true filename of the song, remote or local Definition at line 85 of file playlist.h. References property(). Referenced by file(), and PlaylistItem::url(). |
The documentation for this class was generated from the following file:
