/usr/share/qt5/doc/qtversit/qversitdocument.html is in qtpim5-doc-html 5.0~git20140515~29475884-0ubuntu24~7.
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 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qversitdocument.cpp -->
<title>QVersitDocument Class | Qt 5.0</title>
<link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
<script type="text/javascript">
document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
// loading style sheet breaks anchors that were jumped to before
// so force jumping to anchor again
setTimeout(function() {
var anchor = location.hash;
// need to jump to different anchor first (e.g. none)
location.hash = "#";
setTimeout(function() {
location.hash = anchor;
}, 0);
}, 0);
</script>
</head>
<body>
<div class="header" id="qtdocheader">
<div class="main">
<div class="main-rounded">
<div class="navigationbar">
<table><tr>
<td >Qt 5.0</td><td >QVersitDocument</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.0.0 Reference Documentation</td>
</tr></table>
</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">QVersitDocument Class</h1>
<!-- $$$QVersitDocument-brief -->
<p>The <a href="qversitdocument.html">QVersitDocument</a> class is a container for a list of versit properties. <a href="#details">More...</a></p>
<!-- @@@QVersitDocument -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> <span class="preprocessor">#include <QVersitDocument></span>
</td></tr></table></div><ul>
<li><a href="qversitdocument-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="qversitdocument.html#VersitType-enum">VersitType</a></b> { InvalidType, VCard21Type, VCard30Type, VCard40Type, ICalendar20Type }</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="qversitdocument.html#QVersitDocument">QVersitDocument</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#QVersitDocument-1">QVersitDocument</a></b>(const QVersitDocument &<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#QVersitDocument-2">QVersitDocument</a></b>(VersitType <i>type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#dtor.QVersitDocument">~QVersitDocument</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#addProperty">addProperty</a></b>(const QVersitProperty &<i>property</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#addSubDocument">addSubDocument</a></b>(const QVersitDocument &<i>subdocument</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#clear">clear</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#componentType">componentType</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#isEmpty">isEmpty</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList<QVersitProperty> </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#properties">properties</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#removeProperties">removeProperties</a></b>(const QString &<i>name</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#removeProperty">removeProperty</a></b>(const QVersitProperty &<i>property</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#removeSubDocument">removeSubDocument</a></b>(const QVersitDocument &<i>subdocument</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#setComponentType">setComponentType</a></b>(QString <i>componentType</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#setProperties">setProperties</a></b>(const QList<QVersitProperty> &<i>properties</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#setSubDocuments">setSubDocuments</a></b>(const QList<QVersitDocument> &<i>documents</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#setType">setType</a></b>(VersitType <i>type</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList<QVersitDocument> </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#subDocuments">subDocuments</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> VersitType </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#type">type</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#operator-not-eq">operator!=</a></b>(const QVersitDocument &<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QVersitDocument &</td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#operator-eq">operator=</a></b>(const QVersitDocument &<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qversitdocument.html#operator-eq-eq">operator==</a></b>(const QVersitDocument &<i>other</i>) const</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QVersitDocument-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qversitdocument.html">QVersitDocument</a> class is a container for a list of versit properties.</p>
<p>A vCard is represented in abstract form as a <a href="qversitdocument.html">QVersitDocument</a> that consists of a number of properties such as a name (N), a telephone number (TEL) and an email address (EMAIL), for instance. Each of these properties is stored as an instance of a <a href="qversitproperty.html">QVersitProperty</a> in a <a href="qversitdocument.html">QVersitDocument</a>.</p>
<p>In addition to the list of properties, <a href="qversitdocument.html">QVersitDocument</a> also records the type of the Versit document in two ways. The <a href="qversitdocument.html#VersitType-enum">VersitType</a> enum describes the format in which the document is to be serialized by <a href="qversitwriter.html">QVersitWriter</a> (or the format from which it was read by <a href="qversitreader.html">QVersitReader</a>), and should not be used to infer any semantics about the document data. The <a href="qversitdocument.html#componentType">componentType</a> field is a string corresponding directly to the value of the BEGIN line in a document. For example, for a vCard, this will always be the string "VCARD"; for an iCalendar, it could be "VCALENDAR", "VEVENT", "VTODO", "VJOURNAL", "VALARM" or "VTIMEZONE".</p>
<p>As well as properties, a <a href="qversitdocument.html">QVersitDocument</a> can hold other documents. For iCalendar, this is how a single VCALENDAR document can compose documents of type VEVENT, VTODO, etc.</p>
<p>For example, for the following iCalendar:</p>
<pre class="cpp">
BEGIN:VCALENDAR
VERSION:<span class="number">2.0</span>
BEGIN:VEVENT
SUMMARY:Christmas
DTSTART:<span class="number">20001225</span>
END:VEVENT
END:VCALENDAR
</pre>
<p>This can be represented as a <a href="qversitdocument.html">QVersitDocument</a> of with <a href="qversitdocument.html#componentType">componentType</a> VCALENDAR and versitType <a href="qversitdocument.html#VersitType-enum">ICalendar20Type</a>. It contains no properties (note: the VERSION property is not stored explicitly as a property) and one sub-document. The sub-document has <a href="qversitdocument.html#componentType">componentType</a> VEVENT and versitType <a href="qversitdocument.html#VersitType-enum">ICalendar20Type</a>, and contains two properties.</p>
<p><a href="qversitdocument.html">QVersitDocument</a> supports implicit sharing.</p>
</div>
<p><b>See also </b><a href="qversitproperty.html">QVersitProperty</a>.</p>
<!-- @@@QVersitDocument -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$VersitType$$$InvalidType$$$VCard21Type$$$VCard30Type$$$VCard40Type$$$ICalendar20Type -->
<h3 class="fn" id="VersitType-enum"><a name="VersitType-enum"></a>enum QVersitDocument::<span class="name">VersitType</span></h3>
<p>This enum describes a Versit document serialization format and version.</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>QVersitDocument::InvalidType</code></td><td class="topAlign tblval"><code>0</code></td><td class="topAlign">No type specified or a document with an invalid type was parsed</td></tr>
<tr><td class="topAlign"><code>QVersitDocument::VCard21Type</code></td><td class="topAlign tblval"><code>1</code></td><td class="topAlign">vCard version 2.1</td></tr>
<tr><td class="topAlign"><code>QVersitDocument::VCard30Type</code></td><td class="topAlign tblval"><code>2</code></td><td class="topAlign">vCard version 3.0</td></tr>
<tr><td class="topAlign"><code>QVersitDocument::VCard40Type</code></td><td class="topAlign tblval"><code>3</code></td><td class="topAlign">vCard version 4.0</td></tr>
<tr><td class="topAlign"><code>QVersitDocument::ICalendar20Type</code></td><td class="topAlign tblval"><code>4</code></td><td class="topAlign">iCalendar version 2.0</td></tr>
</table></div>
<!-- @@@VersitType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QVersitDocument[overload1]$$$QVersitDocument -->
<h3 class="fn" id="QVersitDocument"><a name="QVersitDocument"></a>QVersitDocument::<span class="name">QVersitDocument</span>()</h3>
<p>Constructs a new empty document</p>
<!-- @@@QVersitDocument -->
<!-- $$$QVersitDocument$$$QVersitDocumentconstQVersitDocument& -->
<h3 class="fn" id="QVersitDocument-1"><a name="QVersitDocument-1"></a>QVersitDocument::<span class="name">QVersitDocument</span>(const <span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span> &<i>other</i>)</h3>
<p>Constructs a document that is a copy of <i>other</i></p>
<!-- @@@QVersitDocument -->
<!-- $$$QVersitDocument$$$QVersitDocumentVersitType -->
<h3 class="fn" id="QVersitDocument-2"><a name="QVersitDocument-2"></a>QVersitDocument::<span class="name">QVersitDocument</span>(<span class="type"><a href="qversitdocument.html#VersitType-enum">VersitType</a></span> <i>type</i>)</h3>
<p>Constructs a new empty document with the type set to <i>type</i></p>
<!-- @@@QVersitDocument -->
<!-- $$$~QVersitDocument[overload1]$$$~QVersitDocument -->
<h3 class="fn" id="dtor.QVersitDocument"><a name="dtor.QVersitDocument"></a>QVersitDocument::<span class="name">~QVersitDocument</span>()</h3>
<p>Frees the memory used by the document</p>
<!-- @@@~QVersitDocument -->
<!-- $$$addProperty[overload1]$$$addPropertyconstQVersitProperty& -->
<h3 class="fn" id="addProperty"><a name="addProperty"></a><span class="type">void</span> QVersitDocument::<span class="name">addProperty</span>(const <span class="type"><a href="qversitproperty.html">QVersitProperty</a></span> &<i>property</i>)</h3>
<p>Add <i>property</i> to the list of contained versit properties. The property is appended as the last property of the list.</p>
<!-- @@@addProperty -->
<!-- $$$addSubDocument[overload1]$$$addSubDocumentconstQVersitDocument& -->
<h3 class="fn" id="addSubDocument"><a name="addSubDocument"></a><span class="type">void</span> QVersitDocument::<span class="name">addSubDocument</span>(const <span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span> &<i>subdocument</i>)</h3>
<p>Adds <i>subdocument</i> to the Versit document.</p>
<!-- @@@addSubDocument -->
<!-- $$$clear[overload1]$$$clear -->
<h3 class="fn" id="clear"><a name="clear"></a><span class="type">void</span> QVersitDocument::<span class="name">clear</span>()</h3>
<p>Clears the document, removing all properties, sub-documents and metadata.</p>
<!-- @@@clear -->
<!-- $$$componentType[overload1]$$$componentType -->
<h3 class="fn" id="componentType"><a name="componentType"></a><span class="type">QString</span> QVersitDocument::<span class="name">componentType</span>() const</h3>
<p>Gets the versit component type</p>
<p><b>See also </b><a href="qversitdocument.html#setComponentType">setComponentType</a>().</p>
<!-- @@@componentType -->
<!-- $$$isEmpty[overload1]$$$isEmpty -->
<h3 class="fn" id="isEmpty"><a name="isEmpty"></a><span class="type">bool</span> QVersitDocument::<span class="name">isEmpty</span>() const</h3>
<p>Returns true if the document is empty.</p>
<!-- @@@isEmpty -->
<!-- $$$properties[overload1]$$$properties -->
<h3 class="fn" id="properties"><a name="properties"></a><span class="type">QList</span><<span class="type"><a href="qversitproperty.html">QVersitProperty</a></span>> QVersitDocument::<span class="name">properties</span>() const</h3>
<p>Gets the list of the contained versit properties. Note that the actual properties cannot be modified using the copy.</p>
<p><b>See also </b><a href="qversitdocument.html#setProperties">setProperties</a>().</p>
<!-- @@@properties -->
<!-- $$$removeProperties[overload1]$$$removePropertiesconstQString& -->
<h3 class="fn" id="removeProperties"><a name="removeProperties"></a><span class="type">void</span> QVersitDocument::<span class="name">removeProperties</span>(const <span class="type">QString</span> &<i>name</i>)</h3>
<p>Removes all the properties with the given <i>name</i> from the versit document.</p>
<!-- @@@removeProperties -->
<!-- $$$removeProperty[overload1]$$$removePropertyconstQVersitProperty& -->
<h3 class="fn" id="removeProperty"><a name="removeProperty"></a><span class="type">void</span> QVersitDocument::<span class="name">removeProperty</span>(const <span class="type"><a href="qversitproperty.html">QVersitProperty</a></span> &<i>property</i>)</h3>
<p>Removes the property <i>property</i> from the versit document.</p>
<!-- @@@removeProperty -->
<!-- $$$removeSubDocument[overload1]$$$removeSubDocumentconstQVersitDocument& -->
<h3 class="fn" id="removeSubDocument"><a name="removeSubDocument"></a><span class="type">void</span> QVersitDocument::<span class="name">removeSubDocument</span>(const <span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span> &<i>subdocument</i>)</h3>
<p>Removes the <i>subdocument</i> from the versit document.</p>
<!-- @@@removeSubDocument -->
<!-- $$$setComponentType[overload1]$$$setComponentTypeQString -->
<h3 class="fn" id="setComponentType"><a name="setComponentType"></a><span class="type">void</span> QVersitDocument::<span class="name">setComponentType</span>(<span class="type">QString</span> <i>componentType</i>)</h3>
<p>Sets the versit component type to <i>componentType</i> (eg. VCARD, VCALENDAR, VEVENT, etc.)</p>
<p><b>See also </b><a href="qversitdocument.html#componentType">componentType</a>().</p>
<!-- @@@setComponentType -->
<!-- $$$setProperties[overload1]$$$setPropertiesconstQList<QVersitProperty>& -->
<h3 class="fn" id="setProperties"><a name="setProperties"></a><span class="type">void</span> QVersitDocument::<span class="name">setProperties</span>(const <span class="type">QList</span><<span class="type"><a href="qversitproperty.html">QVersitProperty</a></span>> &<i>properties</i>)</h3>
<p>Sets the list of properties to <i>properties</i>. Logically, all of the existing properties are removed and all of the supplied <i>properties</i> are added.</p>
<p><b>See also </b><a href="qversitdocument.html#properties">properties</a>().</p>
<!-- @@@setProperties -->
<!-- $$$setSubDocuments[overload1]$$$setSubDocumentsconstQList<QVersitDocument>& -->
<h3 class="fn" id="setSubDocuments"><a name="setSubDocuments"></a><span class="type">void</span> QVersitDocument::<span class="name">setSubDocuments</span>(const <span class="type">QList</span><<span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span>> &<i>documents</i>)</h3>
<p>Sets the list of subdocuments to <i>documents</i>.</p>
<p><b>See also </b><a href="qversitdocument.html#subDocuments">subDocuments</a>().</p>
<!-- @@@setSubDocuments -->
<!-- $$$setType[overload1]$$$setTypeVersitType -->
<h3 class="fn" id="setType"><a name="setType"></a><span class="type">void</span> QVersitDocument::<span class="name">setType</span>(<span class="type"><a href="qversitdocument.html#VersitType-enum">VersitType</a></span> <i>type</i>)</h3>
<p>Sets the versit document type to <i>type</i>. This determines the format in which the document is to be serialized.</p>
<p><b>See also </b><a href="qversitdocument.html#type">type</a>().</p>
<!-- @@@setType -->
<!-- $$$subDocuments[overload1]$$$subDocuments -->
<h3 class="fn" id="subDocuments"><a name="subDocuments"></a><span class="type">QList</span><<span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span>> QVersitDocument::<span class="name">subDocuments</span>() const</h3>
<p>Returns the list of subdocuments contained within this Versit document.</p>
<p><b>See also </b><a href="qversitdocument.html#setSubDocuments">setSubDocuments</a>().</p>
<!-- @@@subDocuments -->
<!-- $$$type[overload1]$$$type -->
<h3 class="fn" id="type"><a name="type"></a><span class="type"><a href="qversitdocument.html#VersitType-enum">VersitType</a></span> QVersitDocument::<span class="name">type</span>() const</h3>
<p>Gets the versit document type.</p>
<p><b>See also </b><a href="qversitdocument.html#setType">setType</a>().</p>
<!-- @@@type -->
<!-- $$$operator!=[overload1]$$$operator!=constQVersitDocument& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QVersitDocument::<span class="name">operator!=</span>(const <span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span> &<i>other</i>) const</h3>
<p>Returns true if this is not equal to <i>other</i>; false otherwise.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQVersitDocument& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span> &QVersitDocument::<span class="name">operator=</span>(const <span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span> &<i>other</i>)</h3>
<p>Assigns this document to <i>other</i></p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQVersitDocument& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QVersitDocument::<span class="name">operator==</span>(const <span class="type"><a href="qversitdocument.html#QVersitDocument">QVersitDocument</a></span> &<i>other</i>) const</h3>
<p>Returns true if this is equal to <i>other</i>; false otherwise.</p>
<!-- @@@operator== -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</acronym> 2017 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>
|