summaryrefslogtreecommitdiffstats
path: root/doc/html/tqimageconsumer.html
blob: 8bc981f424afc720f56d6f80cf689e6df99525a0 (plain)
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<!-- /home/espenr/tmp/qt-3.3.8-espenr-2499/qt-x11-free-3.3.8/src/kernel/qasyncimageio.cpp:51 -->
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>TQImageConsumer Class</title>
<style type="text/css"><!--
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>TQImageConsumer Class Reference</h1>

<p>The TQImageConsumer class is an abstraction used by TQImageDecoder.
<a href="#details">More...</a>
<p><tt>#include &lt;<a href="qasyncimageio-h.html">ntqasyncimageio.h</a>&gt;</tt>
<p><a href="tqimageconsumer-members.html">List of all member functions.</a>
<h2>Public Members</h2>
<ul>
<li class=fn>virtual void <a href="#end"><b>end</b></a> () = 0</li>
<li class=fn>virtual void <a href="#changed"><b>changed</b></a> ( const TQRect &amp; ) = 0</li>
<li class=fn>virtual void <a href="#frameDone"><b>frameDone</b></a> () = 0</li>
<li class=fn>virtual void <a href="#frameDone-2"><b>frameDone</b></a> ( const&nbsp;TQPoint&nbsp;&amp;&nbsp;offset, const&nbsp;TQRect&nbsp;&amp;&nbsp;rect ) = 0</li>
<li class=fn>virtual void <a href="#setLooping"><b>setLooping</b></a> ( int&nbsp;n ) = 0</li>
<li class=fn>virtual void <a href="#setFramePeriod"><b>setFramePeriod</b></a> ( int&nbsp;milliseconds ) = 0</li>
<li class=fn>virtual void <a href="#setSize"><b>setSize</b></a> ( int, int ) = 0</li>
</ul>
<hr><a name="details"></a><h2>Detailed Description</h2>


The TQImageConsumer class is an abstraction used by <a href="tqimagedecoder.html">TQImageDecoder</a>.
<p> 


<p> The <a href="tqmovie.html">TQMovie</a> class, or <a href="tqlabel.html#setMovie">TQLabel::setMovie</a>(), are easy to use and for
most situations do what you want with regards animated images.
<p> A TQImageConsumer consumes information about changes to the <a href="tqimage.html">TQImage</a>
maintained by a TQImageDecoder. Think of the TQImage as the model or
source of the image data, with the TQImageConsumer as a view of
that data and the TQImageDecoder being the controller that
orchestrates the relationship between the model and the view.
<p> You'd use the TQImageConsumer class, for example, if you were
implementing a web browser with your own image loaders.
<p> <p>See also <a href="tqimagedecoder.html">TQImageDecoder</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 Function Documentation</h2>
<h3 class=fn>void <a name="changed"></a>TQImageConsumer::changed ( const&nbsp;<a href="tqrect.html">TQRect</a>&nbsp;&amp; )<tt> [pure virtual]</tt>
</h3>

<p> Called when the given area of the image has changed.

<h3 class=fn>void <a name="end"></a>TQImageConsumer::end ()<tt> [pure virtual]</tt>
</h3>

<p> Called when all the data from all the frames has been decoded and
revealed as <a href="#changed">changed</a>().

<h3 class=fn>void <a name="frameDone"></a>TQImageConsumer::frameDone ()<tt> [pure virtual]</tt>
</h3>

<p> One of the two <a href="#frameDone">frameDone</a>() functions will be called when a frame
of an animated image has ended and been revealed as <a href="#changed">changed</a>().
<p> When this function is called, the current image should be
displayed.
<p> The decoder will not make any further changes to the image until
the next call to <a href="tqimageformat.html#decode">TQImageFormat::decode</a>().

<h3 class=fn>void <a name="frameDone-2"></a>TQImageConsumer::frameDone ( const&nbsp;<a href="tqpoint.html">TQPoint</a>&nbsp;&amp;&nbsp;offset, const&nbsp;<a href="tqrect.html">TQRect</a>&nbsp;&amp;&nbsp;rect )<tt> [pure virtual]</tt>
</h3>
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
<p> One of the two <a href="#frameDone">frameDone</a>() functions will be called when a frame
of an animated image has ended and been revealed as <a href="#changed">changed</a>().
<p> When this function is called, the area <em>rect</em> in the current
image should be moved by <em>offset</em> and displayed.
<p> The decoder will not make any further changes to the image until
the next call to <a href="tqimageformat.html#decode">TQImageFormat::decode</a>().

<h3 class=fn>void <a name="setFramePeriod"></a>TQImageConsumer::setFramePeriod ( int&nbsp;milliseconds )<tt> [pure virtual]</tt>
</h3>

<p> Notes that the frame about to be decoded should not be displayed
until the given number of <em>milliseconds</em> after the time that this
function is called. Of course, the image may not have been
decoded by then, in which case the frame should not be displayed
until it is complete. A value of -1 (the assumed default)
indicates that the image should be displayed even while it is only
partially loaded.

<h3 class=fn>void <a name="setLooping"></a>TQImageConsumer::setLooping ( int&nbsp;n )<tt> [pure virtual]</tt>
</h3>

<p> Called to indicate that the sequence of frames in the image
should be repeated <em>n</em> times, including the sequence during
decoding.
<p> <ul>
<li> 0 = Forever
<li> 1 = Only display frames the first time through
<li> 2 = Repeat once after first pass through images
<li> etc.
</ul>
<p> To make the <a href="tqimagedecoder.html">TQImageDecoder</a> do this, just delete it and pass the
information to it again for decoding (<a href="#setLooping">setLooping</a>() will be called
again, of course, but that can be ignored), or keep copies of the
changed areas at the ends of frames.

<h3 class=fn>void <a name="setSize"></a>TQImageConsumer::setSize ( int, int )<tt> [pure virtual]</tt>
</h3>

<p> This function is called as soon as the size of the image has been
determined.

<!-- eof -->
<hr><p>
This file is part of the <a href="index.html">TQt toolkit</a>.
Copyright &copy; 1995-2007
<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
<table width=100% cellspacing=0 border=0><tr>
<td>Copyright &copy; 2007
<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
<td align=right><div align=right>TQt 3.3.8</div>
</table></div></address></body>
</html>