Playlist Class Reference
#include <playlist.h>
Inheritance diagram for Playlist:
[legend]List of all members.
|
Public Slots |
| virtual void | showList ()=0 |
| virtual void | hideList ()=0 |
| virtual void | toggleList () |
Signals |
| void | playCurrent () |
| void | listHidden () |
| void | listShown () |
Public Member Functions |
| | Playlist (QObject *parent, const char *name) |
| virtual | ~Playlist () |
| virtual void | reset ()=0 |
| virtual void | clear ()=0 |
| virtual void | addFile (const KURL &, bool play=false)=0 |
| virtual PlaylistItem | next ()=0 |
| virtual PlaylistItem | nextSection () |
| virtual PlaylistItem | previous ()=0 |
| virtual PlaylistItem | previousSection () |
| virtual PlaylistItem | current ()=0 |
| virtual void | setCurrent (const PlaylistItem &)=0 |
| virtual PlaylistItem | getFirst () const =0 |
| virtual PlaylistItem | getAfter (const PlaylistItem &item) const =0 |
| virtual bool | listVisible () const =0 |
| int | handleArguments () |
| virtual QValueList< PlaylistItem > | select (const QStringList &keys, const QStringList &values, int limit=-1, bool exact=false, bool caseSensitive=false) |
| virtual QValueList< PlaylistItem > | select (const QString &key, const QString &value, int limit=-1, bool exact=false, bool caseSensitive=false) |
| QValueList< PlaylistItem > | select (const char *key, const char *value, int limit=-1, bool exact=false, bool caseSensitive=false) |
Detailed Description
The playlist, which you derive from when creating your own playlist.
Do not, under any circumstances, call a Playlist method when you can call a Player method, unless, of course, you ARE the playlist.
Definition at line 328 of file playlist.h.
Constructor & Destructor Documentation
| Playlist::Playlist |
( |
QObject * |
parent, |
|
|
const char * |
name |
|
) |
|
|
| virtual Playlist::~Playlist |
( |
|
) |
[virtual] |
|
|
|
on playlist unload, your playlist must have current()==0 and emit playCurrent |
Member Function Documentation
| virtual void Playlist::addFile |
( |
const KURL & |
, |
|
|
bool |
play = false |
|
) |
[pure virtual] |
|
| virtual void Playlist::clear |
( |
|
) |
[pure virtual] |
|
|
|
get the item after item, note that getFirst and getAfter do not have to follow play order since they are used solely to iterate over the entire collection in some order. Duplicating the play order (by looking into the future) is not necessary. |
| virtual PlaylistItem Playlist::getFirst |
( |
|
) |
const [pure virtual] |
|
| int Playlist::handleArguments |
( |
|
) |
|
|
|
|
do the KCmdLineArgs stuff |
| virtual void Playlist::hideList |
( |
|
) |
[pure virtual, slot] |
|
| void Playlist::listHidden |
( |
|
) |
[signal] |
|
| void Playlist::listShown |
( |
|
) |
[signal] |
|
| virtual bool Playlist::listVisible |
( |
|
) |
const [pure virtual] |
|
|
|
cycle forward, return that |
|
|
cycle to next section, return that defaults to return next() |
| void Playlist::playCurrent |
( |
|
) |
[signal] |
|
|
|
when you want the engine to reload current() This is how your playlist forces noatun to play a new song |
| virtual PlaylistItem Playlist::previousSection |
( |
|
) |
[virtual] |
|
|
|
cycle to previous section, return that defaults to return previous() |
| virtual void Playlist::reset |
( |
|
) |
[pure virtual] |
|
| QValueList<PlaylistItem> Playlist::select |
( |
const char * |
key, |
|
|
const char * |
value, |
|
|
int |
limit = -1, |
|
|
bool |
exact = false, |
|
|
bool |
caseSensitive = false |
|
) |
[inline] |
|
|
|
exactly the same as the above, except converts the const char* to QString (utf8)
Definition at line 453 of file playlist.h. |
| virtual QValueList<PlaylistItem> Playlist::select |
( |
const QString & |
key, |
|
|
const QString & |
value, |
|
|
int |
limit = -1, |
|
|
bool |
exact = false, |
|
|
bool |
caseSensitive = false |
|
) |
[virtual] |
|
|
|
The default implementation will just call the above select. Of course, you're free to implement both of these (with different mechanisms if need be) for speed |
| virtual QValueList<PlaylistItem> Playlist::select |
( |
const QStringList & |
keys, |
|
|
const QStringList & |
values, |
|
|
int |
limit = -1, |
|
|
bool |
exact = false, |
|
|
bool |
caseSensitive = false |
|
) |
[virtual] |
|
|
|
return a list of songs in which at least one of the keys matches at least one of the values
the default implementation will call getFirst() and getAfter() which could be potentially slow, depending how your playlist is designed. So you're free to reimplement this if you could do better
A value of "" is equal to an unset value
limit is the maximum amount of items to return, or -1 if you want as many as possible
if exact is true, a match is only made if the string is identical to a value. if false a match is made if the string contains a value
caseSensitive, if false, means that the given values are compared case insensitively to to the items in the playlist. The keys are always compared with case sensitivity |
| virtual void Playlist::setCurrent |
( |
const PlaylistItem & |
|
) |
[pure virtual] |
|
| virtual void Playlist::showList |
( |
|
) |
[pure virtual, slot] |
|
| virtual void Playlist::toggleList |
( |
|
) |
[virtual, slot] |
|
The documentation for this class was generated from the following file:
This file is part of the documentation for Noatun 2.6.0.
Documentation copyright © 1996-2004 the KDE developers.
Generated on Fri Oct 22 00:20:37 2004 by
doxygen 1.3.8-20040913 written by
Dimitri van Heesch, © 1997-2003