Sophie

Sophie

distrib > Mandriva > current > i586 > media > main-updates > by-pkgid > 8e6051afcdb111a0317a58fb64c2abf5 > files > 4539

qt4-doc-4.6.3-0.2mdv2010.2.i586.rpm

<?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">
<!-- qmovie.cpp -->
<head>
  <title>Qt 4.6: QMovie Class Reference</title>
  <link href="classic.css" rel="stylesheet" type="text/css" />
</head>
<body>
<a name="//apple_ref/cpp/cl//QMovie"></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">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td></tr></table><h1 class="title">QMovie Class Reference<br /><span class="small-subtitle">[<a href="qtgui.html">QtGui</a> module]</span>
</h1>
<p>The QMovie class is a convenience class for playing movies with <a href="qimagereader.html">QImageReader</a>. <a href="#details">More...</a></p>
<pre> #include &lt;QMovie&gt;</pre><p>Inherits <a href="qobject.html">QObject</a>.</p>
<ul>
<li><a href="qmovie-members.html">List of all members, including inherited members</a></li>
<li><a href="qmovie-qt3.html">Qt 3 support 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="qmovie.html#CacheMode-enum">CacheMode</a></b> { CacheNone, CacheAll }</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">enum </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#MovieState-enum">MovieState</a></b> { NotRunning, Paused, Running }</td></tr>
</table>
<hr />
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li><div class="fn"><b><a href="qmovie.html#cacheMode-prop">cacheMode</a></b> : CacheMode</div></li>
<li><div class="fn"><b><a href="qmovie.html#speed-prop">speed</a></b> : int</div></li>
</ul>
<ul>
<li><div bar="2" class="fn"></div>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
</ul>
<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="qmovie.html#QMovie">QMovie</a></b> ( QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#QMovie-2">QMovie</a></b> ( QIODevice * <i>device</i>, const QByteArray &amp; <i>format</i> = QByteArray(), QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#QMovie-3">QMovie</a></b> ( const QString &amp; <i>fileName</i>, const QByteArray &amp; <i>format</i> = QByteArray(), QObject * <i>parent</i> = 0 )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top"></td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#dtor.QMovie">~QMovie</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QColor </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#backgroundColor">backgroundColor</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">CacheMode </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#cacheMode-prop">cacheMode</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#currentFrameNumber">currentFrameNumber</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QImage </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#currentImage">currentImage</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QPixmap </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#currentPixmap">currentPixmap</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QIODevice * </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#device">device</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#fileName">fileName</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QByteArray </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#format">format</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#frameCount">frameCount</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QRect </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#frameRect">frameRect</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#isValid">isValid</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#jumpToFrame">jumpToFrame</a></b> ( int <i>frameNumber</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#loopCount">loopCount</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#nextFrameDelay">nextFrameDelay</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QSize </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#scaledSize">scaledSize</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#setBackgroundColor">setBackgroundColor</a></b> ( const QColor &amp; <i>color</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#cacheMode-prop">setCacheMode</a></b> ( CacheMode <i>mode</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#setDevice">setDevice</a></b> ( QIODevice * <i>device</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#setFileName">setFileName</a></b> ( const QString &amp; <i>fileName</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#setFormat">setFormat</a></b> ( const QByteArray &amp; <i>format</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#setScaledSize">setScaledSize</a></b> ( const QSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#speed-prop">speed</a></b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">MovieState </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#state">state</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">bool </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#jumpToNextFrame">jumpToNextFrame</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#setPaused">setPaused</a></b> ( bool <i>paused</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#speed-prop">setSpeed</a></b> ( int <i>percentSpeed</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#start">start</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#stop">stop</a></b> ()</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="qmovie.html#error">error</a></b> ( QImageReader::ImageReaderError <i>error</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#finished">finished</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#frameChanged">frameChanged</a></b> ( int <i>frameNumber</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#resized">resized</a></b> ( const QSize &amp; <i>size</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#started">started</a></b> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#stateChanged">stateChanged</a></b> ( QMovie::MovieState <i>state</i> )</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#updated">updated</a></b> ( const QRect &amp; <i>rect</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>
<hr />
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">QList&lt;QByteArray&gt; </td><td class="memItemRight" valign="bottom"><b><a href="qmovie.html#supportedFormats">supportedFormats</a></b> ()</td></tr>
</table>
<ul>
<li><div bar="2" class="fn"></div>5 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<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 QMovie class is a convenience class for playing movies with <a href="qimagereader.html">QImageReader</a>.</p>
<p>This class is used to show simple animations without sound. If you want to display video and media content, use the <a href="phonon-module.html">Phonon</a> multimedia framework instead.</p>
<p>First, create a QMovie object by passing either the name of a file or a pointer to a <a href="qiodevice.html">QIODevice</a> containing an animated image format to QMovie's constructor. You can call <a href="qmovie.html#isValid">isValid</a>() to check if the image data is valid, before starting the movie. To start the movie, call <a href="qmovie.html#start">start</a>(). QMovie will enter <a href="qmovie.html#MovieState-enum">Running</a> state, and emit <a href="qmovie.html#started">started</a>() and <a href="qmovie.html#stateChanged">stateChanged</a>(). To get the current state of the movie, call <a href="qmovie.html#state">state</a>().</p>
<p>To display the movie in your application, you can pass your QMovie object to <a href="qlabel.html#setMovie">QLabel::setMovie</a>(). Example:</p>
<pre> QLabel label;
 QMovie *movie = new QMovie(&quot;animations/fire.gif&quot;);

 label.setMovie(movie);
 movie-&gt;start();</pre>
<p>Whenever a new frame is available in the movie, QMovie will emit <a href="qmovie.html#updated">updated</a>(). If the size of the frame changes, <a href="qmovie.html#resized">resized</a>() is emitted. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of the current frame. When the movie is done, QMovie emits <a href="qmovie.html#finished">finished</a>(). If any error occurs during playback (i.e, the image file is corrupt), QMovie will emit <a href="qmovie.html#error">error</a>().</p>
<p>You can control the speed of the movie playback by calling <a href="qmovie.html#speed-prop">setSpeed</a>(), which takes the percentage of the original speed as an argument. Pause the movie by calling setPaused(true). QMovie will then enter <a href="qmovie.html#MovieState-enum">Paused</a> state and emit <a href="qmovie.html#stateChanged">stateChanged</a>(). If you call setPaused(false), QMovie will reenter <a href="qmovie.html#MovieState-enum">Running</a> state and start the movie again. To stop the movie, call <a href="qmovie.html#stop">stop</a>().</p>
<p>Certain animation formats allow you to set the background color. You can call <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>() to set the color, or <a href="qmovie.html#backgroundColor">backgroundColor</a>() to retrieve the current background color.</p>
<p><a href="qmovie.html#currentFrameNumber">currentFrameNumber</a>() returns the sequence number of the current frame. The first frame in the animation has the sequence number 0. <a href="qmovie.html#frameCount">frameCount</a>() returns the total number of frames in the animation, if the image format supports this. You can call <a href="qmovie.html#loopCount">loopCount</a>() to get the number of times the movie should loop before finishing. <a href="qmovie.html#nextFrameDelay">nextFrameDelay</a>() returns the number of milliseconds the current frame should be displayed.</p>
<p>QMovie can be instructed to cache frames of an animation by calling <a href="qmovie.html#cacheMode-prop">setCacheMode</a>().</p>
<p>Call <a href="qmovie.html#supportedFormats">supportedFormats</a>() for a list of formats that QMovie supports.</p>
<p>See also <a href="qlabel.html">QLabel</a>, <a href="qimagereader.html">QImageReader</a>, and <a href="widgets-movie.html">Movie Example</a>.</p>
<hr />
<h2>Member Type Documentation</h2>
<a name="//apple_ref/cpp/tag/QMovie/CacheMode"></a>
<a name="//apple_ref/cpp/econst/QMovie/CacheNone"></a>
<a name="//apple_ref/cpp/econst/QMovie/CacheAll"></a>
<h3 class="fn"><a name="CacheMode-enum"></a>enum QMovie::CacheMode</h3>
<p>This enum describes the different cache modes of <a href="qmovie.html">QMovie</a>.</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>QMovie::CacheNone</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">No frames are cached (the default).</td></tr>
<tr><td valign="top"><tt>QMovie::CacheAll</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">All frames are cached.</td></tr>
</table></p>
<a name="//apple_ref/cpp/tag/QMovie/MovieState"></a>
<a name="//apple_ref/cpp/econst/QMovie/NotRunning"></a>
<a name="//apple_ref/cpp/econst/QMovie/Paused"></a>
<a name="//apple_ref/cpp/econst/QMovie/Running"></a>
<h3 class="fn"><a name="MovieState-enum"></a>enum QMovie::MovieState</h3>
<p>This enum describes the different states of <a href="qmovie.html">QMovie</a>.</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>QMovie::NotRunning</tt></td><td align="center" valign="top"><tt>0</tt></td><td valign="top">The movie is not running. This is <a href="qmovie.html">QMovie</a>'s initial state, and the state it enters after <a href="qmovie.html#stop">stop</a>() has been called or the movie is finished.</td></tr>
<tr><td valign="top"><tt>QMovie::Paused</tt></td><td align="center" valign="top"><tt>1</tt></td><td valign="top">The movie is paused, and <a href="qmovie.html">QMovie</a> stops emitting <a href="qmovie.html#updated">updated</a>() or <a href="qmovie.html#resized">resized</a>(). This state is entered after calling <a href="qmovie-qt3.html#pause" class="compat">pause</a>() or setPaused(true). The current frame number it kept, and the movie will continue with the next frame when <a href="qmovie-qt3.html#unpause" class="compat">unpause</a>() or setPaused(false) is called.</td></tr>
<tr><td valign="top"><tt>QMovie::Running</tt></td><td align="center" valign="top"><tt>2</tt></td><td valign="top">The movie is running.</td></tr>
</table></p>
<hr />
<h2>Property Documentation</h2>
<a name="//apple_ref/cpp/instm/QMovie/cacheMode"></a>
<a name="//apple_ref/cpp/instm/QMovie/setCacheMode"></a>
<h3 class="fn"><a name="cacheMode-prop"></a>cacheMode : <a href="qmovie.html#CacheMode-enum">CacheMode</a></h3>
<p>This property holds the movie's cache mode.</p>
<p>Caching frames can be useful when the underlying animation format handler that <a href="qmovie.html">QMovie</a> relies on to decode the animation data does not support jumping to particular frames in the animation, or even &quot;rewinding&quot; the animation to the beginning (for looping). Furthermore, if the image data comes from a sequential device, it is not possible for the underlying animation handler to seek back to frames whose data has already been read (making looping altogether impossible).</p>
<p>To aid in such situations, a <a href="qmovie.html">QMovie</a> object can be instructed to cache the frames, at the added memory cost of keeping the frames in memory for the lifetime of the object.</p>
<p>By default, this property is set to <a href="qmovie.html#CacheMode-enum">CacheNone</a>.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">CacheMode </td><td class="memItemRight" valign="bottom"><b>cacheMode</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setCacheMode</b> ( CacheMode <i>mode</i> )</td></tr>
</table>
<p>See also <a href="qmovie.html#CacheMode-enum">QMovie::CacheMode</a>.</p>
<a name="//apple_ref/cpp/instm/QMovie/speed"></a>
<a name="//apple_ref/cpp/instm/QMovie/setSpeed"></a>
<h3 class="fn"><a name="speed-prop"></a>speed : int</h3>
<p>This property holds the movie's speed.</p>
<p>The speed is measured in percentage of the original movie speed. The default speed is 100%. Example:</p>
<pre> QMovie movie(&quot;racecar.gif&quot;);
 movie.setSpeed(200); <span class="comment">// 2x speed</span></pre>
<p><b>Access functions:</b></p>
<table class="alignedsummary" border="0" cellpadding="0" cellspacing="0" width="100%">
<tr><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><b>speed</b> () const</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><b>setSpeed</b> ( int <i>percentSpeed</i> )</td></tr>
</table>
<hr />
<h2>Member Function Documentation</h2>
<a name="//apple_ref/cpp/instm/QMovie/QMovie"></a>
<h3 class="fn"><a name="QMovie"></a>QMovie::QMovie ( <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qmovie.html">QMovie</a> object, passing the <i>parent</i> object to <a href="qobject.html">QObject</a>'s constructor.</p>
<p>See also <a href="qmovie.html#setFileName">setFileName</a>(), <a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>
<h3 class="fn"><a name="QMovie-2"></a>QMovie::QMovie ( <a href="qiodevice.html">QIODevice</a> * <i>device</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>format</i> = QByteArray(), <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qmovie.html">QMovie</a> object. <a href="qmovie.html">QMovie</a> will use read image data from <i>device</i>, which it assumes is open and readable. If <i>format</i> is not empty, <a href="qmovie.html">QMovie</a> will use the image format <i>format</i> for decoding the image data. Otherwise, <a href="qmovie.html">QMovie</a> will attempt to guess the format.</p>
<p>The <i>parent</i> object is passed to <a href="qobject.html">QObject</a>'s constructor.</p>
<h3 class="fn"><a name="QMovie-3"></a>QMovie::QMovie ( const <a href="qstring.html">QString</a> &amp; <i>fileName</i>, const <a href="qbytearray.html">QByteArray</a> &amp; <i>format</i> = QByteArray(), <a href="qobject.html">QObject</a> * <i>parent</i> = 0 )</h3>
<p>Constructs a <a href="qmovie.html">QMovie</a> object. <a href="qmovie.html">QMovie</a> will use read image data from <i>fileName</i>. If <i>format</i> is not empty, <a href="qmovie.html">QMovie</a> will use the image format <i>format</i> for decoding the image data. Otherwise, <a href="qmovie.html">QMovie</a> will attempt to guess the format.</p>
<p>The <i>parent</i> object is passed to <a href="qobject.html">QObject</a>'s constructor.</p>
<a name="//apple_ref/cpp/instm/QMovie/~QMovie"></a>
<h3 class="fn"><a name="dtor.QMovie"></a>QMovie::~QMovie ()</h3>
<p>Destructs the <a href="qmovie.html">QMovie</a> object.</p>
<a name="//apple_ref/cpp/instm/QMovie/backgroundColor"></a>
<h3 class="fn"><a name="backgroundColor"></a><a href="qcolor.html">QColor</a> QMovie::backgroundColor () const</h3>
<p>Returns the background color of the movie. If no background color has been assigned, an invalid <a href="qcolor.html">QColor</a> is returned.</p>
<p>See also <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/currentFrameNumber"></a>
<h3 class="fn"><a name="currentFrameNumber"></a>int QMovie::currentFrameNumber () const</h3>
<p>Returns the sequence number of the current frame. The number of the first frame in the movie is 0.</p>
<a name="//apple_ref/cpp/instm/QMovie/currentImage"></a>
<h3 class="fn"><a name="currentImage"></a><a href="qimage.html">QImage</a> QMovie::currentImage () const</h3>
<p>Returns the current frame as a <a href="qimage.html">QImage</a>.</p>
<p>See also <a href="qmovie.html#currentPixmap">currentPixmap</a>() and <a href="qmovie.html#updated">updated</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/currentPixmap"></a>
<h3 class="fn"><a name="currentPixmap"></a><a href="qpixmap.html">QPixmap</a> QMovie::currentPixmap () const</h3>
<p>Returns the current frame as a <a href="qpixmap.html">QPixmap</a>.</p>
<p>See also <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#updated">updated</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/device"></a>
<h3 class="fn"><a name="device"></a><a href="qiodevice.html">QIODevice</a> * QMovie::device () const</h3>
<p>Returns the device <a href="qmovie.html">QMovie</a> reads image data from. If no device has currently been assigned, 0 is returned.</p>
<p>See also <a href="qmovie.html#setDevice">setDevice</a>() and <a href="qmovie.html#fileName">fileName</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/error"></a>
<h3 class="fn"><a name="error"></a>void QMovie::error ( <a href="qimagereader.html#ImageReaderError-enum">QImageReader::ImageReaderError</a> <i>error</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted by <a href="qmovie.html">QMovie</a> when the error <i>error</i> occurred during playback. <a href="qmovie.html">QMovie</a> will stop the movie, and enter <a href="qmovie.html#MovieState-enum">QMovie::NotRunning</a> state.</p>
<a name="//apple_ref/cpp/instm/QMovie/fileName"></a>
<h3 class="fn"><a name="fileName"></a><a href="qstring.html">QString</a> QMovie::fileName () const</h3>
<p>Returns the name of the file that <a href="qmovie.html">QMovie</a> reads image data from. If no file name has been assigned, or if the assigned device is not a file, an empty <a href="qstring.html">QString</a> is returned.</p>
<p>See also <a href="qmovie.html#setFileName">setFileName</a>() and <a href="qmovie.html#device">device</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/finished"></a>
<h3 class="fn"><a name="finished"></a>void QMovie::finished ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the movie has finished.</p>
<p>See also <a href="qmovie.html#stop">QMovie::stop</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/format"></a>
<h3 class="fn"><a name="format"></a><a href="qbytearray.html">QByteArray</a> QMovie::format () const</h3>
<p>Returns the format that <a href="qmovie.html">QMovie</a> uses when decoding image data. If no format has been assigned, an empty QByteArray() is returned.</p>
<p>See also <a href="qmovie.html#setFormat">setFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/frameChanged"></a>
<h3 class="fn"><a name="frameChanged"></a>void QMovie::frameChanged ( int <i>frameNumber</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the frame number has changed to <i>frameNumber</i>. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of the frame.</p>
<p>This function was introduced in Qt 4.1.</p>
<a name="//apple_ref/cpp/instm/QMovie/frameCount"></a>
<h3 class="fn"><a name="frameCount"></a>int QMovie::frameCount () const</h3>
<p>Returns the number of frames in the movie.</p>
<p>Certain animation formats do not support this feature, in which case 0 is returned.</p>
<a name="//apple_ref/cpp/instm/QMovie/frameRect"></a>
<h3 class="fn"><a name="frameRect"></a><a href="qrect.html">QRect</a> QMovie::frameRect () const</h3>
<p>Returns the rect of the last frame. If no frame has yet been updated, an invalid <a href="qrect.html">QRect</a> is returned.</p>
<p>See also <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#currentPixmap">currentPixmap</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/isValid"></a>
<h3 class="fn"><a name="isValid"></a>bool QMovie::isValid () const</h3>
<p>Returns true if the movie is valid (e.g&#x2e;, the image data is readable and the image format is supported); otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QMovie/jumpToFrame"></a>
<h3 class="fn"><a name="jumpToFrame"></a>bool QMovie::jumpToFrame ( int <i>frameNumber</i> )</h3>
<p>Jumps to frame number <i>frameNumber</i>. Returns true on success; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QMovie/jumpToNextFrame"></a>
<h3 class="fn"><a name="jumpToNextFrame"></a>bool QMovie::jumpToNextFrame ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Jumps to the next frame. Returns true on success; otherwise returns false.</p>
<a name="//apple_ref/cpp/instm/QMovie/loopCount"></a>
<h3 class="fn"><a name="loopCount"></a>int QMovie::loopCount () const</h3>
<p>Returns the number of times the movie will loop before it finishes. If the movie will only play once (no looping), loopCount returns 0. If the movie loops forever, loopCount returns -1.</p>
<p>Note that, if the image data comes from a sequential device (e.g&#x2e; a socket), <a href="qmovie.html">QMovie</a> can only loop the movie if the <a href="qmovie.html#cacheMode-prop">cacheMode</a> is set to <a href="qmovie.html#CacheMode-enum">QMovie::CacheAll</a>.</p>
<a name="//apple_ref/cpp/instm/QMovie/nextFrameDelay"></a>
<h3 class="fn"><a name="nextFrameDelay"></a>int QMovie::nextFrameDelay () const</h3>
<p>Returns the number of milliseconds <a href="qmovie.html">QMovie</a> will wait before updating the next frame in the animation.</p>
<a name="//apple_ref/cpp/instm/QMovie/resized"></a>
<h3 class="fn"><a name="resized"></a>void QMovie::resized ( const <a href="qsize.html">QSize</a> &amp; <i>size</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the current frame has been resized to <i>size</i>. This effect is sometimes used in animations as an alternative to replacing the frame. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of the updated frame.</p>
<a name="//apple_ref/cpp/instm/QMovie/scaledSize"></a>
<h3 class="fn"><a name="scaledSize"></a><a href="qsize.html">QSize</a> QMovie::scaledSize ()</h3>
<p>Returns the scaled size of frames.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qmovie.html#setScaledSize">setScaledSize</a>() and <a href="qimagereader.html#scaledSize">QImageReader::scaledSize</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/setBackgroundColor"></a>
<h3 class="fn"><a name="setBackgroundColor"></a>void QMovie::setBackgroundColor ( const <a href="qcolor.html">QColor</a> &amp; <i>color</i> )</h3>
<p>For image formats that support it, this function sets the background color to <i>color</i>.</p>
<p>See also <a href="qmovie.html#backgroundColor">backgroundColor</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/setDevice"></a>
<h3 class="fn"><a name="setDevice"></a>void QMovie::setDevice ( <a href="qiodevice.html">QIODevice</a> * <i>device</i> )</h3>
<p>Sets the current device to <i>device</i>. <a href="qmovie.html">QMovie</a> will read image data from this device when the movie is running.</p>
<p>See also <a href="qmovie.html#device">device</a>() and <a href="qmovie.html#setFormat">setFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/setFileName"></a>
<h3 class="fn"><a name="setFileName"></a>void QMovie::setFileName ( const <a href="qstring.html">QString</a> &amp; <i>fileName</i> )</h3>
<p>Sets the name of the file that <a href="qmovie.html">QMovie</a> reads image data from, to <i>fileName</i>.</p>
<p>See also <a href="qmovie.html#fileName">fileName</a>(), <a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/setFormat"></a>
<h3 class="fn"><a name="setFormat"></a>void QMovie::setFormat ( const <a href="qbytearray.html">QByteArray</a> &amp; <i>format</i> )</h3>
<p>Sets the format that <a href="qmovie.html">QMovie</a> will use when decoding image data, to <i>format</i>. By default, <a href="qmovie.html">QMovie</a> will attempt to guess the format of the image data.</p>
<p>You can call <a href="qmovie.html#supportedFormats">supportedFormats</a>() for the full list of formats <a href="qmovie.html">QMovie</a> supports.</p>
<p>See also <a href="qmovie.html#format">format</a>() and <a href="qimagereader.html#supportedImageFormats">QImageReader::supportedImageFormats</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/setPaused"></a>
<h3 class="fn"><a name="setPaused"></a>void QMovie::setPaused ( bool <i>paused</i> )&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>If <i>paused</i> is true, <a href="qmovie.html">QMovie</a> will enter <a href="qmovie.html#MovieState-enum">Paused</a> state and emit stateChanged(Paused); otherwise it will enter <a href="qmovie.html#MovieState-enum">Running</a> state and emit stateChanged(Running).</p>
<p>See also <a href="qmovie-qt3.html#paused" class="compat">paused</a>() and <a href="qmovie.html#state">state</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/setScaledSize"></a>
<h3 class="fn"><a name="setScaledSize"></a>void QMovie::setScaledSize ( const <a href="qsize.html">QSize</a> &amp; <i>size</i> )</h3>
<p>Sets the scaled frame size to <i>size</i>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qmovie.html#scaledSize">scaledSize</a>() and <a href="qimagereader.html#setScaledSize">QImageReader::setScaledSize</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/start"></a>
<h3 class="fn"><a name="start"></a>void QMovie::start ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Starts the movie. <a href="qmovie.html">QMovie</a> will enter <a href="qmovie.html#MovieState-enum">Running</a> state, and start emitting <a href="qmovie.html#updated">updated</a>() and <a href="qmovie.html#resized">resized</a>() as the movie progresses.</p>
<p>If <a href="qmovie.html">QMovie</a> is in the <a href="qmovie.html#MovieState-enum">Paused</a> state, this function is equivalent to calling setPaused(false). If <a href="qmovie.html">QMovie</a> is already in the <a href="qmovie.html#MovieState-enum">Running</a> state, this function does nothing.</p>
<p>See also <a href="qmovie.html#stop">stop</a>() and <a href="qmovie.html#setPaused">setPaused</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/started"></a>
<h3 class="fn"><a name="started"></a>void QMovie::started ()&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted after <a href="qmovie.html#start">QMovie::start</a>() has been called, and <a href="qmovie.html">QMovie</a> has entered <a href="qmovie.html#MovieState-enum">QMovie::Running</a> state.</p>
<a name="//apple_ref/cpp/instm/QMovie/state"></a>
<h3 class="fn"><a name="state"></a><a href="qmovie.html#MovieState-enum">MovieState</a> QMovie::state () const</h3>
<p>Returns the current state of <a href="qmovie.html">QMovie</a>.</p>
<p>See also <a href="qmovie.html#MovieState-enum">MovieState</a> and <a href="qmovie.html#stateChanged">stateChanged</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/stateChanged"></a>
<h3 class="fn"><a name="stateChanged"></a>void QMovie::stateChanged ( <a href="qmovie.html#MovieState-enum">QMovie::MovieState</a> <i>state</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted every time the state of the movie changes. The new state is specified by <i>state</i>.</p>
<p>See also <a href="qmovie.html#state">QMovie::state</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/stop"></a>
<h3 class="fn"><a name="stop"></a>void QMovie::stop ()&nbsp;&nbsp;<tt> [slot]</tt></h3>
<p>Stops the movie. <a href="qmovie.html">QMovie</a> enters <a href="qmovie.html#MovieState-enum">NotRunning</a> state, and stops emitting <a href="qmovie.html#updated">updated</a>() and <a href="qmovie.html#resized">resized</a>(). If <a href="qmovie.html#start">start</a>() is called again, the movie will restart from the beginning.</p>
<p>If <a href="qmovie.html">QMovie</a> is already in the <a href="qmovie.html#MovieState-enum">NotRunning</a> state, this function does nothing.</p>
<p>See also <a href="qmovie.html#start">start</a>() and <a href="qmovie.html#setPaused">setPaused</a>().</p>
<a name="//apple_ref/cpp/clm/QMovie/supportedFormats"></a>
<h3 class="fn"><a name="supportedFormats"></a><a href="qlist.html">QList</a>&lt;<a href="qbytearray.html">QByteArray</a>&gt; QMovie::supportedFormats ()&nbsp;&nbsp;<tt> [static]</tt></h3>
<p>Returns the list of image formats supported by <a href="qmovie.html">QMovie</a>.</p>
<p>This function was introduced in Qt 4.1.</p>
<p>See also <a href="qimagereader.html#supportedImageFormats">QImageReader::supportedImageFormats</a>().</p>
<a name="//apple_ref/cpp/instm/QMovie/updated"></a>
<h3 class="fn"><a name="updated"></a>void QMovie::updated ( const <a href="qrect.html">QRect</a> &amp; <i>rect</i> )&nbsp;&nbsp;<tt> [signal]</tt></h3>
<p>This signal is emitted when the rect <i>rect</i> in the current frame has been updated. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of the updated frame.</p>
<p /><address><hr /><div align="center">
<table width="100%" cellspacing="0" border="0"><tr class="address">
<td width="40%" align="left">Copyright &copy; 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>