This file is indexed.

/usr/share/qt5/doc/qtlocation/qml-qtlocation-placesearchsuggestionmodel.html is in qtlocation5-doc-html 5.2.1-1ubuntu2.

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
<?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" />
<!-- qdeclarativesearchsuggestionmodel.cpp -->
  <title>PlaceSearchSuggestionModel | QtLocation 5.2</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="qtlocation-index.html">Qt Location</a></li>
<li><a href="qtlocation-qmlmodule.html">QML Types</a></li>
<li>PlaceSearchSuggestionModel</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="#properties">Properties</a></li>
<li class="level1"><a href="#methods">Methods</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">PlaceSearchSuggestionModel</h1>
<span class="subtitle"></span>
<!-- $$$PlaceSearchSuggestionModel-brief -->
<p>Provides access to search term suggestions. <a href="#details">More...</a></p>
<!-- @@@PlaceSearchSuggestionModel -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> </b><tt>import QtLocation 5.0</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt Location 5.0</td></tr></table><ul>
<li><a href="qml-qtlocation-placesearchsuggestionmodel-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#limit-prop">limit</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#offset-prop">offset</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#plugin-prop">plugin</a></b></b> : Plugin</li>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#searchArea-prop">searchArea</a></b></b> : geoshape</li>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#searchTerm-prop">searchTerm</a></b></b> : string</li>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#status-prop">status</a></b></b> : enum</li>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#suggestions-prop">suggestions</a></b></b> : stringlist</li>
</ul>
<a name="methods"></a>
<h2>Methods</h2>
<ul>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#cancel-method">cancel</a></b></b>()</li>
<li class="fn">string <b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#errorString-method">errorString</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#reset-method">reset</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-qtlocation-placesearchsuggestionmodel.html#update-method">update</a></b></b>()</li>
</ul>
<!-- $$$PlaceSearchSuggestionModel-description -->
<a name="details"></a>
<h2>Detailed Description</h2>
<p>The PlaceSearchSuggestionModel can be used to provide search term suggestions as the user enters their search term. The properties of this model should match that of the <a href="qml-qtlocation-placesearchmodel.html">PlaceSearchModel</a>, which will be used to perform the actual search query, to ensure that the search suggestion results are relevant.</p>
<p>There are two ways of accessing the data provided by this model, either through the <a href="qml-qtlocation-placesearchsuggestionmodel.html#suggestions-prop">suggestions</a> property or through views and delegates. The latter is the preferred method.</p>
<p>The <a href="qml-qtlocation-placesearchsuggestionmodel.html#offset-prop">offset</a> and <a href="qml-qtlocation-placesearchsuggestionmodel.html#limit-prop">limit</a> properties can be used to access paged suggestions. When the <a href="qml-qtlocation-placesearchsuggestionmodel.html#offset-prop">offset</a> and <a href="qml-qtlocation-placesearchsuggestionmodel.html#limit-prop">limit</a> properties are set the suggestions between <a href="qml-qtlocation-placesearchsuggestionmodel.html#offset-prop">offset</a> and (<a href="qml-qtlocation-placesearchsuggestionmodel.html#offset-prop">offset</a> + <a href="qml-qtlocation-placesearchsuggestionmodel.html#limit-prop">limit</a> - 1) will be returned. Support for paging may vary from plugin to plugin.</p>
<p>The model returns data for the following roles:</p>
<table class="generic">
 <thead><tr class="qt-style"><th >Role</th><th >Type</th><th >Description</th></tr></thead>
<tr valign="top" class="odd"><td >suggestion</td><td >string</td><td >Suggested search term.</td></tr>
</table>
<p>The following example shows how to use the PlaceSearchSuggestionModel to get suggested search terms from a partial search term. The <a href="qml-qtlocation-placesearchsuggestionmodel.html#searchArea-prop">searchArea</a> is set to match what would be used to perform the actual place search with <a href="qml-qtlocation-placesearchmodel.html">PlaceSearchModel</a>.</p>
<pre class="qml">import QtQuick 2.0
import QtPositioning 5.2
import QtLocation 5.0

