Plasma
Player Class Reference
Interface for getting information from and controlling a media player. More...
#include <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 (qreal 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) |
Detailed Description
Interface for getting information from and controlling a media player.Definition at line 33 of file player.h.
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 22 of file player.cpp.
| Player::~Player | ( | ) | [virtual] |
Definition at line 27 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 110 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 133 of file player.cpp.
| void Player::pause | ( | ) | [virtual] |
Definition at line 106 of file player.cpp.
| void Player::play | ( | ) | [virtual] |
Definition at line 97 of file player.cpp.
| int Player::position | ( | ) | [virtual] |
Position of current track in seconds.
0 if unknown, not defined if Stopped.
Definition at line 77 of file player.cpp.
| void Player::previous | ( | ) | [virtual] |
Definition at line 124 of file player.cpp.
| void Player::seek | ( | int | time | ) | [virtual] |
Definition at line 151 of file player.cpp.
| void Player::setName | ( | const QString & | name | ) | [protected] |
Definition at line 155 of file player.cpp.
| void Player::setVolume | ( | qreal | volume | ) | [virtual] |
Definition at line 142 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 115 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 57 of file player.cpp.
| float Player::volume | ( | ) | [virtual] |
Current volume.
Value should be between 0 and 1
-1 if unknown
Definition at line 82 of file player.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference