~oif-team/ubuntu/natty/qt4-x11/xi2.1

« back to all changes in this revision

Viewing changes to doc/html/qobjectcleanuphandler.html

  • Committer: Bazaar Package Importer
  • Author(s): Adam Conrad
  • Date: 2005-08-24 04:09:09 UTC
  • Revision ID: james.westby@ubuntu.com-20050824040909-xmxe9jfr4a0w5671
Tags: upstream-4.0.0
ImportĀ upstreamĀ versionĀ 4.0.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
<?xml version="1.0" encoding="iso-8859-1"?>
 
2
<!DOCTYPE html
 
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/qobjectcleanuphandler.cpp -->
 
6
<head>
 
7
    <title>Qt 4.0: QObjectCleanupHandler 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>
 
14
</head>
 
15
<body>
 
16
<table border="0" cellpadding="0" cellspacing="0" width="100%">
 
17
<tr>
 
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">&nbsp;&nbsp;</td><td class="postheader" valign="center"><a href="index.html"><font color="#004faf">Home</font></a>&nbsp;&middot; <a href="classes.html"><font color="#004faf">All&nbsp;Classes</font></a>&nbsp;&middot; <a href="mainclasses.html"><font color="#004faf">Main&nbsp;Classes</font></a>&nbsp;&middot; <a href="annotated.html"><font color="#004faf">Annotated</font></a>&nbsp;&middot; <a href="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <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">QObjectCleanupHandler Class Reference</h1>
 
21
<p>The QObjectCleanupHandler class watches the lifetime of multiple QObjects. <a href="#details">More...</a></p>
 
22
<pre>#include &lt;QObjectCleanupHandler&gt;</pre><p>Part of the <a href="qtcore.html">QtCore</a> module.</p>
 
23
<p>Inherits <a href="qobject.html">QObject</a>.</p>
 
24
<ul>
 
25
<li><a href="qobjectcleanuphandler-members.html">List of all members, including inherited members</a></li>
 
26
</ul>
 
27
<a name="public-functions"></a>
 
28
<h3>Public Functions</h3>
 
29
<ul>
 
30
<li><div class="fn"/><b><a href="qobjectcleanuphandler.html#QObjectCleanupHandler">QObjectCleanupHandler</a></b> ()</li>
 
31
<li><div class="fn"/><b><a href="qobjectcleanuphandler.html#dtor.QObjectCleanupHandler">~QObjectCleanupHandler</a></b> ()</li>
 
32
<li><div class="fn"/>QObject * <b><a href="qobjectcleanuphandler.html#add">add</a></b> ( QObject * <i>object</i> )</li>
 
33
<li><div class="fn"/>void <b><a href="qobjectcleanuphandler.html#clear">clear</a></b> ()</li>
 
34
<li><div class="fn"/>bool <b><a href="qobjectcleanuphandler.html#isEmpty">isEmpty</a></b> () const</li>
 
35
<li><div class="fn"/>void <b><a href="qobjectcleanuphandler.html#remove">remove</a></b> ( QObject * <i>object</i> )</li>
 
36
</ul>
 
37
<ul>
 
38
<li><div class="fn"/>28 public functions inherited from <a href="qobject.html#public-functions">QObject</a></li>
 
39
</ul>
 
40
<h3>Additional Inherited Members</h3>
 
41
<ul>
 
42
<li><div class="fn"/>1 property inherited from <a href="qobject.html#properties">QObject</a></li>
 
43
<li><div class="fn"/>1 public slot inherited from <a href="qobject.html#public-slots">QObject</a></li>
 
44
<li><div class="fn"/>1 signal inherited from <a href="qobject.html#signals">QObject</a></li>
 
45
<li><div class="fn"/>4 static public members inherited from <a href="qobject.html#static-public-members">QObject</a></li>
 
46
<li><div class="fn"/>7 protected functions inherited from <a href="qobject.html#protected-functions">QObject</a></li>
 
47
</ul>
 
48
<a name="details"></a>
 
