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
|
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en_US" lang="en_US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdeclarativeparserstatus.cpp -->
<title>Qt 4.8: QDeclarativeParserStatus Class Reference</title>
<link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
<div class="content">
<a href="index.html" class="qtref"><span>Qt Reference Documentation</span></a>
</div>
<div class="breadcrumb toolblock">
<ul>
<li class="first"><a href="index.html">Home</a></li>
<!-- Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtdeclarative.html">QtDeclarative</a></li>
<li>QDeclarativeParserStatus</li>
</ul>
</div>
</div>
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QDeclarativeParserStatus Class Reference</h1>
<!-- $$$QDeclarativeParserStatus-brief -->
<p>The QDeclarativeParserStatus class provides updates on the QML parser state. <a href="#details">More...</a></p>
<!-- @@@QDeclarativeParserStatus -->
<pre class="cpp"> <span class="preprocessor">#include <QDeclarativeParserStatus></span></pre><p><b>Inherited by: </b><a href="qdeclarativeitem.html">QDeclarativeItem</a>.</p>
<p>This class was introduced in Qt 4.7.</p>
<ul>
<li><a href="qdeclarativeparserstatus-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeparserstatus.html#classBegin">classBegin</a></b> () = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qdeclarativeparserstatus.html#componentComplete">componentComplete</a></b> () = 0</td></tr>
</table>
<a name="details"></a>
<!-- $$$QDeclarativeParserStatus-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QDeclarativeParserStatus class provides updates on the QML parser state.</p>
<p>QDeclarativeParserStatus provides a mechanism for classes instantiated by a <a href="qdeclarativeengine.html">QDeclarativeEngine</a> to receive notification at key points in their creation.</p>
<p>This class is often used for optimization purposes, as it allows you to defer an expensive operation until after all the properties have been set on an object. For example, QML's <a href="qml-text.html">Text</a> element uses the parser status to defer text layout until all of its properties have been set (we don't want to layout when the <tt>text</tt> is assigned, and then relayout when the <tt>font</tt> is assigned, and relayout again when the <tt>width</tt> is assigned, and so on).</p>
<p>To use QDeclarativeParserStatus, you must inherit both a <a href="qobject.html">QObject</a>-derived class and QDeclarativeParserStatus, and use the <a href="qobject.html#Q_INTERFACES">Q_INTERFACES</a>() macro.</p>
<pre class="cpp"> <span class="keyword">class</span> MyObject : <span class="keyword">public</span> <span class="type"><a href="qobject.html">QObject</a></span><span class="operator">,</span> <span class="keyword">public</span> <span class="type">QDeclarativeParserStatus</span>
{
Q_OBJECT
Q_INTERFACES(<span class="type">QDeclarativeParserStatus</span>)
<span class="keyword">public</span>:
MyObject(<span class="type"><a href="qobject.html">QObject</a></span> <span class="operator">*</span>parent <span class="operator">=</span> <span class="number">0</span>);
<span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
<span class="type">void</span> classBegin();
<span class="type">void</span> componentComplete();
}</pre>
</div>
<!-- @@@QDeclarativeParserStatus -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$classBegin[overload1]$$$classBegin -->
<h3 class="fn"><a name="classBegin"></a><span class="type">void</span> QDeclarativeParserStatus::<span class="name">classBegin</span> ()<tt> [pure virtual]</tt></h3>
<p>Invoked after class creation, but before any properties have been set.</p>
<!-- @@@classBegin -->
<!-- $$$componentComplete[overload1]$$$componentComplete -->
<h3 class="fn"><a name="componentComplete"></a><span class="type">void</span> QDeclarativeParserStatus::<span class="name">componentComplete</span> ()<tt> [pure virtual]</tt></h3>
<p>Invoked after the root component that caused this instantiation has completed construction. At this point all static values and binding values have been assigned to the class.</p>
<!-- @@@componentComplete -->
</div>
<div class="ft">
<span></span>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2012 Nokia Corporation and/or its
subsidiaries. Documentation contributions included herein are the copyrights of
their respective owners.</p>
<br />
<p>
The documentation provided herein is licensed under the terms of the
<a href="http://www.gnu.org/licenses/fdl.html">GNU Free Documentation
License version 1.3</a> as published by the Free Software Foundation.</p>
<p>
Documentation sources may be obtained from <a href="http://www.qt-project.org">
www.qt-project.org</a>.</p>
<br />
<p>
Nokia, Qt and their respective logos are trademarks of Nokia Corporation
in Finland and/or other countries worldwide. All other trademarks are property
of their respective owners. <a title="Privacy Policy"
href="http://en.gitorious.org/privacy_policy/">Privacy Policy</a></p>
</div>
</body>
</html>
|