\section{KMedia\-Player::Player Class Reference}
\label{classKMediaPlayer_1_1Player}\index{KMediaPlayer::Player@{KMediaPlayer::Player}}
{\bf Player}{\rm (p.\,\pageref{classKMediaPlayer_1_1Player})} is the center of the {\bf KMedia\-Player}{\rm (p.\,\pageref{namespaceKMediaPlayer})} interface.  


{\tt \#include $<$player.h$>$}

Inheritance diagram for KMedia\-Player::Player:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=99pt]{classKMediaPlayer_1_1Player__inherit__graph}
\end{center}
\end{figure}
Collaboration diagram for KMedia\-Player::Player:\begin{figure}[H]
\begin{center}
\leavevmode
\includegraphics[width=124pt]{classKMediaPlayer_1_1Player__coll__graph}
\end{center}
\end{figure}
\subsection*{Public Types}
\begin{CompactItemize}
\item 
enum {\bf State} \{ {\bf Empty}, 
{\bf Stop}, 
{\bf Pause}, 
{\bf Play}
 \}
\end{CompactItemize}
\subsection*{Public Slots}
\begin{CompactItemize}
\item 
virtual void {\bf pause} (void)=0
\item 
virtual void {\bf play} (void)=0
\item 
virtual void {\bf stop} (void)=0
\item 
virtual void {\bf seek} (unsigned long msec)=0
\item 
void {\bf set\-Looping} (bool)
\end{CompactItemize}
\subsection*{Signals}
\begin{CompactItemize}
\item 
void {\bf looping\-Changed} (bool)
\item 
void {\bf state\-Changed} (int)
\end{CompactItemize}
\subsection*{Public Member Functions}
\begin{CompactItemize}
\item 
{\bf Player} ({\bf QObject} $\ast${\bf parent}, const char $\ast${\bf name})
\item 
{\bf Player} ({\bf QWidget} $\ast$parent\-Widget, const char $\ast$widget\-Name, {\bf QObject} $\ast${\bf parent}, const char $\ast${\bf name})
\item 
virtual {\bf View} $\ast$ {\bf view} (void)=0
\item 
virtual bool {\bf is\-Seekable} (void) const =0
\item 
virtual unsigned long {\bf position} (void) const =0
\item 
virtual bool {\bf has\-Length} (void) const =0
\item 
virtual unsigned long {\bf length} (void) const =0
\item 
bool {\bf is\-Looping} (void) const 
\item 
int {\bf state} (void) const 
\end{CompactItemize}
\subsection*{Protected Slots}
\begin{CompactItemize}
\item 
void {\bf set\-State} (int)
\end{CompactItemize}


\subsection{Detailed Description}
{\bf Player}{\rm (p.\,\pageref{classKMediaPlayer_1_1Player})} is the center of the {\bf KMedia\-Player}{\rm (p.\,\pageref{namespaceKMediaPlayer})} interface. 

It provides all of the necessary media player operations, and optionally provides the GUI to control them.

There are two servicetypes for {\bf Player}{\rm (p.\,\pageref{classKMediaPlayer_1_1Player})}: KMedia\-Player/Player and KMedia\-Player/Engine. KMedia\-Player/Player provides a widget (accessable through view as well as XML GUI KActions. KMedia\-Player/Engine omits the user interface facets, for those who wish to provide their own interface. 



Definition at line 46 of file player.h.

\subsection{Member Enumeration Documentation}
\index{KMediaPlayer::Player@{KMedia\-Player::Player}!State@{State}}
\index{State@{State}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}enum {\bf KMedia\-Player::Player::State}}\label{classKMediaPlayer_1_1Player_w4}


The possible states of the {\bf Player}{\rm (p.\,\pageref{classKMediaPlayer_1_1Player})}. 

\begin{Desc}
\item[Enumeration values: ]\par
\begin{description}
\index{Empty@{Empty}!KMediaPlayer::Player@{KMediaPlayer::Player}}\index{KMediaPlayer::Player@{KMediaPlayer::Player}!Empty@{Empty}}\item[{\em 
Empty\label{classKMediaPlayer_1_1Player_w4w0}
}]No track is loaded. \index{Stop@{Stop}!KMediaPlayer::Player@{KMediaPlayer::Player}}\index{KMediaPlayer::Player@{KMediaPlayer::Player}!Stop@{Stop}}\item[{\em 
Stop\label{classKMediaPlayer_1_1Player_w4w1}
}]Not playing. \index{Pause@{Pause}!KMediaPlayer::Player@{KMediaPlayer::Player}}\index{KMediaPlayer::Player@{KMediaPlayer::Player}!Pause@{Pause}}\item[{\em 
Pause\label{classKMediaPlayer_1_1Player_w4w2}
}]Playing is temporarily suspended. \index{Play@{Play}!KMediaPlayer::Player@{KMediaPlayer::Player}}\index{KMediaPlayer::Player@{KMediaPlayer::Player}!Play@{Play}}\item[{\em 
Play\label{classKMediaPlayer_1_1Player_w4w3}
}]The media is currently being output. \end{description}
\end{Desc}



Definition at line 111 of file player.h.

\subsection{Constructor \& Destructor Documentation}
\index{KMediaPlayer::Player@{KMedia\-Player::Player}!Player@{Player}}
\index{Player@{Player}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KMedia\-Player::Player::Player ({\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name})}\label{classKMediaPlayer_1_1Player_a0}


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



Definition at line 39 of file player.cpp.\index{KMediaPlayer::Player@{KMedia\-Player::Player}!Player@{Player}}
\index{Player@{Player}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}KMedia\-Player::Player::Player ({\bf QWidget} $\ast$ {\em parent\-Widget}, const char $\ast$ {\em widget\-Name}, {\bf QObject} $\ast$ {\em parent}, const char $\ast$ {\em name})}\label{classKMediaPlayer_1_1Player_a1}


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



