PageRenderTime 49ms CodeModel.GetById 17ms RepoModel.GetById 0ms app.codeStats 0ms

/PyQt-x11-gpl-4.9.4/doc/html/qmovie.html

#
HTML | 309 lines | 237 code | 72 blank | 0 comment | 0 complexity | 9c11f5c28edfd0e4e701378366782225 MD5 | raw file
Possible License(s): GPL-2.0, GPL-3.0
  1. <?xml version="1.0" encoding="iso-8859-1"?>
  2. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
  3. <html><head><title>QMovie Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
  4. a:link { color: #004faf; text-decoration: none }
  5. a:visited { color: #672967; text-decoration: none }
  6. td.postheader { font-family: sans-serif }
  7. tr.address { font-family: sans-serif }
  8. body { background: #ffffff; color: black; }
  9. </style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr /><td align="left" valign="top" width="32"><img align="left" border="0" height="32" src="images/rb-logo.png" width="32" /></td><td width="1">&#160;&#160;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&#160;&#183; <a href="classes.html"><font color="#004faf">All Classes</font></a>&#160;&#183; <a href="modules.html"><font color="#004faf">Modules</font></a></td></table><h1 align="center">QMovie Class Reference<br /><sup><sup>[<a href="qtgui.html">QtGui</a> module]</sup></sup></h1><p>The QMovie class is a convenience class for playing movies with
  10. <a href="qimagereader.html">QImageReader</a>. <a href="#details">More...</a></p>
  11. <p>Inherits <a href="qobject.html">QObject</a>.</p><h3>Types</h3><ul><li><div class="fn" />enum <b><a href="qmovie.html#CacheMode-enum">CacheMode</a></b> { CacheNone, CacheAll }</li><li><div class="fn" />enum <b><a href="qmovie.html#MovieState-enum">MovieState</a></b> { NotRunning, Paused, Running }</li></ul><h3>Methods</h3><ul><li><div class="fn" /><b><a href="qmovie.html#QMovie">__init__</a></b> (<i>self</i>, QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qmovie.html#QMovie-2">__init__</a></b> (<i>self</i>, QIODevice&#160;<i>device</i>, QByteArray&#160;<i>format</i>&#160;=&#160;QByteArray(), QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" /><b><a href="qmovie.html#QMovie-3">__init__</a></b> (<i>self</i>, QString&#160;<i>fileName</i>, QByteArray&#160;<i>format</i>&#160;=&#160;QByteArray(), QObject&#160;<i>parent</i>&#160;=&#160;None)</li><li><div class="fn" />QColor <b><a href="qmovie.html#backgroundColor">backgroundColor</a></b> (<i>self</i>)</li><li><div class="fn" />CacheMode <b><a href="qmovie.html#cacheMode">cacheMode</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#currentFrameNumber">currentFrameNumber</a></b> (<i>self</i>)</li><li><div class="fn" />QImage <b><a href="qmovie.html#currentImage">currentImage</a></b> (<i>self</i>)</li><li><div class="fn" />QPixmap <b><a href="qmovie.html#currentPixmap">currentPixmap</a></b> (<i>self</i>)</li><li><div class="fn" />QIODevice <b><a href="qmovie.html#device">device</a></b> (<i>self</i>)</li><li><div class="fn" />QString <b><a href="qmovie.html#fileName">fileName</a></b> (<i>self</i>)</li><li><div class="fn" />QByteArray <b><a href="qmovie.html#format">format</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#frameCount">frameCount</a></b> (<i>self</i>)</li><li><div class="fn" />QRect <b><a href="qmovie.html#frameRect">frameRect</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmovie.html#isValid">isValid</a></b> (<i>self</i>)</li><li><div class="fn" />bool <b><a href="qmovie.html#jumpToFrame">jumpToFrame</a></b> (<i>self</i>, int&#160;<i>frameNumber</i>)</li><li><div class="fn" />bool <b><a href="qmovie.html#jumpToNextFrame">jumpToNextFrame</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#loopCount">loopCount</a></b> (<i>self</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#nextFrameDelay">nextFrameDelay</a></b> (<i>self</i>)</li><li><div class="fn" />QSize <b><a href="qmovie.html#scaledSize">scaledSize</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setBackgroundColor">setBackgroundColor</a></b> (<i>self</i>, QColor&#160;<i>color</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setCacheMode">setCacheMode</a></b> (<i>self</i>, CacheMode&#160;<i>mode</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setDevice">setDevice</a></b> (<i>self</i>, QIODevice&#160;<i>device</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setFileName">setFileName</a></b> (<i>self</i>, QString&#160;<i>fileName</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setFormat">setFormat</a></b> (<i>self</i>, QByteArray&#160;<i>format</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setPaused">setPaused</a></b> (<i>self</i>, bool&#160;<i>paused</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setScaledSize">setScaledSize</a></b> (<i>self</i>, QSize&#160;<i>size</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setSpeed">setSpeed</a></b> (<i>self</i>, int&#160;<i>percentSpeed</i>)</li><li><div class="fn" />int <b><a href="qmovie.html#speed">speed</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmovie.html#start">start</a></b> (<i>self</i>)</li><li><div class="fn" />MovieState <b><a href="qmovie.html#state">state</a></b> (<i>self</i>)</li><li><div class="fn" /><b><a href="qmovie.html#stop">stop</a></b> (<i>self</i>)</li></ul><h3>Static Methods</h3><ul><li><div class="fn" />list-of-QByteArray <b><a href="qmovie.html#supportedFormats">supportedFormats</a></b> ()</li></ul><h3>Qt Signals</h3><ul><li><div class="fn" />void <b><a href="qmovie.html#error">error</a></b> (QImageReader::ImageReaderError)</li><li><div class="fn" />void <b><a href="qmovie.html#finished">finished</a></b> ()</li><li><div class="fn" />void <b><a href="qmovie.html#frameChanged">frameChanged</a></b> (int)</li><li><div class="fn" />void <b><a href="qmovie.html#resized">resized</a></b> (const QSize&amp;)</li><li><div class="fn" />void <b><a href="qmovie.html#started">started</a></b> ()</li><li><div class="fn" />void <b><a href="qmovie.html#stateChanged">stateChanged</a></b> (QMovie::MovieState)</li><li><div class="fn" />void <b><a href="qmovie.html#updated">updated</a></b> (const QRect&amp;)</li></ul><a name="details" /><hr /><h2>Detailed Description</h2><p>The QMovie class is a convenience class for playing movies with
  12. <a href="qimagereader.html">QImageReader</a>.</p>
  13. <p>This class is used to show simple animations without sound. If
  14. you want to display video and media content, use the <a href="phonon-module.html">Phonon</a> multimedia framework instead.</p>
  15. <p>First, create a QMovie object by passing either the name of a
  16. file or a pointer to a <a href="qiodevice.html">QIODevice</a>
  17. containing an animated image format to QMovie's constructor. You
  18. can call <a href="qmovie.html#isValid">isValid</a>() to check if
  19. the image data is valid, before starting the movie. To start the
  20. movie, call <a href="qmovie.html#start">start</a>(). QMovie will
  21. enter <a href="qmovie.html#MovieState-enum">Running</a> state, and
  22. emit <a href="qmovie.html#started">started</a>() and <a href="qmovie.html#stateChanged">stateChanged</a>(). To get the current
  23. state of the movie, call <a href="qmovie.html#state">state</a>().</p>
  24. <p>To display the movie in your application, you can pass your
  25. QMovie object to <a href="qlabel.html#setMovie">QLabel.setMovie</a>(). Example:</p>
  26. <pre class="cpp">
  27. <span class="type"><a href="qlabel.html">QLabel</a></span> label;
  28. <span class="type">QMovie</span> <span class="operator">*</span>movie <span class="operator">=</span> <span class="keyword">new</span> <span class="type">QMovie</span>(<span class="string">"animations/fire.gif"</span>);
  29. label<span class="operator">.</span>setMovie(movie);
  30. movie<span class="operator">-</span><span class="operator">&gt;</span><a href="qmovie.html#start">start</a>();
  31. </pre>
  32. <p>Whenever a new frame is available in the movie, QMovie will emit
  33. <a href="qmovie.html#updated">updated</a>(). If the size of the
  34. frame changes, <a href="qmovie.html#resized">resized</a>() is
  35. emitted. You can call <a href="qmovie.html#currentImage">currentImage</a>() or <a href="qmovie.html#currentPixmap">currentPixmap</a>() to get a copy of
  36. the current frame. When the movie is done, QMovie emits <a href="qmovie.html#finished">finished</a>(). If any error occurs during
  37. playback (i.e, the image file is corrupt), QMovie will emit
  38. <a href="qmovie.html#error">error</a>().</p>
  39. <p>You can control the speed of the movie playback by calling
  40. <a href="qmovie.html#speed-prop">setSpeed</a>(), which takes the
  41. percentage of the original speed as an argument. Pause the movie by
  42. 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
  43. setPaused(false), QMovie will reenter <a href="qmovie.html#MovieState-enum">Running</a> state and start the movie
  44. again. To stop the movie, call <a href="qmovie.html#stop">stop</a>().</p>
  45. <p>Certain animation formats allow you to set the background color.
  46. You can call <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>() to set
  47. the color, or <a href="qmovie.html#backgroundColor">backgroundColor</a>() to retrieve the
  48. current background color.</p>
  49. <p><a href="qmovie.html#currentFrameNumber">currentFrameNumber</a>() returns
  50. the sequence number of the current frame. The first frame in the
  51. animation has the sequence number 0. <a href="qmovie.html#frameCount">frameCount</a>() returns the total number
  52. of frames in the animation, if the image format supports this. You
  53. can call <a href="qmovie.html#loopCount">loopCount</a>() to get the
  54. number of times the movie should loop before finishing. <a href="qmovie.html#nextFrameDelay">nextFrameDelay</a>() returns the
  55. number of milliseconds the current frame should be displayed.</p>
  56. <p>QMovie can be instructed to cache frames of an animation by
  57. calling <a href="qmovie.html#cacheMode-prop">setCacheMode</a>().</p>
  58. <p>Call <a href="qmovie.html#supportedFormats">supportedFormats</a>() for a list of
  59. formats that QMovie supports.</p>
  60. <hr /><h2>Type Documentation</h2><h3 class="fn"><a name="CacheMode-enum" />QMovie.CacheMode</h3><p>This enum describes the different cache modes of <a href="qmovie.html">QMovie</a>.</p>
  61. <table class="valuelist">
  62. <tr class="odd" valign="top">
  63. <th class="tblConst">Constant</th>
  64. <th class="tblval">Value</th>
  65. <th class="tbldscr">Description</th>
  66. </tr>
  67. <tr>
  68. <td class="topAlign"><tt>QMovie.CacheNone</tt></td>
  69. <td class="topAlign"><tt>0</tt></td>
  70. <td class="topAlign">No frames are cached (the default).</td>
  71. </tr>
  72. <tr>
  73. <td class="topAlign"><tt>QMovie.CacheAll</tt></td>
  74. <td class="topAlign"><tt>1</tt></td>
  75. <td class="topAlign">All frames are cached.</td>
  76. </tr>
  77. </table>
  78. <h3 class="fn"><a name="MovieState-enum" />QMovie.MovieState</h3><p>This enum describes the different states of <a href="qmovie.html">QMovie</a>.</p>
  79. <table class="valuelist">
  80. <tr class="odd" valign="top">
  81. <th class="tblConst">Constant</th>
  82. <th class="tblval">Value</th>
  83. <th class="tbldscr">Description</th>
  84. </tr>
  85. <tr>
  86. <td class="topAlign"><tt>QMovie.NotRunning</tt></td>
  87. <td class="topAlign"><tt>0</tt></td>
  88. <td class="topAlign">The movie is not running. This is <a href="qmovie.html">QMovie</a>'s initial state, and the state it enters
  89. after <a href="qmovie.html#stop">stop</a>() has been called or the
  90. movie is finished.</td>
  91. </tr>
  92. <tr>
  93. <td class="topAlign"><tt>QMovie.Paused</tt></td>
  94. <td class="topAlign"><tt>1</tt></td>
  95. <td class="topAlign">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
  96. calling <a class="compat" href="qmovie-qt3.html#pause">pause</a>()
  97. or setPaused(true). The current frame number it kept, and the movie
  98. will continue with the next frame when <a class="compat" href="qmovie-qt3.html#unpause">unpause</a>() or
  99. setPaused(false) is called.</td>
  100. </tr>
  101. <tr>
  102. <td class="topAlign"><tt>QMovie.Running</tt></td>
  103. <td class="topAlign"><tt>2</tt></td>
  104. <td class="topAlign">The movie is running.</td>
  105. </tr>
  106. </table>
  107. <hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMovie" />QMovie.__init__ (<i>self</i>, <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qmovie.html">QMovie</a> object, passing
  108. the <i>parent</i> object to <a href="qobject.html">QObject</a>'s
  109. constructor.</p>
  110. <p><b>See also</b> <a href="qmovie.html#setFileName">setFileName</a>(), <a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>
  111. <h3 class="fn"><a name="QMovie-2" />QMovie.__init__ (<i>self</i>, <a href="qiodevice.html">QIODevice</a>&#160;<i>device</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>format</i>&#160;=&#160;QByteArray(), <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qmovie.html">QMovie</a> object. <a href="qmovie.html">QMovie</a> will use read image data from
  112. <i>device</i>, which it assumes is open and readable. If
  113. <i>format</i> is not empty, <a href="qmovie.html">QMovie</a> will
  114. use the image format <i>format</i> for decoding the image data.
  115. Otherwise, <a href="qmovie.html">QMovie</a> will attempt to guess
  116. the format.</p>
  117. <p>The <i>parent</i> object is passed to <a href="qobject.html">QObject</a>'s constructor.</p>
  118. <h3 class="fn"><a name="QMovie-3" />QMovie.__init__ (<i>self</i>, QString&#160;<i>fileName</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>format</i>&#160;=&#160;QByteArray(), <a href="qobject.html">QObject</a>&#160;<i>parent</i>&#160;=&#160;None)</h3><p>The <i>parent</i> argument, if not None, causes <i>self</i> to be owned by Qt instead of PyQt.</p><p>Constructs a <a href="qmovie.html">QMovie</a> object. <a href="qmovie.html">QMovie</a> will use read image data from
  119. <i>fileName</i>. If <i>format</i> is not empty, <a href="qmovie.html">QMovie</a> will use the image format <i>format</i>
  120. for decoding the image data. Otherwise, <a href="qmovie.html">QMovie</a> will attempt to guess the format.</p>
  121. <p>The <i>parent</i> object is passed to <a href="qobject.html">QObject</a>'s constructor.</p>
  122. <h3 class="fn"><a name="backgroundColor" /><a href="qcolor.html">QColor</a> QMovie.backgroundColor (<i>self</i>)</h3><p>Returns the background color of the movie. If no background
  123. color has been assigned, an invalid <a href="qcolor.html">QColor</a> is returned.</p>
  124. <p><b>See also</b> <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>().</p>
  125. <h3 class="fn"><a name="cacheMode" /><a href="qmovie.html#CacheMode-enum">CacheMode</a> QMovie.cacheMode (<i>self</i>)</h3><h3 class="fn"><a name="currentFrameNumber" />int QMovie.currentFrameNumber (<i>self</i>)</h3><p>Returns the sequence number of the current frame. The number of
  126. the first frame in the movie is 0.</p>
  127. <h3 class="fn"><a name="currentImage" /><a href="qimage.html">QImage</a> QMovie.currentImage (<i>self</i>)</h3><p>Returns the current frame as a <a href="qimage.html">QImage</a>.</p>
  128. <p><b>See also</b> <a href="qmovie.html#currentPixmap">currentPixmap</a>() and <a href="qmovie.html#updated">updated</a>().</p>
  129. <h3 class="fn"><a name="currentPixmap" /><a href="qpixmap.html">QPixmap</a> QMovie.currentPixmap (<i>self</i>)</h3><p>Returns the current frame as a <a href="qpixmap.html">QPixmap</a>.</p>
  130. <p><b>See also</b> <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#updated">updated</a>().</p>
  131. <h3 class="fn"><a name="device" /><a href="qiodevice.html">QIODevice</a> QMovie.device (<i>self</i>)</h3><p>Returns the device <a href="qmovie.html">QMovie</a> reads image
  132. data from. If no device has currently been assigned, 0 is
  133. returned.</p>
  134. <p><b>See also</b> <a href="qmovie.html#setDevice">setDevice</a>()
  135. and <a href="qmovie.html#fileName">fileName</a>().</p>
  136. <h3 class="fn"><a name="fileName" />QString QMovie.fileName (<i>self</i>)</h3><p>Returns the name of the file that <a href="qmovie.html">QMovie</a> reads image data from. If no file name has
  137. been assigned, or if the assigned device is not a file, an empty
  138. <a href="qstring.html">QString</a> is returned.</p>
  139. <p><b>See also</b> <a href="qmovie.html#setFileName">setFileName</a>() and <a href="qmovie.html#device">device</a>().</p>
  140. <h3 class="fn"><a name="format" /><a href="qbytearray.html">QByteArray</a> QMovie.format (<i>self</i>)</h3><p>Returns the format that <a href="qmovie.html">QMovie</a> uses
  141. when decoding image data. If no format has been assigned, an empty
  142. QByteArray() is returned.</p>
  143. <p><b>See also</b> <a href="qmovie.html#setFormat">setFormat</a>().</p>
  144. <h3 class="fn"><a name="frameCount" />int QMovie.frameCount (<i>self</i>)</h3><p>Returns the number of frames in the movie.</p>
  145. <p>Certain animation formats do not support this feature, in which
  146. case 0 is returned.</p>
  147. <h3 class="fn"><a name="frameRect" /><a href="qrect.html">QRect</a> QMovie.frameRect (<i>self</i>)</h3><p>Returns the rect of the last frame. If no frame has yet been
  148. updated, an invalid <a href="qrect.html">QRect</a> is returned.</p>
  149. <p><b>See also</b> <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#currentPixmap">currentPixmap</a>().</p>
  150. <h3 class="fn"><a name="isValid" />bool QMovie.isValid (<i>self</i>)</h3><p>Returns true if the movie is valid (e.g., the image data is
  151. readable and the image format is supported); otherwise returns
  152. false.</p>
  153. <h3 class="fn"><a name="jumpToFrame" />bool QMovie.jumpToFrame (<i>self</i>, int&#160;<i>frameNumber</i>)</h3><p>Jumps to frame number <i>frameNumber</i>. Returns true on
  154. success; otherwise returns false.</p>
  155. <h3 class="fn"><a name="jumpToNextFrame" />bool QMovie.jumpToNextFrame (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>bool jumpToNextFrame()</tt>.</p><p>Jumps to the next frame. Returns true on success; otherwise
  156. returns false.</p>
  157. <h3 class="fn"><a name="loopCount" />int QMovie.loopCount (<i>self</i>)</h3><p>Returns the number of times the movie will loop before it
  158. finishes. If the movie will only play once (no looping), loopCount
  159. returns 0. If the movie loops forever, loopCount returns -1.</p>
  160. <p>Note that, if the image data comes from a sequential device
  161. (e.g. a socket), <a href="qmovie.html">QMovie</a> can only loop the
  162. movie if the <a href="qmovie.html#cacheMode-prop">cacheMode</a> is
  163. set to <a href="qmovie.html#CacheMode-enum">QMovie.CacheAll</a>.</p>
  164. <h3 class="fn"><a name="nextFrameDelay" />int QMovie.nextFrameDelay (<i>self</i>)</h3><p>Returns the number of milliseconds <a href="qmovie.html">QMovie</a> will wait before updating the next frame
  165. in the animation.</p>
  166. <h3 class="fn"><a name="scaledSize" /><a href="qsize.html">QSize</a> QMovie.scaledSize (<i>self</i>)</h3><p>Returns the scaled size of frames.</p>
  167. <p>This function was introduced in Qt 4.1.</p>
  168. <p><b>See also</b> <a href="qmovie.html#setScaledSize">setScaledSize</a>() and <a href="qimagereader.html#scaledSize">QImageReader.scaledSize</a>().</p>
  169. <h3 class="fn"><a name="setBackgroundColor" />QMovie.setBackgroundColor (<i>self</i>, <a href="qcolor.html">QColor</a>&#160;<i>color</i>)</h3><p>For image formats that support it, this function sets the
  170. background color to <i>color</i>.</p>
  171. <p><b>See also</b> <a href="qmovie.html#backgroundColor">backgroundColor</a>().</p>
  172. <h3 class="fn"><a name="setCacheMode" />QMovie.setCacheMode (<i>self</i>, <a href="qmovie.html#CacheMode-enum">CacheMode</a>&#160;<i>mode</i>)</h3><h3 class="fn"><a name="setDevice" />QMovie.setDevice (<i>self</i>, <a href="qiodevice.html">QIODevice</a>&#160;<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
  173. the movie is running.</p>
  174. <p><b>See also</b> <a href="qmovie.html#device">device</a>() and
  175. <a href="qmovie.html#setFormat">setFormat</a>().</p>
  176. <h3 class="fn"><a name="setFileName" />QMovie.setFileName (<i>self</i>, QString&#160;<i>fileName</i>)</h3><p>Sets the name of the file that <a href="qmovie.html">QMovie</a>
  177. reads image data from, to <i>fileName</i>.</p>
  178. <p><b>See also</b> <a href="qmovie.html#fileName">fileName</a>(),
  179. <a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>
  180. <h3 class="fn"><a name="setFormat" />QMovie.setFormat (<i>self</i>, <a href="qbytearray.html">QByteArray</a>&#160;<i>format</i>)</h3><p>Sets the format that <a href="qmovie.html">QMovie</a> will use
  181. when decoding image data, to <i>format</i>. By default, <a href="qmovie.html">QMovie</a> will attempt to guess the format of the
  182. image data.</p>
  183. <p>You can call <a href="qmovie.html#supportedFormats">supportedFormats</a>() for the full
  184. list of formats <a href="qmovie.html">QMovie</a> supports.</p>
  185. <p><b>See also</b> <a href="qmovie.html#format">format</a>() and
  186. <a href="qimagereader.html#supportedImageFormats">QImageReader.supportedImageFormats</a>().</p>
  187. <h3 class="fn"><a name="setPaused" />QMovie.setPaused (<i>self</i>, bool&#160;<i>paused</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void setPaused(bool)</tt>.</p><p>If <i>paused</i> is true, <a href="qmovie.html">QMovie</a> will
  188. enter <a href="qmovie.html#MovieState-enum">Paused</a> state and
  189. emit stateChanged(Paused); otherwise it will enter <a href="qmovie.html#MovieState-enum">Running</a> state and emit
  190. stateChanged(Running).</p>
  191. <p><b>See also</b> <a class="compat" href="qmovie-qt3.html#paused">paused</a>() and <a href="qmovie.html#state">state</a>().</p>
  192. <h3 class="fn"><a name="setScaledSize" />QMovie.setScaledSize (<i>self</i>, <a href="qsize.html">QSize</a>&#160;<i>size</i>)</h3><p>Sets the scaled frame size to <i>size</i>.</p>
  193. <p>This function was introduced in Qt 4.1.</p>
  194. <p><b>See also</b> <a href="qmovie.html#scaledSize">scaledSize</a>() and <a href="qimagereader.html#setScaledSize">QImageReader.setScaledSize</a>().</p>
  195. <h3 class="fn"><a name="setSpeed" />QMovie.setSpeed (<i>self</i>, int&#160;<i>percentSpeed</i>)</h3><h3 class="fn"><a name="speed" />int QMovie.speed (<i>self</i>)</h3><h3 class="fn"><a name="start" />QMovie.start (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void start()</tt>.</p><p>Starts the movie. <a href="qmovie.html">QMovie</a> will enter
  196. <a href="qmovie.html#MovieState-enum">Running</a> state, and start
  197. emitting <a href="qmovie.html#updated">updated</a>() and <a href="qmovie.html#resized">resized</a>() as the movie progresses.</p>
  198. <p>If <a href="qmovie.html">QMovie</a> is in the <a href="qmovie.html#MovieState-enum">Paused</a> state, this function is
  199. 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
  200. nothing.</p>
  201. <p><b>See also</b> <a href="qmovie.html#stop">stop</a>() and
  202. <a href="qmovie.html#setPaused">setPaused</a>().</p>
  203. <h3 class="fn"><a name="state" /><a href="qmovie.html#MovieState-enum">MovieState</a> QMovie.state (<i>self</i>)</h3><p>Returns the current state of <a href="qmovie.html">QMovie</a>.</p>
  204. <p><b>See also</b> <a href="qmovie.html#MovieState-enum">MovieState</a> and <a href="qmovie.html#stateChanged">stateChanged</a>().</p>
  205. <h3 class="fn"><a name="stop" />QMovie.stop (<i>self</i>)</h3><p>This method is also a Qt slot with the C++ signature <tt>void stop()</tt>.</p><p>Stops the movie. <a href="qmovie.html">QMovie</a> enters
  206. <a href="qmovie.html#MovieState-enum">NotRunning</a> state, and
  207. stops emitting <a href="qmovie.html#updated">updated</a>() and
  208. <a href="qmovie.html#resized">resized</a>(). If <a href="qmovie.html#start">start</a>() is called again, the movie will
  209. restart from the beginning.</p>
  210. <p>If <a href="qmovie.html">QMovie</a> is already in the <a href="qmovie.html#MovieState-enum">NotRunning</a> state, this function
  211. does nothing.</p>
  212. <p><b>See also</b> <a href="qmovie.html#start">start</a>() and
  213. <a href="qmovie.html#setPaused">setPaused</a>().</p>
  214. <h3 class="fn"><a name="supportedFormats" />list-of-QByteArray QMovie.supportedFormats ()</h3><p>Returns the list of image formats supported by <a href="qmovie.html">QMovie</a>.</p>
  215. <p>This function was introduced in Qt 4.1.</p>
  216. <p><b>See also</b> <a href="qimagereader.html#supportedImageFormats">QImageReader.supportedImageFormats</a>().</p>
  217. <hr /><h2>Qt Signal Documentation</h2><h3 class="fn"><a name="error" />void error (QImageReader::ImageReaderError)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted by <a href="qmovie.html">QMovie</a> when
  218. 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>
  219. <h3 class="fn"><a name="finished" />void finished ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the movie has finished.</p>
  220. <p><b>See also</b> <a href="qmovie.html#stop">QMovie.stop</a>().</p>
  221. <h3 class="fn"><a name="frameChanged" />void frameChanged (int)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the frame number has changed to
  222. <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
  223. the frame.</p>
  224. <p>This function was introduced in Qt 4.1.</p>
  225. <h3 class="fn"><a name="resized" />void resized (const QSize&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the current frame has been resized
  226. to <i>size</i>. This effect is sometimes used in animations as an
  227. 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
  228. the updated frame.</p>
  229. <h3 class="fn"><a name="started" />void started ()</h3><p>This is the default overload of this signal.</p><p>This signal is emitted after <a href="qmovie.html#start">QMovie.start</a>() has been called, and
  230. <a href="qmovie.html">QMovie</a> has entered <a href="qmovie.html#MovieState-enum">QMovie.Running</a> state.</p>
  231. <h3 class="fn"><a name="stateChanged" />void stateChanged (QMovie::MovieState)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted every time the state of the movie
  232. changes. The new state is specified by <i>state</i>.</p>
  233. <p><b>See also</b> <a href="qmovie.html#state">QMovie.state</a>().</p>
  234. <h3 class="fn"><a name="updated" />void updated (const QRect&amp;)</h3><p>This is the default overload of this signal.</p><p>This signal is emitted when the rect <i>rect</i> in the current
  235. 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
  236. the updated frame.</p>
  237. <address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt&#160;4.9.4 for X11</td><td align="center" width="50%">Copyright &#169; <a href="http://www.riverbankcomputing.com">Riverbank&#160;Computing&#160;Ltd</a> and <a href="http://www.qtsoftware.com">Nokia</a> 2012</td><td align="right" width="25%">Qt&#160;4.8.2</td></tr></table></div></address></body></html>