This file is indexed.

/usr/share/qt5/doc/qtwebkitexamples/qtwebkitexamples-webkitwidgets-xmlpatterns-example.html is in qtwebkit5-examples-doc-html 5.5.1+dfsg-2build1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qobjectxmlmodel.qdoc -->
  <title>QObject XML Model Example | Qt WebKit Examples 5.5</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
    <div class="main">
    <div class="main-rounded">
        <div class="navigationbar">
        <ul>
<li>Qt 5.5</li>
<li><a href="qtwebkitexamples-index.html">Qt WebKit Examples</a></li>
<li>QObject XML Model Example</li>
<li id="buildversion">Qt 5.5.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#introduction">Introduction</a></li>
<li class="level2"><a href="#the-user-interface">The User Interface</a></li>
<li class="level1"><a href="#code-walk-through">Code Walk-Through</a></li>
<li class="level2"><a href="#the-custom-node-model-class-qobjextxmlmodel">The Custom Node Model Class: QObjextXmlModel</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QObject XML Model Example</h1>
<span class="subtitle"></span>
<!-- $$$webkitwidgets/xmlpatterns-description -->
<div class="descr"> <a name="details"></a>
<p>This example shows how to use <a href="../qtxmlpatterns/qtxmlpatterns-module.html">QtXmlPatterns</a> to query <a href="../qtcore/qobject.html">QObject</a> trees by modeling the non-XML data structure of a <a href="../qtcore/qobject.html">QObject</a> tree to look like XML.</p>
<a name="introduction"></a>
<h2 id="introduction">Introduction</h2>
<p>This example illustrates two important points about using <a href="../qtxmlpatterns/xmlprocessing.html">XQuery</a> to query non-XML data modeled to look like XML. The first point is that a custom node model class doesn't always have to actually build the node model. Sometimes the node model can be an already existing data structure, like the <a href="../qtcore/qobject.html">QObject</a> tree used in this example. The second point is to explain what is required to make non-XML data look like XML.</p>
<p>In this example, we want to model a <a href="../qtcore/qobject.html">QObject</a> tree to look like XML. That is easy to do because a <a href="../qtcore/qobject.html">QObject</a> tree maps to the XML tree structure in a staightforward way. Each <a href="../qtcore/qobject.html">QObject</a> node is modeled as an XML element node. However, when we want to add the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree to the <a href="../qtcore/qobject.html">QObject</a> tree node model, we are trying to add a second tree to the node model. The <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree exists <i>behind</i> the <a href="../qtcore/qobject.html">QObject</a> tree. Adding the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree to the node model changes the two dimensional tree into a three dimensional tree.</p>
<p>The query engine can only traverse two dimensional trees, because an XML document is always a two dimensional tree. If we want to add the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree to the node model, we have to somehow flatten it into the same plane as the <a href="../qtcore/qobject.html">QObject</a> tree. This requires that the node model class must build an auxiliary data structure and make it part of the two dimensional <a href="../qtcore/qobject.html">QObject</a> node model. How to do this is explained in <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#including-the-qmetaobject-tree">Including The QMetaObject Tree</a>.</p>
<a name="the-user-interface"></a>
<h3 >The User Interface</h3>
<p>The UI for this example was created using Qt Designer:</p>
<p class="centerAlign"><img src="images/qobjectxmlmodel-example.png" alt="" /></p><a name="code-walk-through"></a>
<h2 id="code-walk-through">Code Walk-Through</h2>
<p>The strategy for this example is different from the strategy for the <a href="../qtxmlpatterns/qtxmlpatterns-filetree-example.html">file system example</a>. In the file system example, the node model class had to actually build a node model because the non-XML data to be traversed was the computer's file system, a structure stored on disk in a form that the query engine couldn't use. The node model class had to build an analog of the computer's file system in memory.</p>
<p>For this example, the data structure to be traversed already exists in memory in a usable form. It is the <a href="../qtcore/qobject.html">QObject</a> tree of the example application itself. All we need is the pointer to the root of the <a href="../qtcore/qobject.html">QObject</a> tree.</p>
<p><b>Note: </b>When we add the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree to the node model, the node model class will have to build an auxiliary data structure to move the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree into the same plane as the <a href="../qtcore/qobject.html">QObject</a> tree. This is explained later in <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#including-the-qmetaobject-tree">Including The QMetaObject Tree</a>.</p><a name="the-custom-node-model-class-qobjextxmlmodel"></a>
<h3 >The Custom Node Model Class: QObjextXmlModel</h3>
<p>The node model class for this example is QObjextXmlModel, which is derived from <a href="../qtxmlpatterns/qsimplexmlnodemodel.html">QSimpleXmlNodeModel</a>. QObjextXmlModel implements the callback interface functions that don't have implementations in <a href="../qtxmlpatterns/qsimplexmlnodemodel.html">QSimpleXmlNodeModel</a>:</p>
<pre class="cpp">    <span class="keyword">virtual</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">::</span>DocumentOrder compareOrder(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n1<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n2) <span class="keyword">const</span>;
    <span class="keyword">virtual</span> <span class="type"><a href="../qtxmlpatterns/qxmlname.html">QXmlName</a></span> name(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n) <span class="keyword">const</span>;
    <span class="keyword">virtual</span> <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span> documentUri(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n) <span class="keyword">const</span>;
    <span class="keyword">virtual</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">::</span>NodeKind kind(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n) <span class="keyword">const</span>;
    <span class="keyword">virtual</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> root(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n) <span class="keyword">const</span>;
    <span class="keyword">virtual</span> <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span> typedValue(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n) <span class="keyword">const</span>;
    <span class="keyword">virtual</span> <span class="type"><a href="../qtcore/qvector.html">QVector</a></span><span class="operator">&lt;</span><span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">&gt;</span> attributes(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">&amp;</span>) <span class="keyword">const</span>;
    <span class="keyword">virtual</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> nextFromSimpleAxis(SimpleAxis<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">&amp;</span>) <span class="keyword">const</span>;</pre>
<p>The node model class declares three data members:</p>
<a name="three-data-members"></a><pre class="cpp">    <span class="keyword">const</span> <span class="type"><a href="../qtcore/qurl.html">QUrl</a></span>              m_baseURI;
    <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> <span class="operator">*</span><span class="keyword">const</span>          m_root;
    <span class="keyword">const</span> AllMetaObjects    m_allMetaObjects;</pre>
<p>The constructor sets <code>m_baseURI</code> to the <a href="../qtcore/qurl.html">QUrl</a> constructed from the <a href="../qtcore/qcoreapplication.html#applicationFilePath">file path</a> of the application executable. This is the value returned by <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#documentUri">documentUri()</a>. The constructor sets <code>m_root</code> to point to the <a href="../qtcore/qobject.html">QObject</a> tree for the example application. This is the node model that the query engine will use. And the constructor calls a local function to build the auxiliary data structure (<code>m_allMetaObjects</code>) for including the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree in the node model. How this auxiliary data structure is incorporated into the <a href="../qtcore/qobject.html">QObject</a> node model is discussed in <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#including-the-qmetaobject-tree">Including The QMetaObject Tree</a>.</p>
<a name="accessing-the-node-model"></a>
<h4 >Accessing The Node Model</h4>
<p>Since the query engine knows nothing about <a href="../qtcore/qobject.html">QObject</a> trees, it can only access them by calling functions in the node model callback interface. The query engine passes a <a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a> to uniquely identify a node in the node model. The <a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a> is constructed from a pointer to the <a href="../qtcore/qobject.html">QObject</a> that represents the node. <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#createIndex">createIndex()</a> creates the <a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a>, as in the local <code>root()</code> function, for example:</p>
<pre class="cpp"><span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="type">QObjectXmlModel</span><span class="operator">::</span>root() <span class="keyword">const</span>
{
    <span class="keyword">return</span> createIndex(m_root);
}</pre>
<p>A <a href="../qtcore/qobject.html">QObject</a> represents an element node in the node model, but we also need to represent attribute nodes. For example, the class name of a <a href="../qtcore/qobject.html">QObject</a> is an attribute of the <a href="../qtcore/qobject.html">QObject</a>, so it should be an attribute node in the node model. A <a href="../qtcore/qobject.html">QObject</a>'s class name is obtained from the <a href="../qtcore/qobject.html">QObject</a>. (Actually, it is in the <a href="../qtcore/qmetaobject.html">QMetaObject</a>, which is obtained from the <a href="../qtcore/qobject.html">QObject</a>). This means that a single <a href="../qtcore/qobject.html">QObject</a> logically represents multiple nodes in the node model: the element node and potentially many attribute nodes.</p>
<p>To uniquely identify an attribute node, we need the pointer to the <a href="../qtcore/qobject.html">QObject</a> containing the attribute, and an additional value that identifies the attribute in the <a href="../qtcore/qobject.html">QObject</a>. For this <i>additional data</i> value, we use <code>enum QObjectNodeType</code>:</p>
<pre class="cpp">    <span class="keyword">enum</span> <span class="type">QObjectNodeType</span>
    {
        IsQObject               <span class="operator">=</span> <span class="number">0</span><span class="operator">,</span>
        <span class="type">QObjectProperty</span>         <span class="operator">=</span> <span class="number">1</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">26</span><span class="operator">,</span>
        MetaObjects             <span class="operator">=</span> <span class="number">2</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">26</span><span class="operator">,</span>
        MetaObject              <span class="operator">=</span> <span class="number">3</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">26</span><span class="operator">,</span>
        MetaObjectClassName     <span class="operator">=</span> <span class="number">4</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">26</span><span class="operator">,</span>
        MetaObjectSuperClass    <span class="operator">=</span> <span class="number">5</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">26</span><span class="operator">,</span>
        <span class="type">QObjectClassName</span>        <span class="operator">=</span> <span class="number">6</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">26</span>
    };</pre>
<p>Ignore the <code>MetaObjectXXX</code> values for now. They will be explained in <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#including-the-qmetaobject-tree">Including The QMetaObject Tree</a>. Here we are interested in the three node types for <a href="../qtcore/qobject.html">QObject</a> nodes: <code>IsQObject</code>, which represents the element node type for a <a href="../qtcore/qobject.html">QObject</a>, and <code>QObjectProperty</code> and <code>QObjectClassName</code>, which represent the attribute node types for the attributes of a <a href="../qtcore/qobject.html">QObject</a>.</p>
<p>The <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#createIndex">createIndex()</a> function called in the <code>root()</code> snippet above is the overload that accepts a <code>void*</code> pointer and a second parameter, <code>additionalData</code>, with default value 0 (<code>IsQObject</code>). Wherever you see a call to <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#createIndex">createIndex()</a> that only passes the <a href="../qtcore/qobject.html">QObject</a> pointer, it is creating the node index for a <a href="../qtcore/qobject.html">QObject</a> element node. To create the node index for the class name attribute, for example, the <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#qobject-attributes">attributes()</a> function uses <code>createIndex(object,QObjectClassName)</code>.</p>
<a name="qobject-attributes"></a><pre class="cpp"><span class="type"><a href="../qtcore/qvector.html">QVector</a></span><span class="operator">&lt;</span><span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">&gt;</span> <span class="type">QObjectXmlModel</span><span class="operator">::</span>attributes(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">&amp;</span> n) <span class="keyword">const</span>
{
     <span class="type"><a href="../qtcore/qvector.html">QVector</a></span><span class="operator">&lt;</span><span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">&gt;</span> result;
     <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> <span class="operator">*</span><span class="keyword">const</span> object <span class="operator">=</span> asQObject(n);

     <span class="keyword">switch</span>(toNodeType(n))
     {
        <span class="keyword">case</span> IsQObject:
        {
            <span class="keyword">const</span> <span class="type"><a href="../qtcore/qmetaobject.html">QMetaObject</a></span> <span class="operator">*</span><span class="keyword">const</span> metaObject <span class="operator">=</span> object<span class="operator">-</span><span class="operator">&gt;</span>metaObject();
            <span class="keyword">const</span> <span class="type">int</span> count <span class="operator">=</span> metaObject<span class="operator">-</span><span class="operator">&gt;</span>propertyCount();
            result<span class="operator">.</span>append(createIndex(object<span class="operator">,</span> <span class="type">QObjectClassName</span>));

            <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> count; <span class="operator">+</span><span class="operator">+</span>i) {
                <span class="keyword">const</span> <span class="type"><a href="../qtcore/qmetaproperty.html">QMetaProperty</a></span> qmp(metaObject<span class="operator">-</span><span class="operator">&gt;</span>property(i));
                <span class="keyword">const</span> <span class="type">int</span> ii <span class="operator">=</span> metaObject<span class="operator">-</span><span class="operator">&gt;</span>indexOfProperty(qmp<span class="operator">.</span>name());
                <span class="keyword">if</span> (i <span class="operator">=</span><span class="operator">=</span> ii)
                    result<span class="operator">.</span>append(createIndex(object<span class="operator">,</span> <span class="type">QObjectProperty</span> <span class="operator">|</span> i));
            }
            <span class="keyword">return</span> result;
        }
        <span class="keyword">default</span>:
            <span class="keyword">return</span> <span class="type"><a href="../qtcore/qvector.html">QVector</a></span><span class="operator">&lt;</span><span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span><span class="operator">&gt;</span>();
     }
}</pre>
<p><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#qobject-attributes">attributes()</a> is one of the callback functions you have to implement in your custom node model class. It returns a <a href="../qtcore/qvector.html">QVector</a> of <a href="../qtxmlpatterns/qxmlnodemodelindex.html">node indexes</a> for all the attribute nodes for <a href="../qtcore/qobject.html">QObject</a> <code>n</code>. It calls <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#createIndex">createIndex()</a> in two places. Both calls use the <a href="../qtcore/qobject.html">QObject</a> pointer from the current node <code>n</code> (the element node), and just add a different value for the <i>additional data</i> parameter. This makes sense because, in XML, the attributes of an element are part of that element.</p>
<a name="traversing-the-node-model"></a>
<h4 >Traversing The Node Model</h4>
<p>The query engine traverses the <a href="../qtcore/qobject.html">QObject</a> tree by calling back to the node model class's implementation of <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#qobject-nextfromsimpleaxis">nextFromSimpleAxis()</a>. This function is the heart of the callback interface, and it will probably be the most complex to implement in your custom node model class. Below is a partial listing of the implementation for this example. The full listing will be shown in <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#including-the-qmetaobject-tree">Including The QMetaObject Tree</a>, where we discuss traversing the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree.</p>
<a name="qobject-nextfromsimpleaxis"></a><pre class="cpp"><span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="type">QObjectXmlModel</span><span class="operator">::</span>nextFromSimpleAxis(SimpleAxis axis<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n) <span class="keyword">const</span>
{
    <span class="keyword">switch</span> (toNodeType(n))
    {
        <span class="keyword">case</span> IsQObject:
        {
            <span class="keyword">switch</span> (axis)
            {
                <span class="keyword">case</span> Parent:
                    <span class="keyword">return</span> createIndex(asQObject(n)<span class="operator">-</span><span class="operator">&gt;</span>parent());

                <span class="keyword">case</span> FirstChild:
                {
                    <span class="keyword">if</span> (<span class="operator">!</span>asQObject(n) <span class="operator">|</span><span class="operator">|</span> asQObject(n)<span class="operator">-</span><span class="operator">&gt;</span>children()<span class="operator">.</span>isEmpty())
                        <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
                    <span class="keyword">else</span>
                        <span class="keyword">return</span> createIndex(asQObject(n)<span class="operator">-</span><span class="operator">&gt;</span>children()<span class="operator">.</span>first());
                }

                <span class="keyword">case</span> NextSibling:
                    <span class="keyword">return</span> qObjectSibling(<span class="number">1</span><span class="operator">,</span> n);

                <span class="keyword">case</span> PreviousSibling:
                {
                    <span class="keyword">if</span> (asQObject(n) <span class="operator">=</span><span class="operator">=</span> m_root)
                        <span class="keyword">return</span> createIndex(<span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span>(<span class="number">0</span>)<span class="operator">,</span> MetaObjects);
                    <span class="keyword">else</span>
                        <span class="keyword">return</span> qObjectSibling(<span class="operator">-</span><span class="number">1</span><span class="operator">,</span> n);
                }
            }
            Q_ASSERT(<span class="keyword">false</span>);
        }

        <span class="keyword">case</span> <span class="type">QObjectClassName</span>:
        <span class="keyword">case</span> <span class="type">QObjectProperty</span>:
        {
            Q_ASSERT(axis <span class="operator">=</span><span class="operator">=</span> Parent);
            <span class="keyword">return</span> createIndex(asQObject(n));
        }
    }

    Q_ASSERT(<span class="keyword">false</span>);
    <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
}</pre>
<p>The main switch uses <code>toNodeType()</code>, which obtains the node type from <a href="../qtxmlpatterns/qxmlnodemodelindex.html#additionalData">QXmlNodeModelIndex::additionalData</a>():</p>
<pre class="cpp"><span class="type">QObjectXmlModel</span><span class="operator">::</span><span class="type">QObjectNodeType</span> <span class="type">QObjectXmlModel</span><span class="operator">::</span>toNodeType(<span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n)
{
    <span class="keyword">return</span> <span class="type">QObjectNodeType</span>(n<span class="operator">.</span>additionalData() <span class="operator">&amp;</span> (<span class="number">15</span> <span class="operator">&lt;</span><span class="operator">&lt;</span> <span class="number">26</span>));
}</pre>
<p><code>case IsObject</code> case is the most interesting. It switches again on the value of the <code>axis</code> parameter, which specifies the direction the query engine wants to take from the current node. It is one of the four enum values of <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">QAbstractXmlNodeModel::SimpleAxis</a>. The <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">Parent</a> and <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">FirstChild</a> cases reduce to calls to <a href="../qtcore/qobject.html#parent">QObject::parent</a>() and <a href="../qtcore/qobject.html#children">QObject::children</a>() respectively. Note that a default constructed <a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a> is returned in the <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">Parent</a> case if the current node is the root, and in the <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">FirstChild</a> case if the current node has no children.</p>
<p>For the <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">NextSibling</a> and <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">PreviousSibling</a> axes, the helper function <code>qObjectSibling()</code> is called, with +1 to traverse to the <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">NextSibling</a> and -1 to traverse to the <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">PreviousSibling</a>.</p>
<pre class="cpp"><span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="type">QObjectXmlModel</span><span class="operator">::</span>qObjectSibling(<span class="keyword">const</span> <span class="type">int</span> pos<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n) <span class="keyword">const</span>
{
    Q_ASSERT(pos <span class="operator">=</span><span class="operator">=</span> <span class="number">1</span> <span class="operator">|</span><span class="operator">|</span> pos <span class="operator">=</span><span class="operator">=</span> <span class="operator">-</span><span class="number">1</span>);
    Q_ASSERT(asQObject(n));

    <span class="keyword">const</span> <span class="type"><a href="../qtcore/qobject.html">QObject</a></span> <span class="operator">*</span>parent <span class="operator">=</span> asQObject(n)<span class="operator">-</span><span class="operator">&gt;</span>parent();
    <span class="keyword">if</span> (parent) {
        <span class="keyword">const</span> <span class="type"><a href="../qtcore/qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="../qtcore/qobject.html">QObject</a></span> <span class="operator">*</span><span class="operator">&gt;</span> <span class="operator">&amp;</span>children <span class="operator">=</span> parent<span class="operator">-</span><span class="operator">&gt;</span>children();
        <span class="keyword">const</span> <span class="type">int</span> siblingPos <span class="operator">=</span> children<span class="operator">.</span>indexOf(asQObject(n)) <span class="operator">+</span> pos;

        <span class="keyword">if</span> (siblingPos <span class="operator">&gt;</span><span class="operator">=</span> <span class="number">0</span> <span class="operator">&amp;</span><span class="operator">&amp;</span> siblingPos <span class="operator">&lt;</span> children<span class="operator">.</span>count())
            <span class="keyword">return</span> createIndex(children<span class="operator">.</span>at(siblingPos));
        <span class="keyword">else</span>
            <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
    }
    <span class="keyword">else</span>
        <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
}</pre>
<p><code>qObjectSibling()</code> determines whether or not the node has any siblings. It is called with <code>n</code>, the index of the current node. If the current node is a child, then it has a parent with children (the current node one of these). So, we get the <a href="../qtcore/qobject.html#parent">parent</a>, obtain the parent's <a href="../qtcore/qobject.html#children">child list</a>, find the current node in the list, and construct the node index for the next or previous child (sibling) and return it.</p>
<p><b>Note: </b>In <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#qobject-nextfromsimpleaxis">nextFromSimpleAxis()</a>, the special case of asking for the <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">PreviousSibling</a> of the root node is discussed in <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#including-the-qmetaobject-tree">Including The QMetaObject Tree</a>.</p><p>Traversing away from a <code>QObjectClassName</code> attribute node or a <code>QObjectProperty</code> attribute node might seem a bit confusing at first glance. The only move allowed from an attribute node is to the <a href="../qtxmlpatterns/qabstractxmlnodemodel.html#SimpleAxis-enum">Parent</a>, because attribute nodes don't have children. But these two cases simply return the <a href="../qtxmlpatterns/qxmlnodemodelindex.html">node index</a> of the current node.</p>
<pre class="cpp">        <span class="keyword">case</span> <span class="type">QObjectClassName</span>:
        <span class="keyword">case</span> <span class="type">QObjectProperty</span>:
        {
            Q_ASSERT(axis <span class="operator">=</span><span class="operator">=</span> Parent);
            <span class="keyword">return</span> createIndex(asQObject(n));
        }</pre>
<p>Since <code>n</code> is the <a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a> of the current node, all this does is create another <a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a> for the current node and return it. This was explained above in <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#accessing-the-node-model">Accessing The Node Model</a>, where we saw that each <a href="../qtcore/qobject.html">QObject</a> in the node model actually represents an element node and potentially many attribute nodes. Traversing to the parent node of an attribute simply creates a node index for the same <a href="../qtcore/qobject.html">QObject</a>, but with an <i>additional data</i> value of 0 (<code>IsQObject</code>).</p>
<p>If we only wanted to traverse the <a href="../qtcore/qobject.html">QObject</a> tree with <a href="../qtxmlpatterns/xmlprocessing.html">XQuery</a>, we could just implement the rest of the virtual callback functions listed earlier and we would be done. The implementations for the remaining functions are straightforward. But if we also want to use <a href="../qtxmlpatterns/xmlprocessing.html">XQuery</a> to traverse the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree, we must include the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree in the custom node model.</p>
<a name="including-the-qmetaobject-tree"></a>
<h4 >Including The QMetaObject Tree</h4>
<p>The <a href="../qtcore/metaobjects.html#meta-object-system">metaobject system</a> not only enables Qt's <a href="../qtcore/signalsandslots.html#signals-and-slots">signals and slots</a>, it also provides type information that is useful at run-time; e.g&#x2e;, getting and setting properties without knowing the property names at compile time. Each <a href="../qtcore/qobject.html">QObject</a> has an associated <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree which contains all this useful type information. Given a <a href="../qtcore/qobject.html">QObject</a>, its <a href="../qtcore/qmetaobject.html">QMetaObject</a> is obtained with <a href="../qtcore/qobject.html#metaObject">QObject::metaObject</a>(). Then <a href="../qtcore/qmetaobject.html#superClass">QMetaObject::superClass</a>() can be called repeatedly to get the <a href="../qtcore/qmetaobject.html">QMetaObject</a> for each class in the class hierarchy for the original <a href="../qtcore/qobject.html">QObject</a>.</p>
<p>However, the <a href="../qtcore/qmetaobject.html">QMetaObject</a> hierarchy is a second tree in a plan that exists logically behind the plane of the <a href="../qtcore/qobject.html">QObject</a> tree. The <a href="../qtxmlpatterns/qtxmlpatterns-module.html">QtXmlPatterns</a> query engine can only traverse a two dimensional node model that represents an XML tree. If we want to include the <a href="../qtcore/qmetaobject.html">QMetaObject</a> in the same node model that represents the <a href="../qtcore/qobject.html">QObject</a> tree, we must find a way to flatten the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree into the same plane as the <a href="../qtcore/qobject.html">QObject</a> tree.</p>
<p>The node model class declares <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#all-metaobjects">m_allMetaObjects</a> as a vector of pointers to <a href="../qtcore/qmetaobject.html">QMetaObject</a>:</p>
<a name="all-metaobjects"></a><pre class="cpp">    <span class="keyword">typedef</span> <span class="type"><a href="../qtcore/qvector.html">QVector</a></span><span class="operator">&lt;</span><span class="keyword">const</span> <span class="type"><a href="../qtcore/qmetaobject.html">QMetaObject</a></span> <span class="operator">*</span><span class="operator">&gt;</span> AllMetaObjects;
    <span class="keyword">const</span> AllMetaObjects    m_allMetaObjects;</pre>