Definition at line 31 of file player.cpp.

\subsection{Member Function Documentation}
\index{KMediaPlayer::Player@{KMedia\-Player::Player}!view@{view}}
\index{view@{view}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual {\bf View}$\ast$ KMedia\-Player::Player::view (void)\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKMediaPlayer_1_1Player_a3}


A convenience function returning a pointer to the {\bf View}{\rm (p.\,\pageref{classKMediaPlayer_1_1View})} for this {\bf Player}{\rm (p.\,\pageref{classKMediaPlayer_1_1Player})}, or 0 if this {\bf Player}{\rm (p.\,\pageref{classKMediaPlayer_1_1Player})} has no GUI. 

\index{KMediaPlayer::Player@{KMedia\-Player::Player}!pause@{pause}}
\index{pause@{pause}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KMedia\-Player::Player::pause (void)\hspace{0.3cm}{\tt  [pure virtual, slot]}}\label{classKMediaPlayer_1_1Player_i0}


Pause playback of the media track. 

\index{KMediaPlayer::Player@{KMedia\-Player::Player}!play@{play}}
\index{play@{play}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KMedia\-Player::Player::play (void)\hspace{0.3cm}{\tt  [pure virtual, slot]}}\label{classKMediaPlayer_1_1Player_i1}


Begin playing the media track. 

\index{KMediaPlayer::Player@{KMedia\-Player::Player}!stop@{stop}}
\index{stop@{stop}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KMedia\-Player::Player::stop (void)\hspace{0.3cm}{\tt  [pure virtual, slot]}}\label{classKMediaPlayer_1_1Player_i2}


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

\index{KMediaPlayer::Player@{KMedia\-Player::Player}!seek@{seek}}
\index{seek@{seek}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual void KMedia\-Player::Player::seek (unsigned long {\em msec})\hspace{0.3cm}{\tt  [pure virtual, slot]}}\label{classKMediaPlayer_1_1Player_i3}


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

Some streams may not be seeked.\index{KMediaPlayer::Player@{KMedia\-Player::Player}!isSeekable@{isSeekable}}
\index{isSeekable@{isSeekable}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KMedia\-Player::Player::is\-Seekable (void) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKMediaPlayer_1_1Player_a4}


Returns whether the current track honors seek requests. 

\index{KMediaPlayer::Player@{KMedia\-Player::Player}!position@{position}}
\index{position@{position}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual unsigned long KMedia\-Player::Player::position (void) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKMediaPlayer_1_1Player_a5}


Returns the current playback position in the track. 

\index{KMediaPlayer::Player@{KMedia\-Player::Player}!hasLength@{hasLength}}
\index{hasLength@{hasLength}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual bool KMedia\-Player::Player::has\-Length (void) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKMediaPlayer_1_1Player_a6}


Returns whether the current track has a length. 

Some streams are endless, and do not have one. \index{KMediaPlayer::Player@{KMedia\-Player::Player}!length@{length}}
\index{length@{length}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}virtual unsigned long KMedia\-Player::Player::length (void) const\hspace{0.3cm}{\tt  [pure virtual]}}\label{classKMediaPlayer_1_1Player_a7}


Returns the length of the current track. 

\index{KMediaPlayer::Player@{KMedia\-Player::Player}!setLooping@{setLooping}}
\index{setLooping@{setLooping}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMedia\-Player::Player::set\-Looping (bool)\hspace{0.3cm}{\tt  [slot]}}\label{classKMediaPlayer_1_1Player_i4}


Set whether the {\bf Player}{\rm (p.\,\pageref{classKMediaPlayer_1_1Player})} 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.

References looping\-Changed().\index{KMediaPlayer::Player@{KMedia\-Player::Player}!isLooping@{isLooping}}
\index{isLooping@{isLooping}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}bool KMedia\-Player::Player::is\-Looping (void) const}\label{classKMediaPlayer_1_1Player_a8}


Return the current looping state. 



Definition at line 60 of file player.cpp.\index{KMediaPlayer::Player@{KMedia\-Player::Player}!loopingChanged@{loopingChanged}}
\index{loopingChanged@{loopingChanged}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMedia\-Player::Player::looping\-Changed (bool)\hspace{0.3cm}{\tt  [signal]}}\label{classKMediaPlayer_1_1Player_l0}


Emitted when the looping state is changed. 



Referenced by set\-Looping().\index{KMediaPlayer::Player@{KMedia\-Player::Player}!state@{state}}
\index{state@{state}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}int KMedia\-Player::Player::state (void) const}\label{classKMediaPlayer_1_1Player_a9}


Return the current state of the player. 



Definition at line 74 of file player.cpp.\index{KMediaPlayer::Player@{KMedia\-Player::Player}!stateChanged@{stateChanged}}
\index{stateChanged@{stateChanged}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMedia\-Player::Player::state\-Changed (int)\hspace{0.3cm}{\tt  [signal]}}\label{classKMediaPlayer_1_1Player_l1}


Emitted when the state changes. 



Referenced by set\-State().\index{KMediaPlayer::Player@{KMedia\-Player::Player}!setState@{setState}}
\index{setState@{setState}!KMediaPlayer::Player@{KMedia\-Player::Player}}
\subsubsection{\setlength{\rightskip}{0pt plus 5cm}void KMedia\-Player::Player::set\-State (int)\hspace{0.3cm}{\tt  [protected, slot]}}\label{classKMediaPlayer_1_1Player_j0}


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



Definition at line 65 of file player.cpp.

References state\-Changed().

The documentation for this class was generated from the following files:\begin{CompactItemize}
\item 
player.h\item 
player.cpp\end{CompactItemize}
