Viadeo Twitter Google Bookmarks ! Facebook Digg del.icio.us MySpace Yahoo MyWeb Blinklist Netvouz Reddit Simpy StumbleUpon Bookmarks Windows Live Favorites 
Logo Documentation Qt ·  Page d'accueil  ·  Toutes les classes  ·  Classes principales  ·  Annotées  ·  Classes groupées  ·  Modules  ·  Fonctions  · 

QRadioData Class

The QRadioData class provides interfaces to the RDS functionality of the system radio. More...

 #include <QRadioData>

Inherits: QObject and QMediaBindableInterface.

Public Types

enum Error { NoError, ResourceError, OpenError, OutOfRangeError }
enum ProgramType { Undefined, News, CurrentAffairs, Information, ..., College }

Properties

  • 1 property inherited from QObject

Public Functions

QRadioData(QMediaObject * mediaObject, QObject * parent = 0)
virtual ~QMediaBindableInterface()
~QRadioData()
QtMultimedia::AvailabilityError availabilityError() const
Error error() const
QString errorString() const
bool isAlternativeFrequenciesEnabled() const
virtual QMediaObject * mediaObject() const = 0
ProgramType programType() const
QString programTypeName() const
QString radioText() const
QString stationId() const
QString stationName() const

Reimplemented Public Functions

virtual QMediaObject * mediaObject() const
  • 31 public functions inherited from QObject

Public Slots

void setAlternativeFrequenciesEnabled(bool enabled)
  • 1 public slot inherited from QObject

Signals

void alternativeFrequenciesEnabledChanged(bool enabled)
void error(QRadioData::Error error)
void programTypeChanged(QRadioData::ProgramType programType)
void programTypeNameChanged(QString programTypeName)
void radioTextChanged(QString radioText)
void stationIdChanged(QString stationId)
void stationNameChanged(QString stationName)

Protected Functions

virtual bool setMediaObject(QMediaObject * object) = 0

Reimplemented Protected Functions

virtual bool setMediaObject(QMediaObject * mediaObject)
  • 9 protected functions inherited from QObject

Additional Inherited Members

  • 11 static public members inherited from QObject

Detailed Description

The QRadioData class provides interfaces to the RDS functionality of the system radio.

The radio data object will emit signals for any changes in radio data. You can enable or disable alternative frequency with setAlternativeFrequenciesEnabled().

You can get a QRadioData instance fromt the radioData property from a QRadioTuner instance.

 radio = new QRadioTuner;
 radioData = radio->radioData();

Alternatively, you can pass an instance of QRadioTuner to the constructor to QRadioData.

See also Radio Overview.

Member Type Documentation

enum QRadioData::Error

Enumerates radio data error conditions.

ConstantValueDescription
QRadioData::NoError0No errors have occurred.
QRadioData::ResourceError1There is no radio service available.
QRadioData::OpenError2Unable to open radio device.
QRadioData::OutOfRangeError3An attempt to set a frequency or band that is not supported by radio device.

enum QRadioData::ProgramType

This property holds the type of the currently playing program as transmitted by the radio station. The value can be any one of the values defined in the table below.

ConstantValue
QRadioData::Undefined0
QRadioData::News1
QRadioData::CurrentAffairs2
QRadioData::Information3
QRadioData::Sport4
QRadioData::Education5
QRadioData::Drama6
QRadioData::Culture7
QRadioData::Science8
QRadioData::Varied9
QRadioData::PopMusic10
QRadioData::RockMusic11
QRadioData::EasyListening12
QRadioData::LightClassical13
QRadioData::SeriousClassical14
QRadioData::OtherMusic15
QRadioData::Weather16
QRadioData::Finance17
QRadioData::ChildrensProgrammes18
QRadioData::SocialAffairs19
QRadioData::Religion20
QRadioData::PhoneIn21
QRadioData::Travel22
QRadioData::Leisure23
QRadioData::JazzMusic24
QRadioData::CountryMusic25
QRadioData::NationalMusic26
QRadioData::OldiesMusic27
QRadioData::FolkMusic28
QRadioData::Documentary29
QRadioData::AlarmTest30
QRadioData::Alarm31
QRadioData::Talk32
QRadioData::ClassicRock33
QRadioData::AdultHits34
QRadioData::SoftRock35
QRadioData::Top4036
QRadioData::Soft37
QRadioData::Nostalgia38
QRadioData::Classical39
QRadioData::RhythmAndBlues40
QRadioData::SoftRhythmAndBlues41
QRadioData::Language42
QRadioData::ReligiousMusic43
QRadioData::ReligiousTalk44
QRadioData::Personality45
QRadioData::Public46
QRadioData::College47

