<?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE html> <html lang="en"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <!-- qcustomaudiorolecontrol.cpp --> <title>QCustomAudioRoleControl 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 >QCustomAudioRoleControl</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">QCustomAudioRoleControl Class</h1> <!-- $$$QCustomAudioRoleControl-brief --> <p>The <a href="qcustomaudiorolecontrol.html">QCustomAudioRoleControl</a> class provides control over the audio role of a media object. <a href="#details">More...</a></p> <!-- @@@QCustomAudioRoleControl --> <div class="table"><table class="alignedsummary"> <tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QCustomAudioRoleControl></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.11</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="qcustomaudiorolecontrol-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="qcustomaudiorolecontrol.html#dtor.QCustomAudioRoleControl">~QCustomAudioRoleControl</a></b>()</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QString </td><td class="memItemRight bottomAlign"><b><a href="qcustomaudiorolecontrol.html#customAudioRole">customAudioRole</a></b>() const = 0</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qcustomaudiorolecontrol.html#setCustomAudioRole">setCustomAudioRole</a></b>(const QString &<i>role</i>) = 0</td></tr> <tr><td class="memItemLeft rightAlign topAlign"> virtual QStringList </td><td class="memItemRight bottomAlign"><b><a href="qcustomaudiorolecontrol.html#supportedCustomAudioRoles">supportedCustomAudioRoles</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="qcustomaudiorolecontrol.html#customAudioRoleChanged">customAudioRoleChanged</a></b>(const QString &<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="qcustomaudiorolecontrol.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="qcustomaudiorolecontrol.html#QCustomAudioRoleControl">QCustomAudioRoleControl</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="qcustomaudiorolecontrol.html#QCustomAudioRoleControl_iid">QCustomAudioRoleControl_iid</a></b></td></tr> </table></div> <a name="details"></a> <!-- $$$QCustomAudioRoleControl-description --> <div class="descr"> <h2 id="details">Detailed Description</h2> <p>The <a href="qcustomaudiorolecontrol.html">QCustomAudioRoleControl</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 may implement <a href="qcustomaudiorolecontrol.html">QCustomAudioRoleControl</a> in order to provide access to roles unknown to Qt.</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="qcustomaudiorolecontrol.html">QCustomAudioRoleControl</a> is <code>org.qt-project.qt.customaudiorolecontrol/5.11</code> as defined in <a href="qcustomaudiorolecontrol.html#QCustomAudioRoleControl_iid">QCustomAudioRoleControl_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> <!-- @@@QCustomAudioRoleControl --> <div class="func"> <h2>Member Function Documentation</h2> <!-- $$$QCustomAudioRoleControl[overload1]$$$QCustomAudioRoleControlQObject* --> <h3 class="fn" id="QCustomAudioRoleControl"><a name="QCustomAudioRoleControl"></a><code>[protected] </code>QCustomAudioRoleControl::<span class="name">QCustomAudioRoleControl</span>(<span class="type">QObject</span> *<i>parent</i> = nullptr)</h3> <p>Construct a <a href="qcustomaudiorolecontrol.html">QCustomAudioRoleControl</a> with the given <i>parent</i>.</p> <!-- @@@QCustomAudioRoleControl --> <!-- $$$~QCustomAudioRoleControl[overload1]$$$~QCustomAudioRoleControl --> <h3 class="fn" id="dtor.QCustomAudioRoleControl"><a name="dtor.QCustomAudioRoleControl"></a><code>[virtual] </code>QCustomAudioRoleControl::<span class="name">~QCustomAudioRoleControl</span>()</h3> <p>Destroys the audio role control.</p> <!-- @@@~QCustomAudioRoleControl --> <!-- $$$customAudioRole[overload1]$$$customAudioRole --> <h3 class="fn" id="customAudioRole"><a name="customAudioRole"></a><code>[pure virtual] </code><span class="type">QString</span> QCustomAudioRoleControl::<span class="name">customAudioRole</span>() const</h3> <p>Returns the audio role of the media played by the media service.</p> <p><b>See also </b><a href="qcustomaudiorolecontrol.html#setCustomAudioRole">setCustomAudioRole</a>().</p> <!-- @@@customAudioRole --> <!-- $$$customAudioRoleChanged[overload1]$$$customAudioRoleChangedconstQString& --> <h3 class="fn" id="customAudioRoleChanged"><a name="customAudioRoleChanged"></a><code>[signal] </code><span class="type">void</span> QCustomAudioRoleControl::<span class="name">customAudioRoleChanged</span>(const <span class="type">QString</span> &<i>role</i>)</h3> <p>Signal emitted when the audio <i>role</i> has changed.</p> <!-- @@@customAudioRoleChanged --> <!-- $$$setCustomAudioRole[overload1]$$$setCustomAudioRoleconstQString& --> <h3 class="fn" id="setCustomAudioRole"><a name="setCustomAudioRole"></a><code>[pure virtual] </code><span class="type">void</span> QCustomAudioRoleControl::<span class="name">setCustomAudioRole</span>(const <span class="type">QString</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="qcustomaudiorolecontrol.html#customAudioRole">customAudioRole</a>().</p> <!-- @@@setCustomAudioRole --> <!-- $$$supportedCustomAudioRoles[overload1]$$$supportedCustomAudioRoles --> <h3 class="fn" id="supportedCustomAudioRoles"><a name="supportedCustomAudioRoles"></a><code>[pure virtual] </code><span class="type">QStringList</span> QCustomAudioRoleControl::<span class="name">supportedCustomAudioRoles</span>() const</h3> <p>Returns a list of custom audio roles that the media service supports. An empty list may indicate that the supported custom audio roles aren't known. The list may not be complete.</p> <!-- @@@supportedCustomAudioRoles --> </div> <div class="macros"> <h2>Macro Documentation</h2> <!-- $$$QCustomAudioRoleControl_iid[overload1]$$$QCustomAudioRoleControl_iid --> <h3 class="fn" id="QCustomAudioRoleControl_iid"><a name="QCustomAudioRoleControl_iid"></a><span class="name">QCustomAudioRoleControl_iid</span></h3> <p><code>org.qt-project.qt.customaudiorolecontrol/5.11</code></p> <p>Defines the interface name of the <a href="qcustomaudiorolecontrol.html">QCustomAudioRoleControl</a> class.</p> <!-- @@@QCustomAudioRoleControl_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>