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

« back to all changes in this revision

Viewing changes to doc/html/object.html

  • Committer: Bazaar Package Importer
  • Author(s): Alessandro Ghersi
  • Date: 2009-11-02 18:30:08 UTC
  • mfrom: (1.2.2 upstream)
  • mto: (15.2.5 experimental)
  • mto: This revision was merged to the branch mainline in revision 88.
  • Revision ID: james.westby@ubuntu.com-20091102183008-b6a4gcs128mvfb3m
Tags: upstream-4.6.0~beta1
ImportĀ upstreamĀ versionĀ 4.6.0~beta1

Show diffs side-by-side

added added

removed removed

Lines of Context:
2
2
<!DOCTYPE html
3
3
    PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
4
4
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
5
 
<!-- /fasttmp/mkdist-qt-4.5.2-1245473805/qt-x11-opensource-src-4.5.2/doc/src/object.qdoc -->
 
5
<!-- object.qdoc -->
6
6
<head>
7
 
  <title>Qt 4.5: Qt Object Model</title>
 
7
  <title>Qt 4.6: Qt Object Model</title>
8
8
  <link href="classic.css" rel="stylesheet" type="text/css" />
9
9
</head>
10
10
<body>
11
11
<table border="0" cellpadding="0" cellspacing="0" width="100%">
12
12
<tr>
13
 
<td align="left" valign="top" width="32"><a href="http://qtsoftware.com/products/qt"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
14
 
<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="namespaces.html"><font color="#004faf">All&nbsp;Namespaces</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="groups.html"><font color="#004faf">Grouped&nbsp;Classes</font></a>&nbsp;&middot; <a href="modules.html"><font color="#004faf">Modules</font></a>&nbsp;&middot; <a href="functions.html"><font color="#004faf">Functions</font></a></td>
15
 
<td align="right" valign="top" width="230"></td></tr></table><h1 class="title">Qt Object Model<br /><span class="subtitle"></span>
 
13
<td align="left" valign="top" width="32"><a href="http://qt.nokia.com/"><img src="images/qt-logo.png" align="left" border="0" /></a></td>
 
14
<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="functions.html"><font color="#004faf">All&nbsp;Functions</font></a>&nbsp;&middot; <a href="overviews.html"><font color="#004faf">Overviews</font></a></td><td class="searchBar" align="right" valign="center"><form action="http://www.google.com/cse" id="cse-search-box"><div><input type="hidden" name="cx" value="000136343326384750312:dhbxnqlakyu" /><input type="hidden" name="ie" value="UTF-8" /><input type="text" name="q" size="31" /><input type="submit" name="sa" value="Search" /></div></form></td>
 
15
</tr></table><h1 class="title">Qt Object Model<br /><span class="subtitle"></span>
16
16
</h1>
17
17
<p>The standard C++ object model provides very efficient runtime support for the object paradigm. But its static nature is inflexibile in certain problem domains. Graphical user interface programming is a domain that requires both runtime efficiency and a high level of flexibility. Qt provides this, by combining the speed of C++ with the flexibility of the Qt Object Model.</p>
18
18
<p>Qt adds these features to C++:</p>
28
28
</ul>
29
29
<p>Many of these Qt features are implemented with standard C++ techniques, based on inheritance from <a href="qobject.html">QObject</a>. Others, like the object communication mechanism and the dynamic property system, require the <a href="metaobjects.html">Meta-Object System</a> provided by Qt's own <a href="moc.html#moc">Meta-Object Compiler (moc)</a>.</p>
30
30
<p>The meta-object system is a C++ extension that makes the language better suited to true component GUI programming. Although templates can be used to extend C++, the meta-object system provides benefits using standard C++ that cannot be achieved with templates; see <a href="templates.html">Why Doesn't Qt Use Templates for Signals and Slots?</a></p>
 
31
<a name="important-classes"></a>
 
32
<h3>Important Classes</h3>
 
33
<p>These classes form the basis of the Qt Object Model.</p>
 
