listenSupport Class Reference

Support for listening in streams. More...

#include <listensupport.h>

Collaboration diagram for listenSupport:

Collaboration graph
[legend]

List of all members.

Public Slots

void setStation (radioStation *newStation)
void setNoStation ()

Signals

void isPlayingChanged (bool newValue)

Public Member Functions

 listenSupport (QObject *parent=0)
virtual ~listenSupport ()
bool isPlaying () const

Properties

bool isPlaying

Private Slots

void setRelayPort (qlonglong ignored, PropertyValue value)
void processNewState (Phonon::State newstate)

Private Member Functions

void setIsPlaying (bool newValue)
void reloadListening ()

Private Attributes

Phonon::AudioOutput * audioOutput
bool internal_isPlaying
Phonon::MediaObject * media
radioStationstation
qlonglong relayPort


Detailed Description

Support for listening in streams.

This class offers support for listening in streams. The stream who is played (There is only one stream played at the same time.) can be defined by passing a radioStation object to setStation().

The class handles autoatically any relevant changes in the radioStation object (changing relay port). You can safely delete the radioStation object. Playback stops in this case.

Definition at line 39 of file listensupport.h.


Constructor & Destructor Documentation

listenSupport::listenSupport ( QObject *  parent = 0  ) 

The constructor.

Parameters:
parent The parent of this object.

Definition at line 27 of file listensupport.cpp.

References audioOutput, media, processNewState(), relayPort, setIsPlaying(), and station.

Here is the call graph for this function:

listenSupport::~listenSupport (  )  [virtual]

The destructor.

Definition at line 39 of file listensupport.cpp.

References audioOutput, and media.


Member Function Documentation

bool listenSupport::isPlaying (  )  const

See property isPlaying.

void listenSupport::isPlayingChanged ( bool  newValue  )  [signal]

See property isPlaying.

Referenced by setIsPlaying().

Here is the caller graph for this function:

void listenSupport::processNewState ( Phonon::State  newstate  )  [private, slot]

Processes a changed state of media.

Definition at line 114 of file listensupport.cpp.

References setIsPlaying().

Referenced by listenSupport().

Here is the call graph for this function:

Here is the caller graph for this function:

void listenSupport::reloadListening (  )  [private]

Stops the playback. If a valid relayPort (>=0) is given, playback is than restarted for this relay port.

Definition at line 91 of file listensupport.cpp.

References media, and relayPort.

Referenced by setRelayPort().

Here is the caller graph for this function:

void listenSupport::setIsPlaying ( bool  newValue  )  [private]

See property isPlaying.

Definition at line 106 of file listensupport.cpp.

References internal_isPlaying, and isPlayingChanged().

Referenced by listenSupport(), and processNewState().

Here is the call graph for this function:

Here is the caller graph for this function:

void listenSupport::setNoStation (  )  [slot]

Conveniance function that calls

Definition at line 70 of file listensupport.cpp.

References setStation().

Referenced by setStation().

Here is the call graph for this function:

Here is the caller graph for this function:

void listenSupport::setRelayPort ( qlonglong  ignored,
PropertyValue  value 
) [private, slot]

Sets the relay port. If it is necessary that the playback changes, these changes are done.

Parameters:
ignored This argument is ignored.
value The new value
See also:
relayPort

Definition at line 75 of file listensupport.cpp.

References PropertyValue::internalValue, relayPort, reloadListening(), PropertyValue::type, and PropertyValue::value.

Referenced by setStation().

Here is the call graph for this function:

Here is the caller graph for this function:

void listenSupport::setStation ( radioStation newStation  )  [slot]

Determinates the station where to listen.

Parameters:
newStation The corresponding radioStation object. You can pass a NULL pointer here to disable listening in.

Definition at line 45 of file listensupport.cpp.

References ripping::relayPort, setNoStation(), setRelayPort(), and station.

Referenced by stationlistModel::disableListeningIn(), stationlistModel::enableListeningIn(), and setNoStation().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Phonon::AudioOutput* listenSupport::audioOutput [private]

The audio output object.

Definition at line 76 of file listensupport.h.

Referenced by listenSupport(), and ~listenSupport().

Used internally to store the property isPlaying.

Definition at line 78 of file listensupport.h.

Referenced by setIsPlaying().

Phonon::MediaObject* listenSupport::media [private]

The media object.

Definition at line 80 of file listensupport.h.

Referenced by listenSupport(), reloadListening(), and ~listenSupport().

qlonglong listenSupport::relayPort [private]

The actual relay port.

See also:
setRelayPort

Definition at line 92 of file listensupport.h.

Referenced by listenSupport(), reloadListening(), and setRelayPort().

If it is NULL, than no listening in is desired. Else, listening in is desired for the specified station.

Note:
This can not be a QPointer, because in this case it would be, if the radioStation object is destroyed, reset to 0 before the slot setNoStation() is called. However, in this case there would be no reload done.

Definition at line 89 of file listensupport.h.

Referenced by listenSupport(), and setStation().


Property Documentation

bool listenSupport::isPlaying [read]

This property holds if the listen support is playing actually or not.

See also:
 void setIsPlaying(bool newValue); 

Definition at line 51 of file listensupport.h.


The documentation for this class was generated from the following files:

doxygen