49
<hr />
 
50
<h2>Detailed Description</h2>
 
51
<p>The QObjectCleanupHandler class watches the lifetime of multiple QObjects.</p>
 
52
<p>A QObjectCleanupHandler is useful whenever you need to know when a number of <a href="qobject.html">QObject</a>s that are owned by someone else have been deleted. This is important, for example, when referencing memory in an application that has been allocated in a shared library.</p>
 
53
<p>To keep track of some <a href="qobject.html">QObject</a>s, create a QObjectCleanupHandler, and <a href="qobjectcleanuphandler.html#add">add</a>() the objects you are interested in. If you are no longer interested in tracking a particular object, use <a href="qobjectcleanuphandler.html#remove">remove</a>() to remove it from the cleanup handler. If an object being tracked by the cleanup handler gets deleted by someone else it will automatically be removed from the cleanup handler. You can delete all the objects in the cleanup handler with <a href="qobjectcleanuphandler.html#clear">clear</a>(), or by destroying the cleanup handler. <a href="qobjectcleanuphandler.html#isEmpty">isEmpty</a>() returns true if the QObjectCleanupHandler has no objects to keep track of.</p>
 
54
<p>See also <a href="qpointer.html">QPointer</a>.</p>
 
55
<hr />
 
56
<h2>Member Function Documentation</h2>
 
57
<h3 class="fn"><a name="QObjectCleanupHandler"></a>QObjectCleanupHandler::QObjectCleanupHandler ()</h3>
 
58
<p>Constructs an empty <a href="qobjectcleanuphandler.html">QObjectCleanupHandler</a>.</p>
 
59
<h3 class="fn"><a name="dtor.QObjectCleanupHandler"></a>QObjectCleanupHandler::~QObjectCleanupHandler ()</h3>
 
60
<p>Destroys the cleanup handler. All objects in this cleanup handler will be deleted.</p>
 
61
<p>See also <a href="qobjectcleanuphandler.html#clear">clear</a>().</p>
 
62
<h3 class="fn"><a name="add"></a><a href="qobject.html">QObject</a> * QObjectCleanupHandler::add ( <a href="qobject.html">QObject</a> * <i>object</i> )</h3>
 
63
<p>Adds <i>object</i> to this cleanup handler and returns the pointer to the object.</p>
 
64
<p>See also <a href="qobjectcleanuphandler.html#remove">remove</a>().</p>
 
65
<h3 class="fn"><a name="clear"></a>void QObjectCleanupHandler::clear ()</h3>
 
66
<p>Deletes all objects in this cleanup handler. The cleanup handler becomes empty.</p>
 
67
<p>See also <a href="qobjectcleanuphandler.html#isEmpty">isEmpty</a>().</p>
 
68
<h3 class="fn"><a name="isEmpty"></a>bool QObjectCleanupHandler::isEmpty () const</h3>
 
69
<p>Returns true if this cleanup handler is empty or if all objects in this cleanup handler have been destroyed; otherwise return false.</p>
 
70
<p>See also <a href="qobjectcleanuphandler.html#add">add</a>(), <a href="qobjectcleanuphandler.html#remove">remove</a>(), and <a href="qobjectcleanuphandler.html#clear">clear</a>().</p>
 
71
<h3 class="fn"><a name="remove"></a>void QObjectCleanupHandler::remove ( <a href="qobject.html">QObject</a> * <i>object</i> )</h3>
 
72
<p>Removes the <i>object</i> from this cleanup handler. The object will not be destroyed.</p>
 
73
<p>See also <a href="qobjectcleanuphandler.html#add">add</a>().</p>
 
74
<p /><address><hr /><div align="center">
 
75
<table width="100%" cellspacing="0" border="0"><tr class="address">
 
76
<td width="30%">Copyright &copy; 2005 <a href="trolltech.html">Trolltech</a></td>
 
77
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
78
<td width="30%" align="right"><div align="right">Qt 4.0.0</div></td>
 
79
</tr></table></div></address></body>
 
80
</html>