1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309
|
<?xml version="1.0" encoding="iso-8859-1"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
<html><head><title>QMovie Class Reference</title><style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm }
a:link { color: #004faf; text-decoration: none }
a:visited { color: #672967; text-decoration: none }
td.postheader { font-family: sans-serif }
tr.address { font-family: sans-serif }
body { background: #ffffff; color: black; }
</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">  </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="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
<a href="qimagereader.html">QImageReader</a>. <a href="#details">More...</a></p>
<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 <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qmovie.html#QMovie-2">__init__</a></b> (<i>self</i>, QIODevice <i>device</i>, QByteArray <i>format</i> = QByteArray(), QObject <i>parent</i> = None)</li><li><div class="fn" /><b><a href="qmovie.html#QMovie-3">__init__</a></b> (<i>self</i>, QString <i>fileName</i>, QByteArray <i>format</i> = QByteArray(), QObject <i>parent</i> = 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 <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 <i>color</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setCacheMode">setCacheMode</a></b> (<i>self</i>, CacheMode <i>mode</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setDevice">setDevice</a></b> (<i>self</i>, QIODevice <i>device</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setFileName">setFileName</a></b> (<i>self</i>, QString <i>fileName</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setFormat">setFormat</a></b> (<i>self</i>, QByteArray <i>format</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setPaused">setPaused</a></b> (<i>self</i>, bool <i>paused</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setScaledSize">setScaledSize</a></b> (<i>self</i>, QSize <i>size</i>)</li><li><div class="fn" /><b><a href="qmovie.html#setSpeed">setSpeed</a></b> (<i>self</i>, int <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" />unknown-type <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&)</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&)</li></ul><a name="details" /><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 class="cpp">
<span class="type"><a href="qlabel.html">QLabel</a></span> label;
<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>);
label<span class="operator">.</span>setMovie(movie);
movie<span class="operator">-</span><span class="operator">></span><a href="qmovie.html#start">start</a>();
</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>
<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>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.CacheNone</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">No frames are cached (the default).</td>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.CacheAll</tt></td>
<td class="topAlign"><tt>1</tt></td>
<td class="topAlign">All frames are cached.</td>
</tr>
</table>
<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>
<table class="valuelist">
<tr class="odd" valign="top">
<th class="tblConst">Constant</th>
<th class="tblval">Value</th>
<th class="tbldscr">Description</th>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.NotRunning</tt></td>
<td class="topAlign"><tt>0</tt></td>
<td class="topAlign">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 class="topAlign"><tt>QMovie.Paused</tt></td>
<td class="topAlign"><tt>1</tt></td>
<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
calling <a class="compat" href="qmovie-qt3.html#pause">pause</a>()
or setPaused(true). The current frame number it kept, and the movie
will continue with the next frame when <a class="compat" href="qmovie-qt3.html#unpause">unpause</a>() or
setPaused(false) is called.</td>
</tr>
<tr>
<td class="topAlign"><tt>QMovie.Running</tt></td>
<td class="topAlign"><tt>2</tt></td>
<td class="topAlign">The movie is running.</td>
</tr>
</table>
<hr /><h2>Method Documentation</h2><h3 class="fn"><a name="QMovie" />QMovie.__init__ (<i>self</i>, <a href="qobject.html">QObject</a> <i>parent</i> = 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
the <i>parent</i> object to <a href="qobject.html">QObject</a>'s
constructor.</p>
<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>
<h3 class="fn"><a name="QMovie-2" />QMovie.__init__ (<i>self</i>, <a href="qiodevice.html">QIODevice</a> <i>device</i>, <a href="qbytearray.html">QByteArray</a> <i>format</i> = QByteArray(), <a href="qobject.html">QObject</a> <i>parent</i> = 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
<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" />QMovie.__init__ (<i>self</i>, QString <i>fileName</i>, <a href="qbytearray.html">QByteArray</a> <i>format</i> = QByteArray(), <a href="qobject.html">QObject</a> <i>parent</i> = 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
<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>
<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
color has been assigned, an invalid <a href="qcolor.html">QColor</a> is returned.</p>
<p><b>See also</b> <a href="qmovie.html#setBackgroundColor">setBackgroundColor</a>().</p>
<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
the first frame in the movie is 0.</p>
<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>
<p><b>See also</b> <a href="qmovie.html#currentPixmap">currentPixmap</a>() and <a href="qmovie.html#updated">updated</a>().</p>
<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>
<p><b>See also</b> <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#updated">updated</a>().</p>
<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
data from. If no device has currently been assigned, 0 is
returned.</p>
<p><b>See also</b> <a href="qmovie.html#setDevice">setDevice</a>()
and <a href="qmovie.html#fileName">fileName</a>().</p>
<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
been assigned, or if the assigned device is not a file, an empty
<a href="qstring.html">QString</a> is returned.</p>
<p><b>See also</b> <a href="qmovie.html#setFileName">setFileName</a>() and <a href="qmovie.html#device">device</a>().</p>
<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
when decoding image data. If no format has been assigned, an empty
QByteArray() is returned.</p>
<p><b>See also</b> <a href="qmovie.html#setFormat">setFormat</a>().</p>
<h3 class="fn"><a name="frameCount" />int QMovie.frameCount (<i>self</i>)</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>
<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
updated, an invalid <a href="qrect.html">QRect</a> is returned.</p>
<p><b>See also</b> <a href="qmovie.html#currentImage">currentImage</a>() and <a href="qmovie.html#currentPixmap">currentPixmap</a>().</p>
<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
readable and the image format is supported); otherwise returns
false.</p>
<h3 class="fn"><a name="jumpToFrame" />bool QMovie.jumpToFrame (<i>self</i>, int <i>frameNumber</i>)</h3><p>Jumps to frame number <i>frameNumber</i>. Returns true on
success; otherwise returns false.</p>
<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
returns false.</p>
<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
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. 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>
<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
in the animation.</p>
<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>
<p>This function was introduced in Qt 4.1.</p>
<p><b>See also</b> <a href="qmovie.html#setScaledSize">setScaledSize</a>() and <a href="qimagereader.html#scaledSize">QImageReader.scaledSize</a>().</p>
<h3 class="fn"><a name="setBackgroundColor" />QMovie.setBackgroundColor (<i>self</i>, <a href="qcolor.html">QColor</a> <i>color</i>)</h3><p>For image formats that support it, this function sets the
background color to <i>color</i>.</p>
<p><b>See also</b> <a href="qmovie.html#backgroundColor">backgroundColor</a>().</p>
<h3 class="fn"><a name="setCacheMode" />QMovie.setCacheMode (<i>self</i>, <a href="qmovie.html#CacheMode-enum">CacheMode</a> <i>mode</i>)</h3><h3 class="fn"><a name="setDevice" />QMovie.setDevice (<i>self</i>, <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><b>See also</b> <a href="qmovie.html#device">device</a>() and
<a href="qmovie.html#setFormat">setFormat</a>().</p>
<h3 class="fn"><a name="setFileName" />QMovie.setFileName (<i>self</i>, QString <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><b>See also</b> <a href="qmovie.html#fileName">fileName</a>(),
<a href="qmovie.html#setDevice">setDevice</a>(), and <a href="qmovie.html#setFormat">setFormat</a>().</p>
<h3 class="fn"><a name="setFormat" />QMovie.setFormat (<i>self</i>, <a href="qbytearray.html">QByteArray</a> <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><b>See also</b> <a href="qmovie.html#format">format</a>() and
<a href="qimagereader.html#supportedImageFormats">QImageReader.supportedImageFormats</a>().</p>
<h3 class="fn"><a name="setPaused" />QMovie.setPaused (<i>self</i>, bool <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
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><b>See also</b> <a class="compat" href="qmovie-qt3.html#paused">paused</a>() and <a href="qmovie.html#state">state</a>().</p>
<h3 class="fn"><a name="setScaledSize" />QMovie.setScaledSize (<i>self</i>, <a href="qsize.html">QSize</a> <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><b>See also</b> <a href="qmovie.html#scaledSize">scaledSize</a>() and <a href="qimagereader.html#setScaledSize">QImageReader.setScaledSize</a>().</p>
<h3 class="fn"><a name="setSpeed" />QMovie.setSpeed (<i>self</i>, int <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
<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><b>See also</b> <a href="qmovie.html#stop">stop</a>() and
<a href="qmovie.html#setPaused">setPaused</a>().</p>
<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>
<p><b>See also</b> <a href="qmovie.html#MovieState-enum">MovieState</a> and <a href="qmovie.html#stateChanged">stateChanged</a>().</p>
<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
<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><b>See also</b> <a href="qmovie.html#start">start</a>() and
<a href="qmovie.html#setPaused">setPaused</a>().</p>
<h3 class="fn"><a name="supportedFormats" />unknown-type QMovie.supportedFormats ()</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><b>See also</b> <a href="qimagereader.html#supportedImageFormats">QImageReader.supportedImageFormats</a>().</p>
<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
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>
<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>
<p><b>See also</b> <a href="qmovie.html#stop">QMovie.stop</a>().</p>
<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
<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>
<h3 class="fn"><a name="resized" />void resized (const ::QSize&)</h3><p>This is the default overload of this signal.</p><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>
<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
<a href="qmovie.html">QMovie</a> has entered <a href="qmovie.html#MovieState-enum">QMovie.Running</a> state.</p>
<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
changes. The new state is specified by <i>state</i>.</p>
<p><b>See also</b> <a href="qmovie.html#state">QMovie.state</a>().</p>
<h3 class="fn"><a name="updated" />void updated (const ::QRect&)</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
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>
<address><hr /><div align="center"><table border="0" cellspacing="0" width="100%"><tr class="address"><td align="left" width="25%">PyQt 4.12.1 for X11</td><td align="center" width="50%">Copyright © <a href="http://www.riverbankcomputing.com">Riverbank Computing Ltd</a> and <a href="http://www.qt.io">The Qt Company</a> 2015</td><td align="right" width="25%">Qt 4.8.7</td></tr></table></div></address></body></html>
|