KMediaPlayer
KMediaPlayer::Player Class Reference
#include <player.h>

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 45 of file player.h.
Public Types | |
| enum | State { Empty, Stop, Pause, Play } |
Public Slots | |
| virtual void | pause (void)=0 |
| virtual void | play (void)=0 |
| virtual void | stop (void)=0 |
| virtual void | seek (qlonglong msec)=0 |
| void | setLooping (bool) |
Signals | |
| void | loopingChanged (bool) |
| void | stateChanged (int) |
Public Member Functions | |
| Player (QObject *parent) | |
| Player (QWidget *parentWidget, const char *widgetName, QObject *parent) | |
| virtual | ~Player (void) |
| virtual View * | view (void)=0 |
| virtual bool | isSeekable (void) const =0 |
| virtual qlonglong | position (void) const =0 |
| virtual bool | hasLength (void) const =0 |
| virtual qlonglong | length (void) const =0 |
| bool | isLooping (void) const |
| int | state (void) const |
Protected Slots | |
| void | setState (int) |
Properties | |
| bool | hasLength |
| qlonglong | length |
| bool | looping |
| qlonglong | position |
| bool | seekable |
| int | state |
Member Enumeration Documentation
Constructor & Destructor Documentation
| KMediaPlayer::Player::Player | ( | QObject * | parent | ) |
This constructor is what to use when no GUI is required, as in the case of a KMediaPlayer/Engine.
Definition at line 36 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 27 of file player.cpp.
| KMediaPlayer::Player::~Player | ( | void | ) | [virtual] |
Definition at line 45 of file player.cpp.
Member Function Documentation
| virtual View* KMediaPlayer::Player::view | ( | void | ) | [pure virtual] |
| virtual void KMediaPlayer::Player::pause | ( | void | ) | [pure virtual, slot] |
Pause playback of the media track.
| virtual void KMediaPlayer::Player::play | ( | void | ) | [pure virtual, slot] |
Begin playing the media track.
| virtual void KMediaPlayer::Player::stop | ( | void | ) | [pure virtual, slot] |
Stop playback of the media track and return to the beginning.
| virtual void KMediaPlayer::Player::seek | ( | qlonglong | msec | ) | [pure virtual, slot] |
Move the current playback position to the specified time in milliseconds, if the track is seekable.
Some streams may not be seeked.
| virtual bool KMediaPlayer::Player::isSeekable | ( | void | ) | const [pure virtual] |
Returns whether the current track honors seek requests.
| virtual qlonglong KMediaPlayer::Player::position | ( | void | ) | const [pure virtual] |
Returns the current playback position in the track.
| virtual bool KMediaPlayer::Player::hasLength | ( | void | ) | const [pure virtual] |
Returns whether the current track has a length.
Some streams are endless, and do not have one.
| virtual qlonglong KMediaPlayer::Player::length | ( | void | ) | const [pure virtual] |
Returns the length of the current track.
| void KMediaPlayer::Player::setLooping | ( | bool | b | ) | [slot] |
Set whether the Player should continue playing at the beginning of the track when the end of the track is reached.
Definition at line 49 of file player.cpp.
| bool KMediaPlayer::Player::isLooping | ( | void | ) | const |
| void KMediaPlayer::Player::loopingChanged | ( | bool | ) | [signal] |
Emitted when the looping state is changed.
| int KMediaPlayer::Player::state | ( | void | ) | const |
| void KMediaPlayer::Player::stateChanged | ( | int | ) | [signal] |
Emitted when the state changes.
| void KMediaPlayer::Player::setState | ( | int | s | ) | [protected, slot] |
Implementers use this to control what users see as the current state.
Definition at line 63 of file player.cpp.
Property Documentation
The documentation for this class was generated from the following files:
KDE 4.0 API Reference