|
1 <!DOCTYPE html> |
|
2 <html><head> |
|
3 <title>eric6.WebBrowser.OpenSearch.OpenSearchEngine</title> |
|
4 <meta charset="UTF-8"> |
|
5 <style> |
|
6 body { |
|
7 background: #EDECE6; |
|
8 margin: 0em 1em 10em 1em; |
|
9 color: black; |
|
10 } |
|
11 |
|
12 h1 { color: white; background: #85774A; } |
|
13 h2 { color: white; background: #85774A; } |
|
14 h3 { color: white; background: #9D936E; } |
|
15 h4 { color: white; background: #9D936E; } |
|
16 |
|
17 a { color: #BA6D36; } |
|
18 |
|
19 </style> |
|
20 </head> |
|
21 <body><a NAME="top" ID="top"></a> |
|
22 <h1>eric6.WebBrowser.OpenSearch.OpenSearchEngine</h1> |
|
23 <p> |
|
24 Module implementing the open search engine. |
|
25 </p> |
|
26 <h3>Global Attributes</h3> |
|
27 <table> |
|
28 <tr><td>None</td></tr> |
|
29 </table> |
|
30 <h3>Classes</h3> |
|
31 <table> |
|
32 <tr> |
|
33 <td><a href="#OpenSearchEngine">OpenSearchEngine</a></td> |
|
34 <td>Class implementing the open search engine.</td> |
|
35 </tr> |
|
36 </table> |
|
37 <h3>Functions</h3> |
|
38 <table> |
|
39 <tr><td>None</td></tr> |
|
40 </table> |
|
41 <hr /><hr /> |
|
42 <a NAME="OpenSearchEngine" ID="OpenSearchEngine"></a> |
|
43 <h2>OpenSearchEngine</h2> |
|
44 <p> |
|
45 Class implementing the open search engine. |
|
46 </p><h3>Signals</h3> |
|
47 <dl> |
|
48 <dt>imageChanged()</dt> |
|
49 <dd> |
|
50 emitted after the icon has been changed |
|
51 </dd><dt>suggestions(list of strings)</dt> |
|
52 <dd> |
|
53 emitted after the suggestions have |
|
54 been received |
|
55 </dd> |
|
56 </dl> |
|
57 <h3>Derived from</h3> |
|
58 QObject |
|
59 <h3>Class Attributes</h3> |
|
60 <table> |
|
61 <tr><td>None</td></tr> |
|
62 </table> |
|
63 <h3>Class Methods</h3> |
|
64 <table> |
|
65 <tr> |
|
66 <td><a href="#OpenSearchEngine.parseTemplate">parseTemplate</a></td> |
|
67 <td>Class method to parse a search template.</td> |
|
68 </tr> |
|
69 </table> |
|
70 <h3>Methods</h3> |
|
71 <table> |
|
72 <tr> |
|
73 <td><a href="#OpenSearchEngine.__init__">OpenSearchEngine</a></td> |
|
74 <td>Constructor</td> |
|
75 </tr><tr> |
|
76 <td><a href="#OpenSearchEngine.__eq__">__eq__</a></td> |
|
77 <td>Special method implementing the == operator.</td> |
|
78 </tr><tr> |
|
79 <td><a href="#OpenSearchEngine.__imageObtained">__imageObtained</a></td> |
|
80 <td>Private slot to receive the image of the engine.</td> |
|
81 </tr><tr> |
|
82 <td><a href="#OpenSearchEngine.__lt__">__lt__</a></td> |
|
83 <td>Special method implementing the < operator.</td> |
|
84 </tr><tr> |
|
85 <td><a href="#OpenSearchEngine.__suggestionsObtained">__suggestionsObtained</a></td> |
|
86 <td>Private slot to receive the suggestions.</td> |
|
87 </tr><tr> |
|
88 <td><a href="#OpenSearchEngine.description">description</a></td> |
|
89 <td>Public method to get the description of the engine.</td> |
|
90 </tr><tr> |
|
91 <td><a href="#OpenSearchEngine.image">image</a></td> |
|
92 <td>Public method to get the image of the engine.</td> |
|
93 </tr><tr> |
|
94 <td><a href="#OpenSearchEngine.imageUrl">imageUrl</a></td> |
|
95 <td>Public method to get the image URL of the engine.</td> |
|
96 </tr><tr> |
|
97 <td><a href="#OpenSearchEngine.isValid">isValid</a></td> |
|
98 <td>Public method to check, if the engine is valid.</td> |
|
99 </tr><tr> |
|
100 <td><a href="#OpenSearchEngine.loadImage">loadImage</a></td> |
|
101 <td>Public method to load the image of the engine.</td> |
|
102 </tr><tr> |
|
103 <td><a href="#OpenSearchEngine.name">name</a></td> |
|
104 <td>Public method to get the name of the engine.</td> |
|
105 </tr><tr> |
|
106 <td><a href="#OpenSearchEngine.networkAccessManager">networkAccessManager</a></td> |
|
107 <td>Public method to get a reference to the network access manager object.</td> |
|
108 </tr><tr> |
|
109 <td><a href="#OpenSearchEngine.providesSuggestions">providesSuggestions</a></td> |
|
110 <td>Public method to check, if the engine provides suggestions.</td> |
|
111 </tr><tr> |
|
112 <td><a href="#OpenSearchEngine.requestSuggestions">requestSuggestions</a></td> |
|
113 <td>Public method to request suggestions.</td> |
|
114 </tr><tr> |
|
115 <td><a href="#OpenSearchEngine.searchMethod">searchMethod</a></td> |
|
116 <td>Public method to get the HTTP request method used to perform search requests.</td> |
|
117 </tr><tr> |
|
118 <td><a href="#OpenSearchEngine.searchParameters">searchParameters</a></td> |
|
119 <td>Public method to get the search parameters of the engine.</td> |
|
120 </tr><tr> |
|
121 <td><a href="#OpenSearchEngine.searchUrl">searchUrl</a></td> |
|
122 <td>Public method to get a URL ready for searching.</td> |
|
123 </tr><tr> |
|
124 <td><a href="#OpenSearchEngine.searchUrlTemplate">searchUrlTemplate</a></td> |
|
125 <td>Public method to get the search URL template of the engine.</td> |
|
126 </tr><tr> |
|
127 <td><a href="#OpenSearchEngine.setDescription">setDescription</a></td> |
|
128 <td>Public method to set the engine description.</td> |
|
129 </tr><tr> |
|
130 <td><a href="#OpenSearchEngine.setImage">setImage</a></td> |
|
131 <td>Public method to set the image of the engine.</td> |
|
132 </tr><tr> |
|
133 <td><a href="#OpenSearchEngine.setImageUrl">setImageUrl</a></td> |
|
134 <td>Public method to set the engine image URL.</td> |
|
135 </tr><tr> |
|
136 <td><a href="#OpenSearchEngine.setImageUrlAndLoad">setImageUrlAndLoad</a></td> |
|
137 <td>Public method to set the engine image URL.</td> |
|
138 </tr><tr> |
|
139 <td><a href="#OpenSearchEngine.setName">setName</a></td> |
|
140 <td>Public method to set the engine name.</td> |
|
141 </tr><tr> |
|
142 <td><a href="#OpenSearchEngine.setNetworkAccessManager">setNetworkAccessManager</a></td> |
|
143 <td>Public method to set the reference to the network access manager.</td> |
|
144 </tr><tr> |
|
145 <td><a href="#OpenSearchEngine.setSearchMethod">setSearchMethod</a></td> |
|
146 <td>Public method to set the HTTP request method used to perform search requests.</td> |
|
147 </tr><tr> |
|
148 <td><a href="#OpenSearchEngine.setSearchParameters">setSearchParameters</a></td> |
|
149 <td>Public method to set the engine search parameters.</td> |
|
150 </tr><tr> |
|
151 <td><a href="#OpenSearchEngine.setSearchUrlTemplate">setSearchUrlTemplate</a></td> |
|
152 <td>Public method to set the engine search URL template.</td> |
|
153 </tr><tr> |
|
154 <td><a href="#OpenSearchEngine.setSuggestionsMethod">setSuggestionsMethod</a></td> |
|
155 <td>Public method to set the HTTP request method used to perform suggestions requests.</td> |
|
156 </tr><tr> |
|
157 <td><a href="#OpenSearchEngine.setSuggestionsParameters">setSuggestionsParameters</a></td> |
|
158 <td>Public method to set the engine suggestions parameters.</td> |
|
159 </tr><tr> |
|
160 <td><a href="#OpenSearchEngine.setSuggestionsUrlTemplate">setSuggestionsUrlTemplate</a></td> |
|
161 <td>Public method to set the engine suggestions URL template.</td> |
|
162 </tr><tr> |
|
163 <td><a href="#OpenSearchEngine.suggestionsMethod">suggestionsMethod</a></td> |
|
164 <td>Public method to get the HTTP request method used to perform suggestions requests.</td> |
|
165 </tr><tr> |
|
166 <td><a href="#OpenSearchEngine.suggestionsParameters">suggestionsParameters</a></td> |
|
167 <td>Public method to get the suggestions parameters of the engine.</td> |
|
168 </tr><tr> |
|
169 <td><a href="#OpenSearchEngine.suggestionsUrl">suggestionsUrl</a></td> |
|
170 <td>Public method to get a URL ready for suggestions.</td> |
|
171 </tr><tr> |
|
172 <td><a href="#OpenSearchEngine.suggestionsUrlTemplate">suggestionsUrlTemplate</a></td> |
|
173 <td>Public method to get the search URL template of the engine.</td> |
|
174 </tr> |
|
175 </table> |
|
176 <h3>Static Methods</h3> |
|
177 <table> |
|
178 <tr><td>None</td></tr> |
|
179 </table> |
|
180 <a NAME="OpenSearchEngine.parseTemplate" ID="OpenSearchEngine.parseTemplate"></a> |
|
181 <h4>OpenSearchEngine.parseTemplate (class method)</h4> |
|
182 <b>parseTemplate</b>(<i>searchTerm, searchTemplate</i>) |
|
183 <p> |
|
184 Class method to parse a search template. |
|
185 </p><dl> |
|
186 <dt><i>searchTerm</i></dt> |
|
187 <dd> |
|
188 term to search for (string) |
|
189 </dd><dt><i>searchTemplate</i></dt> |
|
190 <dd> |
|
191 template to be parsed (string) |
|
192 </dd> |
|
193 </dl><dl> |
|
194 <dt>Returns:</dt> |
|
195 <dd> |
|
196 parsed template (string) |
|
197 </dd> |
|
198 </dl><a NAME="OpenSearchEngine.__init__" ID="OpenSearchEngine.__init__"></a> |
|
199 <h4>OpenSearchEngine (Constructor)</h4> |
|
200 <b>OpenSearchEngine</b>(<i>parent=None</i>) |
|
201 <p> |
|
202 Constructor |
|
203 </p><dl> |
|
204 <dt><i>parent</i></dt> |
|
205 <dd> |
|
206 reference to the parent object (QObject) |
|
207 </dd> |
|
208 </dl><a NAME="OpenSearchEngine.__eq__" ID="OpenSearchEngine.__eq__"></a> |
|
209 <h4>OpenSearchEngine.__eq__</h4> |
|
210 <b>__eq__</b>(<i>other</i>) |
|
211 <p> |
|
212 Special method implementing the == operator. |
|
213 </p><dl> |
|
214 <dt><i>other</i></dt> |
|
215 <dd> |
|
216 reference to an open search engine (OpenSearchEngine) |
|
217 </dd> |
|
218 </dl><dl> |
|
219 <dt>Returns:</dt> |
|
220 <dd> |
|
221 flag indicating equality (boolean) |
|
222 </dd> |
|
223 </dl><a NAME="OpenSearchEngine.__imageObtained" ID="OpenSearchEngine.__imageObtained"></a> |
|
224 <h4>OpenSearchEngine.__imageObtained</h4> |
|
225 <b>__imageObtained</b>(<i></i>) |
|
226 <p> |
|
227 Private slot to receive the image of the engine. |
|
228 </p><a NAME="OpenSearchEngine.__lt__" ID="OpenSearchEngine.__lt__"></a> |
|
229 <h4>OpenSearchEngine.__lt__</h4> |
|
230 <b>__lt__</b>(<i>other</i>) |
|
231 <p> |
|
232 Special method implementing the < operator. |
|
233 </p><dl> |
|
234 <dt><i>other</i></dt> |
|
235 <dd> |
|
236 reference to an open search engine (OpenSearchEngine) |
|
237 </dd> |
|
238 </dl><dl> |
|
239 <dt>Returns:</dt> |
|
240 <dd> |
|
241 flag indicating less than (boolean) |
|
242 </dd> |
|
243 </dl><a NAME="OpenSearchEngine.__suggestionsObtained" ID="OpenSearchEngine.__suggestionsObtained"></a> |
|
244 <h4>OpenSearchEngine.__suggestionsObtained</h4> |
|
245 <b>__suggestionsObtained</b>(<i></i>) |
|
246 <p> |
|
247 Private slot to receive the suggestions. |
|
248 </p><a NAME="OpenSearchEngine.description" ID="OpenSearchEngine.description"></a> |
|
249 <h4>OpenSearchEngine.description</h4> |
|
250 <b>description</b>(<i></i>) |
|
251 <p> |
|
252 Public method to get the description of the engine. |
|
253 </p><dl> |
|
254 <dt>Returns:</dt> |
|
255 <dd> |
|
256 description of the engine (string) |
|
257 </dd> |
|
258 </dl><a NAME="OpenSearchEngine.image" ID="OpenSearchEngine.image"></a> |
|
259 <h4>OpenSearchEngine.image</h4> |
|
260 <b>image</b>(<i></i>) |
|
261 <p> |
|
262 Public method to get the image of the engine. |
|
263 </p><dl> |
|
264 <dt>Returns:</dt> |
|
265 <dd> |
|
266 image of the engine (QImage) |
|
267 </dd> |
|
268 </dl><a NAME="OpenSearchEngine.imageUrl" ID="OpenSearchEngine.imageUrl"></a> |
|
269 <h4>OpenSearchEngine.imageUrl</h4> |
|
270 <b>imageUrl</b>(<i></i>) |
|
271 <p> |
|
272 Public method to get the image URL of the engine. |
|
273 </p><dl> |
|
274 <dt>Returns:</dt> |
|
275 <dd> |
|
276 image URL of the engine (string) |
|
277 </dd> |
|
278 </dl><a NAME="OpenSearchEngine.isValid" ID="OpenSearchEngine.isValid"></a> |
|
279 <h4>OpenSearchEngine.isValid</h4> |
|
280 <b>isValid</b>(<i></i>) |
|
281 <p> |
|
282 Public method to check, if the engine is valid. |
|
283 </p><dl> |
|
284 <dt>Returns:</dt> |
|
285 <dd> |
|
286 flag indicating validity (boolean) |
|
287 </dd> |
|
288 </dl><a NAME="OpenSearchEngine.loadImage" ID="OpenSearchEngine.loadImage"></a> |
|
289 <h4>OpenSearchEngine.loadImage</h4> |
|
290 <b>loadImage</b>(<i></i>) |
|
291 <p> |
|
292 Public method to load the image of the engine. |
|
293 </p><a NAME="OpenSearchEngine.name" ID="OpenSearchEngine.name"></a> |
|
294 <h4>OpenSearchEngine.name</h4> |
|
295 <b>name</b>(<i></i>) |
|
296 <p> |
|
297 Public method to get the name of the engine. |
|
298 </p><dl> |
|
299 <dt>Returns:</dt> |
|
300 <dd> |
|
301 name of the engine (string) |
|
302 </dd> |
|
303 </dl><a NAME="OpenSearchEngine.networkAccessManager" ID="OpenSearchEngine.networkAccessManager"></a> |
|
304 <h4>OpenSearchEngine.networkAccessManager</h4> |
|
305 <b>networkAccessManager</b>(<i></i>) |
|
306 <p> |
|
307 Public method to get a reference to the network access manager object. |
|
308 </p><dl> |
|
309 <dt>Returns:</dt> |
|
310 <dd> |
|
311 reference to the network access manager object |
|
312 (QNetworkAccessManager) |
|
313 </dd> |
|
314 </dl><a NAME="OpenSearchEngine.providesSuggestions" ID="OpenSearchEngine.providesSuggestions"></a> |
|
315 <h4>OpenSearchEngine.providesSuggestions</h4> |
|
316 <b>providesSuggestions</b>(<i></i>) |
|
317 <p> |
|
318 Public method to check, if the engine provides suggestions. |
|
319 </p><dl> |
|
320 <dt>Returns:</dt> |
|
321 <dd> |
|
322 flag indicating suggestions are provided (boolean) |
|
323 </dd> |
|
324 </dl><a NAME="OpenSearchEngine.requestSuggestions" ID="OpenSearchEngine.requestSuggestions"></a> |
|
325 <h4>OpenSearchEngine.requestSuggestions</h4> |
|
326 <b>requestSuggestions</b>(<i>searchTerm</i>) |
|
327 <p> |
|
328 Public method to request suggestions. |
|
329 </p><dl> |
|
330 <dt><i>searchTerm</i></dt> |
|
331 <dd> |
|
332 term to get suggestions for (string) |
|
333 </dd> |
|
334 </dl><a NAME="OpenSearchEngine.searchMethod" ID="OpenSearchEngine.searchMethod"></a> |
|
335 <h4>OpenSearchEngine.searchMethod</h4> |
|
336 <b>searchMethod</b>(<i></i>) |
|
337 <p> |
|
338 Public method to get the HTTP request method used to perform search |
|
339 requests. |
|
340 </p><dl> |
|
341 <dt>Returns:</dt> |
|
342 <dd> |
|
343 HTTP request method (string) |
|
344 </dd> |
|
345 </dl><a NAME="OpenSearchEngine.searchParameters" ID="OpenSearchEngine.searchParameters"></a> |
|
346 <h4>OpenSearchEngine.searchParameters</h4> |
|
347 <b>searchParameters</b>(<i></i>) |
|
348 <p> |
|
349 Public method to get the search parameters of the engine. |
|
350 </p><dl> |
|
351 <dt>Returns:</dt> |
|
352 <dd> |
|
353 search parameters of the engine (list of two tuples) |
|
354 </dd> |
|
355 </dl><a NAME="OpenSearchEngine.searchUrl" ID="OpenSearchEngine.searchUrl"></a> |
|
356 <h4>OpenSearchEngine.searchUrl</h4> |
|
357 <b>searchUrl</b>(<i>searchTerm</i>) |
|
358 <p> |
|
359 Public method to get a URL ready for searching. |
|
360 </p><dl> |
|
361 <dt><i>searchTerm</i></dt> |
|
362 <dd> |
|
363 term to search for (string) |
|
364 </dd> |
|
365 </dl><dl> |
|
366 <dt>Returns:</dt> |
|
367 <dd> |
|
368 URL (QUrl) |
|
369 </dd> |
|
370 </dl><a NAME="OpenSearchEngine.searchUrlTemplate" ID="OpenSearchEngine.searchUrlTemplate"></a> |
|
371 <h4>OpenSearchEngine.searchUrlTemplate</h4> |
|
372 <b>searchUrlTemplate</b>(<i></i>) |
|
373 <p> |
|
374 Public method to get the search URL template of the engine. |
|
375 </p><dl> |
|
376 <dt>Returns:</dt> |
|
377 <dd> |
|
378 search URL template of the engine (string) |
|
379 </dd> |
|
380 </dl><a NAME="OpenSearchEngine.setDescription" ID="OpenSearchEngine.setDescription"></a> |
|
381 <h4>OpenSearchEngine.setDescription</h4> |
|
382 <b>setDescription</b>(<i>description</i>) |
|
383 <p> |
|
384 Public method to set the engine description. |
|
385 </p><dl> |
|
386 <dt><i>description</i></dt> |
|
387 <dd> |
|
388 description of the engine (string) |
|
389 </dd> |
|
390 </dl><a NAME="OpenSearchEngine.setImage" ID="OpenSearchEngine.setImage"></a> |
|
391 <h4>OpenSearchEngine.setImage</h4> |
|
392 <b>setImage</b>(<i>image</i>) |
|
393 <p> |
|
394 Public method to set the image of the engine. |
|
395 </p><dl> |
|
396 <dt><i>image</i></dt> |
|
397 <dd> |
|
398 image to be set (QImage) |
|
399 </dd> |
|
400 </dl><a NAME="OpenSearchEngine.setImageUrl" ID="OpenSearchEngine.setImageUrl"></a> |
|
401 <h4>OpenSearchEngine.setImageUrl</h4> |
|
402 <b>setImageUrl</b>(<i>imageUrl</i>) |
|
403 <p> |
|
404 Public method to set the engine image URL. |
|
405 </p><dl> |
|
406 <dt><i>imageUrl</i></dt> |
|
407 <dd> |
|
408 image URL of the engine (string) |
|
409 </dd> |
|
410 </dl><a NAME="OpenSearchEngine.setImageUrlAndLoad" ID="OpenSearchEngine.setImageUrlAndLoad"></a> |
|
411 <h4>OpenSearchEngine.setImageUrlAndLoad</h4> |
|
412 <b>setImageUrlAndLoad</b>(<i>imageUrl</i>) |
|
413 <p> |
|
414 Public method to set the engine image URL. |
|
415 </p><dl> |
|
416 <dt><i>imageUrl</i></dt> |
|
417 <dd> |
|
418 image URL of the engine (string) |
|
419 </dd> |
|
420 </dl><a NAME="OpenSearchEngine.setName" ID="OpenSearchEngine.setName"></a> |
|
421 <h4>OpenSearchEngine.setName</h4> |
|
422 <b>setName</b>(<i>name</i>) |
|
423 <p> |
|
424 Public method to set the engine name. |
|
425 </p><dl> |
|
426 <dt><i>name</i></dt> |
|
427 <dd> |
|
428 name of the engine (string) |
|
429 </dd> |
|
430 </dl><a NAME="OpenSearchEngine.setNetworkAccessManager" ID="OpenSearchEngine.setNetworkAccessManager"></a> |
|
431 <h4>OpenSearchEngine.setNetworkAccessManager</h4> |
|
432 <b>setNetworkAccessManager</b>(<i>networkAccessManager</i>) |
|
433 <p> |
|
434 Public method to set the reference to the network access manager. |
|
435 </p><dl> |
|
436 <dt><i>networkAccessManager</i></dt> |
|
437 <dd> |
|
438 reference to the network access manager |
|
439 object (QNetworkAccessManager) |
|
440 </dd> |
|
441 </dl><a NAME="OpenSearchEngine.setSearchMethod" ID="OpenSearchEngine.setSearchMethod"></a> |
|
442 <h4>OpenSearchEngine.setSearchMethod</h4> |
|
443 <b>setSearchMethod</b>(<i>method</i>) |
|
444 <p> |
|
445 Public method to set the HTTP request method used to perform search |
|
446 requests. |
|
447 </p><dl> |
|
448 <dt><i>method</i></dt> |
|
449 <dd> |
|
450 HTTP request method (string) |
|
451 </dd> |
|
452 </dl><a NAME="OpenSearchEngine.setSearchParameters" ID="OpenSearchEngine.setSearchParameters"></a> |
|
453 <h4>OpenSearchEngine.setSearchParameters</h4> |
|
454 <b>setSearchParameters</b>(<i>searchParameters</i>) |
|
455 <p> |
|
456 Public method to set the engine search parameters. |
|
457 </p><dl> |
|
458 <dt><i>searchParameters</i></dt> |
|
459 <dd> |
|
460 search parameters of the engine |
|
461 (list of two tuples) |
|
462 </dd> |
|
463 </dl><a NAME="OpenSearchEngine.setSearchUrlTemplate" ID="OpenSearchEngine.setSearchUrlTemplate"></a> |
|
464 <h4>OpenSearchEngine.setSearchUrlTemplate</h4> |
|
465 <b>setSearchUrlTemplate</b>(<i>searchUrlTemplate</i>) |
|
466 <p> |
|
467 Public method to set the engine search URL template. |
|
468 </p><p> |
|
469 The URL template is processed according to the specification: |
|
470 <a |
|
471 href="http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_URL_template_syntax"> |
|
472 http://www.opensearch.org/Specifications/OpenSearch/1.1#OpenSearch_URL_template_syntax</a> |
|
473 </p><p> |
|
474 A list of template parameters currently supported and what they are |
|
475 replaced with: |
|
476 <table> |
|
477 <tr><td><b>Parameter</b></td><td><b>Value</b></td></tr> |
|
478 <tr><td>{count}</td><td>20</td></tr> |
|
479 <tr><td>{startIndex}</td><td>0</td></tr> |
|
480 <tr><td>{startPage}</td><td>0</td></tr> |
|
481 <tr><td>{language}</td> |
|
482 <td>the default language code (RFC 3066)</td></tr> |
|
483 <tr><td>{country}</td> |
|
484 <td>the default country code (first part of language)</td></tr> |
|
485 <tr><td>{inputEncoding}</td><td>UTF-8</td></tr> |
|
486 <tr><td>{outputEncoding}</td><td>UTF-8</td></tr> |
|
487 <tr><td>{searchTerms}</td><td>the string supplied by the user</td></tr> |
|
488 <tr><td>{*:source}</td> |
|
489 <td>application name, QCoreApplication::applicationName()</td></tr> |
|
490 </table> |
|
491 </p><dl> |
|
492 <dt><i>searchUrlTemplate</i></dt> |
|
493 <dd> |
|
494 search URL template of the engine (string) |
|
495 </dd> |
|
496 </dl><a NAME="OpenSearchEngine.setSuggestionsMethod" ID="OpenSearchEngine.setSuggestionsMethod"></a> |
|
497 <h4>OpenSearchEngine.setSuggestionsMethod</h4> |
|
498 <b>setSuggestionsMethod</b>(<i>method</i>) |
|
499 <p> |
|
500 Public method to set the HTTP request method used to perform |
|
501 suggestions requests. |
|
502 </p><dl> |
|
503 <dt><i>method</i></dt> |
|
504 <dd> |
|
505 HTTP request method (string) |
|
506 </dd> |
|
507 </dl><a NAME="OpenSearchEngine.setSuggestionsParameters" ID="OpenSearchEngine.setSuggestionsParameters"></a> |
|
508 <h4>OpenSearchEngine.setSuggestionsParameters</h4> |
|
509 <b>setSuggestionsParameters</b>(<i>suggestionsParameters</i>) |
|
510 <p> |
|
511 Public method to set the engine suggestions parameters. |
|
512 </p><dl> |
|
513 <dt><i>suggestionsParameters</i></dt> |
|
514 <dd> |
|
515 suggestions parameters of the |
|
516 engine (list of two tuples) |
|
517 </dd> |
|
518 </dl><a NAME="OpenSearchEngine.setSuggestionsUrlTemplate" ID="OpenSearchEngine.setSuggestionsUrlTemplate"></a> |
|
519 <h4>OpenSearchEngine.setSuggestionsUrlTemplate</h4> |
|
520 <b>setSuggestionsUrlTemplate</b>(<i>suggestionsUrlTemplate</i>) |
|
521 <p> |
|
522 Public method to set the engine suggestions URL template. |
|
523 </p><dl> |
|
524 <dt><i>suggestionsUrlTemplate</i></dt> |
|
525 <dd> |
|
526 suggestions URL template of the |
|
527 engine (string) |
|
528 </dd> |
|
529 </dl><a NAME="OpenSearchEngine.suggestionsMethod" ID="OpenSearchEngine.suggestionsMethod"></a> |
|
530 <h4>OpenSearchEngine.suggestionsMethod</h4> |
|
531 <b>suggestionsMethod</b>(<i></i>) |
|
532 <p> |
|
533 Public method to get the HTTP request method used to perform |
|
534 suggestions requests. |
|
535 </p><dl> |
|
536 <dt>Returns:</dt> |
|
537 <dd> |
|
538 HTTP request method (string) |
|
539 </dd> |
|
540 </dl><a NAME="OpenSearchEngine.suggestionsParameters" ID="OpenSearchEngine.suggestionsParameters"></a> |
|
541 <h4>OpenSearchEngine.suggestionsParameters</h4> |
|
542 <b>suggestionsParameters</b>(<i></i>) |
|
543 <p> |
|
544 Public method to get the suggestions parameters of the engine. |
|
545 </p><dl> |
|
546 <dt>Returns:</dt> |
|
547 <dd> |
|
548 suggestions parameters of the engine (list of two tuples) |
|
549 </dd> |
|
550 </dl><a NAME="OpenSearchEngine.suggestionsUrl" ID="OpenSearchEngine.suggestionsUrl"></a> |
|
551 <h4>OpenSearchEngine.suggestionsUrl</h4> |
|
552 <b>suggestionsUrl</b>(<i>searchTerm</i>) |
|
553 <p> |
|
554 Public method to get a URL ready for suggestions. |
|
555 </p><dl> |
|
556 <dt><i>searchTerm</i></dt> |
|
557 <dd> |
|
558 term to search for (string) |
|
559 </dd> |
|
560 </dl><dl> |
|
561 <dt>Returns:</dt> |
|
562 <dd> |
|
563 URL (QUrl) |
|
564 </dd> |
|
565 </dl><a NAME="OpenSearchEngine.suggestionsUrlTemplate" ID="OpenSearchEngine.suggestionsUrlTemplate"></a> |
|
566 <h4>OpenSearchEngine.suggestionsUrlTemplate</h4> |
|
567 <b>suggestionsUrlTemplate</b>(<i></i>) |
|
568 <p> |
|
569 Public method to get the search URL template of the engine. |
|
570 </p><dl> |
|
571 <dt>Returns:</dt> |
|
572 <dd> |
|
573 search URL template of the engine (string) |
|
574 </dd> |
|
575 </dl> |
|
576 <div align="right"><a href="#top">Up</a></div> |
|
577 <hr /> |
|
578 </body></html> |