<span class="type">PlaceSearchSuggestionModel</span> {
    <span class="name">id</span>: <span class="name">suggestionModel</span>

    <span class="name">plugin</span>: <span class="name">myPlugin</span>

    <span class="comment">// Brisbane</span>
    <span class="name">searchArea</span>: <span class="name">QtLocation</span>.<span class="name">circle</span>(<span class="name">QtLocation</span>.<span class="name">coordinate</span>(-<span class="number">27.46778</span>, <span class="number">153.02778</span>))

    <span class="name">onSearchTermChanged</span>: <span class="name">update</span>()
}

<span class="type">ListView</span> {
    <span class="name">model</span>: <span class="name">suggestionModel</span>
    <span class="name">delegate</span>: <span class="name">Text</span> { <span class="name">text</span>: <span class="name">suggestion</span> }
}</pre>
<p><b>See also </b><a href="qml-qtlocation-placesearchmodel.html">PlaceSearchModel</a> and <a href="qplacemanager.html">QPlaceManager</a>.</p>
<!-- @@@PlaceSearchSuggestionModel -->
<h2>Property Documentation</h2>
<!-- $$$limit -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><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 class="qmldoc"><p>This property holds the limit of the number of items that will be returned.</p>
<p><b>See also </b><a href="qml-qtlocation-placesearchsuggestionmodel.html#offset-prop">offset</a>.</p>
</div></div><!-- @@@limit -->
<br/>
<!-- $$$offset -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><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 class="qmldoc"><p>This property holds the index of the first item in the model.</p>
<p><b>See also </b><a href="qml-qtlocation-placesearchsuggestionmodel.html#limit-prop">limit</a>.</p>
</div></div><!-- @@@offset -->
<br/>
<!-- $$$plugin -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><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 class="qmldoc"><p>This property holds the provider <a href="qml-qtlocation-plugin.html">Plugin</a> which will be used to perform the search.</p>
</div></div><!-- @@@plugin -->
<br/>
<!-- $$$searchArea -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="searchArea-prop"></a><span class="name">searchArea</span> : <span class="type">geoshape</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the search area. Search suggestion results returned by the model will be relevant to the given search area.</p>
<p>If this property is set to a geocircle its radius property may be left unset, in which case the <a href="qml-qtlocation-plugin.html">Plugin</a> will choose an appropriate radius for the search.</p>
</div></div><!-- @@@searchArea -->
<br/>
<!-- $$$searchTerm -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="searchTerm-prop"></a><span class="name">searchTerm</span> : <span class="type">string</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the partial search term used in query.</p>
</div></div><!-- @@@searchTerm -->
<br/>
<!-- $$$status -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="status-prop"></a><span class="name">status</span> : <span class="type">enum</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the status of the model. It can be one of:</p>
<table class="generic">
 <tr valign="top" class="odd"><td ><a href="qml-qtlocation-placesearchsuggestionmodel.html">PlaceSearchSuggestionModel</a>.Null</td><td >No search query has been executed. The model is empty.</td></tr>
