1
<?xml version="1.0" encoding="iso-8859-1"?>
3
PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
<!-- /tmp/qt-4.0.0-espenr-1119621036935/qt-x11-opensource-desktop-4.0.0/src/corelib/kernel/qcoreevent.cpp -->
7
<title>Qt 4.0: QChildEvent Class Reference</title>
8
<style>h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }
9
a:link { color: #004faf; text-decoration: none }
10
a:visited { color: #672967; text-decoration: none }
11
td.postheader { font-family: sans-serif }
12
tr.address { font-family: sans-serif }
13
body { background: #ffffff; color: black; }</style>
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
18
<td align="left" valign="top" width="32"><img src="images/qt-logo.png" align="left" width="32" height="32" border="0" /></td>
19
<td width="1"> </td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a> · <a href="classes.html"><font color="#004faf">All Classes</font></a> · <a href="mainclasses.html"><font color="#004faf">Main Classes</font></a> · <a href="annotated.html"><font color="#004faf">Annotated</font></a> · <a href="groups.html"><font color="#004faf">Grouped Classes</font></a> · <a href="functions.html"><font color="#004faf">Functions</font></a></td>
20
<td align="right" valign="top" width="230"><img src="images/trolltech-logo.png" align="right" width="203" height="32" border="0" /></td></tr></table><h1 align="center">QChildEvent Class Reference</h1>
21
<p>The QChildEvent class contains event parameters for child object events. <a href="#details">More...</a></p>
22
<pre>#include <QChildEvent></pre><p>Part of the <a href="qtcore.html">QtCore</a> module.</p>
23
<p>Inherits <a href="qevent.html">QEvent</a>.</p>
25
<li><a href="qchildevent-members.html">List of all members, including inherited members</a></li>
26
<li><a href="qchildevent-qt3.html">Qt 3 support members</a></li>
28
<a name="public-functions"></a>
29
<h3>Public Functions</h3>
31
<li><div class="fn"/><b><a href="qchildevent.html#QChildEvent">QChildEvent</a></b> ( Type <i>type</i>, QObject * <i>child</i> )</li>
32
<li><div class="fn"/>bool <b><a href="qchildevent.html#added">added</a></b> () const</li>
33
<li><div class="fn"/>QObject * <b><a href="qchildevent.html#child">child</a></b> () const</li>
34
<li><div class="fn"/>bool <b><a href="qchildevent.html#polished">polished</a></b> () const</li>
35
<li><div class="fn"/>bool <b><a href="qchildevent.html#removed">removed</a></b> () const</li>
38
<li><div class="fn"/>6 public functions inherited from <a href="qevent.html#public-functions">QEvent</a></li>
40
<h3>Additional Inherited Members</h3>
42
<li><div class="fn"/>1 property inherited from <a href="qevent.html#properties">QEvent</a></li>
44
<a name="details"></a>
46
<h2>Detailed Description</h2>
47
<p>The QChildEvent class contains event parameters for child object events.</p>
48
<p>Child events are sent immediately to objects when children are added or removed.</p>
49
<p>In both cases you can only rely on the child being a <a href="qobject.html">QObject</a> (or, if <a href="qobject.html#isWidgetType">QObject::isWidgetType</a>() returns true, a <a href="qwidget.html">QWidget</a>). This is because in the <a href="qevent.html#Type-enum">QEvent::ChildAdded</a> case the child is not yet fully constructed; in the <a href="qevent.html#Type-enum">QEvent::ChildRemoved</a> case it might have already been destructed.</p>
50
<p>The handler for these events is <a href="qobject.html#childEvent">QObject::childEvent</a>().</p>
52
<h2>Member Function Documentation</h2>
53
<h3 class="fn"><a name="QChildEvent"></a>QChildEvent::QChildEvent ( <a href="qevent.html#Type-enum">Type</a> <i>type</i>, <a href="qobject.html">QObject</a> * <i>child</i> )</h3>
54
<p>Constructs a child event object of a particular <i>type</i> for the <i>child</i>.</p>
55
<p><i>type</i> can be <a href="qevent.html#Type-enum">QEvent::ChildAdded</a>, <a href="qevent.html#Type-enum">QEvent::ChildRemoved</a>, <a href="qevent.html#Type-enum">QEvent::ChildPolished</a>, or <a href="qevent.html#Type-enum">QEvent::ChildRemoved</a>.</p>
56
<p>See also <a href="qchildevent.html#child">child</a>().</p>
57
<h3 class="fn"><a name="added"></a>bool QChildEvent::added () const</h3>
58
<p>Returns true if <a href="qevent.html#type">type</a>() is <a href="qevent.html#Type-enum">QEvent::ChildAdded</a>; otherwise returns false.</p>
59
<h3 class="fn"><a name="child"></a><a href="qobject.html">QObject</a> * QChildEvent::child () const</h3>
60
<p>Returns the child object that was added or removed.</p>
61
<h3 class="fn"><a name="polished"></a>bool QChildEvent::polished () const</h3>
62
<p>Returns true if <a href="qevent.html#type">type</a>() is <a href="qevent.html#Type-enum">QEvent::ChildPolished</a>; otherwise returns false.</p>
63
<h3 class="fn"><a name="removed"></a>bool QChildEvent::removed () const</h3>
64
<p>Returns true if <a href="qevent.html#type">type</a>() is <a href="qevent.html#Type-enum">QEvent::ChildRemoved</a>; otherwise returns false.</p>
65
<p /><address><hr /><div align="center">
66
<table width="100%" cellspacing="0" border="0"><tr class="address">
67
<td width="30%">Copyright © 2005 <a href="trolltech.html">Trolltech</a></td>
68
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
69
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
70
</tr></table></div></address></body>