<p>This vector gets populated by the QObjectXmlModel constructor by calling the private allMetaObjects() function:</p>
<pre class="cpp"><span class="type">QObjectXmlModel</span><span class="operator">::</span>AllMetaObjects <span class="type">QObjectXmlModel</span><span class="operator">::</span>allMetaObjects() <span class="keyword">const</span>
{
    <span class="type"><a href="../qtxmlpatterns/qxmlquery.html">QXmlQuery</a></span> query(namePool());
    query<span class="operator">.</span>bindVariable(<span class="string">&quot;root&quot;</span><span class="operator">,</span> root());
    query<span class="operator">.</span>setQuery(<span class="string">&quot;declare variable $root external;&quot;</span>
                   <span class="string">&quot;$root/descendant-or-self::QObject&quot;</span>);
    Q_ASSERT(query<span class="operator">.</span>isValid());

    <span class="type"><a href="../qtxmlpatterns/qxmlresultitems.html">QXmlResultItems</a></span> result;
    query<span class="operator">.</span>evaluateTo(<span class="operator">&amp;</span>result);
    <span class="type"><a href="../qtxmlpatterns/qxmlitem.html">QXmlItem</a></span> i(result<span class="operator">.</span>next());

    AllMetaObjects objects;
    <span class="keyword">while</span> (<span class="operator">!</span>i<span class="operator">.</span>isNull()) {
        <span class="keyword">const</span> <span class="type"><a href="../qtcore/qmetaobject.html">QMetaObject</a></span> <span class="operator">*</span>moo <span class="operator">=</span> asQObject(i<span class="operator">.</span>toNodeModelIndex())<span class="operator">-</span><span class="operator">&gt;</span>metaObject();
        <span class="keyword">while</span> (moo) {
            <span class="keyword">if</span> (<span class="operator">!</span>objects<span class="operator">.</span>contains(moo))
                objects<span class="operator">.</span>append(moo);
            moo <span class="operator">=</span> moo<span class="operator">-</span><span class="operator">&gt;</span>superClass();
        }
        i <span class="operator">=</span> result<span class="operator">.</span>next();
    }

    Q_ASSERT(<span class="operator">!</span>objects<span class="operator">.</span>contains(<span class="number">0</span>));
    <span class="keyword">return</span> objects;
}</pre>
<p>The first half of the function is an example of the standard code pattern for using <a href="../qtxmlpatterns/qtxmlpatterns-module.html">QtXmlPatterns</a> to run an <a href="../qtxmlpatterns/xmlprocessing.html">XQuery</a>. First it creates an instance of <a href="../qtxmlpatterns/qxmlquery.html">QXmlQuery</a>. Then it <a href="../qtxmlpatterns/qxmlquery.html#bindVariable">binds</a> the <a href="../qtxmlpatterns/xmlprocessing.html">XQuery</a> variable <code>$root</code> to the root node of the of the node model; i.e&#x2e;, the root of the <a href="../qtcore/qobject.html">QObject</a> tree. Then it <a href="../qtxmlpatterns/qxmlquery.html#setQuery">sets the query</a> to be an <a href="../qtxmlpatterns/xmlprocessing.html">XQuery</a> that returns all the <a href="../qtwebkit/qtwebkit-bridge.html#qobjects">QObjects</a> in the node model. Finally, the query is evaluated into a <a href="../qtxmlpatterns/qxmlresultitems.html">result item list</a>.</p>
<p><b>Note: </b><a href="../qtxmlpatterns/qxmlquery.html#bindVariable">QXmlQuery::bindVariable</a>() must be called before <a href="../qtxmlpatterns/qxmlquery.html#setQuery">QXmlQuery::setQuery</a>(), because setting the query causes <a href="../qtxmlpatterns/qtxmlpatterns-module.html">QtXmlPatterns</a> to <i>compile</i> the <a href="../qtxmlpatterns/xmlprocessing.html">XQuery</a>, which requires knowledge of the variable bindings.</p><p>The second half of the function traverses the <a href="../qtxmlpatterns/qxmlresultitems.html">result item list</a>, getting the <a href="../qtcore/qmetaobject.html">QMetaObject</a> hierarchy for each <a href="../qtcore/qobject.html">QObject</a> and appending it to <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#all-metaobjects">m_allMetaObjects</a>, if it isn't already there. But how do we include this vector of pointers to QMetaObjects in the node model? The key insight is shown in the full listing of <a href="qtwebkitexamples-webkitwidgets-xmlpatterns-example.html#full-listing-of-nextfromsimpleaxis">nextFromSimpleAxis()</a>, where we are interested now in the <code>MetaObjectXXX</code> cases:</p>
<a name="full-listing-of-nextfromsimpleaxis"></a><pre class="cpp"><span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="type">QObjectXmlModel</span><span class="operator">::</span>nextFromSimpleAxis(SimpleAxis axis<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span> <span class="operator">&amp;</span>n) <span class="keyword">const</span>
{
    <span class="keyword">switch</span> (toNodeType(n))
    {
        <span class="keyword">case</span> IsQObject:
        {
            <span class="keyword">switch</span> (axis)
            {
                <span class="keyword">case</span> Parent:
                    <span class="keyword">return</span> createIndex(asQObject(n)<span class="operator">-</span><span class="operator">&gt;</span>parent());

                <span class="keyword">case</span> FirstChild:
                {
                    <span class="keyword">if</span> (<span class="operator">!</span>asQObject(n) <span class="operator">|</span><span class="operator">|</span> asQObject(n)<span class="operator">-</span><span class="operator">&gt;</span>children()<span class="operator">.</span>isEmpty())
                        <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
                    <span class="keyword">else</span>
                        <span class="keyword">return</span> createIndex(asQObject(n)<span class="operator">-</span><span class="operator">&gt;</span>children()<span class="operator">.</span>first());
                }

                <span class="keyword">case</span> NextSibling:
                    <span class="keyword">return</span> qObjectSibling(<span class="number">1</span><span class="operator">,</span> n);

                <span class="keyword">case</span> PreviousSibling:
                {
                    <span class="keyword">if</span> (asQObject(n) <span class="operator">=</span><span class="operator">=</span> m_root)
                        <span class="keyword">return</span> createIndex(<span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span>(<span class="number">0</span>)<span class="operator">,</span> MetaObjects);
                    <span class="keyword">else</span>
                        <span class="keyword">return</span> qObjectSibling(<span class="operator">-</span><span class="number">1</span><span class="operator">,</span> n);
                }
            }
            Q_ASSERT(<span class="keyword">false</span>);
        }

        <span class="keyword">case</span> <span class="type">QObjectClassName</span>:
        <span class="keyword">case</span> <span class="type">QObjectProperty</span>:
        {
            Q_ASSERT(axis <span class="operator">=</span><span class="operator">=</span> Parent);
            <span class="keyword">return</span> createIndex(asQObject(n));
        }
        <span class="keyword">case</span> MetaObjects:
        {
            <span class="keyword">switch</span> (axis)
            {
                <span class="keyword">case</span> Parent:
                    <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
                <span class="keyword">case</span> PreviousSibling:
                    <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
                <span class="keyword">case</span> NextSibling:
                    <span class="keyword">return</span> root();
                <span class="keyword">case</span> FirstChild:
                {
                    <span class="keyword">return</span> createIndex(<span class="keyword">const_cast</span><span class="operator">&lt;</span><span class="type"><a href="../qtcore/qmetaobject.html">QMetaObject</a></span><span class="operator">*</span><span class="operator">&gt;</span>(m_allMetaObjects<span class="operator">.</span>first())<span class="operator">,</span>MetaObject);
                }
            }
            Q_ASSERT(<span class="keyword">false</span>);
        }

        <span class="keyword">case</span> MetaObject:
        {
            <span class="keyword">switch</span> (axis)
            {
                <span class="keyword">case</span> FirstChild:
                    <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
                <span class="keyword">case</span> Parent:
                    <span class="keyword">return</span> createIndex(<span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span>(<span class="number">0</span>)<span class="operator">,</span> MetaObjects);
                <span class="keyword">case</span> PreviousSibling:
                    <span class="keyword">return</span> metaObjectSibling(<span class="operator">-</span><span class="number">1</span><span class="operator">,</span> n);
                <span class="keyword">case</span> NextSibling:
                    <span class="keyword">return</span> metaObjectSibling(<span class="number">1</span><span class="operator">,</span> n);
            }
        }

        <span class="keyword">case</span> MetaObjectClassName:
        <span class="keyword">case</span> MetaObjectSuperClass:
        {
            Q_ASSERT(axis <span class="operator">=</span><span class="operator">=</span> Parent);
            <span class="keyword">return</span> createIndex(asQObject(n)<span class="operator">,</span> MetaObject);
        }
    }

    Q_ASSERT(<span class="keyword">false</span>);
    <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
}</pre>
<p>But first, revisit the <code>PreviousSibling</code> case for the <code>IsQObject</code> case:</p>
<pre class="cpp">                <span class="keyword">case</span> PreviousSibling:
                {
                    <span class="keyword">if</span> (asQObject(n) <span class="operator">=</span><span class="operator">=</span> m_root)
                        <span class="keyword">return</span> createIndex(<span class="type"><a href="../qtcore/qtglobal.html#qint64-typedef">qint64</a></span>(<span class="number">0</span>)<span class="operator">,</span> MetaObjects);
                    <span class="keyword">else</span>
                        <span class="keyword">return</span> qObjectSibling(<span class="operator">-</span><span class="number">1</span><span class="operator">,</span> n);
                }</pre>