<tr valign="top" class="even"><td ><a href="qml-qtlocation-placesearchsuggestionmodel.html">PlaceSearchSuggestionModel</a>.Ready</td><td >The search query has completed, and the results are available.</td></tr>
<tr valign="top" class="odd"><td ><a href="qml-qtlocation-placesearchsuggestionmodel.html">PlaceSearchSuggestionModel</a>.Loading</td><td >A search query is currently being executed.</td></tr>
<tr valign="top" class="even"><td ><a href="qml-qtlocation-placesearchsuggestionmodel.html">PlaceSearchSuggestionModel</a>.Error</td><td >An error occurred when executing the previous search query.</td></tr>
</table>
</div></div><!-- @@@status -->
<br/>
<!-- $$$suggestions -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlPropNode"><p><a name="suggestions-prop"></a><span class="name">suggestions</span> : <span class="type">stringlist</span></p></td></tr></table></div><div class="qmldoc"><p>This property holds the list of predicted search terms that the model currently has.</p>
</div></div><!-- @@@suggestions -->
<br/>
<h2>Method Documentation</h2>
<!-- $$$cancel -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="cancel-method"></a><span class="name">cancel</span>()</p></td></tr></table></div><div class="qmldoc"><p>Cancels an ongoing search suggestion operation immediately and sets the model status to <a href="qml-qtlocation-placesearchsuggestionmodel.html">PlaceSearchSuggestionModel</a>.Ready. The model retains any search suggestions it had before the operation was started.</p>
<p>If an operation is not ongoing, invoking cancel() has no effect.</p>
<p><b>See also </b><a href="qml-qtlocation-placesearchsuggestionmodel.html#update-method">update()</a> and <a href="qml-qtlocation-placesearchsuggestionmodel.html#status-prop">status</a>.</p>
</div></div><!-- @@@cancel -->
<br/>
<!-- $$$errorString -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="errorString-method"></a><span class="type">string</span> <span class="name">errorString</span>() const</p></td></tr></table></div><div class="qmldoc"><p>This read-only property holds the textual presentation of latest search suggestion model error. If no error has occurred, or if the model was cleared, 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/>
<!-- $$$reset -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="reset-method"></a><span class="name">reset</span>()</p></td></tr></table></div><div class="qmldoc"><p>Resets the model. All search suggestions are cleared, any outstanding requests are aborted and possible errors are cleared. Model status will be set to <a href="qml-qtlocation-placesearchsuggestionmodel.html">PlaceSearchSuggestionModel</a>.Null.</p>
</div></div><!-- @@@reset -->
<br/>
<!-- $$$update -->
<div class="qmlitem"><div class="qmlproto"><table class="qmlname"><tr valign="top" class="odd"><td class="tblQmlFuncNode"><p><a name="update-method"></a><span class="name">update</span>()</p></td></tr></table></div><div class="qmldoc"><p>Updates the model based on the provided query parameters. The model will be populated with a list of search suggestions for the partial <a href="qml-qtlocation-placesearchsuggestionmodel.html#searchTerm-prop">searchTerm</a> and <a href="qml-qtlocation-placesearchsuggestionmodel.html#searchArea-prop">searchArea</a>. If the <a href="qml-qtlocation-placesearchsuggestionmodel.html#plugin-prop">plugin</a> supports it, other paramaters such as <a href="qml-qtlocation-placesearchsuggestionmodel.html#limit-prop">limit</a> and <a href="qml-qtlocation-placesearchsuggestionmodel.html#offset-prop">offset</a> may be specified. <tt>update()</tt> submits the set of parameters to the <a href="qml-qtlocation-placesearchsuggestionmodel.html#plugin-prop">plugin</a> to process.</p>
<p>While the model is updating the <a href="qml-qtlocation-placesearchsuggestionmodel.html#status-prop">status</a> of the model is set to <tt>PlaceSearchSuggestionModel.Loading</tt>. If the model is successfully updated, the <a href="qml-qtlocation-placesearchsuggestionmodel.html#status-prop">status</a> is set to <tt>PlaceSearchSuggestionModel.Ready</tt>, while if it unsuccessfully completes, the <a href="qml-qtlocation-placesearchsuggestionmodel.html#status-prop">status</a> is set to <tt>PlaceSearchSuggestionModel.Error</tt> and the model cleared.</p>
<p>This example shows use of the model</p>
<pre class="cpp">PlaceSeachSuggestionModel {
    id: model
    plugin: backendPlugin
    searchArea: <span class="type">QtPositioning</span><span class="operator">.</span>circle(<span class="type">QtPositioning</span><span class="operator">.</span>coordinate(<span class="number">10</span><span class="operator">,</span> <span class="number">10</span>))
    <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
}

MouseArea {
    <span class="operator">.</span><span class="operator">.</span><span class="operator">.</span>
    onClicked: {
        model<span class="operator">.</span>searchTerm <span class="operator">=</span> <span class="string">&quot;piz&quot;</span>
        model<span class="operator">.</span>searchArea<span class="operator">.</span>center<span class="operator">.</span>latitude <span class="operator">=</span> <span class="operator">-</span><span class="number">27.5</span>;
        model<span class="operator">.</span>searchArea<span class="operator">.</span>cetner<span class="operator">.</span>longitude <span class="operator">=</span> <span class="number">153</span>;
        model<span class="operator">.</span>update();
    }
}</pre>
<p>A more detailed example can be found in the in <a href="qtlocation-places-example.html#presenting-search-suggestions">Places (QML)</a> example.</p>
<p><b>See also </b><a href="qml-qtlocation-placesearchsuggestionmodel.html#cancel-method">cancel()</a> and <a href="qml-qtlocation-placesearchsuggestionmodel.html#status-prop">status</a>.</p>
</div></div><!-- @@@update -->
<br/>
        </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>