QRadioDataControl Class

The QRadioDataControl class provides access to the RDS functionality of the radio in the QMediaService . 更多...

头: #include <QRadioDataControl>
qmake: QT += multimedia
继承: QMediaControl

该类已过时。 提供它是为使旧源代码能继续工作。强烈建议不要在新代码中使用它。

公共函数

virtual ~QRadioDataControl ()
virtual QRadioData::Error error () const = 0
virtual QString errorString () const = 0
virtual bool isAlternativeFrequenciesEnabled () const = 0
virtual QRadioData::ProgramType programType () const = 0
virtual QString programTypeName () const = 0
virtual QString radioText () const = 0
virtual void setAlternativeFrequenciesEnabled (bool enabled ) = 0
virtual QString stationId () const = 0
virtual QString stationName () const = 0

信号

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 )

保护函数

QRadioDataControl (QObject * parent = nullptr)

QRadioDataControl_iid

详细描述

The functionality provided by this control is exposed to application code through the QRadioData 类。

The interface name of QRadioDataControl is org.qt-project.qt.radiodatacontrol/5.0 作为定义在 QRadioDataControl_iid .

另请参阅 QMediaService::requestControl () 和 QRadioData .

成员函数文档编制

[protected] QRadioDataControl:: QRadioDataControl ( QObject * parent = nullptr)

Constructs a radio data control with the given parent .

[signal] void QRadioDataControl:: alternativeFrequenciesEnabledChanged ( bool enabled )

Signals that the alternative frequencies setting has changed to the value of enabled .

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

Signals that an error has occurred.

注意: 信号 error 在此类中被重载。通过使用函数指针句法连接到此信号,Qt 提供用于获得如此范例展示的函数指针的方便帮助程序:

connect(radioDataControl, QOverload<QRadioData::Error>::of(&QRadioDataControl::error),
    [=](QRadioData::Error error){ /* ... */ });
					

[signal] void QRadioDataControl:: programTypeChanged ( QRadioData::ProgramType programType )

Signals that the Program Type programType has changed

[signal] void QRadioDataControl:: programTypeNameChanged ( QString programTypeName )

Signals that the Program Type Name programTypeName has changed

[signal] void QRadioDataControl:: radioTextChanged ( QString radioText )

Signals that the Radio Text radioText has changed

[signal] void QRadioDataControl:: stationIdChanged ( QString stationId )

Signals that the Program Identification stationId has changed

[signal] void QRadioDataControl:: stationNameChanged ( QString stationName )

Signals that the Program Service stationName has changed

[virtual] QRadioDataControl:: ~QRadioDataControl ()

Destroys a radio data control.

[pure virtual] QRadioData::Error QRadioDataControl:: error () const

Returns the error state of a radio data.

[pure virtual] QString QRadioDataControl:: errorString () const

Returns a string describing a radio data's error state.

[pure virtual] bool QRadioDataControl:: isAlternativeFrequenciesEnabled () const

Returns true if Alternative Frequency is currently enabled

[pure virtual] QRadioData::ProgramType QRadioDataControl:: programType () const

Returns the current Program Type

[pure virtual] QString QRadioDataControl:: programTypeName () const

Returns the current Program Type Name

[pure virtual] QString QRadioDataControl:: radioText () const

Returns the current Radio Text

[pure virtual] void QRadioDataControl:: setAlternativeFrequenciesEnabled ( bool enabled )

Sets the Alternative Frequency to enabled

另请参阅 isAlternativeFrequenciesEnabled ().

[pure virtual] QString QRadioDataControl:: stationId () const

Returns the current Program Identification

[pure virtual] QString QRadioDataControl:: stationName () const

Returns the current Program Service

宏文档编制

QRadioDataControl_iid

org.qt-project.qt.radiodatacontrol/5.0

定义接口名为 QRadioDataControl 类。