PlaylistItemData Class Reference
Playlist item data. More...
#include <playlist.h>
Public Member Functions | |
| 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.
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(). |
|
|
return whether if the given key exists Referenced by streamable(). |
|
|
what's the length of the song, in milliseconds? |
|
|
returns a friendly representation of the length of this file |
|
|
first, this checks for the property "mimetype", else it'l ask KMimeType based on file() |
|
|
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 |
|
|
return a list of property keys |
|
||||||||||||
|
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 url(). |
|
|
remove this item from the list |
|
|
Your playlist must call this when the file is removed from the playlist |
|
|
sets the length of the song, in milliseconds |
|
||||||||||||
|
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(). |
|
|
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. |
|
|
the true filename of the song, remote or local Definition at line 85 of file playlist.h. References property(). Referenced by file(). |
The documentation for this class was generated from the following file:
