7
#include <noatunplaylist.h>
14
* This class has slots for all the common media player buttons
15
* The slots are called, and it queries the Playlist for the appropriate
18
class Player : public QObject
22
friend class PlaylistItem;
25
enum LoopType { None=0, Song, Playlist };
28
Player(QObject *parent=0);
32
* returns a string with the time that can
36
QString lengthString(int _position=-1);
38
* returns the LoopType enum
40
int loopStyle() const { return mLoopStyle; }
42
* the volume from 0-100
43
* use volume() instead
47
* the position in milliseconds
49
int getTime() const { return position; }
51
* the track-length in milliseconds
55
* true if we're playing
68
* get the current playlist
70
* And this may not be necessarily an item allocated
73
PlaylistItem *current() const { return mCurrent;}
76
* load the @param file, clear the playlist if @param purg is set
77
* and if autoplay is set, play the item.
79
void openFile(const KURL &file, bool purge=true, bool autoplay=false);
81
Engine *engine() const { return mEngine; }
85
* show or hide the playlist
87
void toggleListView();
89
* force the playing/paused/stopped/playlist shown signals to
94
* remove current from playlist
111
* start playing, or pause if we're currently playing
117
void fastForward(bool allowLoop);
119
* same as fastForward(true)
121
void fastForward() { fastForward(true); }
124
* skip to the position, unit is milliseconds
126
void skipTo(int msec);
134
void toggleInterfaces();
135
void showInterfaces();
136
void hideInterfaces();
143
* Tells you to update the seekbar and volume
153
* Tells you to show again
160
void loopTypeChange(int t);
161
void playlistShown();
162
void playlistHidden();
165
* called at the same time as newSong, but
166
* maybe easier to work with
168
void newSongLen(int mins, int sec);
171
* when a new song is currently playing
176
* Called when a new song is about to be played, but
177
* hasn't started. player->current() is the
182
void volumeChanged(int);
190
PlaylistItem *mCurrent;
192
bool showingInterfaces;