<p>When asking for the previous sibling of the root of the <a href="../qtcore/qobject.html">QObject</a> tree, it creates a node model index with a null <a href="../qtcore/qobject.html">QObject</a> pointer and an <code>additionalData</code> value of <code>MetaObjects</code>. This effectively allows the query engine to jump from the <a href="../qtcore/qobject.html">QObject</a> tree to the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree.</p>
<p>The query engine can jump from the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree back to the <a href="../qtcore/qobject.html">QObject</a> tree in the <code>NextSibling</code> case of case <code>MetaObjects</code>, where the <code>root()</code> function is called:</p>
<pre class="cpp">        <span class="keyword">case</span> MetaObjects:
        {
            <span class="keyword">switch</span> (axis)
            {
                <span class="keyword">case</span> Parent:
                    <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
                <span class="keyword">case</span> PreviousSibling:
                    <span class="keyword">return</span> <span class="type"><a href="../qtxmlpatterns/qxmlnodemodelindex.html">QXmlNodeModelIndex</a></span>();
                <span class="keyword">case</span> NextSibling:
                    <span class="keyword">return</span> root();
                <span class="keyword">case</span> FirstChild:
                {
                    <span class="keyword">return</span> createIndex(<span class="keyword">const_cast</span><span class="operator">&lt;</span><span class="type"><a href="../qtcore/qmetaobject.html">QMetaObject</a></span><span class="operator">*</span><span class="operator">&gt;</span>(m_allMetaObjects<span class="operator">.</span>first())<span class="operator">,</span>MetaObject);
                }
            }
            Q_ASSERT(<span class="keyword">false</span>);
        }</pre>
