QAudioRoleControl Class

The QAudioRoleControl class provides control over the audio role of a media object. 更多...

头: #include <QAudioRoleControl>
qmake: QT += multimedia
Since: Qt 5.6
继承: QMediaControl

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

该类在 Qt 5.6 引入。

公共函数

virtual ~QAudioRoleControl ()
virtual QAudio::Role audioRole () const = 0
virtual void setAudioRole (QAudio::Role role ) = 0
virtual QList<QAudio::Role> supportedAudioRoles () const = 0

信号

void audioRoleChanged (QAudio::Role role )

保护函数

QAudioRoleControl (QObject * parent = nullptr)

QAudioRoleControl_iid

详细描述

QMediaService supports audio roles it will implement QAudioRoleControl.

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

The interface name of QAudioRoleControl is org.qt-project.qt.audiorolecontrol/5.6 作为定义在 QAudioRoleControl_iid .

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

成员函数文档编制

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

Construct a QAudioRoleControl with the given parent .

[signal] void QAudioRoleControl:: audioRoleChanged ( QAudio::Role role )

Signal emitted when the audio role 已改变。

[虚拟] QAudioRoleControl:: ~QAudioRoleControl ()

Destroys the audio role control.

[pure virtual] QAudio::Role QAudioRoleControl:: audioRole () const

Returns the audio role of the media played by the media service.

另请参阅 setAudioRole ().

[pure virtual] void QAudioRoleControl:: setAudioRole ( QAudio::Role role )

设置音频 role of the media played by the media service.

另请参阅 audioRole ().

[pure virtual] QList < QAudio::Role > QAudioRoleControl:: supportedAudioRoles () const

Returns a list of audio roles that the media service supports.

宏文档编制

QAudioRoleControl_iid

org.qt-project.qt.audiorolecontrol/5.6

定义接口名为 QAudioRoleControl 类。