IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)

QRadioData Class

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

Article lu   fois.

L'auteur

Liens sociaux

Viadeo Twitter Facebook Share on Google+   

QRadioData Class

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.

 
Sélectionnez
radio = new QRadioTuner;
radioData = radio->radioData();

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

See Also

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

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:

[read-only] programType : const ProgramType

Current Program Type

Access functions:

  • programType() const

Notifier signal:

[read-only] programTypeName : const QString

Current Program Type Name

Access functions:

  • programTypeName() const

Notifier signal:

[read-only] radioText : const QString

Current Radio Text

Access functions:

  • radioText() const

Notifier signal:

[read-only] stationId : const QString

Current Program Identification

Access functions:

  • stationId() const

Notifier signal:

[read-only] stationName : const QString

Current Program Service

Access functions:

  • stationName() const

Notifier signal:

Member Function Documentation

 

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

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.

[virtual] QRadioData::~QRadioData()

Destroys a radio data.

void QRadioData::alternativeFrequenciesEnabledChanged(bool enabled)

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

Notifier signal for property alternativeFrequenciesEnabled.

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 availability will be that of the radio tuner.

QRadioData::Error QRadioData::error() const

Returns the error state of a radio data.

See Also

See also errorString()

void QRadioData::error(QRadioData::Error error)

Signals that an error occurred.

QString QRadioData::errorString() const

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

See Also

See also error()

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

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

Signals that the Program Type code has changed to programType

Notifier signal for property programType.

void QRadioData::programTypeNameChanged(QString programTypeName)

Signals that the Program Type Name has changed to programTypeName

Notifier signal for property programTypeName.

void QRadioData::radioTextChanged(QString radioText)

Signals that the Radio Text property has changed to radioText

Notifier signal for property radioText.

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

void QRadioData::stationIdChanged(QString stationId)

Signals that the Program Identification code has changed to stationId

Notifier signal for property stationId.

void QRadioData::stationNameChanged(QString stationName)

Signals that the Program Service has changed to stationName

Notifier signal for property stationName.

Vous avez aimé ce tutoriel ? Alors partagez-le en cliquant sur les boutons suivants : Viadeo Twitter Facebook Share on Google+