• Skip to content
  • Skip to link menu
  • KDE API Reference
  • kdelibs-4.10.5 API Reference
  • KDE Home
  • Contact Us
 

KMediaPlayer

  • KMediaPlayer
  • Player
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | Properties
KMediaPlayer::Player Class Reference

#include <player.h>

Inheritance diagram for KMediaPlayer::Player:
KParts::ReadOnlyPart KParts::Part QObject KParts::PartBase KXMLGUIClient

List of all members.

Public Types

enum  State { Empty, Stop, Pause, Play }

Public Slots

virtual void pause (void)=0
virtual void play (void)=0
virtual void seek (qlonglong msec)=0
void setLooping (bool)
virtual void stop (void)=0
- Public Slots inherited from KParts::ReadOnlyPart
virtual bool openUrl (const KUrl &url)

Signals

void loopingChanged (bool)
void stateChanged (int)
- Signals inherited from KParts::ReadOnlyPart
void canceled (const QString &errMsg)
void completed ()
void completed (bool pendingAction)
void setStatusBarText (const QString &text)
void setWindowCaption (const QString &caption)
void started (KIO::Job *)
void urlChanged (const KUrl &url)
- Signals inherited from KParts::Part

Public Member Functions

 Player (QObject *parent)
 Player (QWidget *parentWidget, const char *widgetName, QObject *parent)
virtual ~Player (void)
virtual bool hasLength (void) const =0
bool isLooping (void) const
virtual bool isSeekable (void) const =0
virtual qlonglong length (void) const =0
virtual qlonglong position (void) const =0
int state (void) const
virtual View * view (void)=0
- Public Member Functions inherited from KParts::ReadOnlyPart
 ReadOnlyPart (QObject *parent=0)
virtual ~Part ()
virtual ~PartBase ()
virtual ~ReadOnlyPart ()
OpenUrlArguments arguments () const
BrowserExtension * browserExtension () const
bool closeStream ()
virtual bool closeUrl ()
virtual void embed (QWidget *parentWidget)
virtual Part * hitTest (QWidget *widget, const QPoint &globalPos)
KIconLoader * iconLoader ()
bool isProgressInfoEnabled () const
bool isSelectable () const
PartManager * manager () const
bool openStream (const QString &mimeType, const KUrl &url)
 Part (QObject *parent=0)
 PartBase ()
QObject * partObject () const
void setArguments (const OpenUrlArguments &arguments)
void setAutoDeletePart (bool autoDeletePart)
void setAutoDeleteWidget (bool autoDeleteWidget)
virtual void setManager (PartManager *manager)
void setPartObject (QObject *object)
void setProgressInfoEnabled (bool show)
virtual void setSelectable (bool selectable)
void showProgressInfo (bool show)
KUrl url () const
virtual QWidget * widget ()
bool writeStream (const QByteArray &data)

Protected Slots

void setState (int)
- Protected Slots inherited from KParts::ReadOnlyPart
void slotWidgetDestroyed ()
- Protected Slots inherited from KParts::Part

Properties

bool hasLength
qlonglong length
bool looping
qlonglong position
bool seekable
int state
- Properties inherited from KParts::ReadOnlyPart
KUrl url

Additional Inherited Members

- Protected Member Functions inherited from KParts::ReadOnlyPart
 ReadOnlyPart (ReadOnlyPartPrivate &dd, QObject *parent)
void abortLoad ()
virtual void customEvent (QEvent *event)
virtual void guiActivateEvent (GUIActivateEvent *event)
QWidget * hostContainer (const QString &containerName)
bool isLocalFileTemporary () const
void loadPlugins (QObject *parent, KXMLGUIClient *parentGUIClient, const KComponentData &componentData)
void loadPlugins ()
QString localFilePath () const
virtual bool openFile ()
 Part (PartPrivate &dd, QObject *parent)
virtual void partActivateEvent (PartActivateEvent *event)
 PartBase (PartBasePrivate &dd)
virtual void partSelectEvent (PartSelectEvent *event)
virtual void setComponentData (const KComponentData &componentData)
virtual void setComponentData (const KComponentData &componentData, bool loadPlugins)
void setLocalFilePath (const QString &localFilePath)
void setLocalFileTemporary (bool temp)
void setPluginInterfaceVersion (int version)
void setPluginLoadingMode (PluginLoadingMode loadingMode)
void setUrl (const KUrl &url)
virtual void setWidget (QWidget *widget)

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.


Member Enumeration Documentation

enum KMediaPlayer::Player::State

The possible states of the Player.

Enumerator:
Empty 

No track is loaded.

Stop 

Not playing.

Pause 

Playing is temporarily suspended.

Play 

The media is currently being output.

Definition at line 116 of file player.h.


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.

KMediaPlayer::Player::Player ( QWidget *  parentWidget,
const char *  widgetName,
QObject *  parent 
)

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

bool KMediaPlayer::Player::isLooping ( void  ) const

Return the current looping state.

Definition at line 58 of file player.cpp.

virtual bool KMediaPlayer::Player::isSeekable ( void  ) const
pure virtual

Returns whether the current track honors seek requests.

virtual qlonglong KMediaPlayer::Player::length ( void  ) const
pure virtual

Returns the length of the current track.

void KMediaPlayer::Player::loopingChanged ( bool  )
signal

Emitted when the looping state is changed.

virtual void KMediaPlayer::Player::pause ( void  )
pure virtualslot

Pause playback of the media track.

virtual void KMediaPlayer::Player::play ( void  )
pure virtualslot

Begin playing the media track.

virtual qlonglong KMediaPlayer::Player::position ( void  ) const
pure virtual

Returns the current playback position in the track.

virtual void KMediaPlayer::Player::seek ( qlonglong  msec)
pure virtualslot

Move the current playback position to the specified time in milliseconds, if the track is seekable.

Some streams may not be seeked.

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.

void KMediaPlayer::Player::setState ( int  s)
protectedslot

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

Definition at line 63 of file player.cpp.

int KMediaPlayer::Player::state ( void  ) const

Return the current state of the player.

Definition at line 72 of file player.cpp.

void KMediaPlayer::Player::stateChanged ( int  )
signal

Emitted when the state changes.

virtual void KMediaPlayer::Player::stop ( void  )
pure virtualslot

Stop playback of the media track and return to the beginning.

virtual View* KMediaPlayer::Player::view ( void  )
pure virtual

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


Property Documentation

bool KMediaPlayer::Player::hasLength
read

Definition at line 48 of file player.h.

qlonglong KMediaPlayer::Player::length
read

Definition at line 49 of file player.h.

bool KMediaPlayer::Player::looping
readwrite

Definition at line 50 of file player.h.

qlonglong KMediaPlayer::Player::position
read

Definition at line 51 of file player.h.

bool KMediaPlayer::Player::seekable
read

Definition at line 52 of file player.h.

int KMediaPlayer::Player::state
readwrite

Definition at line 53 of file player.h.


The documentation for this class was generated from the following files:
  • player.h
  • player.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Tue Jul 23 2013 22:05:33 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KMediaPlayer

Skip menu "KMediaPlayer"
  • Main Page
  • Namespace List
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • Related Pages

kdelibs-4.10.5 API Reference

Skip menu "kdelibs-4.10.5 API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal