KMediaPlayer::Player Class Reference
Player is the center of the KMediaPlayer interface. More...
#include <player.h>
Inheritance diagram for KMediaPlayer::Player:

Public Types | |
enum | State { Empty, Stop, Pause, Play } |
The possible states of the Player. More... | |
Public Slots | |
virtual void | pause (void)=0 |
Pause playback of the media track. | |
virtual void | play (void)=0 |
Begin playing the media track. | |
virtual void | stop (void)=0 |
Stop playback of the media track and return to the beginning. | |
virtual void | seek (unsigned long msec)=0 |
Move the current playback position to the specified time in milliseconds, if the track is seekable. | |
void | setLooping (bool) |
Set whether the Player should continue playing at the beginning of the track when the end of the track is reached. | |
Signals | |
void | loopingChanged (bool) |
Emitted when the looping state is changed. | |
void | stateChanged (int) |
Emitted when the state changes. | |
Public Methods | |
Player (QObject *parent, const char *name) | |
This constructor is what to use when no GUI is required, as in the case of a KMediaPlayer/Engine. | |
Player (QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name) | |
This constructor is what to use when a GUI is required, as in the case of a KMediaPlayer/Player. | |
virtual View * | view (void)=0 |
A convenience function returning a pointer to the View for this Player, or 0 if this Player has no GUI. | |
virtual bool | isSeekable (void) const=0 |
Returns whether the current track honors seek requests. | |
virtual unsigned long | position (void) const=0 |
Returns the current playback position in the track. | |
virtual bool | hasLength (void) const=0 |
Returns whether the current track has a length. | |
virtual unsigned long | length (void) const=0 |
Returns the length of the current track. | |
bool | isLooping (void) const |
Return the current looping state. | |
int | state (void) const |
Return the current state of the player. | |
Protected Slots | |
void | setState (int) |
Implementers use this to control what users see as the current state. |
Detailed Description
Player is the center of the KMediaPlayer interface.It provides all of the necessary media player operations, and optionally provides the GUI to control them.
There are two servicetypes for Player: KMediaPlayer/Player and KMediaPlayer/Engine. KMediaPlayer/Player provides a widget (accessable through view as well as XML GUI KActions. KMediaPlayer/Engine omits the user interface facets, for those who wish to provide their own interface.
Definition at line 46 of file player.h.
Member Enumeration Documentation
|
The possible states of the Player.
|
Constructor & Destructor Documentation
|
This constructor is what to use when no GUI is required, as in the case of a KMediaPlayer/Engine.
Definition at line 39 of file player.cpp. |
|
This constructor is what to use when a GUI is required, as in the case of a KMediaPlayer/Player.
Definition at line 31 of file player.cpp. |
Member Function Documentation
|
A convenience function returning a pointer to the View for this Player, or 0 if this Player has no GUI.
|
|
Pause playback of the media track.
|
|
Begin playing the media track.
|
|
Stop playback of the media track and return to the beginning.
|
|
Move the current playback position to the specified time in milliseconds, if the track is seekable. Some streams may not be seeked. |
|
Returns whether the current track honors seek requests.
|
|
Returns the current playback position in the track.
|
|
Returns whether the current track has a length. Some streams are endless, and do not have one. |
|
Returns the length of the current track.
|
|
Set whether the Player should continue playing at the beginning of the track when the end of the track is reached.
Definition at line 51 of file player.cpp. References loopingChanged(). |
|
Return the current looping state.
Definition at line 60 of file player.cpp. |
|
Emitted when the looping state is changed.
Referenced by setLooping(). |
|
Return the current state of the player.
Definition at line 74 of file player.cpp. |
|
Emitted when the state changes.
Referenced by setState(). |
|
Implementers use this to control what users see as the current state.
Definition at line 65 of file player.cpp. References stateChanged(). |
The documentation for this class was generated from the following files: