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/qasyncimageio.cpp:51 -->
|
---|
3 | <html>
|
---|
4 | <head>
|
---|
5 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
6 | <title>QImageConsumer 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>QImageConsumer Class Reference</h1>
|
---|
33 |
|
---|
34 | <p>The QImageConsumer class is an abstraction used by QImageDecoder.
|
---|
35 | <a href="#details">More...</a>
|
---|
36 | <p><tt>#include <<a href="qasyncimageio-h.html">qasyncimageio.h</a>></tt>
|
---|
37 | <p><a href="qimageconsumer-members.html">List of all member functions.</a>
|
---|
38 | <h2>Public Members</h2>
|
---|
39 | <ul>
|
---|
40 | <li class=fn>virtual void <a href="#end"><b>end</b></a> () = 0</li>
|
---|
41 | <li class=fn>virtual void <a href="#changed"><b>changed</b></a> ( const QRect & ) = 0</li>
|
---|
42 | <li class=fn>virtual void <a href="#frameDone"><b>frameDone</b></a> () = 0</li>
|
---|
43 | <li class=fn>virtual void <a href="#frameDone-2"><b>frameDone</b></a> ( const QPoint & offset, const QRect & rect ) = 0</li>
|
---|
44 | <li class=fn>virtual void <a href="#setLooping"><b>setLooping</b></a> ( int n ) = 0</li>
|
---|
45 | <li class=fn>virtual void <a href="#setFramePeriod"><b>setFramePeriod</b></a> ( int milliseconds ) = 0</li>
|
---|
46 | <li class=fn>virtual void <a href="#setSize"><b>setSize</b></a> ( int, int ) = 0</li>
|
---|
47 | </ul>
|
---|
48 | <hr><a name="details"></a><h2>Detailed Description</h2>
|
---|
49 |
|
---|
50 |
|
---|
51 | The QImageConsumer class is an abstraction used by <a href="qimagedecoder.html">QImageDecoder</a>.
|
---|
52 | <p>
|
---|
53 |
|
---|
54 |
|
---|
55 | <p> The <a href="qmovie.html">QMovie</a> class, or <a href="qlabel.html#setMovie">QLabel::setMovie</a>(), are easy to use and for
|
---|
56 | most situations do what you want with regards animated images.
|
---|
57 | <p> A QImageConsumer consumes information about changes to the <a href="qimage.html">QImage</a>
|
---|
58 | maintained by a QImageDecoder. Think of the QImage as the model or
|
---|
59 | source of the image data, with the QImageConsumer as a view of
|
---|
60 | that data and the QImageDecoder being the controller that
|
---|
61 | orchestrates the relationship between the model and the view.
|
---|
62 | <p> You'd use the QImageConsumer class, for example, if you were
|
---|
63 | implementing a web browser with your own image loaders.
|
---|
64 | <p> <p>See also <a href="qimagedecoder.html">QImageDecoder</a>, <a href="graphics.html">Graphics Classes</a>, <a href="images.html">Image Processing Classes</a>, and <a href="multimedia.html">Multimedia Classes</a>.
|
---|
65 |
|
---|
66 | <hr><h2>Member Function Documentation</h2>
|
---|
67 | <h3 class=fn>void <a name="changed"></a>QImageConsumer::changed ( const <a href="qrect.html">QRect</a> & )<tt> [pure virtual]</tt>
|
---|
68 | </h3>
|
---|
69 |
|
---|
70 | <p> Called when the given area of the image has changed.
|
---|
71 |
|
---|
72 | <h3 class=fn>void <a name="end"></a>QImageConsumer::end ()<tt> [pure virtual]</tt>
|
---|
73 | </h3>
|
---|
74 |
|
---|
75 | <p> Called when all the data from all the frames has been decoded and
|
---|
76 | revealed as <a href="#changed">changed</a>().
|
---|
77 |
|
---|
78 | <h3 class=fn>void <a name="frameDone"></a>QImageConsumer::frameDone ()<tt> [pure virtual]</tt>
|
---|
79 | </h3>
|
---|
80 |
|
---|
81 | <p> One of the two <a href="#frameDone">frameDone</a>() functions will be called when a frame
|
---|
82 | of an animated image has ended and been revealed as <a href="#changed">changed</a>().
|
---|
83 | <p> When this function is called, the current image should be
|
---|
84 | displayed.
|
---|
85 | <p> The decoder will not make any further changes to the image until
|
---|
86 | the next call to <a href="qimageformat.html#decode">QImageFormat::decode</a>().
|
---|
87 |
|
---|
88 | <h3 class=fn>void <a name="frameDone-2"></a>QImageConsumer::frameDone ( const <a href="qpoint.html">QPoint</a> & offset, const <a href="qrect.html">QRect</a> & rect )<tt> [pure virtual]</tt>
|
---|
89 | </h3>
|
---|
90 | This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
|
---|
91 | <p> One of the two <a href="#frameDone">frameDone</a>() functions will be called when a frame
|
---|
92 | of an animated image has ended and been revealed as <a href="#changed">changed</a>().
|
---|
93 | <p> When this function is called, the area <em>rect</em> in the current
|
---|
94 | image should be moved by <em>offset</em> and displayed.
|
---|
95 | <p> The decoder will not make any further changes to the image until
|
---|
96 | the next call to <a href="qimageformat.html#decode">QImageFormat::decode</a>().
|
---|
97 |
|
---|
98 | <h3 class=fn>void <a name="setFramePeriod"></a>QImageConsumer::setFramePeriod ( int milliseconds )<tt> [pure virtual]</tt>
|
---|
99 | </h3>
|
---|
100 |
|
---|
101 | <p> Notes that the frame about to be decoded should not be displayed
|
---|
102 | until the given number of <em>milliseconds</em> after the time that this
|
---|
103 | function is called. Of course, the image may not have been
|
---|
104 | decoded by then, in which case the frame should not be displayed
|
---|
105 | until it is complete. A value of -1 (the assumed default)
|
---|
106 | indicates that the image should be displayed even while it is only
|
---|
107 | partially loaded.
|
---|
108 |
|
---|
109 | <h3 class=fn>void <a name="setLooping"></a>QImageConsumer::setLooping ( int n )<tt> [pure virtual]</tt>
|
---|
110 | </h3>
|
---|
111 |
|
---|
112 | <p> Called to indicate that the sequence of frames in the image
|
---|
113 | should be repeated <em>n</em> times, including the sequence during
|
---|
114 | decoding.
|
---|
115 | <p> <ul>
|
---|
116 | <li> 0 = Forever
|
---|
117 | <li> 1 = Only display frames the first time through
|
---|
118 | <li> 2 = Repeat once after first pass through images
|
---|
119 | <li> etc.
|
---|
120 | </ul>
|
---|
121 | <p> To make the <a href="qimagedecoder.html">QImageDecoder</a> do this, just delete it and pass the
|
---|
122 | information to it again for decoding (<a href="#setLooping">setLooping</a>() will be called
|
---|
123 | again, of course, but that can be ignored), or keep copies of the
|
---|
124 | changed areas at the ends of frames.
|
---|
125 |
|
---|
126 | <h3 class=fn>void <a name="setSize"></a>QImageConsumer::setSize ( int, int )<tt> [pure virtual]</tt>
|
---|
127 | </h3>
|
---|
128 |
|
---|
129 | <p> This function is called as soon as the size of the image has been
|
---|
130 | determined.
|
---|
131 |
|
---|
132 | <!-- eof -->
|
---|
133 | <hr><p>
|
---|
134 | This file is part of the <a href="index.html">Qt toolkit</a>.
|
---|
135 | Copyright © 1995-2007
|
---|
136 | <a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
|
---|
137 | <table width=100% cellspacing=0 border=0><tr>
|
---|
138 | <td>Copyright © 2007
|
---|
139 | <a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
|
---|
140 | <td align=right><div align=right>Qt 3.3.8</div>
|
---|
141 | </table></div></address></body>
|
---|
142 | </html>
|
---|