summaryrefslogtreecommitdiffstats
path: root/doc/man/man3/qimageconsumer.3qt
blob: 8a31dae0d272df7091db994c977a50cb52db5a15 (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
'\" t
.TH QImageConsumer 3qt "2 February 2007" "Trolltech AS" \" -*- nroff -*-
.\" Copyright 1992-2007 Trolltech ASA.  All rights reserved.  See the
.\" license file included in the distribution for a complete license
.\" statement.
.\"
.ad l
.nh
.SH NAME
QImageConsumer \- Abstraction used by QImageDecoder
.SH SYNOPSIS
\fC#include <ntqasyncimageio.h>\fR
.PP
.SS "Public Members"
.in +1c
.ti -1c
.BI "virtual void \fBend\fR () = 0"
.br
.ti -1c
.BI "virtual void \fBchanged\fR ( const QRect & ) = 0"
.br
.ti -1c
.BI "virtual void \fBframeDone\fR () = 0"
.br
.ti -1c
.BI "virtual void \fBframeDone\fR ( const QPoint & offset, const QRect & rect ) = 0"
.br
.ti -1c
.BI "virtual void \fBsetLooping\fR ( int n ) = 0"
.br
.ti -1c
.BI "virtual void \fBsetFramePeriod\fR ( int milliseconds ) = 0"
.br
.ti -1c
.BI "virtual void \fBsetSize\fR ( int, int ) = 0"
.br
.in -1c
.SH DESCRIPTION
The QImageConsumer class is an abstraction used by QImageDecoder.
.PP
The QMovie class, or QLabel::setMovie(), are easy to use and for most situations do what you want with regards animated images.
.PP
A QImageConsumer consumes information about changes to the QImage maintained by a QImageDecoder. Think of the QImage as the model or source of the image data, with the QImageConsumer as a view of that data and the QImageDecoder being the controller that orchestrates the relationship between the model and the view.
.PP
You'd use the QImageConsumer class, for example, if you were implementing a web browser with your own image loaders.
.PP
See also QImageDecoder, Graphics Classes, Image Processing Classes, and Multimedia Classes.
.SH MEMBER FUNCTION DOCUMENTATION
.SH "void QImageConsumer::changed ( const QRect & )\fC [pure virtual]\fR"
Called when the given area of the image has changed.
.SH "void QImageConsumer::end ()\fC [pure virtual]\fR"
Called when all the data from all the frames has been decoded and revealed as changed().
.SH "void QImageConsumer::frameDone ()\fC [pure virtual]\fR"
One of the two frameDone() functions will be called when a frame of an animated image has ended and been revealed as changed().
.PP
When this function is called, the current image should be displayed.
.PP
The decoder will not make any further changes to the image until the next call to QImageFormat::decode().
.SH "void QImageConsumer::frameDone ( const QPoint & offset, const QRect & rect )\fC [pure virtual]\fR"
This is an overloaded member function, provided for convenience. It behaves essentially like the above function.
.PP
One of the two frameDone() functions will be called when a frame of an animated image has ended and been revealed as changed().
.PP
When this function is called, the area \fIrect\fR in the current image should be moved by \fIoffset\fR and displayed.
.PP
The decoder will not make any further changes to the image until the next call to QImageFormat::decode().
.SH "void QImageConsumer::setFramePeriod ( int milliseconds )\fC [pure virtual]\fR"
Notes that the frame about to be decoded should not be displayed until the given number of \fImilliseconds\fR 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.
.SH "void QImageConsumer::setLooping ( int n )\fC [pure virtual]\fR"
Called to indicate that the sequence of frames in the image should be repeated \fIn\fR times, including the sequence during decoding.
.TP
0 = Forever
.TP
1 = Only display frames the first time through
.TP
2 = Repeat once after first pass through images
.TP
etc.
.PP
To make the QImageDecoder do this, just delete it and pass the information to it again for decoding (setLooping() will be called again, of course, but that can be ignored), or keep copies of the changed areas at the ends of frames.
.SH "void QImageConsumer::setSize ( int, int )\fC [pure virtual]\fR"
This function is called as soon as the size of the image has been
determined.

.SH "SEE ALSO"
.BR http://doc.trolltech.com/qimageconsumer.html
.BR http://www.trolltech.com/faq/tech.html
.SH COPYRIGHT
Copyright 1992-2007 Trolltech ASA, http://www.trolltech.com.  See the
license file included in the distribution for a complete license
statement.
.SH AUTHOR
Generated automatically from the source code.
.SH BUGS
If you find a bug in Qt, please report it as described in
.BR http://doc.trolltech.com/bughowto.html .
Good bug reports help us to help you. Thank you.
.P
The definitive Qt documentation is provided in HTML format; it is
located at $QTDIR/doc/html and can be read using Qt Assistant or with
a web browser. This man page is provided as a convenience for those
users who prefer man pages, although this format is not officially
supported by Trolltech. 
.P
If you find errors in this manual page, please report them to
.BR qt-bugs@trolltech.com .
Please include the name of the manual page (qimageconsumer.3qt) and the Qt
version (3.3.8).