Engines
Player Class Reference
#include <player.h>

Detailed Description
Interface for getting information from and controlling a media player.Definition at line 33 of file player.h.
Public Types | |
typedef KSharedPtr< Player > | Ptr |
enum | State { Playing, Paused, Stopped } |
Public Member Functions | |
virtual QString | album () |
virtual QString | artist () |
virtual QPixmap | artwork () |
virtual bool | canGoNext () |
virtual bool | canGoPrevious () |
virtual bool | canPause () |
virtual bool | canPlay () |
virtual bool | canSeek () |
virtual bool | canSetVolume () |
virtual bool | canStop () |
virtual QString | comment () |
PlayerFactory * | factory () const |
virtual QString | genre () |
virtual bool | isRunning ()=0 |
virtual int | length () |
QString | name () const |
virtual void | next () |
virtual void | pause () |
virtual void | play () |
Player (PlayerFactory *factory=0) | |
virtual int | position () |
virtual void | previous () |
virtual void | seek (int time) |
virtual void | setVolume (float volume) |
virtual State | state ()=0 |
virtual void | stop () |
virtual QString | title () |
virtual int | trackNumber () |
virtual float | volume () |
virtual | ~Player () |
Protected Member Functions | |
void | setName (const QString &name) |
Member Typedef Documentation
typedef KSharedPtr<Player> Player::Ptr |
Member Enumeration Documentation
enum Player::State |
Constructor & Destructor Documentation
Player::Player | ( | PlayerFactory * | factory = 0 |
) |
Definition at line 3 of file player.cpp.
Player::~Player | ( | ) | [virtual] |
Definition at line 8 of file player.cpp.
Member Function Documentation
QString Player::album | ( | ) | [virtual] |
QString Player::artist | ( | ) | [virtual] |
QPixmap Player::artwork | ( | ) | [virtual] |
bool Player::canGoNext | ( | ) | [virtual] |
bool Player::canGoPrevious | ( | ) | [virtual] |
bool Player::canPause | ( | ) | [virtual] |
bool Player::canPlay | ( | ) | [virtual] |
bool Player::canSeek | ( | ) | [virtual] |
bool Player::canSetVolume | ( | ) | [virtual] |
bool Player::canStop | ( | ) | [virtual] |
Stop the currently playing track.
canStop() should usually be state() != Stopped if stop() is implemented
Definition at line 91 of file player.cpp.
QString Player::comment | ( | ) | [virtual] |
PlayerFactory * Player::factory | ( | ) | const |
QString Player::genre | ( | ) | [virtual] |
virtual bool Player::isRunning | ( | ) | [pure virtual] |
Whether the player is running and accessible.
int Player::length | ( | ) | [virtual] |
QString Player::name | ( | ) | const |
void Player::next | ( | ) | [virtual] |
Definition at line 114 of file player.cpp.
void Player::pause | ( | ) | [virtual] |
Definition at line 87 of file player.cpp.
void Player::play | ( | ) | [virtual] |
Definition at line 78 of file player.cpp.
int Player::position | ( | ) | [virtual] |
Position of current track in seconds.
0 if unknown, not defined if Stopped.
Definition at line 58 of file player.cpp.
void Player::previous | ( | ) | [virtual] |
Definition at line 105 of file player.cpp.
void Player::seek | ( | int | time | ) | [virtual] |
Definition at line 132 of file player.cpp.
void Player::setName | ( | const QString & | name | ) | [protected] |
Definition at line 136 of file player.cpp.
void Player::setVolume | ( | float | volume | ) | [virtual] |
Definition at line 123 of file player.cpp.
virtual State Player::state | ( | ) | [pure virtual] |
Current state of the player.
Undefined if !running()
See State
void Player::stop | ( | ) | [virtual] |
Definition at line 96 of file player.cpp.
QString Player::title | ( | ) | [virtual] |
int Player::trackNumber | ( | ) | [virtual] |
Track number of current track.
Note that this is the track on a CD or in an album, not the playlist position
0 if no track defined, or unknown.
Definition at line 38 of file player.cpp.
float Player::volume | ( | ) | [virtual] |
Current volume.
Value should be between 0 and 1
-1 if unknown
Definition at line 63 of file player.cpp.
The documentation for this class was generated from the following files: