/usr/share/qt5/doc/qtxmlpatterns/qxmlnodemodelindex.html is in qtxmlpatterns5-doc-html 5.5.1-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 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qabstractxmlnodemodel.cpp -->
<title>QXmlNodeModelIndex Class | Qt XML Patterns 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="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.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="#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>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QXmlNodeModelIndex Class</h1>
<!-- $$$QXmlNodeModelIndex-brief -->
<p>The <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> class identifies a node in an XML node model subclassed from <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a>. <a href="#details">More...</a></p>
<!-- @@@QXmlNodeModelIndex -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QXmlNodeModelIndex></span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += xmlpatterns</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 4.4</td></tr></table></div><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 id="public-types">Public Types</h2>
<div class="table"><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></div>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><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 &<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 &<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 &<i> other</i>) const</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QXmlNodeModelIndex-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> class identifies a node in an XML node model subclassed from <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a>.</p>
<p><a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> 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 <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> 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><a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> doesn't impose any restrictions on the <code>data</code> value an <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> should contain. The meaning of the data left to the associated <a href="qabstractxmlnodemodel.html">node model</a>. Because <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> depends on a particular subclass of <a href="qabstractxmlnodemodel.html">QAbstractXmlNodeModel</a> for its existence, the only way you can create an instance of <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> 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 <a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> from arguments that are appropriate for your particular node model.</p>
<p>A default constructed node index is said to be null, i.e., <a href="qxmlnodemodelindex.html#isNull">isNull</a>() returns true.</p>
<p><a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a> 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" id="DocumentOrder-enum"><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>
<div class="table"><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"><code>QXmlNodeModelIndex::Precedes</code></td><td class="topAlign"><code>-1</code></td><td class="topAlign">Signifies the <code>\<\<</code> operator. Test whether the first operand precedes the second in the document.</td></tr>
<tr><td class="topAlign"><code>QXmlNodeModelIndex::Follows</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">Signifies the <code>\>\></code> operator. Test whether the first operand follows the second in the document.</td></tr>
<tr><td class="topAlign"><code>QXmlNodeModelIndex::Is</code></td><td class="topAlign"><code>0</code></td><td class="topAlign">Signifies the <code>is</code> operator. Test whether two nodes have the same node identity.</td></tr>
</table></div>
<!-- @@@DocumentOrder -->
<!-- $$$List -->
<h3 class="fn" id="List-typedef"><a name="List-typedef"></a>typedef QXmlNodeModelIndex::<span class="name">List</span></h3>
<p>Typedef for QList<<a href="qxmlnodemodelindex.html">QXmlNodeModelIndex</a>>.</p>
<!-- @@@List -->
<!-- $$$NodeKind$$$Attribute$$$Comment$$$Document$$$Element$$$Namespace$$$ProcessingInstruction$$$Text -->
<h3 class="fn" id="NodeKind-enum"><a name="NodeKind-enum"></a>enum QXmlNodeModelIndex::<span class="name">NodeKind</span></h3>
<p>Identifies a kind of node.</p>
<div class="table"><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"><code>QXmlNodeModelIndex::Attribute</code></td><td class="topAlign"><code>1</code></td><td class="topAlign">Identifies an attribute node</td></tr>
<tr><td class="topAlign"><code>QXmlNodeModelIndex::Text</code></td><td class="topAlign"><code>64</code></td><td class="topAlign">Identifies a text node</td></tr>
<tr><td class="topAlign"><code>QXmlNodeModelIndex::Comment</code></td><td class="topAlign"><code>2</code></td><td class="topAlign">Identifies a comment node</td></tr>
<tr><td class="topAlign"><code>QXmlNodeModelIndex::Document</code></td><td class="topAlign"><code>4</code></td><td class="topAlign">Identifies a document node</td></tr>
<tr><td class="topAlign"><code>QXmlNodeModelIndex::Element</code></td><td class="topAlign"><code>8</code></td><td class="topAlign">Identifies an element node</td></tr>
<tr><td class="topAlign"><code>QXmlNodeModelIndex::Namespace</code></td><td class="topAlign"><code>16</code></td><td class="topAlign">Identifies a namespace node</td></tr>
<tr><td class="topAlign"><code>QXmlNodeModelIndex::ProcessingInstruction</code></td><td class="topAlign"><code>32</code></td><td class="topAlign">Identifies a processing instruction.</td></tr>
</table></div>
<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" id="QXmlNodeModelIndex"><a name="QXmlNodeModelIndex"></a>QXmlNodeModelIndex::<span class="name">QXmlNodeModelIndex</span>()</h3>
<p>Default constructor. Creates an item that is <code>null</code>.</p>
<p><b>See also </b><a href="qxmlnodemodelindex.html#isNull">isNull</a>().</p>
<!-- @@@QXmlNodeModelIndex -->
<!-- $$$QXmlNodeModelIndex$$$QXmlNodeModelIndexconstQXmlNodeModelIndex& -->
<h3 class="fn" id="QXmlNodeModelIndex-2"><a name="QXmlNodeModelIndex-2"></a>QXmlNodeModelIndex::<span class="name">QXmlNodeModelIndex</span>(const <span class="type"><a href="qxmlnodemodelindex.html#QXmlNodeModelIndex">QXmlNodeModelIndex</a></span> &<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" id="additionalData"><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" id="data"><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" id="internalPointer"><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" id="isNull"><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" id="model"><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" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QXmlNodeModelIndex::<span class="name">operator!=</span>(const <span class="type"><a href="qxmlnodemodelindex.html#QXmlNodeModelIndex">QXmlNodeModelIndex</a></span> &<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" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QXmlNodeModelIndex::<span class="name">operator==</span>(const <span class="type"><a href="qxmlnodemodelindex.html#QXmlNodeModelIndex">QXmlNodeModelIndex</a></span> &<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., 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">©</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>
|