qmovie.html

来自「QT 下载资料仅供参考」· HTML 代码 · 共 389 行 · 第 1/2 页

HTML
389
字号
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><!-- /home/reggie/tmp/qt-3.0-reggie-5401/qt-x11-commercial-3.0.5/src/kernel/qmovie.cpp:61 --><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>QMovie Class</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: #ffffff; color: black; }--></style></head><body><table border="0" cellpadding="0" cellspacing="0" width="100%"><tr bgcolor="#E5E5E5"><td valign=center> <a href="index.html"><font color="#004faf">Home</font></a> | <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a> | <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a> | <a href="annotated.html"><font color="#004faf">Annotated</font></a> | <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a> | <a href="functions.html"><font color="#004faf">Functions</font></a></td><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><p>The QMovie class provides incremental loading of animations or images, signalling as it progresses.<a href="#details">More...</a><p><tt>#include &lt;<a href="qmovie-h.html">qmovie.h</a>&gt;</tt><p><a href="qmovie-members.html">List of all member functions.</a><h2>Public Members</h2><ul><li><div class=fn><a href="#QMovie"><b>QMovie</b></a> ()</div></li><li><div class=fn><a href="#QMovie-2"><b>QMovie</b></a> ( int&nbsp;bufsize )</div></li><li><div class=fn><a href="#QMovie-3"><b>QMovie</b></a> ( QDataSource&nbsp;*&nbsp;src, int&nbsp;bufsize = 1024 )</div></li><li><div class=fn><a href="#QMovie-4"><b>QMovie</b></a> ( const&nbsp;QString&nbsp;&amp;&nbsp;fileName, int&nbsp;bufsize = 1024 )</div></li><li><div class=fn><a href="#QMovie-5"><b>QMovie</b></a> ( QByteArray&nbsp;data, int&nbsp;bufsize = 1024 )</div></li><li><div class=fn><a href="#QMovie-6"><b>QMovie</b></a> ( const&nbsp;QMovie&nbsp;&amp;&nbsp;movie )</div></li><li><div class=fn><a href="#~QMovie"><b>~QMovie</b></a> ()</div></li><li><div class=fn>QMovie &amp; <a href="#operator-eq"><b>operator=</b></a> ( const&nbsp;QMovie&nbsp;&amp;&nbsp;movie )</div></li><li><div class=fn>int <a href="#pushSpace"><b>pushSpace</b></a> () const</div></li><li><div class=fn>void <a href="#pushData"><b>pushData</b></a> ( const&nbsp;uchar&nbsp;*&nbsp;data, int&nbsp;length )</div></li><li><div class=fn>const QColor &amp; <a href="#backgroundColor"><b>backgroundColor</b></a> () const</div></li><li><div class=fn>void <a href="#setBackgroundColor"><b>setBackgroundColor</b></a> ( const&nbsp;QColor&nbsp;&amp;&nbsp;c )</div></li><li><div class=fn>const QRect &amp; <a href="#getValidRect"><b>getValidRect</b></a> () const</div></li><li><div class=fn>const QPixmap &amp; <a href="#framePixmap"><b>framePixmap</b></a> () const</div></li><li><div class=fn>const QImage &amp; <a href="#frameImage"><b>frameImage</b></a> () const</div></li><li><div class=fn>bool <a href="#isNull"><b>isNull</b></a> () const</div></li><li><div class=fn>int <a href="#frameNumber"><b>frameNumber</b></a> () const</div></li><li><div class=fn>int <a href="#steps"><b>steps</b></a> () const</div></li><li><div class=fn>bool <a href="#paused"><b>paused</b></a> () const</div></li><li><div class=fn>bool <a href="#finished"><b>finished</b></a> () const</div></li><li><div class=fn>bool <a href="#running"><b>running</b></a> () const</div></li><li><div class=fn>void <a href="#unpause"><b>unpause</b></a> ()</div></li><li><div class=fn>void <a href="#pause"><b>pause</b></a> ()</div></li><li><div class=fn>void <a href="#step"><b>step</b></a> ()</div></li><li><div class=fn>void <a href="#step-2"><b>step</b></a> ( int&nbsp;steps )</div></li><li><div class=fn>void <a href="#restart"><b>restart</b></a> ()</div></li><li><div class=fn>int <a href="#speed"><b>speed</b></a> () const</div></li><li><div class=fn>void <a href="#setSpeed"><b>setSpeed</b></a> ( int&nbsp;percent )</div></li><li><div class=fn>void <a href="#connectResize"><b>connectResize</b></a> ( QObject&nbsp;*&nbsp;receiver, const&nbsp;char&nbsp;*&nbsp;member )</div></li><li><div class=fn>void <a href="#disconnectResize"><b>disconnectResize</b></a> ( QObject&nbsp;*&nbsp;receiver, const&nbsp;char&nbsp;*&nbsp;member = 0 )</div></li><li><div class=fn>void <a href="#connectUpdate"><b>connectUpdate</b></a> ( QObject&nbsp;*&nbsp;receiver, const&nbsp;char&nbsp;*&nbsp;member )</div></li><li><div class=fn>void <a href="#disconnectUpdate"><b>disconnectUpdate</b></a> ( QObject&nbsp;*&nbsp;receiver, const&nbsp;char&nbsp;*&nbsp;member = 0 )</div></li><li><div 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 }</div></li><li><div class=fn>void <a href="#connectStatus"><b>connectStatus</b></a> ( QObject&nbsp;*&nbsp;receiver, const&nbsp;char&nbsp;*&nbsp;member )</div></li><li><div class=fn>void <a href="#disconnectStatus"><b>disconnectStatus</b></a> ( QObject&nbsp;*&nbsp;receiver, const&nbsp;char&nbsp;*&nbsp;member = 0 )</div></li></ul><hr><a name="details"></a><h2>Detailed Description</h2>The QMovie class provides incremental loading of animations or images, signalling as it progresses.<p> <p> The simplest way to display a QMovie is to use a <a href="qlabel.html">QLabel</a> and<a href="qlabel.html#setMovie">QLabel::setMovie</a>().<p> A QMovie provides a <a href="qpixmap.html">QPixmap</a> as the <a href="#framePixmap">framePixmap</a>(); connections canbe made via <a href="#connectResize">connectResize</a>() and <a href="#connectUpdate">connectUpdate</a>() to receivenotification of size and pixmap changes. All decoding is drivenby the normal event-processing mechanisms.<p> The movie begins playing as soon as the QMovie is created(actually, once control returns to the event loop). When the lastframe in the movie has been played, it may loop back to the startif such looping is defined in the input source.<p> QMovie objects are <a href="shclass.html#explicitly-shared">explicitly shared</a>. This means that a QMoviecopied from another QMovie will be displaying the same frame atall times. If one shared movie pauses, all pause. To make <em>independent</em> movies, they must be constructed separately.<p> The set of data formats supported by QMovie is determined by thedecoder factories that have been installed; the format of theinput is determined as the input is decoded.<p> The supported formats are MNG (if Qt is configured with MNGsupport enabled) and GIF (if Qt is configured with GIF supportenabled, see qgif.h).<p> If Qt is configured to support GIF reading, we are required tostate that "The Graphics Interchange Format(c) is the Copyrightproperty of CompuServe Incorporated. GIF(sm) is a Service Markproperty of CompuServe Incorporated.<p> <b>Warning:</b> If you are in a country that recognizes software patentsand in which Unisys holds a patent on LZW compression and/ordecompression and you want to use GIF, Unisys may require you tolicense that technology. Such countries include Canada, Japan,the USA, France, Germany, Italy and the UK.<p> GIF support may be removed completely in a future version of Qt.We recommend using the MNG or PNG format.<p> <center><img src="qmovie.png" alt="QMovie"></center> <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>.<hr><h2>Member Type Documentation</h2><h3 class=fn><a name="Status-enum"></a>QMovie::Status</h3><ul><li><tt>QMovie::SourceEmpty</tt><li><tt>QMovie::UnrecognizedFormat</tt><li><tt>QMovie::Paused</tt><li><tt>QMovie::EndOfFrame</tt><li><tt>QMovie::EndOfLoop</tt><li><tt>QMovie::EndOfMovie</tt><li><tt>QMovie::SpeedChanged</tt></ul><hr><h2>Member Function Documentation</h2><h3 class=fn><a name="QMovie"></a>QMovie::QMovie ()</h3>Constructs a null QMovie. The only interesting thing to do withsuch a movie is to assign another movie to it.<p> <p>See also <a href="#isNull">isNull</a>().<h3 class=fn><a name="QMovie-2"></a>QMovie::QMovie ( int&nbsp;bufsize )</h3>Constructs a QMovie with an external data source. You should latercall <a href="#pushData">pushData</a>() to send incoming animation data to the movie.<p> The <em>bufsize</em> argument sets the maximum amount of data the moviewill transfer from the data source per event loop. The lower thisvalue, the better interleaved the movie playback will be withother event processing, but the slower the overall processing willbe.<p> <p>See also <a href="#pushData">pushData</a>().<h3 class=fn><a name="QMovie-3"></a>QMovie::QMovie ( <a href="qdatasource.html">QDataSource</a>&nbsp;*&nbsp;src, int&nbsp;bufsize = 1024 )</h3>Constructs a QMovie that reads an image sequence from the givendata source, <em>src</em>. The source must be allocated dynamically,because QMovie will take ownership of it and will destroy it whenthe movie is destroyed. The movie starts playing as soon as eventprocessing continues.<p> The <em>bufsize</em> argument sets the maximum amount of data the moviewill transfer from the data source per event loop. The lower thisvalue, the better interleaved the movie playback will be withother event processing, but the slower the overall processing willbe.<h3 class=fn><a name="QMovie-4"></a>QMovie::QMovie ( const&nbsp;<a href="qstring.html">QString</a>&nbsp;&amp;&nbsp;fileName, int&nbsp;bufsize = 1024 )</h3>Constructs a QMovie that reads an image sequence from the file, <em>fileName</em>.<p> The <em>bufsize</em> argument sets the maximum amount of data the moviewill transfer from the data source per event loop. The lower thisvalue, the better interleaved the movie playback will be withother event processing, but the slower the overall processing willbe.<h3 class=fn><a name="QMovie-5"></a>QMovie::QMovie ( <a href="qbytearray.html">QByteArray</a>&nbsp;data, int&nbsp;bufsize = 1024 )</h3>Constructs a QMovie that reads an image sequence from the bytearray, <em>data</em>.<p> The <em>bufsize</em> argument sets the maximum amount of data the moviewill transfer from the data source per event loop. The lower thisvalue, the better interleaved the movie playback will be withother event processing, but the slower the overall processing willbe.<h3 class=fn><a name="QMovie-6"></a>QMovie::QMovie ( const&nbsp;<a href="qmovie.html">QMovie</a>&nbsp;&amp;&nbsp;movie )</h3>Constructs a movie that uses the same data as movie <em>movie</em>.QMovies use <a href="shclass.html#explicit-sharing">explicit sharing</a>, so operations on the copy willaffect both.<h3 class=fn><a name="~QMovie"></a>QMovie::~QMovie ()</h3>Destroys the QMovie. If this is the last reference to the data ofthe movie, the data is deallocated.<h3 class=fn>const&nbsp;<a href="qcolor.html">QColor</a>&nbsp;&amp; <a name="backgroundColor"></a>QMovie::backgroundColor () const</h3>Returns the background color of the movie set by<a href="#setBackgroundColor">setBackgroundColor</a>().<h3 class=fn>void <a name="connectResize"></a>QMovie::connectResize ( <a href="qobject.html">QObject</a>&nbsp;*&nbsp;receiver, const&nbsp;char&nbsp;*&nbsp;member )

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?