QRadioData Class
The QRadioData class provides interfaces to the RDS functionality of the system radio. More...
| Header: | #include <QRadioData> |
| qmake: | QT += multimedia |
| Inherits: | QObject and QMediaBindableInterface |
This class is obsolete. It is provided to keep old source code working. We strongly advise against using it in new code.
Public Types
| enum | Error { NoError, ResourceError, OpenError, OutOfRangeError } |
| enum | ProgramType { Undefined, News, CurrentAffairs, Information, Sport, …, College } |
Properties
|
|
Public Functions
| bool | isAlternativeFrequenciesEnabled() const |
| QRadioData::ProgramType | programType() const |
| QString | programTypeName() const |
| QString | radioText() const |
| QString | stationId() const |
| QString | stationName() const |
Public Slots
| void | setAlternativeFrequenciesEnabled(bool enabled) |
Signals
| void | alternativeFrequenciesEnabledChanged(bool enabled) |
| void | programTypeChanged(QRadioData::ProgramType programType) |
| void | programTypeNameChanged(QString programTypeName) |
| void | radioTextChanged(QString radioText) |
| void | stationIdChanged(QString stationId) |
| void | stationNameChanged(QString stationName) |
Detailed Description
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.
| 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. |
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.
| 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 |
Property Documentation
alternativeFrequenciesEnabled : bool
Is Alternative Frequency currently enabled
Access functions:
| bool | isAlternativeFrequenciesEnabled() const |
| void | setAlternativeFrequenciesEnabled(bool enabled) |
Notifier signal:
| void | alternativeFrequenciesEnabledChanged(bool enabled) |
programType : const ProgramType
Current Program Type
Access functions:
| QRadioData::ProgramType | programType() const |
Notifier signal:
| void | programTypeChanged(QRadioData::ProgramType programType) |
programTypeName : const QString
Current Program Type Name
Access functions:
| QString | programTypeName() const |
Notifier signal:
| void | programTypeNameChanged(QString programTypeName) |
radioText : const QString
Current Radio Text
Access functions:
| QString | radioText() const |
Notifier signal:
| void | radioTextChanged(QString radioText) |
stationId : const QString
Current Program Identification
Access functions:
| QString | stationId() const |
Notifier signal:
| void | stationIdChanged(QString stationId) |
stationName : const QString
Current Program Service
Access functions:
| QString | stationName() const |
Notifier signal:
| void | stationNameChanged(QString stationName) |