source: trunk/doc/html/qpaintevent.html@ 208

Last change on this file since 208 was 190, checked in by rudi, 14 years ago

reference documentation added

File size: 6.5 KB
Line 
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/qevent.cpp:1251 -->
3<html>
4<head>
5<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
6<title>QPaintEvent Class</title>
7<style type="text/css"><!--
8fn { margin-left: 1cm; text-indent: -1cm; }
9a:link { color: #004faf; text-decoration: none }
10a:visited { color: #672967; text-decoration: none }
11body { 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&nbsp;Classes</font></a>
23 | <a href="mainclasses.html">
24<font color="#004faf">Main&nbsp;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&nbsp;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>QPaintEvent Class Reference</h1>
33
34<p>The QPaintEvent class contains event parameters for paint events.
35<a href="#details">More...</a>
36<p><tt>#include &lt;<a href="qevent-h.html">qevent.h</a>&gt;</tt>
37<p>Inherits <a href="qevent.html">QEvent</a>.
38<p><a href="qpaintevent-members.html">List of all member functions.</a>
39<h2>Public Members</h2>
40<ul>
41<li class=fn><a href="#QPaintEvent"><b>QPaintEvent</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;paintRegion, bool&nbsp;erased = TRUE )</li>
42<li class=fn><a href="#QPaintEvent-2"><b>QPaintEvent</b></a> ( const&nbsp;QRect&nbsp;&amp;&nbsp;paintRect, bool&nbsp;erased = TRUE )</li>
43<li class=fn><a href="#QPaintEvent-3"><b>QPaintEvent</b></a> ( const&nbsp;QRegion&nbsp;&amp;&nbsp;paintRegion, const&nbsp;QRect&nbsp;&amp;&nbsp;paintRect, bool&nbsp;erased = TRUE )</li>
44<li class=fn>const QRect &amp; <a href="#rect"><b>rect</b></a> () const</li>
45<li class=fn>const QRegion &amp; <a href="#region"><b>region</b></a> () const</li>
46<li class=fn>bool <a href="#erased"><b>erased</b></a> () const</li>
47</ul>
48<hr><a name="details"></a><h2>Detailed Description</h2>
49
50
51The QPaintEvent class contains event parameters for paint events.
52<p>
53<p> Paint events are sent to widgets that need to update themselves,
54for instance when part of a widget is exposed because a covering
55widget is moved.
56<p> The event contains a <a href="#region">region</a>() that needs to be updated, and a
57<a href="#rect">rect</a>() that is the bounding rectangle of that region. Both are
58provided because many widgets can't make much use of region(), and
59rect() can be much faster than region().boundingRect(). Painting
60is clipped to region() during processing of a paint event.
61<p> The <a href="#erased">erased</a>() function returns TRUE if the region() has been
62cleared to the widget's background (see
63<a href="qwidget.html#backgroundMode">QWidget::backgroundMode</a>()), and FALSE if the region's contents are
64arbitrary.
65<p> <p>See also <a href="qpainter.html">QPainter</a>, <a href="qwidget.html#update">QWidget::update</a>(), <a href="qwidget.html#repaint">QWidget::repaint</a>(), <a href="qwidget.html#paintEvent">QWidget::paintEvent</a>(), <a href="qwidget.html#backgroundMode-prop">QWidget::backgroundMode</a>, <a href="qregion.html">QRegion</a>, and <a href="events.html">Event Classes</a>.
66
67<hr><h2>Member Function Documentation</h2>
68<h3 class=fn><a name="QPaintEvent"></a>QPaintEvent::QPaintEvent ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;paintRegion, bool&nbsp;erased = TRUE )
69</h3>
70
71<p> Constructs a paint event object with the region that should be
72updated. The region is given by <em>paintRegion</em>. If <em>erased</em> is
73TRUE the region will be cleared before repainting.
74
75<h3 class=fn><a name="QPaintEvent-2"></a>QPaintEvent::QPaintEvent ( const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;paintRect, bool&nbsp;erased = TRUE )
76</h3>
77
78<p> Constructs a paint event object with the rectangle that should be
79updated. The region is also given by <em>paintRect</em>. If <em>erased</em> is
80TRUE the region will be cleared before repainting.
81
82<h3 class=fn><a name="QPaintEvent-3"></a>QPaintEvent::QPaintEvent ( const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp;&nbsp;paintRegion, const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp;&nbsp;paintRect, bool&nbsp;erased = TRUE )
83</h3>
84
85<p> Constructs a paint event object with the rectangle <em>paintRect</em>
86that should be updated. The region is given by <em>paintRegion</em>. If
87<em>erased</em> is TRUE the region will be cleared before repainting.
88
89<h3 class=fn>bool <a name="erased"></a>QPaintEvent::erased () const
90</h3>
91
92<p> Returns TRUE if the paint event region (or rectangle) has been
93erased with the widget's background; otherwise returns FALSE.
94
95<h3 class=fn>const&nbsp;<a href="qrect.html">QRect</a>&nbsp;&amp; <a name="rect"></a>QPaintEvent::rect () const
96</h3>
97
98<p> Returns the rectangle that should be updated.
99<p> <p>See also <a href="#region">region</a>() and <a href="qpainter.html#setClipRect">QPainter::setClipRect</a>().
100
101<p>Examples: <a href="life-example.html#x1892">life/life.cpp</a>, <a href="qfd-example.html#x2001">qfd/fontdisplayer.cpp</a>, <a href="showimg-example.html#x1340">showimg/showimg.cpp</a>, <a href="tutorial1-10.html#x2357">t10/cannon.cpp</a>, <a href="tutorial1-11.html#x2369">t11/cannon.cpp</a>, <a href="tutorial1-13.html#x2405">t13/cannon.cpp</a>, and <a href="tooltip-example.html#x446">tooltip/tooltip.cpp</a>.
102<h3 class=fn>const&nbsp;<a href="qregion.html">QRegion</a>&nbsp;&amp; <a name="region"></a>QPaintEvent::region () const
103</h3>
104
105<p> Returns the region that should be updated.
106<p> <p>See also <a href="#rect">rect</a>() and <a href="qpainter.html#setClipRegion">QPainter::setClipRegion</a>().
107
108<p>Examples: <a href="qfd-example.html#x2002">qfd/fontdisplayer.cpp</a> and <a href="scribble-example.html#x920">scribble/scribble.cpp</a>.
109<!-- eof -->
110<hr><p>
111This file is part of the <a href="index.html">Qt toolkit</a>.
112Copyright &copy; 1995-2007
113<a href="http://www.trolltech.com/">Trolltech</a>. All Rights Reserved.<p><address><hr><div align=center>
114<table width=100% cellspacing=0 border=0><tr>
115<td>Copyright &copy; 2007
116<a href="troll.html">Trolltech</a><td align=center><a href="trademarks.html">Trademarks</a>
117<td align=right><div align=right>Qt 3.3.8</div>
118</table></div></address></body>
119</html>
Note: See TracBrowser for help on using the repository browser.