<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qaudiorolecontrol.cpp --> <title>QAudioRoleControl Class | Qt Multimedia 5.12.6</title> <link rel="stylesheet" type="text/css" href="style/offline-simple.css" /> <script type="text/javascript"> document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css"); // loading style sheet breaks anchors that were jumped to before // so force jumping to anchor again setTimeout(function() { var anchor = location.hash; // need to jump to different anchor first (e.g. none) location.hash = "#"; setTimeout(function() { location.hash = anchor; }, 0); }, 0); </script> </head> <body> <div class="header" id="qtdocheader"> <div class="main"> <div class="main-rounded"> <div class="navigationbar"> <table><tr> <td >Qt 5.12</td><td ><a href="qtmultimedia-index.html">Qt Multimedia</a></td><td ><a href="qtmultimedia-modules.html">C++ Classes</a></td><td >QAudioRoleControl</td></tr></table><table class="buildversion"><tr> <td id="buildversion" width="100%" align="right"><a href="qtmultimedia-index.html">Qt 5.12.6 Reference Documentation</a></td> </tr></table> </div> </div> <div class="content"> <div class="line"> <div class="content mainContent"> <div class="sidebar"> <div class="toc"> <h3><a name="toc">Contents</a></h3> <ul> <li class="level1"><a href="#public-functions">Public Functions</a></li> <li class="level1"><a href="#signals">Signals</a></li> <li class="level1"><a href="#static-public-members">Static Public Members</a></li> <li class="level1"><a href="#protected-functions">Protected Functions</a></li> <li class="level1"><a href="#macros">Macros</a></li> <li class="level1"><a href="#details">Detailed Description</a></li> </ul> </div> <div class="sidebar-content" id="sidebar-content"></div></div> <h1 class="title">QAudioRoleControl Class</h1> <!-- $$$QAudioRoleControl-brief --> <p>The <a href="qaudiorolecontrol.html">QAudioRoleControl</a> class provides control over the audio role of a media object. <a href="#details">More...</a></p> <!-- @@@QAudioRoleControl --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QAudioRoleControl></span> </td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += multimedia</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.6</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qmediacontrol.html">QMediaControl</a></td></tr></table></div><ul> <li><a href="qaudiorolecontrol-members.html">List of all members, including inherited members</a></li> </ul> <a name="public-functions"></a> <h2 id="public-functions">Public Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qaudiorolecontrol.html#dtor.QAudioRoleControl">~QAudioRoleControl</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QAudio::Role </td><td class="memItemRight bottomAlign"><b><a href="qaudiorolecontrol.html#audioRole">audioRole</a></b>() const = 0</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qaudiorolecontrol.html#setAudioRole">setAudioRole</a></b>(QAudio::Role <i>role</i>) = 0</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QList<QAudio::Role> </td><td class="memItemRight bottomAlign"><b><a href="qaudiorolecontrol.html#supportedAudioRoles">supportedAudioRoles</a></b>() const = 0</td></tr> </table></div> <a name="signals"></a> <h2 id="signals">Signals</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qaudiorolecontrol.html#audioRoleChanged">audioRoleChanged</a></b>(QAudio::Role <i>role</i>)</td></tr> </table></div> <a name="static-public-members"></a> <h2 id="static-public-members">Static Public Members</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> const QMetaObject </td><td class="memItemRight bottomAlign"><b><a href="qaudiorolecontrol.html#staticMetaObject-var">staticMetaObject</a></b></td></tr> </table></div> <a name="protected-functions"></a> <h2 id="protected-functions">Protected Functions</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaudiorolecontrol.html#QAudioRoleControl">QAudioRoleControl</a></b>(QObject *<i>parent</i> = nullptr)</td></tr> </table></div> <a name="macros"></a> <h2 id="macros">Macros</h2> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qaudiorolecontrol.html#QAudioRoleControl_iid">QAudioRoleControl_iid</a></b></td></tr> </table></div> <a name="details"></a> <!-- $$$QAudioRoleControl-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qaudiorolecontrol.html">QAudioRoleControl</a> class provides control over the audio role of a media object.</p> <p>If a <a href="qmediaservice.html">QMediaService</a> supports audio roles it will implement <a href="qaudiorolecontrol.html">QAudioRoleControl</a>.</p> <p>The functionality provided by this control is exposed to application code through the <a href="qmediaplayer.html">QMediaPlayer</a> class.</p> <p>The interface name of <a href="qaudiorolecontrol.html">QAudioRoleControl</a> is <code>org.qt-project.qt.audiorolecontrol/5.6</code> as defined in <a href="qaudiorolecontrol.html#QAudioRoleControl_iid">QAudioRoleControl_iid</a>.</p> </div> <p><b>See also </b><a href="qmediaservice.html#requestControl-1">QMediaService::requestControl</a>() and <a href="qmediaplayer.html">QMediaPlayer</a>.</p> <!-- @@@QAudioRoleControl --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QAudioRoleControl[overload1]$$$QAudioRoleControlQObject* --> <h3 class="fn" id="QAudioRoleControl"><a name="QAudioRoleControl"></a><code>[protected] </code>QAudioRoleControl::<span class="name">QAudioRoleControl</span>(<span class="type">QObject</span> *<i>parent</i> = nullptr)</h3> <p>Construct a <a href="qaudiorolecontrol.html">QAudioRoleControl</a> with the given <i>parent</i>.</p> <!-- @@@QAudioRoleControl --> <!-- $$$~QAudioRoleControl[overload1]$$$~QAudioRoleControl --> <h3 class="fn" id="dtor.QAudioRoleControl"><a name="dtor.QAudioRoleControl"></a><code>[virtual] </code>QAudioRoleControl::<span class="name">~QAudioRoleControl</span>()</h3> <p>Destroys the audio role control.</p> <!-- @@@~QAudioRoleControl --> <!-- $$$audioRole[overload1]$$$audioRole --> <h3 class="fn" id="audioRole"><a name="audioRole"></a><code>[pure virtual] </code><span class="type"><a href="qaudio.html#Role-enum">QAudio::Role</a></span> QAudioRoleControl::<span class="name">audioRole</span>() const</h3> <p>Returns the audio role of the media played by the media service.</p> <p><b>See also </b><a href="qaudiorolecontrol.html#setAudioRole">setAudioRole</a>().</p> <!-- @@@audioRole --> <!-- $$$audioRoleChanged[overload1]$$$audioRoleChangedQAudio::Role --> <h3 class="fn" id="audioRoleChanged"><a name="audioRoleChanged"></a><code>[signal] </code><span class="type">void</span> QAudioRoleControl::<span class="name">audioRoleChanged</span>(<span class="type"><a href="qaudio.html#Role-enum">QAudio::Role</a></span> <i>role</i>)</h3> <p>Signal emitted when the audio <i>role</i> has changed.</p> <!-- @@@audioRoleChanged --> <!-- $$$setAudioRole[overload1]$$$setAudioRoleQAudio::Role --> <h3 class="fn" id="setAudioRole"><a name="setAudioRole"></a><code>[pure virtual] </code><span class="type">void</span> QAudioRoleControl::<span class="name">setAudioRole</span>(<span class="type"><a href="qaudio.html#Role-enum">QAudio::Role</a></span> <i>role</i>)</h3> <p>Sets the audio <i>role</i> of the media played by the media service.</p> <p><b>See also </b><a href="qaudiorolecontrol.html#audioRole">audioRole</a>().</p> <!-- @@@setAudioRole --> <!-- $$$supportedAudioRoles[overload1]$$$supportedAudioRoles --> <h3 class="fn" id="supportedAudioRoles"><a name="supportedAudioRoles"></a><code>[pure virtual] </code><span class="type">QList</span><<span class="type"><a href="qaudio.html#Role-enum">QAudio::Role</a></span>> QAudioRoleControl::<span class="name">supportedAudioRoles</span>() const</h3> <p>Returns a list of audio roles that the media service supports.</p> <!-- @@@supportedAudioRoles --> </div> <div class="macros"> <h2>Macro Documentation</h2> <!-- $$$QAudioRoleControl_iid[overload1]$$$QAudioRoleControl_iid --> <h3 class="fn" id="QAudioRoleControl_iid"><a name="QAudioRoleControl_iid"></a><span class="name">QAudioRoleControl_iid</span></h3> <p><code>org.qt-project.qt.audiorolecontrol/5.6</code></p> <p>Defines the interface name of the <a href="qaudiorolecontrol.html">QAudioRoleControl</a> class.</p> <!-- @@@QAudioRoleControl_iid --> </div> </div> </div> </div> </div> </div> <div class="footer"> <p> <acronym title="Copyright">©</acronym> 2019 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners.<br/> The documentation provided herein is licensed under the terms of the <a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation License version 1.3</a> as published by the Free Software Foundation.<br/> Qt and respective logos are trademarks of The Qt Company Ltd. in Finland and/or other countries worldwide. All other trademarks are property of their respective owners. </p> </div> </body> </html>