class Player

# class Player | Player is the center of the KMediaPlayer interface. More...
Contains pure virtuals
Full name | `KMediaPlayer::Player`
Definition | `#include <player.h>`
Inherits | KParts::ReadOnlyPart (kparts) [public ], KMediaPlayer::PlayerDCOPObject [public ]
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum State { Empty, Stop, Pause, Play }

#### Public Methods

- Player (QObject *parent, const char *name)
- Player (QWidget *parentWidget, const char *widgetName, QObject *parent, const char *name)
- virtual ~Player (void)
- virtual View * view (void)
- virtual bool isSeekable (void) const
- virtual unsigned long position (void) const
- virtual bool hasLength (void) const
- virtual unsigned long length (void) const
- bool isLooping (void) const
- int state (void) const

#### Public Slots

- virtual void pause (void)
- virtual void play (void)
- virtual void stop (void)
- virtual void seek (unsigned long msec)
- void setLooping (bool)

#### Signals

- void loopingChanged (bool)
- void stateChanged (int)

#### Protected Slots

- void setState (int)

## 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.

Player (QObject *parent, const char *name) | ### Player

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) | ### Player

This constructor is what to use when a GUI is required, as in the case of a KMediaPlayer/Player.

~Player (void) | ### ~Player

[virtual]

View * view (void) | ### view

[pure virtual]

A convenience function returning a pointer to the View for this Player, or 0 if this Player has no GUI.

void pause (void) | ### pause

[pure virtual slot]

Reimplemented from PlayerDCOPObject.

void play (void) | ### play

[pure virtual slot]

Reimplemented from PlayerDCOPObject.

void stop (void) | ### stop

[pure virtual slot]

Reimplemented from PlayerDCOPObject.

void seek (unsigned long msec) | ### seek

[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.

Reimplemented from PlayerDCOPObject.

bool isSeekable (void) | ### isSeekable

[const pure virtual]

Reimplemented from PlayerDCOPObject.

unsigned long position (void) | ### position

[const pure virtual]

Reimplemented from PlayerDCOPObject.

bool hasLength (void) | ### hasLength

[const pure virtual]

Returns whether the current track has a length. Some streams are endless, and do not have one.

Reimplemented from PlayerDCOPObject.

unsigned long length (void) | ### length

[const pure virtual]

Reimplemented from PlayerDCOPObject.

void setLooping (bool) | ### setLooping

[slot]

Set whether the Player should continue playing at the beginning of the track when the end of the track is reached.

Reimplemented from PlayerDCOPObject.

bool isLooping (void) | ### isLooping

[const]

Reimplemented from PlayerDCOPObject.

void loopingChanged (bool) | ### loopingChanged

[signal]

enum State { Empty, Stop, Pause, Play } | ### State

int state (void) | ### state

[const]

Reimplemented from PlayerDCOPObject.

void stateChanged (int) | ### stateChanged

[signal]

void setState (int) | ### setState

[protected slots slot]

Implementers use this to control what users see as the current state.

Reimplemented from PlayerDCOPObject.

Generated by: root on macppc.ports.openbsd.org on Sat Sep 6 10:38:11 2003, using kdoc 2.0a54.