/usr/share/qt5/doc/qtlocation/qml-qtlocation-geocodemodel.html is in qtlocation5-doc-html 5.5.1-3ubuntu1.
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 | <?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdeclarativegeocodemodel.cpp -->
<title>GeocodeModel QML Type | Qt Location 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="qtlocation-index.html">Qt Location</a></li>
<li><a href="qtlocation-qmlmodule.html">QML Types</a></li>
<li>GeocodeModel QML Type</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="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
<li class="level2"><a href="#example-usage">Example Usage</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">GeocodeModel QML Type</h1>
<span class="subtitle"></span>
<!-- $$$GeocodeModel-brief -->
<p>The <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> type provides support for searching operations related to geographic information. <a href="#details">More...</a></p>
<!-- @@@GeocodeModel -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import QtLocation 5.3</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt Location 5.5</td></tr></table></div><ul>
<li><a href="qml-qtlocation-geocodemodel-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#autoUpdate-prop">autoUpdate</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#bounds-prop">bounds</a></b></b> : geoshape</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#count-prop">count</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#error-prop">error</a></b></b> : enumeration</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#errorString-prop">errorString</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#limit-prop">limit</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#offset-prop">offset</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#plugin-prop">plugin</a></b></b> : Plugin</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#query-prop">query</a></b></b> : QVariant</li>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#status-prop">status</a></b></b> : enumeration</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-geocodemodel.html#locationsChanged-signal">locationsChanged</a></b></b>()</li>
</ul>
<a name="methods"></a>
<h2 id="methods">Methods</h2>
<ul>
<li class="fn">void <b><b><a href="qml-qtlocation-geocodemodel.html#cancel-method">cancel</a></b></b>()</li>
<li class="fn">Location <b><b><a href="qml-qtlocation-geocodemodel.html#get-method">get</a></b></b>(int)</li>
<li class="fn">void <b><b><a href="qml-qtlocation-geocodemodel.html#reset-method">reset</a></b></b>()</li>
<li class="fn">void <b><b><a href="qml-qtlocation-geocodemodel.html#update-method">update</a></b></b>()</li>
</ul>
<!-- $$$GeocodeModel-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
</p>
<p>The <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> type is used as part of a model/view grouping to match addresses or search strings with geographic locations. How the geographic locations generated are used or displayed is decided by any Views attached to the <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> (for example a <a href="qml-qtlocation-mapitemview.html">MapItemView</a> or ListView).</p>
<p>Like <a href="qml-qtlocation-map.html">Map</a> and <a href="qml-qtlocation-routemodel.html">RouteModel</a>, all the data for a <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> to work comes from a services plugin. This is contained in the <a href="location-places-qml.html#plugin">plugin</a> property, and this must be set before the <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> can do any useful work.</p>
<p>Once the plugin is set, the <a href="qml-qtlocation-geocodemodel.html#query-prop">query</a> property can be used to specify the address or search string to match. If <a href="qml-qtlocation-geocodemodel.html#autoUpdate-prop">autoUpdate</a> is enabled, the Model will update its output automatically. Otherwise, the <a href="qml-qtlocation-geocodemodel.html#update-method">update</a> method may be used. By default, <a href="qml-qtlocation-geocodemodel.html#autoUpdate-prop">autoUpdate</a> is disabled.</p>
<p>The data stored and returned in the <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> consists of Location objects, as a list with the role name "locationData". See the documentation for Location for further details on its structure and contents.</p>
<a name="example-usage"></a>
<h3 >Example Usage</h3>
<p>The following snippet is two-part, showing firstly the declaration of objects, and secondly a short piece of procedural code using it. We set the geocodeModel's <a href="qml-qtlocation-geocodemodel.html#autoUpdate-prop">autoUpdate</a> property to false, and call <a href="qml-qtlocation-geocodemodel.html#update-method">update</a> once the query is set up. In this case, as we use a string value in <a href="qml-qtlocation-geocodemodel.html#query-prop">query</a>, only one update would occur, even with <a href="qml-qtlocation-geocodemodel.html#autoUpdate-prop">autoUpdate</a> enabled. However, if we provided an Address object we may inadvertently trigger multiple requests whilst setting its properties.</p>
<pre class="cpp">Plugin {
id: aPlugin
}
GeocodeModel {
id: geocodeModel
plugin: aPlugin
autoUpdate: <span class="keyword">false</span>
}</pre>
<pre class="cpp">{
geocodeModel<span class="operator">.</span>query <span class="operator">=</span> <span class="string">"53 Brandl St, Eight Mile Plains, Australia"</span>
geocodeModel<span class="operator">.</span>update()
}</pre>
<!-- @@@GeocodeModel -->
<h2>Property Documentation</h2>
<!-- $$$autoUpdate -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="autoUpdate-prop"><td class="tblQmlPropNode"><p><a name="autoUpdate-prop"></a><span class="name">autoUpdate</span> : <span class="type">bool</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property controls whether the Model automatically updates in response to changes in its attached query. The default value of this property is false.</p>
<p>If setting this value to 'true' and using an Address or coordinate as the query, note that any change at all in the object's properties will trigger a new request to be sent. If you are adjusting many properties of the object whilst autoUpdate is enabled, this can generate large numbers of useless (and later discarded) requests.</p>
</div></div><!-- @@@autoUpdate -->
<br/>
<!-- $$$bounds -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="bounds-prop"><td class="tblQmlPropNode"><p><a name="bounds-prop"></a><span class="name">bounds</span> : <span class="type">geoshape</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the bounding area used to limit the results to those within the area. This is particularly useful if query is only partially filled out, as the service will attempt to (reverse) geocode all matches for the specified data.</p>
<p>Accepted types are georectangle and geocircle.</p>
</div></div><!-- @@@bounds -->
<br/>
<!-- $$$count -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="count-prop"><td class="tblQmlPropNode"><p><a name="count-prop"></a><span class="name">count</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds how many locations the model currently has. Amongst other uses, you can use this value when accessing locations via the <a href="qml-qtlocation-geocodemodel.html#get-method">GeocodeModel::get</a> -method.</p>
</div></div><!-- @@@count -->
<br/>
<!-- $$$error -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="error-prop"><td class="tblQmlPropNode"><p><a name="error-prop"></a><span class="name">error</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>This read-only property holds the latest error value of the geocoding request.</p>
<ul>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.NoError - No error has occurred</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.EngineNotSetError - The plugin/service provider used does not support (reverse) geocoding</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.CommunicationError - An error occurred while communicating with the service provider</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.ParseError - The response from the service provider was in an unrecognizable format</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.UnsupportedOptionError - The requested operation or one of the options for the operation are not supported by the service provider.</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.CombinationError - An error occurred while results where being combined from multiple sources</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.UnknownError - An error occurred which does not fit into any of the other categories</li>
</ul>
</div></div><!-- @@@error -->
<br/>
<!-- $$$errorString -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="errorString-prop"><td class="tblQmlPropNode"><p><a name="errorString-prop"></a><span class="name">errorString</span> : <span class="type">string</span></p></td></tr></table></div></div><div class="qmldoc"><p>This read-only property holds the textual presentation of the latest geocoding error. If no error has occurred or the model has been reset, an empty string is returned.</p>
<p>An empty string may also be returned if an error occurred which has no associated textual representation.</p>
</div></div><!-- @@@errorString -->
<br/>
<!-- $$$limit -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="limit-prop"><td class="tblQmlPropNode"><p><a name="limit-prop"></a><span class="name">limit</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the maximum number of results. The limit and <a href="qml-qtlocation-geocodemodel.html#offset-prop">offset</a> values are only applicable with free string geocoding (that is they are not considered when using addresses or coordinates in the search query).</p>
<p>If limit is -1 the entire result set will be returned, otherwise at most limit results will be returned. The limit and <a href="qml-qtlocation-geocodemodel.html#offset-prop">offset</a> results can be used together to implement paging.</p>
</div></div><!-- @@@limit -->
<br/>
<!-- $$$offset -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="offset-prop"><td class="tblQmlPropNode"><p><a name="offset-prop"></a><span class="name">offset</span> : <span class="type">int</span></p></td></tr></table></div></div><div class="qmldoc"><p>This property tells not to return the first 'offset' number of the results. The <a href="qml-qtlocation-geocodemodel.html#limit-prop">limit</a> and offset values are only applicable with free string geocoding (that is they are not considered when using addresses or coordinates in the search query).</p>
<p>The <a href="qml-qtlocation-geocodemodel.html#limit-prop">limit</a> and offset results can be used together to implement paging.</p>
</div></div><!-- @@@offset -->
<br/>
<!-- $$$plugin -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="plugin-prop"><td class="tblQmlPropNode"><p><a name="plugin-prop"></a><span class="name">plugin</span> : <span class="type"><a href="qml-qtlocation-plugin.html">Plugin</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the plugin that provides the actual geocoding service. Note that all plugins do not necessarily provide geocoding (could for example provide only routing or maps).</p>
<p><b>See also </b><a href="location-places-qml.html#plugin">Plugin</a>.</p>
</div></div><!-- @@@plugin -->
<br/>
<!-- $$$query -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="query-prop"><td class="tblQmlPropNode"><p><a name="query-prop"></a><span class="name">query</span> : <span class="type"><a href="../qtcore/qvariant.html">QVariant</a></span></p></td></tr></table></div></div><div class="qmldoc"><p>This property holds the data of the geocoding request. The property accepts three types of queries which determine both the data and the type of action to be performed:</p>
<ul>
<li>Address - Geocoding (address to coordinate)</li>
<li>coordinate - Reverse geocoding (coordinate to address)</li>
<li>string - Geocoding (address to coordinate)</li>
</ul>
</div></div><!-- @@@query -->
<br/>
<!-- $$$status -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="status-prop"><td class="tblQmlPropNode"><p><a name="status-prop"></a><span class="name">status</span> : <span class="type">enumeration</span></p></td></tr></table></div></div><div class="qmldoc"><p>This read-only property holds the current status of the model.</p>
<ul>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.Null - No geocode requests have been issued or <a href="qml-qtlocation-geocodemodel.html#reset-method">reset</a> has been called.</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.Ready - Geocode request(s) have finished successfully.</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.Loading - Geocode request has been issued but not yet finished</li>
<li><a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.Error - Geocoding error has occurred, details are in <a href="qml-qtlocation-geocodemodel.html#error-prop">error</a> and <a href="qml-qtlocation-geocodemodel.html#errorString-prop">errorString</a></li>
</ul>
</div></div><!-- @@@status -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$locationsChanged -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="locationsChanged-signal"><td class="tblQmlFuncNode"><p><a name="locationsChanged-signal"></a><span class="name">locationsChanged</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>This signal is emitted when locations in the model have changed.</p>
<p><b>See also </b><a href="qml-qtlocation-geocodemodel.html#count-prop">count</a>.</p>
</div></div><!-- @@@locationsChanged -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$cancel -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="cancel-method"><td class="tblQmlFuncNode"><p><a name="cancel-method"></a><span class="type">void</span> <span class="name">cancel</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Cancels any outstanding requests and clears errors. Model status will be set to either <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.Null or <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.Ready.</p>
</div></div><!-- @@@cancel -->
<br/>
<!-- $$$get -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="get-method"><td class="tblQmlFuncNode"><p><a name="get-method"></a><span class="type">Location</span> <span class="name">get</span>(<span class="type">int</span>)</p></td></tr></table></div></div><div class="qmldoc"><p>Returns the Location at given index. Use <a href="qml-qtlocation-geocodemodel.html#count-prop">count</a> property to check the amount of locations available. The locations are indexed from zero, so the accessible range is 0...(count - 1).</p>
<p>If you access out of bounds, a zero (null object) is returned and a warning is issued.</p>
</div></div><!-- @@@get -->
<br/>
<!-- $$$reset -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="reset-method"><td class="tblQmlFuncNode"><p><a name="reset-method"></a><span class="type">void</span> <span class="name">reset</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Resets the model. All location data is cleared, any outstanding requests are aborted and possible errors are cleared. Model status will be set to <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a>.Null</p>
</div></div><!-- @@@reset -->
<br/>
<!-- $$$update -->
<div class="qmlitem"><div class="qmlproto"><div class="table"><table class="qmlname"><tr valign="top" class="odd" id="update-method"><td class="tblQmlFuncNode"><p><a name="update-method"></a><span class="type">void</span> <span class="name">update</span>()</p></td></tr></table></div></div><div class="qmldoc"><p>Instructs the <a href="qml-qtlocation-geocodemodel.html">GeocodeModel</a> to update its data. This is most useful when <a href="qml-qtlocation-geocodemodel.html#autoUpdate-prop">autoUpdate</a> is disabled, to force a refresh when the query has been changed.</p>
</div></div><!-- @@@update -->
<br/>
</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>
|