<?xml version="1.0" encoding="iso-8859-1"?> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <!-- phonon-api.qdoc --> <head> <title>Qt 4.6: MediaController Class Reference</title> <link href="classic.css" rel="stylesheet" type="text/css" /> </head> <body> <a name="//apple_ref/cpp/cl/Phonon/MediaController"></a> <table border="0" cellpadding="0" cellspacing="0" width="100%"> <tr> <td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td> <td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="functions.html"><font color="#004faf">All Functions</font></a> · <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">MediaController Class Reference<br /><span class="small-subtitle">(Phonon::MediaController)<br />[<a href="phonon.html">Phonon</a> module]</span> </h1> <p>The MediaController class controls optional features of a media file/device. <a href="#details">More...</a></p> <pre> #include <Phonon/MediaController></pre><p><b>This class is not part of the Qt GUI Framework Edition.</b></p> <p>Inherits <a href="qobject.html">QObject</a>.</p> <p>This class was introduced in Qt 4.4.</p> <ul> <li><a href="phonon-mediacontroller-members.html">List of all members, including inherited members</a></li> </ul> <hr /> <a name="public-types"></a> <h2>Public Types</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#Feature-enum">Feature</a></b> { Angles, Chapters, Titles }</td></tr> <tr><td class="memItemLeft" align="right" valign="top">flags </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#Feature-enum">Features</a></b></td></tr> </table> <hr /> <a name="public-functions"></a> <h2>Public Functions</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#MediaController">MediaController</a></b> ( MediaObject * <i>parent</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#dtor.MediaController">~MediaController</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#autoplayTitles">autoplayTitles</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#availableAngles">availableAngles</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#availableChapters">availableChapters</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#availableTitles">availableTitles</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#currentAngle">currentAngle</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#currentChapter">currentChapter</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#currentTitle">currentTitle</a></b> () const</td></tr> <tr><td class="memItemLeft" align="right" valign="top">Features </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#supportedFeatures">supportedFeatures</a></b> () const</td></tr> </table> <ul> <li><div bar="2" class="fn"></div>29 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li> </ul> <hr /> <a name="public-slots"></a> <h2>Public Slots</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#nextTitle">nextTitle</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#previousTitle">previousTitle</a></b> ()</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#setAutoplayTitles">setAutoplayTitles</a></b> ( bool <i>enable</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#setCurrentAngle">setCurrentAngle</a></b> ( int <i>angleNumber</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#setCurrentChapter">setCurrentChapter</a></b> ( int <i>chapterNumber</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#setCurrentTitle">setCurrentTitle</a></b> ( int <i>titleNumber</i> )</td></tr> </table> <ul> <li><div bar="2" class="fn"></div>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li> </ul> <hr /> <a name="signals"></a> <h2>Signals</h2> <table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%"> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#angleChanged">angleChanged</a></b> ( int <i>angleNumber</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#availableAnglesChanged">availableAnglesChanged</a></b> ( int <i>availableAngles</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#availableChaptersChanged">availableChaptersChanged</a></b> ( int <i>availableChapters</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#availableTitlesChanged">availableTitlesChanged</a></b> ( int <i>availableTitles</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#chapterChanged">chapterChanged</a></b> ( int <i>chapterNumber</i> )</td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="phonon-mediacontroller.html#titleChanged">titleChanged</a></b> ( int <i>titleNumber</i> )</td></tr> </table> <ul> <li><div bar="2" class="fn"></div>1 signal inherited from <a href="qobject.html#signals">QObject</a></li> </ul> <h3>Additional Inherited Members</h3> <ul> <li><div class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li> <li><div class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li> <li><div class="fn"></div>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li> </ul> <a name="details"></a> <hr /> <h2>Detailed Description</h2> <p>The MediaController class controls optional features of a media file/device.</p> <p>Some media sources have content that the <a href="phonon-mediaobject.html">MediaObject</a> does not provide control over, for instance, chapters in a DVD file. The functionality the media controller offers is dependent on the type of media source that is played back. Commonly, the media controller allows you to:</p> <ul> <li>Navigate between <b>chapters</b>.</li> <li>Navigate between <b>titles</b>.</li> <li>Select between <b>angles</b>.</li> </ul> <p>The <a href="phonon-mediacontroller.html#Feature-enum">Feature</a> enum explains these terms in more detail, and their context in playback of CD and DVD.</p> <p>The media controller keeps a <a href="phonon-mediaobject.html">MediaObject</a>, of which <a href="phonon-mediaobject.html#currentSource">media source</a> is played back. You can still call the media object's functions, e.g., <a href="phonon-mediaobject.html#stop">stop()</a>; this is all handled correctly by the media controller. You have the option of letting the media controller play all titles of a source in sequence by setting the <a href="phonon-mediacontroller.html#autoplayTitles">autoplay titles</a> option.</p> <p>To start a playback using a media object, you call <a href="phonon-mediaobject.html#play">play()</a> on the media object. To play a specific title, use <a href="phonon-mediacontroller.html#setCurrentTitle">setCurrentTitle</a>() and then call <a href="phonon-mediaobject.html#play">play()</a>.</p> <p><b>Warning:</b> The Phonon::MediaController class is not yet supported by Qt backends.</p> <p>See also <a href="phonon-module.html">Phonon Module</a>.</p> <hr /> <h2>Member Type Documentation</h2> <a name="//apple_ref/cpp/tag/Phonon::MediaController/Feature"></a> <a name="//apple_ref/cpp/econst/Phonon::MediaController/Angles"></a> <a name="//apple_ref/cpp/econst/Phonon::MediaController/Chapters"></a> <a name="//apple_ref/cpp/econst/Phonon::MediaController/Titles"></a> <a name="//apple_ref/cpp/tdef/Phonon::MediaController/Features"></a> <h3 class="flags"><a name="Feature-enum"></a>enum MediaController::Feature<br />flags MediaController::Features</h3> <p>The values of this enum are interpreted differently depending on the type of media source, e.g., DVD or CD. We give examples for these sources.</p> <p><table class="valuelist" border="1" cellpadding="2" cellspacing="1" width="100%"> <tr><th width="25%">Constant</th><th width="15%">Value</th><th width="60%">Description</th></tr> <tr><td valign="top"><tt>Phonon::MediaController::Angles</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">In the VOB (DVD) format, it is possible to to give several video streams of the same scene, each of which displays the scene from a different angle. The DVD viewer can then change between these angles.</td></tr> <tr><td valign="top"><tt>Phonon::MediaController::Chapters</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">In the VOB format, chapters are points in a single video stream that can be played and seeked to separately.</td></tr> <tr><td valign="top"><tt>Phonon::MediaController::Titles</tt></td><td align="center" valign="top"><tt>4</tt></td><td valign="top">On a CD, a title is a separate sound track. On DVD, a title is a separate VOB file.</td></tr> </table></p> <p>The Features type is a typedef for <a href="qflags.html">QFlags</a><Feature>. It stores an OR combination of Feature values.</p> <hr /> <h2>Member Function Documentation</h2> <a name="//apple_ref/cpp/instm/Phonon::MediaController/MediaController"></a> <h3 class="fn"><a name="MediaController"></a>MediaController::MediaController ( <a href="phonon-mediaobject.html">MediaObject</a> * <i>parent</i> )</h3> <p>Constructs a new <a href="phonon-mediacontroller.html">MediaController</a> with the media object (<i>parent</i>) to be used by the media controller.</p> <p>See also <a href="phonon-mediaobject.html">MediaObject</a> and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/~MediaController"></a> <h3 class="fn"><a name="dtor.MediaController"></a>MediaController::~MediaController ()</h3> <a name="//apple_ref/cpp/instm/Phonon::MediaController/angleChanged"></a> <h3 class="fn"><a name="angleChanged"></a>void MediaController::angleChanged ( int <i>angleNumber</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the current angle changes. The new angle number is given by <i>angleNumber</i>.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/autoplayTitles"></a> <h3 class="fn"><a name="autoplayTitles"></a>bool MediaController::autoplayTitles () const</h3> <p>Returns true if titles will automatically be played when the media is played; otherwise returns false.</p> <p>The media controller will play the titles of the media source in sequence when the media object's <a href="phonon-mediaobject.html#play">play()</a> function is called. If the autoplay option is disabled, the media object will play the <a href="phonon-mediacontroller.html#currentTitle">MediaController::currentTitle()</a>{current title} and then finish the playback.</p> <p>See also <a href="phonon-mediacontroller.html#setAutoplayTitles">setAutoplayTitles</a>() and <a href="phonon-mediacontroller.html#currentTitle">currentTitle</a>().</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/availableAngles"></a> <h3 class="fn"><a name="availableAngles"></a>int MediaController::availableAngles () const</h3> <p>Returns the available angles that is available for the current media source.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/availableAnglesChanged"></a> <h3 class="fn"><a name="availableAnglesChanged"></a>void MediaController::availableAnglesChanged ( int <i>availableAngles</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the number of available angles changes. The new number of available angles is given by <i>availableAngles</i>.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/availableChapters"></a> <h3 class="fn"><a name="availableChapters"></a>int MediaController::availableChapters () const</h3> <p>Returns the number of chapters the current media source contains.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/availableChaptersChanged"></a> <h3 class="fn"><a name="availableChaptersChanged"></a>void MediaController::availableChaptersChanged ( int <i>availableChapters</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the number of available chapters changes. The new number of available chapters is given by <i>availableChapters</i>.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/availableTitles"></a> <h3 class="fn"><a name="availableTitles"></a>int MediaController::availableTitles () const</h3> <p>Returns the number of titles that the current media source contains.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/availableTitlesChanged"></a> <h3 class="fn"><a name="availableTitlesChanged"></a>void MediaController::availableTitlesChanged ( int <i>availableTitles</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the number of available titles changes. The new number of available titles is given by <i>availableTitles</i>.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/chapterChanged"></a> <h3 class="fn"><a name="chapterChanged"></a>void MediaController::chapterChanged ( int <i>chapterNumber</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the current chapter changes. The new chapter number is given by <i>chapterNumber</i>.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/currentAngle"></a> <h3 class="fn"><a name="currentAngle"></a>int MediaController::currentAngle () const</h3> <p>Returns the angle that is currently used.</p> <p>See also <a href="phonon-mediacontroller.html#setCurrentAngle">setCurrentAngle</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/currentChapter"></a> <h3 class="fn"><a name="currentChapter"></a>int MediaController::currentChapter () const</h3> <p>Returns the chapter that is currently being played back.</p> <p>See also <a href="phonon-mediacontroller.html#setCurrentChapter">setCurrentChapter</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/currentTitle"></a> <h3 class="fn"><a name="currentTitle"></a>int MediaController::currentTitle () const</h3> <p>Returns the title that is currently played back.</p> <p>The current title is 0 (the first) by default.</p> <p>See also <a href="phonon-mediacontroller.html#setCurrentTitle">setCurrentTitle</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/nextTitle"></a> <h3 class="fn"><a name="nextTitle"></a>void MediaController::nextTitle () <tt> [slot]</tt></h3> <p>Skips to the next title.</p> <p>If it was playing before the title change it will start playback on the next title if autoplayTitles is enabled.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/previousTitle"></a> <h3 class="fn"><a name="previousTitle"></a>void MediaController::previousTitle () <tt> [slot]</tt></h3> <p>Skips to the previous title.</p> <p>If it was playing before the title change it will start playback on the previous title if autoplayTitles is enabled.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/setAutoplayTitles"></a> <h3 class="fn"><a name="setAutoplayTitles"></a>void MediaController::setAutoplayTitles ( bool <i>enable</i> ) <tt> [slot]</tt></h3> <p>Sets the titles to play automatically when the media is played if <i>enable</i> is true; otherwise disables this option.</p> <p>The media controller will play the titles of the media source in sequence when the media object's <a href="phonon-mediaobject.html#play">play()</a> function is called. If the autoplay option is disabled, the media object will play the <a href="phonon-mediacontroller.html#currentTitle">MediaController::currentTitle()</a>{current title} and then finish the playback.</p> <p>See also <a href="phonon-mediacontroller.html#autoplayTitles">autoplayTitles</a>() and <a href="phonon-mediacontroller.html#currentTitle">currentTitle</a>().</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/setCurrentAngle"></a> <h3 class="fn"><a name="setCurrentAngle"></a>void MediaController::setCurrentAngle ( int <i>angleNumber</i> ) <tt> [slot]</tt></h3> <p>Sets the current angle to the given <i>angleNumber</i> if the media file or device supports navigation by angle number.</p> <p>See also <a href="phonon-mediacontroller.html#currentAngle">currentAngle</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/setCurrentChapter"></a> <h3 class="fn"><a name="setCurrentChapter"></a>void MediaController::setCurrentChapter ( int <i>chapterNumber</i> ) <tt> [slot]</tt></h3> <p>Sets the current chapter to the given <i>chapterNumber</i> if the media file or device supports navigation by chapter number.</p> <p>See also <a href="phonon-mediacontroller.html#currentChapter">currentChapter</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/setCurrentTitle"></a> <h3 class="fn"><a name="setCurrentTitle"></a>void MediaController::setCurrentTitle ( int <i>titleNumber</i> ) <tt> [slot]</tt></h3> <p>Skips to the given title <i>titleNumber</i>.</p> <p>If it was playing before the title change it will start playback on the new title if autoplayTitles is enabled.</p> <p>See also <a href="phonon-mediacontroller.html#currentTitle">currentTitle</a>() and <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <a name="//apple_ref/cpp/instm/Phonon::MediaController/supportedFeatures"></a> <h3 class="fn"><a name="supportedFeatures"></a><a href="phonon-mediacontroller.html#Feature-enum">Features</a> MediaController::supportedFeatures () const</h3> <a name="//apple_ref/cpp/instm/Phonon::MediaController/titleChanged"></a> <h3 class="fn"><a name="titleChanged"></a>void MediaController::titleChanged ( int <i>titleNumber</i> ) <tt> [signal]</tt></h3> <p>This signal is emitted whenever the current title changes. The new title number is given by <i>titleNumber</i>.</p> <p>See also <a href="phonon-mediacontroller.html#Feature-enum">Feature</a>.</p> <p /><address><hr /><div align="center"> <table width="100%" cellspacing="0" border="0"><tr class="address"> <td width="40%" align="left">Copyright © 2010 Nokia Corporation and/or its subsidiary(-ies)</td> <td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td> <td width="40%" align="right"><div align="right">Qt 4.6.3</div></td> </tr></table></div></address></body> </html>