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.
org.qt-project.qt.audiorolecontrol/5.6
定義接口名為 QAudioRoleControl 類。