<p>Having jumped from the <a href="../qtcore/qobject.html">QObject</a> tree to the <a href="../qtcore/qmetaobject.html">QMetaObject</a> tree, the query engine will use the <code>MetaObject</code>, <code>MetaObjectClassName</code>, and <code>MetaObjectSuperClass</code> cases, which are similar to the cases for <code>IsQObject</code>, <code>QObjectProperty</code>, and <code>QObjectClassName</code>.</p>
<p>Files:</p>
<ul>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-mainwindow-cpp.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/mainwindow.cpp</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-mainwindow-h.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/mainwindow.h</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-qobjectxmlmodel-cpp.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.cpp</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-qobjectxmlmodel-h.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.h</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-xmlsyntaxhighlighter-cpp.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/xmlsyntaxhighlighter.cpp</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-xmlsyntaxhighlighter-h.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/xmlsyntaxhighlighter.h</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-forms-mainwindow-ui.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/forms/mainwindow.ui</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-queries-statisticsinhtml-xq.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/queries/statisticsInHTML.xq</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-queries-wholetree-xq.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/queries/wholeTree.xq</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-main-cpp.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/main.cpp</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-xmlpatterns-pro.html">webkitwidgets/xmlpatterns/xmlpatterns.pro</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-qobjectxmlmodel-pro.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/qobjectxmlmodel.pro</a></li>
<li><a href="qtwebkitexamples-webkitwidgets-xmlpatterns-qobjectxmlmodel-queries-qrc.html">webkitwidgets/xmlpatterns/qobjectxmlmodel/queries.qrc</a></li>
</ul>
</div>
<!-- @@@webkitwidgets/xmlpatterns -->
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2015 The Qt Company Ltd.
   Documentation contributions included herein are the copyrights of
   their respective owners.<br>    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.<br>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>