• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • interfaces
 

interfaces

  • KMediaPlayer
  • Player
Public Types | Public Slots | Signals | Public Member Functions | Protected Slots | List of all members
KMediaPlayer::Player Class Referenceabstract

#include <player.h>

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

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 (unsigned long msec)=0
 
void setLooping (bool)
 
- 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 started (TDEIO::Job *)
 
void completed ()
 
void completed (bool pendingAction)
 
void canceled (const TQString &errMsg)
 
- Signals inherited from KParts::Part
void setWindowCaption (const TQString &caption)
 
void setStatusBarText (const TQString &text)
 

Public Member Functions

 Player (TQObject *parent, const char *name)
 
 Player (TQWidget *parentWidget, const char *widgetName, TQObject *parent, const char *name)
 
virtual View * view (void)=0
 
virtual bool isSeekable (void) const =0
 
virtual unsigned long position (void) const =0
 
virtual bool hasLength (void) const =0
 
virtual unsigned long length (void) const =0
 
bool isLooping (void) const
 
int state (void) const
 
- Public Member Functions inherited from KParts::ReadOnlyPart
 ReadOnlyPart (TQObject *parent=0, const char *name=0)
 
void setProgressInfoEnabled (bool show)
 
bool isProgressInfoEnabled () const
 
KURL url () const
 
virtual bool closeURL ()
 
bool openStream (const TQString &mimeType, const KURL &url)
 
bool writeStream (const TQByteArray &data)
 
bool closeStream ()
 
- Public Member Functions inherited from KParts::Part
 Part (TQObject *parent=0, const char *name=0)
 
virtual void embed (TQWidget *parentWidget)
 
virtual TQWidget * widget ()
 
PartManager * manager () const
 
virtual Part * hitTest (TQWidget *widget, const TQPoint &globalPos)
 
virtual void setSelectable (bool selectable)
 
bool isSelectable () const
 
- Public Member Functions inherited from KParts::PartBase
void setPartObject (TQObject *object)
 
- Public Member Functions inherited from KXMLGUIClient
 KXMLGUIClient (KXMLGUIClient *parent)
 
TDEAction * action (const char *name) const
 
virtual TDEAction * action (const TQDomElement &element) const
 
virtual TDEActionCollection * actionCollection () const
 
virtual TDEInstance * instance () const
 
virtual TQDomDocument domDocument () const
 
virtual TQString xmlFile () const
 
void setXMLGUIBuildDocument (const TQDomDocument &doc)
 
TQDomDocument xmlguiBuildDocument () const
 
void setFactory (KXMLGUIFactory *factory)
 
KXMLGUIFactory * factory () const
 
KXMLGUIClient * parentClient () const
 
void insertChildClient (KXMLGUIClient *child)
 
void removeChildClient (KXMLGUIClient *child)
 
const TQPtrList< KXMLGUIClient > * childClients ()
 
void setClientBuilder (KXMLGUIBuilder *builder)
 
KXMLGUIBuilder * clientBuilder () const
 
void reloadXML ()
 
void plugActionList (const TQString &name, const TQPtrList< TDEAction > &actionList)
 
void unplugActionList (const TQString &name)
 
void beginXMLPlug (TQWidget *)
 
void endXMLPlug ()
 
void prepareXMLUnplug (TQWidget *)
 

Protected Slots

void setState (int)
 

Additional Inherited Members

- Protected Types inherited from KParts::PartBase
enum  PluginLoadingMode
 
- Protected Member Functions inherited from KParts::ReadOnlyPart
virtual bool openFile ()=0
 
virtual void guiActivateEvent (GUIActivateEvent *event)
 
- Protected Member Functions inherited from KParts::Part
virtual void setWidget (TQWidget *widget)
 
virtual void partActivateEvent (PartActivateEvent *event)
 
virtual void partSelectEvent (PartSelectEvent *event)
 
virtual void guiActivateEvent (GUIActivateEvent *event)
 
TQWidget * hostContainer (const TQString &containerName)
 
