[190] | 1 | <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
---|
| 2 | <!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qmovie.cpp:61 -->
|
---|
| 3 | <html>
|
---|
| 4 | <head>
|
---|
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
| 6 | <title>QMovie Class</title>
|
---|
| 7 | <style type="text/css"><!--
|
---|
| 8 | fn { margin-left: 1cm; text-indent: -1cm; }
|
---|
| 9 | a:link { color: #004faf; text-decoration: none }
|
---|
| 10 | a:visited { color: #672967; text-decoration: none }
|
---|
| 11 | body { background: #ffffff; color: black; }
|
---|
| 12 | --></style>
|
---|
| 13 | </head>
|
---|
| 14 | <body>
|
---|
| 15 |
|
---|
| 16 | <table border="0" cellpadding="0" cellspacing="0" width="100%">
|
---|
| 17 | <tr bgcolor="#E5E5E5">
|
---|
| 18 | <td valign=center>
|
---|
| 19 | <a href="index.html">
|
---|
| 20 | <font color="#004faf">Home</font></a>
|
---|
| 21 | | <a href="classes.html">
|
---|
| 22 | <font color="#004faf">All Classes</font></a>
|
---|
| 23 | | <a href="mainclasses.html">
|
---|
| 24 | <font color="#004faf">Main Classes</font></a>
|
---|
| 25 | | <a href="annotated.html">
|
---|
| 26 | <font color="#004faf">Annotated</font></a>
|
---|
| 27 | | <a href="groups.html">
|
---|
| 28 | <font color="#004faf">Grouped Classes</font></a>
|
---|
| 29 | | <a href="functions.html">
|
---|
| 30 | <font color="#004faf">Functions</font></a>
|
---|
| 31 | </td>
|
---|
| 32 | <td align="right" valign="center"><img src="logo32.png" align="right" width="64" height="32" border="0"></td></tr></table><h1 align=center>QMovie Class Reference</h1>
|
---|
| 33 |
|
---|
| 34 | <p>The QMovie class provides incremental loading of animations or images, signalling as it progresses.
|
---|
| 35 | <a href="#details">More...</a>
|
---|
| 36 | <p><tt>#include <<a href="qmovie-h.html">qmovie.h</a>></tt>
|
---|
| 37 | <p><a href="qmovie-members.html">List of all member functions.</a>
|
---|
| 38 | <h2>Public Members</h2>
|
---|
| 39 | <ul>
|
---|
| 40 | <li class=fn><a href="#QMovie"><b>QMovie</b></a> ()</li>
|
---|
| 41 | <li class=fn><a href="#QMovie-2"><b>QMovie</b></a> ( int bufsize )</li>
|
---|
| 42 | <li class=fn><a href="#QMovie-3"><b>QMovie</b></a> ( QDataSource * src, int bufsize = 1024 )</li>
|
---|
| 43 | <li class=fn><a href="#QMovie-4"><b>QMovie</b></a> ( const QString & fileName, int bufsize = 1024 )</li>
|
---|
| 44 | <li class=fn><a href="#QMovie-5"><b>QMovie</b></a> ( QByteArray data, int bufsize = 1024 )</li>
|
---|
| 45 | <li class=fn><a href="#QMovie-6"><b>QMovie</b></a> ( const QMovie & movie )</li>
|
---|
| 46 | <li class=fn><a href="#~QMovie"><b>~QMovie</b></a> ()</li>
|
---|
| 47 | <li class=fn>QMovie & <a href="#operator-eq"><b>operator=</b></a> ( const QMovie & movie )</li>
|
---|
| 48 | <li class=fn>int <a href="#pushSpace"><b>pushSpace</b></a> () const</li>
|
---|
| 49 | <li class=fn>void <a href="#pushData"><b>pushData</b></a> ( const uchar * data, int length )</li>
|
---|
| 50 | <li class=fn>const QColor & <a href="#backgroundColor"><b>backgroundColor</b></a> () const</li>
|
---|
| 51 | <li class=fn>void <a href="#setBackgroundColor"><b>setBackgroundColor</b></a> ( const QColor & c )</li>
|
---|
| 52 | <li class=fn>const QRect & <a href="#getValidRect"><b>getValidRect</b></a> () const</li>
|
---|
| 53 | <li class=fn>const QPixmap & <a href="#framePixmap"><b>framePixmap</b></a> () const</li>
|
---|
| 54 | <li class=fn>const QImage & <a href="#frameImage"><b>frameImage</b></a> () const</li>
|
---|
| 55 | <li class=fn>bool <a href="#isNull"><b>isNull</b></a> () const</li>
|
---|
| 56 | <li class=fn>int <a href="#frameNumber"><b>frameNumber</b></a> () const</li>
|
---|
| 57 | <li class=fn>int <a href="#steps"><b>steps</b></a> () const</li>
|
---|
| 58 | <li class=fn>bool <a href="#paused"><b>paused</b></a> () const</li>
|
---|
| 59 | <li class=fn>bool <a href="#finished"><b>finished</b></a> () const</li>
|
---|
| 60 | <li class=fn>bool <a href="#running"><b>running</b></a> () const</li>
|
---|
| 61 | <li class=fn>void <a href="#unpause"><b>unpause</b></a> ()</li>
|
---|
| 62 | <li class=fn>void <a href="#pause"><b>pause</b></a> ()</li>
|
---|
| 63 | <li class=fn>void <a href="#step"><b>step</b></a> ()</li>
|
---|
| 64 | <li class=fn>void <a href="#step-2"><b>step</b></a> ( int steps )</li>
|
---|
| 65 | <li class=fn>void <a href="#restart"><b>restart</b></a> ()</li>
|
---|
| 66 | <li class=fn>int <a href="#speed"><b>speed</b></a> () const</li>
|
---|
| 67 | <li class=fn>void <a href="#setSpeed"><b>setSpeed</b></a> ( int percent )</li>
|
---|
| 68 | <li class=fn>void <a href="#connectResize"><b>connectResize</b></a> ( QObject * receiver, const char * member )</li>
|
---|
| 69 | <li class=fn>void <a href="#disconnectResize"><b>disconnectResize</b></a> ( QObject * receiver, const char * member = 0 )</li>
|
---|
| 70 | <li class=fn>void <a href="#connectUpdate"><b>connectUpdate</b></a> ( QObject * receiver, const char * member )</li>
|
---|
| 71 | <li class=fn>void <a href="#disconnectUpdate"><b>disconnectUpdate</b></a> ( QObject * receiver, const char * member = 0 )</li>
|
---|
| 72 | <li class=fn>enum <a href="#Status-enum"><b>Status</b></a> { SourceEmpty = -2, UnrecognizedFormat = -1, Paused = 1, EndOfFrame = 2, EndOfLoop = 3, EndOfMovie = 4, SpeedChanged = 5 }</li>
|
---|
| 73 | <li class=fn>void <a href="#connectStatus"><b>connectStatus</b></a> ( QObject * receiver, const char * member )</li>
|
---|
| 74 | <li class=fn>void <a href="#disconnectStatus"><b>disconnectStatus</b></a> ( QObject * receiver, const char * member = 0 )</li>
|
---|
| 75 | </ul>
|
---|
| 76 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
| 77 |
|
---|
| 78 |
|
---|
| 79 | The QMovie class provides incremental loading of animations or images, signalling as it progresses.
|
---|
| 80 | <p>
|
---|
| 81 |
|
---|
| 82 |
|
---|
| 83 |
|
---|
| 84 | <p> The simplest way to display a QMovie is to use a <a href="qlabel.html">QLabel</a> and
|
---|
| 85 | <a href="qlabel.html#setMovie">QLabel::setMovie</a>().
|
---|
| 86 | <p> A QMovie provides a <a href="qpixmap.html">QPixmap</a> as the <a href="#framePixmap">framePixmap</a>(); connections can
|
---|
| 87 | be made via <a href="#connectResize">connectResize</a>() and <a href="#connectUpdate">connectUpdate</a>() to receive
|
---|
| 88 | notification of size and pixmap changes. All decoding is driven
|
---|
| 89 | by the normal event-processing mechanisms.
|
---|
| 90 | <p> The movie begins playing as soon as the QMovie is created
|
---|
| 91 | (actually, once control returns to the event loop). When the last
|
---|
| 92 | frame in the movie has been played, it may loop back to the start
|
---|
| 93 | if such looping is defined in the input source.
|
---|
| 94 | <p> QMovie objects are <a href="shclass.html#explicitly-shared">explicitly shared</a>. This means that a QMovie
|
---|
| 95 | copied from another QMovie will be displaying the same frame at
|
---|
| 96 | all times. If one shared movie pauses, all pause. To make <em>independent</em> movies, they must be constructed separately.
|
---|
| 97 | <p> The set of data formats supported by QMovie is determined by the
|
---|
| 98 | decoder factories that have been installed; the format of the
|
---|
| 99 | input is determined as the input is decoded.
|
---|
| 100 | <p> The supported formats are MNG (if Qt is configured with MNG
|
---|
| 101 | support enabled) and GIF (if Qt is configured with GIF support
|
---|
| 102 | enabled, see qgif.h).
|
---|
| 103 | <p> If Qt is configured to support GIF reading, we are required to
|
---|
| 104 | state that "The Graphics Interchange Format(c) is the Copyright
|
---|
| 105 | property of CompuServe Incorporated. GIF(sm) is a Service Mark
|
---|
| 106 | property of CompuServe Incorporated.
|
---|
| 107 | <p> <b>Warning:</b> If you are in a country that recognizes software patents
|
---|
| 108 | and in which Unisys holds a patent on LZW compression and/or
|
---|
| 109 | decompression and you want to use GIF, Unisys may require you to
|
---|
| 110 | license that technology. Such countries include Canada, Japan,
|
---|
| 111 | the USA, France, Germany, Italy and the UK.
|
---|
| 112 | <p> GIF support may be removed completely in a future version of Qt.
|
---|
| 113 | We recommend using the MNG or PNG format.
|
---|
| 114 | <p> <center><img src="qmovie.png" alt="QMovie"></center>
|
---|
| 115 | <p> <p>See also <a href="qlabel.html#setMovie">QLabel::setMovie</a>(), <a href="graphics.html">Graphics Classes</a>, <a href="images.html">Image Processing Classes</a>, and <a href="multimedia.html">Multimedia Classes</a>.
|
---|
| 116 |
|
---|
| 117 | <hr><h2>Member Type Documentation</h2>
|
---|
| 118 | <h3 class=fn><a name="Status-enum"></a>QMovie::Status</h3>
|
---|
| 119 |
|
---|
| 120 | <ul>
|
---|
| 121 | <li><tt>QMovie::SourceEmpty</tt>
|
---|
| 122 | <li><tt>QMovie::UnrecognizedFormat</tt>
|
---|
| 123 | <li><tt>QMovie::Paused</tt>
|
---|
| 124 | <li><tt>QMovie::EndOfFrame</tt>
|
---|
| 125 | <li><tt>QMovie::EndOfLoop</tt>
|
---|
| 126 | <li><tt>QMovie::EndOfMovie</tt>
|
---|
| 127 | <li><tt>QMovie::SpeedChanged</tt>
|
---|
| 128 | </ul>
|
---|
| 129 | <hr><h2>Member Function Documentation</h2>
|
---|
| 130 | <h3 class=fn><a name="QMovie"></a>QMovie::QMovie ()
|
---|
| 131 | </h3>
|
---|
| 132 | Constructs a null QMovie. The only interesting thing to do with
|
---|
| 133 | such a movie is to assign another movie to it.
|
---|
| 134 | <p> <p>See also <a href="#isNull">isNull</a>().
|
---|
| 135 |
|
---|
| 136 | <h3 class=fn><a name="QMovie-2"></a>QMovie::QMovie ( int bufsize )
|
---|
| 137 | </h3>
|
---|
| 138 | Constructs a QMovie with an external data source. You should later
|
---|
| 139 | call <a href="#pushData">pushData</a>() to send incoming animation data to the movie.
|
---|
| 140 | <p> The <em>bufsize</em> argument sets the maximum amount of data the movie
|
---|
| 141 | will transfer from the data source per event loop. The lower this
|
---|
| 142 | value, the better interleaved the movie playback will be with
|
---|
| 143 | other event processing, but the slower the overall processing will
|
---|
| 144 | be.
|
---|
| 145 | <p> <p>See also <a href="#pushData">pushData</a>().
|
---|
| 146 |
|
---|
| 147 | <h3 class=fn><a name="QMovie-3"></a>QMovie::QMovie ( <a href="qdatasource.html">QDataSource</a> * src, int bufsize = 1024 )
|
---|
| 148 | </h3>
|
---|
| 149 | Constructs a QMovie that reads an image sequence from the given
|
---|
| 150 | data source, <em>src</em>. The source must be allocated dynamically,
|
---|
| 151 | because QMovie will take ownership of it and will destroy it when
|
---|
| 152 | the movie is destroyed. The movie starts playing as soon as event
|
---|
| 153 | processing continues.
|
---|
| 154 | <p> The <em>bufsize</em> argument sets the maximum amount of data the movie
|
---|
| 155 | will transfer from the data source per event loop. The lower this
|
---|
| 156 | value, the better interleaved the movie playback will be with
|
---|
| 157 | other event processing, but the slower the overall processing will
|
---|
| 158 | be.
|
---|
| 159 |
|
---|
| 160 | <h3 class=fn><a name="QMovie-4"></a>QMovie::QMovie ( const <a href="qstring.html">QString</a> & fileName, int bufsize = 1024 )
|
---|
| 161 | </h3>
|
---|
| 162 | Constructs a QMovie that reads an image sequence from the file, <em>fileName</em>.
|
---|
| 163 | <p> The <em>bufsize</em> argument sets the maximum amount of data the movie
|
---|
| 164 | will transfer from the data source per event loop. The lower this
|
---|
| 165 | value, the better interleaved the movie playback will be with
|
---|
| 166 | other event processing, but the slower the overall processing will
|
---|
| 167 | be.
|
---|
| 168 |
|
---|
| 169 | <h3 class=fn><a name="QMovie-5"></a>QMovie::QMovie ( <a href="qbytearray.html">QByteArray</a> data, int bufsize = 1024 )
|
---|
| 170 | </h3>
|
---|
| 171 | Constructs a QMovie that reads an image sequence from the byte
|
---|
| 172 | array, <em>data</em>.
|
---|
| 173 | <p> The <em>bufsize</em> argument sets the maximum amount of data the movie
|
---|
| 174 | will transfer from the data source per event loop. The lower this
|
---|
| 175 | value, the better interleaved the movie playback will be with
|
---|
| 176 | other event processing, but the slower the overall processing will
|
---|
| 177 | be.
|
---|
| 178 |
|
---|
| 179 | <h3 class=fn><a name="QMovie-6"></a>QMovie::QMovie ( const <a href="qmovie.html">QMovie</a> & movie )
|
---|
| 180 | </h3>
|
---|
| 181 | Constructs a movie that uses the same data as movie <em>movie</em>.
|
---|
| 182 | QMovies use <a href="shclass.html#explicit-sharing">explicit sharing</a>, so operations on the copy will
|
---|
| 183 | affect both.
|
---|
| 184 |
|
---|
| 185 | <h3 class=fn><a name="~QMovie"></a>QMovie::~QMovie ()
|
---|
| 186 | </h3>
|
---|
| 187 | Destroys the QMovie. If this is the last reference to the data of
|
---|
| 188 | the movie, the data is deallocated.
|
---|
| 189 |
|
---|
| 190 | <h3 class=fn>const <a href="qcolor.html">QColor</a> & <a name="backgroundColor"></a>QMovie::backgroundColor () const
|
---|
| 191 | </h3>
|
---|
| 192 | Returns the background color of the movie set by
|
---|
| 193 | <a href="#setBackgroundColor">setBackgroundColor</a>().
|
---|
| 194 |
|
---|
| 195 | <h3 class=fn>void <a name="connectResize"></a>QMovie::connectResize ( <a href="qobject.html">QObject</a> * receiver, const char * member )
|
---|
| 196 | </h3>
|
---|
| 197 | Connects the <em>receiver</em>'s <em>member</em> of type <tt>void member(const QSize&)</tt> so that it is signalled when the movie changes size.
|
---|
| 198 | <p> Note that due to the <a href="shclass.html#explicit-sharing">explicit sharing</a> of QMovie objects, these
|
---|
| 199 | connections persist until they are explicitly disconnected with
|
---|
| 200 | <a href="#disconnectResize">disconnectResize</a>() or until <em>every</em> shared copy of the movie is
|
---|
| 201 | deleted.
|
---|
| 202 |
|
---|
| 203 | <p>Example: <a href="movies-example.html#x498">movies/main.cpp</a>.
|
---|
| 204 | <h3 class=fn>void <a name="connectStatus"></a>QMovie::connectStatus ( <a href="qobject.html">QObject</a> * receiver, const char * member )
|
---|
| 205 | </h3>
|
---|
| 206 | Connects the <em>receiver</em>'s <em>member</em>, of type <tt>void member(int)</tt> so that it is signalled when the movie changes
|
---|
| 207 | status. The status codes are negative for errors and positive for
|
---|
| 208 | information.
|
---|
| 209 | <p> <center><table cellpadding="4" cellspacing="2" border="0">
|
---|
| 210 | <tr bgcolor="#a2c511"> <th valign="top">Status Code <th valign="top">Meaning
|
---|
| 211 | <tr bgcolor="#f0f0f0"> <td valign="top">QMovie::SourceEmpty
|
---|
| 212 | <td valign="top">signalled if the input cannot be read.
|
---|
| 213 | <tr bgcolor="#d0d0d0"> <td valign="top">QMovie::UnrecognizedFormat
|
---|
| 214 | <td valign="top">signalled if the input data is unrecognized.
|
---|
| 215 | <tr bgcolor="#f0f0f0"> <td valign="top">QMovie::Paused
|
---|
| 216 | <td valign="top">signalled when the movie is paused by a call to <a href="#paused">paused</a>()
|
---|
| 217 | or by after <a href="#step">stepping</a> pauses.
|
---|
| 218 | <tr bgcolor="#d0d0d0"> <td valign="top">QMovie::EndOfFrame
|
---|
| 219 | <td valign="top">signalled at end-of-frame after any update and Paused signals.
|
---|
| 220 | <tr bgcolor="#f0f0f0"> <td valign="top">QMovie::EndOfLoop
|
---|
| 221 | <td valign="top">signalled at end-of-loop, after any update signals,
|
---|
| 222 | EndOfFrame - but before EndOfMovie.
|
---|
| 223 | <tr bgcolor="#d0d0d0"> <td valign="top">QMovie::EndOfMovie
|
---|
| 224 | <td valign="top">signalled when the movie completes and is not about to loop.
|
---|
| 225 | </table></center>
|
---|
| 226 | <p> More status messages may be added in the future, so a general test
|
---|
| 227 | for errors would test for negative.
|
---|
| 228 | <p> Note that due to the <a href="shclass.html#explicit-sharing">explicit sharing</a> of QMovie objects, these
|
---|
| 229 | connections persist until they are explicitly disconnected with
|
---|
| 230 | <a href="#disconnectStatus">disconnectStatus</a>() or until <em>every</em> shared copy of the movie is
|
---|
| 231 | deleted.
|
---|
| 232 |
|
---|
| 233 | <p>Example: <a href="movies-example.html#x499">movies/main.cpp</a>.
|
---|
| 234 | <h3 class=fn>void <a name="connectUpdate"></a>QMovie::connectUpdate ( <a href="qobject.html">QObject</a> * receiver, const char * member )
|
---|
| 235 | </h3>
|
---|
| 236 | Connects the <em>receiver</em>'s <em>member</em> of type <tt>void member(const QRect&)</tt> so that it is signalled when an area of the <a href="#framePixmap">framePixmap</a>()
|
---|
| 237 | has changed since the previous frame.
|
---|
| 238 | <p> Note that due to the <a href="shclass.html#explicit-sharing">explicit sharing</a> of QMovie objects, these
|
---|
| 239 | connections persist until they are explicitly disconnected with
|
---|
| 240 | <a href="#disconnectUpdate">disconnectUpdate</a>() or until <em>every</em> shared copy of the movie is
|
---|
| 241 | deleted.
|
---|
| 242 |
|
---|
| 243 | <p>Example: <a href="movies-example.html#x500">movies/main.cpp</a>.
|
---|
| 244 | <h3 class=fn>void <a name="disconnectResize"></a>QMovie::disconnectResize ( <a href="qobject.html">QObject</a> * receiver, const char * member = 0 )
|
---|
| 245 | </h3>
|
---|
| 246 | Disconnects the <em>receiver</em>'s <em>member</em> (or all members if <em>member</em> is zero) that were previously connected by <a href="#connectResize">connectResize</a>().
|
---|
| 247 |
|
---|
| 248 | <h3 class=fn>void <a name="disconnectStatus"></a>QMovie::disconnectStatus ( <a href="qobject.html">QObject</a> * receiver, const char * member = 0 )
|
---|
| 249 | </h3>
|
---|
| 250 | Disconnects the <em>receiver</em>'s <em>member</em> (or all members if <em>member</em> is zero) that were previously connected by <a href="#connectStatus">connectStatus</a>().
|
---|
| 251 |
|
---|
| 252 | <h3 class=fn>void <a name="disconnectUpdate"></a>QMovie::disconnectUpdate ( <a href="qobject.html">QObject</a> * receiver, const char * member = 0 )
|
---|
| 253 | </h3>
|
---|
| 254 | Disconnects the <em>receiver</em>'s <em>member</em> (or all members if \q
|
---|
| 255 | member is zero) that were previously connected by <a href="#connectUpdate">connectUpdate</a>().
|
---|
| 256 |
|
---|
| 257 | <h3 class=fn>bool <a name="finished"></a>QMovie::finished () const
|
---|
| 258 | </h3>
|
---|
| 259 | Returns TRUE if the image is no longer playing: this happens when
|
---|
| 260 | all loops of all frames are complete; otherwise returns FALSE.
|
---|
| 261 |
|
---|
| 262 | <p>Example: <a href="movies-example.html#x501">movies/main.cpp</a>.
|
---|
| 263 | <h3 class=fn>const <a href="qimage.html">QImage</a> & <a name="frameImage"></a>QMovie::frameImage () const
|
---|
| 264 | </h3>
|
---|
| 265 | Returns the current frame of the movie, as a <a href="qimage.html">QImage</a>. It is not
|
---|
| 266 | generally useful to keep a copy of this image. Also note that you
|
---|
| 267 | must not call this function if the movie is <a href="#finished">finished</a>(), since by
|
---|
| 268 | then the image will not be available.
|
---|
| 269 | <p> <p>See also <a href="#framePixmap">framePixmap</a>().
|
---|
| 270 |
|
---|
| 271 | <h3 class=fn>int <a name="frameNumber"></a>QMovie::frameNumber () const
|
---|
| 272 | </h3>
|
---|
| 273 | Returns the number of times EndOfFrame has been emitted since the
|
---|
| 274 | start of the current loop of the movie. Thus, before any
|
---|
| 275 | EndOfFrame has been emitted the value will be 0; within slots
|
---|
| 276 | processing the first signal, <a href="#frameNumber">frameNumber</a>() will be 1, and so on.
|
---|
| 277 |
|
---|
| 278 | <h3 class=fn>const <a href="qpixmap.html">QPixmap</a> & <a name="framePixmap"></a>QMovie::framePixmap () const
|
---|
| 279 | </h3>
|
---|
| 280 | Returns the current frame of the movie, as a <a href="qpixmap.html">QPixmap</a>. It is not
|
---|
| 281 | generally useful to keep a copy of this pixmap. It is better to
|
---|
| 282 | keep a copy of the QMovie and get the <a href="#framePixmap">framePixmap</a>() only when
|
---|
| 283 | needed for drawing.
|
---|
| 284 | <p> <p>See also <a href="#frameImage">frameImage</a>().
|
---|
| 285 |
|
---|
| 286 | <p>Example: <a href="movies-example.html#x502">movies/main.cpp</a>.
|
---|
| 287 | <h3 class=fn>const <a href="qrect.html">QRect</a> & <a name="getValidRect"></a>QMovie::getValidRect () const
|
---|
| 288 | </h3>
|
---|
| 289 | Returns the area of the pixmap for which pixels have been
|
---|
| 290 | generated.
|
---|
| 291 |
|
---|
| 292 | <h3 class=fn>bool <a name="isNull"></a>QMovie::isNull () const
|
---|
| 293 | </h3>
|
---|
| 294 | Returns TRUE if the movie is null; otherwise returns FALSE.
|
---|
| 295 |
|
---|
| 296 | <h3 class=fn><a href="qmovie.html">QMovie</a> & <a name="operator-eq"></a>QMovie::operator= ( const <a href="qmovie.html">QMovie</a> & movie )
|
---|
| 297 | </h3>
|
---|
| 298 | Makes this movie use the same data as movie <em>movie</em>. QMovies use
|
---|
| 299 | <a href="shclass.html#explicit-sharing">explicit sharing</a>.
|
---|
| 300 |
|
---|
| 301 | <h3 class=fn>void <a name="pause"></a>QMovie::pause ()
|
---|
| 302 | </h3>
|
---|
| 303 | Pauses the progress of the animation.
|
---|
| 304 | <p> <p>See also <a href="#unpause">unpause</a>().
|
---|
| 305 |
|
---|
| 306 | <p>Example: <a href="movies-example.html#x503">movies/main.cpp</a>.
|
---|
| 307 | <h3 class=fn>bool <a name="paused"></a>QMovie::paused () const
|
---|
| 308 | </h3>
|
---|
| 309 | Returns TRUE if the image is paused; otherwise returns FALSE.
|
---|
| 310 |
|
---|
| 311 | <p>Example: <a href="movies-example.html#x504">movies/main.cpp</a>.
|
---|
| 312 | <h3 class=fn>void <a name="pushData"></a>QMovie::pushData ( const uchar * data, int length )
|
---|
| 313 | </h3>
|
---|
| 314 | Pushes <em>length</em> bytes from <em>data</em> into the movie. <em>length</em> must
|
---|
| 315 | be no more than the amount returned by <a href="#pushSpace">pushSpace</a>() since the
|
---|
| 316 | previous call to <a href="#pushData">pushData</a>().
|
---|
| 317 |
|
---|
| 318 | <h3 class=fn>int <a name="pushSpace"></a>QMovie::pushSpace () const
|
---|
| 319 | </h3>
|
---|
| 320 | Returns the maximum amount of data that can currently be pushed
|
---|
| 321 | into the movie by a call to <a href="#pushData">pushData</a>(). This is affected by the
|
---|
| 322 | initial buffer size, but varies as the movie plays and data is
|
---|
| 323 | consumed.
|
---|
| 324 |
|
---|
| 325 | <h3 class=fn>void <a name="restart"></a>QMovie::restart ()
|
---|
| 326 | </h3>
|
---|
| 327 | Rewinds the movie to the beginning. If the movie has not been
|
---|
| 328 | paused, it begins playing again.
|
---|
| 329 |
|
---|
| 330 | <p>Example: <a href="movies-example.html#x505">movies/main.cpp</a>.
|
---|
| 331 | <h3 class=fn>bool <a name="running"></a>QMovie::running () const
|
---|
| 332 | </h3>
|
---|
| 333 | Returns TRUE if the image is not single-stepping, not paused, and
|
---|
| 334 | not finished; otherwise returns FALSE.
|
---|
| 335 |
|
---|
| 336 | <h3 class=fn>void <a name="setBackgroundColor"></a>QMovie::setBackgroundColor ( const <a href="qcolor.html">QColor</a> & c )
|
---|
| 337 | </h3>
|
---|
| 338 | Sets the background color of the pixmap to <em>c</em>. If the background
|
---|
| 339 | color isValid(), the pixmap will never have a mask because the
|
---|
| 340 | background color will be used in transparent regions of the image.
|
---|
| 341 | <p> <p>See also <a href="#backgroundColor">backgroundColor</a>().
|
---|
| 342 |
|
---|
| 343 | <h3 class=fn>void <a name="setSpeed"></a>QMovie::setSpeed ( int percent )
|
---|
| 344 | </h3>
|
---|
| 345 | Sets the movie's play speed as a percentage, to <em>percent</em>. This
|
---|
| 346 | is a percentage of the speed dictated by the input data format.
|
---|
| 347 | The default is 100 percent.
|
---|
| 348 |
|
---|
| 349 | <h3 class=fn>int <a name="speed"></a>QMovie::speed () const
|
---|
| 350 | </h3>
|
---|
| 351 | Returns the movie's play speed as a percentage. The default is 100
|
---|
| 352 | percent.
|
---|
| 353 | <p> <p>See also <a href="#setSpeed">setSpeed</a>().
|
---|
| 354 |
|
---|
| 355 | <h3 class=fn>void <a name="step"></a>QMovie::step ()
|
---|
| 356 | </h3>
|
---|
| 357 | Steps forward 1 frame and then pauses.
|
---|
| 358 |
|
---|
| 359 | <p>Example: <a href="movies-example.html#x506">movies/main.cpp</a>.
|
---|
| 360 | <h3 class=fn>void <a name="step-2"></a>QMovie::step ( int steps )
|
---|
| 361 | </h3>
|
---|
| 362 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
| 363 | <p> Steps forward, showing <em>steps</em> frames, and then pauses.
|
---|
| 364 |
|
---|
| 365 | <h3 class=fn>int <a name="steps"></a>QMovie::steps () const
|
---|
| 366 | </h3>
|
---|
| 367 | Returns the number of steps remaining after a call to <a href="#step">step</a>(). If
|
---|
| 368 | the movie is paused, <a href="#steps">steps</a>() returns 0. If it's running normally
|
---|
| 369 | or is finished, steps() returns a negative number.
|
---|
| 370 |
|
---|
| 371 | <p>Example: <a href="movies-example.html#x507">movies/main.cpp</a>.
|
---|
| 372 | <h3 class=fn>void <a name="unpause"></a>QMovie::unpause ()
|
---|
| 373 | </h3>
|
---|
| 374 | Unpauses the progress of the animation.
|
---|
| 375 | <p> <p>See also <a href="#pause">pause</a>().
|
---|
| 376 |
|
---|
| 377 | <p>Example: <a href="movies-example.html#x508">movies/main.cpp</a>.
|
---|
| 378 | <!-- eof -->
|
---|
| 379 | <hr><p>
|
---|
| 380 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
| 381 | Copyright © 1995-2007
|
---|
| 382 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
| 383 | <table width=100% cellspacing=0 border=0><tr>
|
---|
| 384 | <td>Copyright © 2007
|
---|
| 385 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
| 386 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
| 387 | </table></div></address></body>
|
---|
| 388 | </html>
|
---|