34
<p><table width="100%" class="annotated" cellpadding="2" cellspacing="1" border="0">
 
35
<tr valign="top" class="odd"><th><a href="qmetaclassinfo.html">QMetaClassInfo</a></th><td>Additional information about a class</td></tr>
 
36
<tr valign="top" class="even"><th><a href="qmetaenum.html">QMetaEnum</a></th><td>Meta-data about an enumerator</td></tr>
 
37
<tr valign="top" class="odd"><th><a href="qmetamethod.html">QMetaMethod</a></th><td>Meta-data about a member function</td></tr>
 
38
<tr valign="top" class="even"><th><a href="qmetaobject.html">QMetaObject</a></th><td>Contains meta-information about Qt objects</td></tr>
 
39
<tr valign="top" class="odd"><th><a href="qmetaproperty.html">QMetaProperty</a></th><td>Meta-data about a property</td></tr>
 
40
<tr valign="top" class="even"><th><a href="qmetatype.html">QMetaType</a></th><td>Manages named types in the meta-object system</td></tr>
 
41
<tr valign="top" class="odd"><th><a href="qobject.html">QObject</a></th><td>The base class of all Qt objects</td></tr>
 
42
<tr valign="top" class="even"><th><a href="qobjectcleanuphandler.html">QObjectCleanupHandler</a></th><td>Watches the lifetime of multiple QObjects</td></tr>
 
43
<tr valign="top" class="odd"><th><a href="qpointer.html">QPointer</a></th><td>Template class that provides guarded pointers to QObjects</td></tr>
 
44
<tr valign="top" class="even"><th><a href="qsignalmapper.html">QSignalMapper</a></th><td>Bundles signals from identifiable senders</td></tr>
 
45
<tr valign="top" class="odd"><th><a href="qvariant.html">QVariant</a></th><td>Acts like a union for the most common Qt data types</td></tr>
 
46
</table></p>
31
47
<a name="identity-vs-value"></a><a name="qt-objects-identity-vs-value"></a>
32
48
<h3>Qt Objects: Identity vs Value</h3>
33
49
<p>Some of the added features listed above for the Qt Object Model, require that we think of Qt Objects as identities, not values. Values are copied or assigned; identities are cloned. Cloning means to create a new identity, not an exact copy of the old one. For example, twins have different identities. They may look identical, but they have different names, different locations, and may have completely different social networks.</p>
42
58
<p>For these reasons, Qt Objects should be treated as identities, not as values. Identities are cloned, not copied or assigned, and cloning an identity is a more complex operation than copying or assigning a value. Therefore, <a href="qobject.html">QObject</a> and all subclasses of <a href="qobject.html">QObject</a> (direct or indirect) have their <a href="qobject.html#no-copy-constructor">copy constructor and assignment operator</a> disabled.</p>
43
59
<p /><address><hr /><div align="center">
44
60
<table width="100%" cellspacing="0" border="0"><tr class="address">
45
 
<td width="30%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
46
 
<td width="40%" align="center"><a href="trademarks.html">Trademarks</a></td>
47
 
<td width="30%" align="right"><div align="right">Qt 4.5.2</div></td>
48
 
</tr></table></div></address></body>
 
61
<td width="40%" align="left">Copyright &copy; 2009 Nokia Corporation and/or its subsidiary(-ies)</td>
 
62
<td width="20%" align="center"><a href="trademarks.html">Trademarks</a></td>
 
63
<td width="40%" align="right"><div align="right">Qt 4.6.0</div></td>
 
64
<script type="text/javascript" src="http://www.google.com/jsapi"></script><script type="text/javascript">google.load("elements", "1", {packages: "transliteration"});</script><script type="text/javascript" src="http://www.google.com/coop/cse/t13n?form=cse-search-box&t13n_langs=en"></script><script type="text/javascript" src="http://www.google.com/coop/cse/brand?form=cse-search-box&lang=en"></script></tr></table></div></address></body>
49
65
</html>