Property Documentation

alternativeFrequenciesEnabled : bool

This property holds is Alternative Frequency currently enabled.

Access functions:

bool isAlternativeFrequenciesEnabled() const
void setAlternativeFrequenciesEnabled(bool enabled)

Notifier signal:

void alternativeFrequenciesEnabledChanged(bool enabled)

programType : const ProgramType

This property holds current Program Type.

Access functions:

ProgramType programType() const

Notifier signal:

void programTypeChanged(QRadioData::ProgramType programType)

programTypeName : const QString

This property holds current Program Type Name.

Access functions:

QString programTypeName() const

Notifier signal:

void programTypeNameChanged(QString programTypeName)

radioText : const QString

This property holds current Radio Text.

Access functions:

QString radioText() const

Notifier signal:

void radioTextChanged(QString radioText)

stationId : const QString

This property holds current Program Identification.

Access functions:

QString stationId() const

Notifier signal:

void stationIdChanged(QString stationId)

stationName : const QString

This property holds current Program Service.

Access functions:

QString stationName() const

Notifier signal:

void stationNameChanged(QString stationName)

Member Function Documentation

QRadioData::QRadioData(QMediaObject * mediaObject, QObject * parent = 0)

Constructs a radio data based on a mediaObject and parent.

The mediaObject should be an instance of QRadioTuner. It is preferable to use the radioData property on a QRadioTuner instance to get an instance of QRadioData.

During construction, this class is bound to the mediaObject using the bind() method.

QRadioData::~QRadioData()

Destroys a radio data.

QtMultimedia::AvailabilityError QRadioData::availabilityError() const

Returns the availability of the radio data service.

A long as there is a media service which provides control, then the availability error will be that of the radio tuner.

Error QRadioData::error() const

Returns the error state of a radio data.

See also errorString().

void QRadioData::error(QRadioData::Error error) [signal]

Signals that an error occurred.

QString QRadioData::errorString() const

Returns a description of a radio data's error state.

See also error().

QMediaObject * QRadioData::mediaObject() const [virtual]

Reimplemented from QMediaBindableInterface::mediaObject().

See also setMediaObject().

bool QRadioData::setMediaObject(QMediaObject * mediaObject) [virtual protected]

Reimplemented from QMediaBindableInterface::setMediaObject().

See also mediaObject().

Cette page est une traduction d'une page de la documentation de Qt, écrite par Nokia Corporation and/or its subsidiary(-ies). Les éventuels problèmes résultant d'une mauvaise traduction ne sont pas imputables à Nokia. Qt 5.0-snapshot
Copyright © 2012 Developpez LLC. Tous droits réservés Developpez LLC. Aucune reproduction, même partielle, ne peut être faite de ce site et de l'ensemble de son contenu : textes, documents et images sans l'autorisation expresse de Developpez LLC. Sinon, vous encourez selon la loi jusqu'à 3 ans de prison et jusqu'à 300 000 E de dommages et intérêts. Cette page est déposée à la SACD.
Vous avez déniché une erreur ? Un bug ? Une redirection cassée ? Ou tout autre problème, quel qu'il soit ? Ou bien vous désirez participer à ce projet de traduction ? N'hésitez pas à nous contacter ou par MP !
 
 
 
 
Partenaires

Hébergement Web