CopperSpice API  1.7.2
QRadioData Class Reference

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

Inheritance diagram for QRadioData:
QObject QMediaBindableInterface

Public Types

enum  Error
 
enum  ProgramType
 

Public 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)
 
- Public Signals inherited from QObject
void destroyed (QObject *obj=nullptr)
 
void objectNameChanged (const QString &objectName)
 

Public Slots

void setAlternativeFrequenciesEnabled (bool enabled)
 
- Public Slots inherited from QObject
void deleteLater ()
 

Public Methods

 QRadioData (QMediaObject *mediaObject, QObject *parent=nullptr)
 
 ~QRadioData ()
 
QMultimedia::AvailabilityStatus availability () const
 
Error error () const
 
QString errorString () const
 
bool isAlternativeFrequenciesEnabled () const
 
QMediaObjectmediaObject () const override
 
ProgramType programType () const
 
QString programTypeName () const
 
QString radioText () const
 
QString stationId () const
 
QString stationName () const
 
- Public Methods inherited from QObject
 QObject (QObject *parent=nullptr)
 
 ~QObject ()
 
bool blockSignals (bool block)
 
const QList< QObject * > & children () const
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool connect (const QObject *sender, const QString &signalMethod, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
bool disconnect (const QObject *receiver, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod, const QString &location, const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
bool disconnect (const QString &signalMethod=QString (), const QObject *receiver=nullptr, const QString &slotMethod=QString ()) const
 
void dumpObjectInfo ()
 
void dumpObjectTree ()
 
QList< QStringdynamicPropertyNames () const
 
virtual bool event (QEvent *event)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
template<typename T >
findChild (const QString &childName=QString ()) const
 
template<class T >
QList< T > findChildren (const QRegularExpression &regExp, Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
template<class T >
QList< T > findChildren (const QString &objName=QString (), Qt::FindChildOptions options=Qt::FindChildrenRecursively) const
 
bool inherits (const QString &className) const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const
 
bool isWindowType () const
 
void killTimer (int id)
 
const QMetaObjectmetaObject () const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const
 
QObject * parent () const
 
template<class T = QVariant>
property (const QString &name) const
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const QString &name, const QVariant &value)
 
bool signalsBlocked () const
 
int startTimer (int interval, Qt::TimerType timerType=Qt::CoarseTimer)
 
QThreadthread () const
 
- Public Methods inherited from QMediaBindableInterface
virtual ~QMediaBindableInterface ()
 

Protected Methods

bool setMediaObject (QMediaObject *) override
 
- Protected Methods inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signalMethod) const
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signalMethod) const
 
bool isSignalConnected (const QMetaMethod &signalMethod) const
 
int receivers (const QString &signal) const
 
QObject * sender () const
 
int senderSignalIndex () const
 
virtual void timerEvent (QTimerEvent *event)
 

Properties

 alternativeFrequenciesEnabled
 Alternative Frequency currently enabled. More...
 
 programType
 Current Program Type. More...
 
 programTypeName
 Current Program Type Name. More...
 
 radioText
 Current Radio Text. More...
 
 stationId
 Current Program Identification. More...
 
 stationName
 Current Program Service. More...
 
- Properties inherited from QObject
 objectName
 

Additional Inherited Members

- Static Public Methods inherited from QObject
static bool connect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool connect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection, const QString &location=QString ())
 
static bool connect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod, Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...), Qt::ConnectionType type=Qt::AutoConnection)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool connect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotLambda, Qt::ConnectionType type=Qt::AutoConnection)
 
static bool disconnect (const QObject *sender, const QMetaMethod &signalMethod, const QObject *receiver, const QMetaMethod &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QObject *receiver, const QString &slotMethod)
 
static bool disconnect (const QObject *sender, const QString &signalMethod, const QString &location, const QObject *receiver, const QString &slotMethod)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class SlotClass , class... SlotArgs, class SlotReturn >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, SlotReturn (SlotClass::*slotMethod)(SlotArgs...))
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, std::nullptr_t slotMethod=nullptr)
 
template<class Sender , class SignalClass , class... SignalArgs, class Receiver , class T >
static bool disconnect (const Sender *sender, void (SignalClass::*signalMethod)(SignalArgs...), const Receiver *receiver, T slotMethod)
 
static QMetaObjectstaticMetaObject ()
 
static QString tr (const char *text, const char *comment=nullptr, std::optional< int > numArg=std::optional< int >())
 

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 using the setAlternativeFrequenciesEnabled() method.

To obtain QRadioData instance retrieve the QRadioTuner::radioData property.

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

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

See also
Radio Overview

Member Enumeration Documentation

Enumerates radio data error conditions.

Constant Value Description
QRadioData::NoError 0 No errors have occurred.
QRadioData::ResourceError 1 There is no radio service available.
QRadioData::OpenError 2 Unable to open radio device.
QRadioData::OutOfRangeError 3 An attempt to set a frequency or band that is not supported by radio device./td>

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.

