This file is indexed.

/usr/share/qt5/doc/qtxmlpatterns/qxmlnodemodelindex.html is in qtxmlpatterns5-doc-html 5.2.1-3.

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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.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" />
<!-- qabstractxmlnodemodel.cpp -->
  <title>QXmlNodeModelIndex Class | QtXmlPatterns </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.2</li>
<li><a href="qtxmlpatterns-index.html">Qt XML Patterns</a></li>
<li><a href="qtxmlpatterns-module.html">C++ Classes</a></li>
<li>QXmlNodeModelIndex</li>
<li id="buildversion">
Qt 5.2.1 Reference Documentation</li>
    </ul>
    </div>
</div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#public-types">Public Types</a></li>
<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">QXmlNodeModelIndex Class</h1>
<!-- $$$QXmlNodeModelIndex-brief -->
<p>The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a>. <a href="#details">More...</a></p>
<!-- @@@QXmlNodeModelIndex -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include &lt;QXmlNodeModelIndex&gt;</span>
</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> <tt>QT += xmlpatterns</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 4.4</td></tr></table><p><b>Note:</b> All functions in this class are reentrant.</p>
<ul>
<li><a href="qxmlnodemodelindex-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#DocumentOrder-enum">DocumentOrder</a></b> { Precedes, Follows, Is }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> typedef </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#List-typedef">List</a></b></td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#NodeKind-enum">NodeKind</a></b> { Attribute, Text, Comment, Document, ..., ProcessingInstruction }</td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#QXmlNodeModelIndex">QXmlNodeModelIndex</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#QXmlNodeModelIndex-2">QXmlNodeModelIndex</a></b>(const QXmlNodeModelIndex &amp;<i> other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#additionalData">additionalData</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qint64 </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#data">data</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void * </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#internalPointer">internalPointer</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#isNull">isNull</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> const QAbstractXmlNodeModel * </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#model">model</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#operator-not-eq">operator!=</a></b>(const QXmlNodeModelIndex &amp;<i> other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qxmlnodemodelindex.html#operator-eq-eq">operator==</a></b>(const QXmlNodeModelIndex &amp;<i> other</i>) const</td></tr>
</table>
<a name="details"></a>
<!-- $$$QXmlNodeModelIndex-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QXmlNodeModelIndex class identifies a node in an XML node model subclassed from <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a>.</p>
<p>QXmlNodeModelIndex is an index into an <a href="qabstractxmlnodemodel.html">XML node model</a>. It contains:</p>
<ul>
<li>A pointer to an <a href="qabstractxmlnodemodel.html">XML node model</a>, which is returned by <a href="qxmlnodemodelindex.html#model">model</a>(), and</li>
<li>Some data, which is returned by <a href="qxmlnodemodelindex.html#data">data</a>(), <a href="qxmlnodemodelindex.html#internalPointer">internalPointer</a>(), and <a href="qxmlnodemodelindex.html#additionalData">additionalData</a>().</li>
</ul>
<p>Because QXmlNodeModelIndex is intentionally a simple class, it doesn't have member functions for accessing the properties of nodes. For example, it doesn't have functions for getting a node's name or its list of attributes or child nodes. If you find that you need to retrieve this kind of information from your query results, there are two ways to proceed.</p>
<ul>
<li>Send the output of your <a href="xmlprocessing.html">XQuery</a> to an <a href="qabstractxmlreceiver.html">XML receiver</a>, or</li>
<li>Let your <a href="xmlprocessing.html">XQuery</a> do all the work to produce the desired result.</li>
</ul>
<p>The second case is explained by example. Suppose you want to populate a list widget with the values of certain attributes from a set of result elements. You could write an <a href="xmlprocessing.html">XQuery</a> to return the set of elements, and then you would write the code to iterate over the result elements, get their attributes, and extract the desired string values. But the simpler way is to just augment your <a href="xmlprocessing.html">XQuery</a> to finding the desired attribute values. Then all you have to do is evaluate the <a href="xmlprocessing.html">XQuery</a> using the version of <a href="qxmlquery.html#evaluateTo">QXmlQuery::evaluateTo</a>() that populates a QStringList, which you can send directly to your widget.</p>
<p>QXmlNodeModelIndex doesn't impose any restrictions on the <tt>data</tt> value an QXmlNodeModelIndex should contain. The meaning of the data left to the associated <a href="qabstractxmlnodemodel.html">node model</a>. Because QXmlNodeModelIndex depends on a particular subclass of <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> for its existence, the only way you can create an instance of QXmlNodeModelIndex is by asking the node model to create one for you with <a href="qabstractxmlnodemodel.html#createIndex">QAbstractXmlNodeModel::createIndex</a>(). Since that function is protected, it is usually a good idea to write a public function that creates a QXmlNodeModelIndex from arguments that are appropriate for your particular node model.</p>
<p>A default constructed node index is said to be null, i.e&#x2e;, <a href="qxmlnodemodelindex.html#isNull">isNull</a>() returns true.</p>
<p>QXmlNodeModelIndex and <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> follow the same design pattern used for QModelIndex and QAbstractItemModel.</p>
</div>
<!-- @@@QXmlNodeModelIndex -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$DocumentOrder$$$Precedes$$$Is$$$Follows -->
<h3 class="fn"><a name="DocumentOrder-enum"></a>enum QXmlNodeModelIndex::<span class="name">DocumentOrder</span></h3>
<p>Identifies the specific node comparison operator that should be used.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Precedes</tt></td><td class="topAlign"><tt>-1</tt></td><td class="topAlign">Signifies the <tt>\&lt;\&lt;</tt> operator. Test whether the first operand precedes the second in the document.</td></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Follows</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Signifies the <tt>\&gt;\&gt;</tt> operator. Test whether the first operand follows the second in the document.</td></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Is</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">Signifies the <tt>is</tt> operator. Test whether two nodes have the same node identity.</td></tr>
</table>
<!-- @@@DocumentOrder -->
<!-- $$$List -->
<h3 class="fn"><a name="List-typedef"></a>typedef QXmlNodeModelIndex::<span class="name">List</span></h3>
<p>Typedef for QList&lt;<a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a>&gt;.</p>
<!-- @@@List -->
<!-- $$$NodeKind$$$Attribute$$$Comment$$$Document$$$Element$$$Namespace$$$ProcessingInstruction$$$Text -->
<h3 class="fn"><a name="NodeKind-enum"></a>enum QXmlNodeModelIndex::<span class="name">NodeKind</span></h3>
<p>Identifies a kind of node.</p>
<table class="valuelist"><tr valign="top" class="odd"><th class="tblConst">Constant</th><th class="tblval">Value</th><th class="tbldscr">Description</th></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Attribute</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Identifies an attribute node</td></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Text</tt></td><td class="topAlign"><tt>64</tt></td><td class="topAlign">Identifies a text node</td></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Comment</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">Identifies a comment node</td></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Document</tt></td><td class="topAlign"><tt>4</tt></td><td class="topAlign">Identifies a document node</td></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Element</tt></td><td class="topAlign"><tt>8</tt></td><td class="topAlign">Identifies an element node</td></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::Namespace</tt></td><td class="topAlign"><tt>16</tt></td><td class="topAlign">Identifies a namespace node</td></tr>
<tr><td class="topAlign"><tt>QXmlNodeModelIndex::ProcessingInstruction</tt></td><td class="topAlign"><tt>32</tt></td><td class="topAlign">Identifies a processing instruction.</td></tr>
</table>
<p>Note that the optional XML declaration at very beginning of the XML document is not a processing instruction</p>
<p><b>See also </b><a href="qabstractxmlnodemodel.html#kind">QAbstractXmlNodeModel::kind</a>().</p>
<!-- @@@NodeKind -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QXmlNodeModelIndex[overload1]$$$QXmlNodeModelIndex -->
<h3 class="fn"><a name="QXmlNodeModelIndex"></a>QXmlNodeModelIndex::<span class="name">QXmlNodeModelIndex</span>()</h3>
<p>Default constructor. Creates an item that is <tt>null</tt>.</p>
<p><b>See also </b><a href="qxmlnodemodelindex.html#isNull">isNull</a>().</p>
<!-- @@@QXmlNodeModelIndex -->
<!-- $$$QXmlNodeModelIndex$$$QXmlNodeModelIndexconstQXmlNodeModelIndex& -->
<h3 class="fn"><a name="QXmlNodeModelIndex-2"></a>QXmlNodeModelIndex::<span class="name">QXmlNodeModelIndex</span>(const <span class="type">QXmlNodeModelIndex</span> &amp;<i> other</i>)</h3>
<p>Standard copy constructor. Creates a <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> instance that is a copy of <i>other</i>.</p>
<!-- @@@QXmlNodeModelIndex -->
<!-- $$$additionalData[overload1]$$$additionalData -->
<h3 class="fn"><a name="additionalData"></a><span class="type">qint64</span> QXmlNodeModelIndex::<span class="name">additionalData</span>() const</h3>
<p>Returns the second data value. The node index holds two data values. <a href="qxmlnodemodelindex.html#data">data</a>() returns the first one.</p>
<p><b>See also </b><a href="qxmlnodemodelindex.html#data">data</a>().</p>
<!-- @@@additionalData -->
<!-- $$$data[overload1]$$$data -->
<h3 class="fn"><a name="data"></a><span class="type">qint64</span> QXmlNodeModelIndex::<span class="name">data</span>() const</h3>
<p>Returns the first data value. The node index holds two data values. <a href="qxmlnodemodelindex.html#additionalData">additionalData</a>() returns the second one.</p>
<p><b>See also </b><a href="qxmlnodemodelindex.html#additionalData">additionalData</a>().</p>
<!-- @@@data -->
<!-- $$$internalPointer[overload1]$$$internalPointer -->
<h3 class="fn"><a name="internalPointer"></a><span class="type">void</span> * QXmlNodeModelIndex::<span class="name">internalPointer</span>() const</h3>
<p>Returns the first data value as a void* pointer.</p>
<p><b>See also </b><a href="qxmlnodemodelindex.html#additionalData">additionalData</a>().</p>
<!-- @@@internalPointer -->
<!-- $$$isNull[overload1]$$$isNull -->
<h3 class="fn"><a name="isNull"></a><span class="type">bool</span> QXmlNodeModelIndex::<span class="name">isNull</span>() const</h3>
<p>Returns true if this <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> is a default constructed value, otherwise false.</p>
<p>A null <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> doesn't represent any node and cannot be used in conjunction with <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a>.</p>
<!-- @@@isNull -->
<!-- $$$model[overload1]$$$model -->
<h3 class="fn"><a name="model"></a>const <span class="type"><a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a></span> * QXmlNodeModelIndex::<span class="name">model</span>() const</h3>
<p>Returns the <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> that this node index refers to. <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> does not own <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> and does not keep track of its lifetime, so this pointer will dangle if the <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> is deallocated first.</p>
<p>There is no setter for the node model because instances of <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> instances are only created with <a href="qabstractxmlnodemodel.html#createIndex">QAbstractXmlNodeModel::createIndex</a>().</p>
<!-- @@@model -->
<!-- $$$operator!=[overload1]$$$operator!=constQXmlNodeModelIndex& -->
<h3 class="fn"><a name="operator-not-eq"></a><span class="type">bool</span> QXmlNodeModelIndex::<span class="name">operator!=</span>(const <span class="type">QXmlNodeModelIndex</span> &amp;<i> other</i>) const</h3>
<p>Returns true if <i>other</i> is the same node as this.</p>
<!-- @@@operator!= -->
<!-- $$$operator==[overload1]$$$operator==constQXmlNodeModelIndex& -->
<h3 class="fn"><a name="operator-eq-eq"></a><span class="type">bool</span> QXmlNodeModelIndex::<span class="name">operator==</span>(const <span class="type">QXmlNodeModelIndex</span> &amp;<i> other</i>) const</h3>
<p>Returns true if this node is the same as <i>other</i>. This operator does not compare values, children, or names of nodes. It compares node identities, i.e&#x2e;, whether two nodes are from the same document and are found at the exact same place.</p>
<!-- @@@operator== -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2013 Digia Plc and/or its
   subsidiaries. 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>    Digia, Qt and their respective logos are trademarks of Digia Plc     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>