- Protected Member Functions inherited from KParts::PartBase
virtual void setInstance (TDEInstance *instance)
 
virtual void setInstance (TDEInstance *instance, bool loadPlugins)
 
void loadPlugins (TQObject *parent, KXMLGUIClient *parentGUIClient, TDEInstance *instance)
 
void setPluginLoadingMode (PluginLoadingMode loadingMode)
 
- Protected Member Functions inherited from KXMLGUIClient
virtual void setInstance (TDEInstance *instance)
 
virtual void setXMLFile (const TQString &file, bool merge=false, bool setXMLDoc=true)
 
virtual void setXML (const TQString &document, bool merge=false)
 
virtual void setDOMDocument (const TQDomDocument &document, bool merge=false)
 
virtual void conserveMemory ()
 
virtual void stateChanged (const TQString &newstate, ReverseStateChange reverse=StateNoReverse)
 
- Protected Attributes inherited from KParts::ReadOnlyPart
KURL m_url
 
TQString m_file
 
bool m_bTemp
 
- Protected Attributes inherited from KParts::PartBase
 DoNotLoadPlugins
 
 LoadPlugins
 
 LoadPluginsIfEnabled
 

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 TDEActions. KMediaPlayer/Engine omits the user interface facets, for those who wish to provide their own interface.

Definition at line 46 of file player.h.

Member Enumeration Documentation

◆ State

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 111 of file player.h.

Constructor & Destructor Documentation

◆ Player() [1/2]

KMediaPlayer::Player::Player ( TQObject *  parent,
const char *  name 
)

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

Definition at line 39 of file player.cpp.

◆ Player() [2/2]

KMediaPlayer::Player::Player ( TQWidget *  parentWidget,
const char *  widgetName,
TQObject *  parent,
const char *  name 
)

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

Definition at line 31 of file player.cpp.

◆ ~Player()

KMediaPlayer::Player::~Player ( void  )
virtual

Definition at line 47 of file player.cpp.

Member Function Documentation

◆ hasLength()

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.

◆ isLooping()

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

Return the current looping state.

Definition at line 60 of file player.cpp.

◆ isSeekable()

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

Returns whether the current track honors seek requests.

◆ length()

virtual unsigned long KMediaPlayer::Player::length ( void  ) const
pure virtual

Returns the length of the current track.

◆ loopingChanged

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

Emitted when the looping state is changed.

◆ pause

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

Pause playback of the media track.

◆ play

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

Begin playing the media track.

◆ position()

virtual unsigned long KMediaPlayer::Player::position ( void  ) const
pure virtual

Returns the current playback position in the track.

◆ seek

virtual void KMediaPlayer::Player::seek ( unsigned long  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.

◆ setLooping

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 51 of file player.cpp.

◆ setState

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

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

Definition at line 65 of file player.cpp.

◆ state()

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

Return the current state of the player.

Definition at line 74 of file player.cpp.

◆ stateChanged

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

Emitted when the state changes.

◆ stop

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

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

◆ view()

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.


The documentation for this class was generated from the following files:
  • player.h
  • player.cpp

interfaces

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

interfaces

Skip menu "interfaces"
  • arts
  • dcop
  • dnssd
  • interfaces
  •   kspeech
  •     interface
  •     library
  •   tdetexteditor
  • kate
  • kded
  • kdoctools
  • kimgio
  • kjs
  • libtdemid
  • libtdescreensaver
  • tdeabc
  • tdecmshell
  • tdecore
  • tdefx
  • tdehtml
  • tdeinit
  • tdeio
  •   bookmarks
  •   httpfilter
  •   kpasswdserver
  •   kssl
  •   tdefile
  •   tdeio
  •   tdeioexec
  • tdeioslave
  •   http
  • tdemdi
  •   tdemdi
  • tdenewstuff
  • tdeparts
  • tdeprint
  • tderandr
  • tderesources
  • tdespell2
  • tdesu
  • tdeui
  • tdeunittest
  • tdeutils
  • tdewallet
Generated for interfaces by doxygen 1.9.4
This website is maintained by Timothy Pearson.