Constant Value
QRadioData::Undefined 0
QRadioData::News 1
QRadioData::CurrentAffairs 2
QRadioData::Information 3
QRadioData::Sport 4
QRadioData::Education 5
QRadioData::Drama 6
QRadioData::Culture 7
QRadioData::Science 8
QRadioData::Varied 9
QRadioData::PopMusic 10
QRadioData::RockMusic 11
QRadioData::EasyListening 12
QRadioData::LightClassical 13
QRadioData::SeriousClassical 14
QRadioData::OtherMusic 15
QRadioData::Weather 16
QRadioData::Finance 17
QRadioData::ChildrensProgrammes 18
QRadioData::SocialAffairs 19
QRadioData::Religion 20
QRadioData::PhoneIn 21
QRadioData::Travel 22
QRadioData::Leisure 23
QRadioData::JazzMusic 24
QRadioData::CountryMusic 25
QRadioData::NationalMusic 26
QRadioData::OldiesMusic 27
QRadioData::FolkMusic 28
QRadioData::Documentary 29
QRadioData::AlarmTest 30
QRadioData::Alarm 31
QRadioData::Talk 32
QRadioData::ClassicRock 33
QRadioData::AdultHits 34
QRadioData::SoftRock 35
QRadioData::Top40 36
QRadioData::Soft 37
QRadioData::Nostalgia 38
QRadioData::Classical 39
QRadioData::RhythmAndBlues 40
QRadioData::SoftRhythmAndBlues 41
QRadioData::Language 42
QRadioData::ReligiousMusic 43
QRadioData::ReligiousTalk 44
QRadioData::Personality 45
QRadioData::Public 46
QRadioData::College 47

Constructor & Destructor Documentation

QRadioData::QRadioData ( QMediaObject mediaObject,
QObject parent = nullptr 
)
explicit

Constructs a radio data based on a mediaObject and parent.

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

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

QRadioData::~QRadioData ( )

Destroys a radio data.

Method Documentation

void QRadioData::alternativeFrequenciesEnabledChanged ( bool  enabled)
signal

Signals that automatically tuning to alternative frequencies has been enabled or disabled according to enabled.

QMultimedia::AvailabilityStatus QRadioData::availability ( ) const

Returns the availability of the radio data service.

A long as there is a media service which provides radio functionality, then the QMultimedia::AvailabilityStatus will be that of the QRadioTuner::availability().

QRadioData::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()
bool QRadioData::isAlternativeFrequenciesEnabled ( ) const

Documentation pending.

QMediaObject* QRadioData::mediaObject ( ) const
overridevirtual

Return the currently attached media object.

Implements QMediaBindableInterface.

QRadioData::ProgramType QRadioData::programType ( ) const

Documentation pending.

void QRadioData::programTypeChanged ( QRadioData::ProgramType  programType)
signal

Signals that the Program Type code has changed to programType.

QString QRadioData::programTypeName ( ) const

Documentation pending.

void QRadioData::programTypeNameChanged ( QString  programTypeName)
signal

Signals that the Program Type Name has changed to programTypeName.

QString QRadioData::radioText ( ) const

Documentation pending.

void QRadioData::radioTextChanged ( QString  radioText)
signal

Signals that the Radio Text property has changed to radioText.

void QRadioData::setAlternativeFrequenciesEnabled ( bool  enabled)
slot

Documentation pending.

bool QRadioData::setMediaObject ( QMediaObject object)
overrideprotectedvirtual

Attaches to the media object. Returns true if attached successfully, otherwise returns false.

Implements QMediaBindableInterface.

QString QRadioData::stationId ( ) const

Documentation pending.

void QRadioData::stationIdChanged ( QString  stationId)
signal

Signals that the Program Identification code has changed to stationId.

QString QRadioData::stationName ( ) const

Documentation pending.

void QRadioData::stationNameChanged ( QString  stationName)
signal

Signals that the Program Service has changed to stationName.

Property Documentation

QRadioData::alternativeFrequenciesEnabled

This property contains true if the alternative frequency is currently enabled.

PropertiesClass Methods
read isAlternativeFrequenciesEnabled
write setAlternativeFrequenciesEnabled
notify alternativeFrequenciesEnabledChanged
QRadioData::programType

This property contains the current program type

PropertiesClass Methods
read programType
notify programTypeChanged
QRadioData::programTypeName

This property contains the current program type name.

PropertiesClass Methods
read programTypeName
notify programTypeNameChanged
QRadioData::radioText

This property contains the current radio text.

PropertiesClass Methods
read radioText
notify radioTextChanged
QRadioData::stationId

This property contains the current program identification.

PropertiesClass Methods
read stationId
notify stationIdChanged
QRadioData::stationName

This property contains the current program service.

PropertiesClass Methods
read stationName
notify stationNameChanged