Sophie

Sophie

distrib > Mageia > 5 > i586 > media > core-release > by-pkgid > 50facae208d4a6f280e44a513b104320 > files > 924

qt-mobility-doc-1.2.0-13.mga5.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.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" />
<!-- qgeosearchmanager.cpp -->
  <title>Qt Mobility 1.2: QGeoSearchManager Class Reference</title>
  <link rel="stylesheet" type="text/css" href="style/offline.css" />
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="content"> 
    <a href="index.html" class="qtref"><span>QtMobility Reference Documentation</span></a>
  </div>
  <div class="breadcrumb toolblock">
    <ul>
      <li class="first"><a href="index.html">Home</a></li>
      <!--  Breadcrumbs go here -->
<li><a href="modules.html">Modules</a></li>
<li><a href="qtlocation.html">QtLocation</a></li>
<li>QGeoSearchManager</li>
    </ul>
  </div>
</div>
<div class="content mainContent">
<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="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QGeoSearchManager Class Reference</h1>
<!-- $$$QGeoSearchManager-brief -->
<p>The QGeoSearchManager class provides support for searching operations related to geographic information. <a href="#details">More...</a></p>
<!-- @@@QGeoSearchManager -->
<pre class="cpp"> <span class="preprocessor">#include &lt;QGeoSearchManager&gt;</span></pre><p><b>Inherits: </b><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a>.</p>
<p>This class was introduced in Qt Mobility 1.1.</p>
<ul>
<li><a href="qgeosearchmanager-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-types"></a>
<h2>Public Types</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#SearchType-enum">SearchType</a></b> { SearchNone, SearchGeocode, SearchLandmarks, SearchAll }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#SearchType-enum">SearchTypes</a></b></td></tr>
</table>
<a name="public-functions"></a>
<h2>Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#dtor.QGeoSearchManager">~QGeoSearchManager</a></b> ()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#addAdditionalLandmarkManager">addAdditionalLandmarkManager</a></b> ( QLandmarkManager * <i>landmarkManager</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QLandmarkManager *&gt; </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#additionalLandmarkManagers">additionalLandmarkManagers</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLandmarkManager * </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#defaultLandmarkManager">defaultLandmarkManager</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoSearchReply * </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#geocode">geocode</a></b> ( const QGeoAddress &amp; <i>address</i>, QGeoBoundingArea * <i>bounds</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QLocale </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#locale">locale</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#managerName">managerName</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#managerVersion">managerVersion</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoSearchReply * </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#reverseGeocode">reverseGeocode</a></b> ( const QGeoCoordinate &amp; <i>coordinate</i>, QGeoBoundingArea * <i>bounds</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoSearchReply * </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#search">search</a></b> ( const QString &amp; <i>searchString</i>, SearchTypes <i>searchTypes</i> = SearchTypes( SearchAll ), int <i>limit</i> = -1, int <i>offset</i> = 0, QGeoBoundingArea * <i>bounds</i> = 0 )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#setAdditionalLandmarkManagers">setAdditionalLandmarkManagers</a></b> ( const QList&lt;QLandmarkManager *&gt; &amp; <i>landmarkManagers</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#setLocale">setLocale</a></b> ( const QLocale &amp; <i>locale</i> )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> SearchTypes </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#supportedSearchTypes">supportedSearchTypes</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#supportsGeocoding">supportsGeocoding</a></b> () const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#supportsReverseGeocoding">supportsReverseGeocoding</a></b> () const</td></tr>
</table>
<ul>
<li class="fn">29 public functions inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-functions">QObject</a></li>
</ul>
<a name="signals"></a>
<h2>Signals</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#error">error</a></b> ( QGeoSearchReply * <i>reply</i>, QGeoSearchReply::Error <i>error</i>, QString <i>errorString</i> = QString() )</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeosearchmanager.html#finished">finished</a></b> ( QGeoSearchReply * <i>reply</i> )</td></tr>
</table>
<ul>
<li class="fn">1 signal inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#signals">QObject</a></li>
</ul>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">1 property inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#properties">QObject</a></li>
<li class="fn">1 public slot inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-slots">QObject</a></li>
<li class="fn">1 public variable inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#public-variables">QObject</a></li>
<li class="fn">4 static public members inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#static-public-members">QObject</a></li>
<li class="fn">7 protected functions inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#protected-functions">QObject</a></li>
<li class="fn">2 protected variables inherited from <a href="http://qt.nokia.com/doc/4.7/qobject.html#protected-variables">QObject</a></li>
</ul>
<a name="details"></a>
<!-- $$$QGeoSearchManager-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QGeoSearchManager class provides support for searching operations related to geographic information.</p>
<p>The <a href="qgeosearchmanager.html#geocode">geocode</a>(), <a href="qgeosearchmanager.html#reverseGeocode">reverseGeocode</a>() and <a href="qgeosearchmanager.html#search">search</a>() functions return <a href="qgeosearchreply.html">QGeoSearchReply</a> objects, which manage these operations and report on the result of the operations and any errors which may have occurred.</p>
<p>The <a href="qgeosearchmanager.html#geocode">geocode</a>() and <a href="qgeosearchmanager.html#reverseGeocode">reverseGeocode</a>() functions can be used to convert <a href="qgeoaddress.html">QGeoAddress</a> instances to <a href="qgeocoordinate.html">QGeoCoordinate</a> instances and vice-versa.</p>
<p>The <a href="qgeosearchmanager.html#search">search</a>() function allows a user to perform a free text search for place information. If the string provided can be interpreted as an address it can be geocoded to coordinate information, and the string can also be used to search a landmarks database, depending on the level of support supplied by the service provider.</p>
<p>The <a href="qgeosearchmanager.html#defaultLandmarkManager">defaultLandmarkManager</a>() function will return a <a href="qlandmarkmanager.html">QLandmarkManager</a> instance if access to the service providers landmark database is available outside of the <a href="qgeosearchmanager.html#search">search</a>() method.</p>
<p>A user can supply other <a href="qlandmarkmanager.html">QLandmarkManager</a> instances to be searched during the execution of <a href="qgeosearchmanager.html#search">search</a>() with <a href="qgeosearchmanager.html#setAdditionalLandmarkManagers">setAdditionalLandmarkManagers</a>(). This means that a personal database store can be combined with a public source of database information with very little effort.</p>
<p><b>Note:</b> At present the additional landmark managers only search for the search string in the name of the landmarks.</p>
<p>Instances of QGeoSearchManager can be accessed with <a href="qgeoserviceprovider.html#searchManager">QGeoServiceProvider::searchManager</a>().</p>
<p>A small example of the usage of QGeoSearchManager and the handling of <a href="qlandmark.html">QLandmark</a> results follows:</p>
<pre class="cpp"> <span class="keyword">class</span> MySearchHandler : <span class="keyword">public</span> <span class="type"><a href="http://qt.nokia.com/doc/4.7/qobject.html">QObject</a></span>
 {
     Q_OBJECT
 <span class="keyword">public</span>:
     MySearchHandler(<span class="type">QGeoSearchManager</span> <span class="operator">*</span>searchManager<span class="operator">,</span> <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> searchString)
     {
         <span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span> <span class="operator">*</span>reply <span class="operator">=</span> searchManager<span class="operator">-</span><span class="operator">&gt;</span>search(searchString);

         <span class="keyword">if</span> (reply<span class="operator">-</span><span class="operator">&gt;</span>isFinished()) {
             <span class="keyword">if</span> (reply<span class="operator">-</span><span class="operator">&gt;</span>error() <span class="operator">=</span><span class="operator">=</span> <span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span><span class="operator">::</span>NoError) {
                 searchResults(reply);
             <span class="keyword">else</span>
                 searchError(reply<span class="operator">,</span> reply<span class="operator">-</span><span class="operator">&gt;</span>error()<span class="operator">,</span> reply<span class="operator">-</span><span class="operator">&gt;</span>errorString());
             <span class="keyword">return</span>;
         }

         connect(searchManager<span class="operator">,</span>
                 SIGNAL(finished(<span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span><span class="operator">*</span>))<span class="operator">,</span>
                 <span class="keyword">this</span><span class="operator">,</span>
                 SLOT(searchResults(<span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span><span class="operator">*</span>)));

         connect(searchManager<span class="operator">,</span>
                 SIGNAL(error(<span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span><span class="operator">*</span><span class="operator">,</span><span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span><span class="operator">::</span>Error<span class="operator">,</span><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span>))<span class="operator">,</span>
                 <span class="keyword">this</span>
                 SLOT(searchError(<span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span><span class="operator">*</span><span class="operator">,</span><span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span><span class="operator">::</span>Error<span class="operator">,</span><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span>)));
     }

 <span class="keyword">private</span> <span class="keyword">slots</span>:
     <span class="type">void</span> searchResults(<span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span> <span class="operator">*</span>reply)
     {
         <span class="comment">// The QLandmark results can be created from the simpler</span>
         <span class="comment">// QGeoPlace results if that is required.</span>
         <span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span><span class="operator">&lt;</span><span class="type"><a href="qlandmark.html">QLandmark</a></span><span class="operator">&gt;</span> landmarks;
         <span class="keyword">for</span> (<span class="type">int</span> i <span class="operator">=</span> <span class="number">0</span>; i <span class="operator">&lt;</span> reply<span class="operator">-</span><span class="operator">&gt;</span>places()<span class="operator">.</span>size(); <span class="operator">+</span><span class="operator">+</span>i) {
             <span class="keyword">if</span> (reply<span class="operator">-</span><span class="operator">&gt;</span>places()<span class="operator">.</span>at(i)<span class="operator">.</span>isLandmark())
                 landmarks<span class="operator">.</span>append(<span class="type"><a href="qlandmark.html">QLandmark</a></span>(reply<span class="operator">-</span><span class="operator">&gt;</span>places()<span class="operator">.</span>at(i)));
         }

         <span class="comment">// ... now we have to make use of the places and landmarks ...</span>
         reply<span class="operator">-</span><span class="operator">&gt;</span>deleteLater();
     }

     <span class="type">void</span> searchError(<span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span> <span class="operator">*</span>reply<span class="operator">,</span> <span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span><span class="operator">::</span>Error error<span class="operator">,</span> <span class="keyword">const</span> <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> <span class="operator">&amp;</span>errorString)
     {
         <span class="comment">// ... inform the user that an error has occurred ...</span>
         reply<span class="operator">-</span><span class="operator">&gt;</span>deleteLater();
     }
 };</pre>
</div>
<!-- @@@QGeoSearchManager -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$SearchType$$$SearchNone$$$SearchGeocode$$$SearchLandmarks$$$SearchAll -->
<h3 class="flags"><a name="SearchType-enum"></a>enum QGeoSearchManager::<span class="name">SearchType</span><br/>flags QGeoSearchManager::<span class="name">SearchTypes</span></h3>
<p>Describes the type of search that should be performed by <a href="qgeosearchmanager.html#search">search</a>().</p>
<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"><tt>QGeoSearchManager::SearchNone</tt></td><td class="topAlign"><tt>0x0000</tt></td><td class="topAlign">Do not use the search string.</td></tr>
<tr><td class="topAlign"><tt>QGeoSearchManager::SearchGeocode</tt></td><td class="topAlign"><tt>0x0001</tt></td><td class="topAlign">Use the search string as a textual address in a geocoding operation.</td></tr>
<tr><td class="topAlign"><tt>QGeoSearchManager::SearchLandmarks</tt></td><td class="topAlign"><tt>0x0002</tt></td><td class="topAlign">Use the search string for free-text search against the available landmark information sources.</td></tr>
<tr><td class="topAlign"><tt>QGeoSearchManager::SearchAll</tt></td><td class="topAlign"><tt>0xFFFF</tt></td><td class="topAlign">All available information sources should be used as part of the search.</td></tr>
</table>
<p>The SearchTypes type is a typedef for <a href="qflags.html">QFlags</a>&lt;SearchType&gt;. It stores an OR combination of SearchType values.</p>
<!-- @@@SearchType -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$~QGeoSearchManager[overload1]$$$~QGeoSearchManager -->
<h3 class="fn"><a name="dtor.QGeoSearchManager"></a>QGeoSearchManager::<span class="name">~QGeoSearchManager</span> ()</h3>
<p>Destroys this manager.</p>
<!-- @@@~QGeoSearchManager -->
<!-- $$$addAdditionalLandmarkManager[overload1]$$$addAdditionalLandmarkManagerQLandmarkManager* -->
<h3 class="fn"><a name="addAdditionalLandmarkManager"></a><span class="type">void</span> QGeoSearchManager::<span class="name">addAdditionalLandmarkManager</span> ( <span class="type"><a href="qlandmarkmanager.html">QLandmarkManager</a></span> * <i>landmarkManager</i> )</h3>
<p>Adds <i>landmarkManager</i> to the list of landmark managers that will be used with <a href="qgeosearchmanager.html#search">search</a>().</p>
<p>These landmark managers will be used along with the landmark manager returned by <a href="qgeosearchmanager.html#defaultLandmarkManager">defaultLandmarkManager</a>().</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@addAdditionalLandmarkManager -->
<!-- $$$additionalLandmarkManagers[overload1]$$$additionalLandmarkManagers -->
<h3 class="fn"><a name="additionalLandmarkManagers"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span>&lt;<span class="type"><a href="qlandmarkmanager.html">QLandmarkManager</a></span> *&gt; QGeoSearchManager::<span class="name">additionalLandmarkManagers</span> () const</h3>
<p>Returns the landmark managers that will be used with <a href="qgeosearchmanager.html#search">search</a>().</p>
<p>These landmark managers will be used along with the landmark manager returned by <a href="qgeosearchmanager.html#defaultLandmarkManager">defaultLandmarkManager</a>().</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<p><b>See also </b><a href="qgeosearchmanager.html#setAdditionalLandmarkManagers">setAdditionalLandmarkManagers</a>().</p>
<!-- @@@additionalLandmarkManagers -->
<!-- $$$defaultLandmarkManager[overload1]$$$defaultLandmarkManager -->
<h3 class="fn"><a name="defaultLandmarkManager"></a><span class="type"><a href="qlandmarkmanager.html">QLandmarkManager</a></span> * QGeoSearchManager::<span class="name">defaultLandmarkManager</span> () const</h3>
<p>Returns the landmark manager provided by the service provider for use with <a href="qgeosearchmanager.html#search">search</a>().</p>
<p>Will return 0 if the no landmark manager is associated with the service provider. This does not indicate that <a href="qgeosearchmanager.html#search">search</a>() does not support landmark searching, only that any landmark searching which occurs within in <a href="qgeosearchmanager.html#search">search</a>() is done without the use of a <a href="qlandmarkmanager.html">QLandmarkManager</a>.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@defaultLandmarkManager -->
<!-- $$$error[overload1]$$$errorQGeoSearchReply*QGeoSearchReply::ErrorQString -->
<h3 class="fn"><a name="error"></a><span class="type">void</span> QGeoSearchManager::<span class="name">error</span> ( <span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span> * <i>reply</i>, <span class="type"><a href="qgeosearchreply.html#Error-enum">QGeoSearchReply::Error</a></span> <i>error</i>, <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> <i>errorString</i> = QString() )<tt> [signal]</tt></h3>
<p>This signal is emitted when an error has been detected in the processing of <i>reply</i>. The <a href="qgeosearchmanager.html#finished">QGeoSearchManager::finished</a>() signal will probably follow.</p>
<p>The error will be described by the error code <i>error</i>. If <i>errorString</i> is not empty it will contain a textual description of the error.</p>
<p>This signal and <a href="qgeosearchreply.html#error">QGeoSearchReply::error</a>() will be emitted at the same time.</p>
<p><b>Note:</b> Do no delete the <i>reply</i> object in the slot connected to this signal. Use <a href="http://qt.nokia.com/doc/4.7/qobject.html#deleteLater">deleteLater</a>() instead.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@error -->
<!-- $$$finished[overload1]$$$finishedQGeoSearchReply* -->
<h3 class="fn"><a name="finished"></a><span class="type">void</span> QGeoSearchManager::<span class="name">finished</span> ( <span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span> * <i>reply</i> )<tt> [signal]</tt></h3>
<p>This signal is emitted when <i>reply</i> has finished processing.</p>
<p>If reply::error() equals <a href="qgeosearchreply.html#Error-enum">QGeoSearchReply::NoError</a> then the processing finished successfully.</p>
<p>This signal and <a href="qgeosearchreply.html#finished">QGeoSearchReply::finished</a>() will be emitted at the same time.</p>
<p><b>Note:</b> Do no delete the <i>reply</i> object in the slot connected to this signal. Use <a href="http://qt.nokia.com/doc/4.7/qobject.html#deleteLater">deleteLater</a>() instead.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@finished -->
<!-- $$$geocode[overload1]$$$geocodeconstQGeoAddress&QGeoBoundingArea* -->
<h3 class="fn"><a name="geocode"></a><span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span> * QGeoSearchManager::<span class="name">geocode</span> ( const <span class="type"><a href="qgeoaddress.html">QGeoAddress</a></span> &amp; <i>address</i>, <span class="type"><a href="qgeoboundingarea.html">QGeoBoundingArea</a></span> * <i>bounds</i> = 0 )</h3>
<p>Begins the geocoding of <i>address</i>. Geocoding is the process of finding a coordinate that corresponds to a given address.</p>
<p>A <a href="qgeosearchreply.html">QGeoSearchReply</a> object will be returned, which can be used to manage the geocoding operation and to return the results of the operation.</p>
<p>This manager and the returned <a href="qgeosearchreply.html">QGeoSearchReply</a> object will emit signals indicating if the operation completes or if errors occur.</p>
<p>If <a href="qgeosearchmanager.html#supportsGeocoding">supportsGeocoding</a>() returns false an <a href="qgeosearchreply.html#Error-enum">QGeoSearchReply::UnsupportedOptionError</a> will occur.</p>
<p>Once the operation has completed, <a href="qgeosearchreply.html#places">QGeoSearchReply::places</a>() can be used to retrieve the results, which will consist of a list of <a href="qgeoplace.html">QGeoPlace</a> objects. These object represent a combination of coordinate and address data.</p>
<p>The address data returned in the results may be different from <i>address</i>. This will usually occur if the geocoding service backend uses a different canonical form of addresses or if <i>address</i> was only partially filled out.</p>
<p>If <i>bounds</i> is non-null and valid <a href="qgeoboundingarea.html">QGeoBoundingArea</a> it will be used to limit the results to thos that are contained within <i>bounds</i>. This is particularly useful if <i>address</i> is only partially filled out, as the service will attempt to geocode all matches for the specified data.</p>
<p>The user is responsible for deleting the returned reply object, although this can be done in the slot connected to <a href="qgeosearchmanager.html#finished">QGeoSearchManager::finished</a>(), <a href="qgeosearchmanager.html#error">QGeoSearchManager::error</a>(), <a href="qgeosearchreply.html#finished">QGeoSearchReply::finished</a>() or <a href="qgeosearchreply.html#error">QGeoSearchReply::error</a>() with <a href="http://qt.nokia.com/doc/4.7/qobject.html#deleteLater">deleteLater</a>().</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@geocode -->
<!-- $$$locale[overload1]$$$locale -->
<h3 class="fn"><a name="locale"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qlocale.html">QLocale</a></span> QGeoSearchManager::<span class="name">locale</span> () const</h3>
<p>Returns the locale used to hint to this search manager about what language to use for the results.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<p><b>See also </b><a href="qgeosearchmanager.html#setLocale">setLocale</a>().</p>
<!-- @@@locale -->
<!-- $$$managerName[overload1]$$$managerName -->
<h3 class="fn"><a name="managerName"></a><span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> QGeoSearchManager::<span class="name">managerName</span> () const</h3>
<p>Returns the name of the engine which implements the behaviour of this search manager.</p>
<p>The combination of managerName() and <a href="qgeosearchmanager.html#managerVersion">managerVersion</a>() should be unique amongst the plugin implementations.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@managerName -->
<!-- $$$managerVersion[overload1]$$$managerVersion -->
<h3 class="fn"><a name="managerVersion"></a><span class="type">int</span> QGeoSearchManager::<span class="name">managerVersion</span> () const</h3>
<p>Returns the version of the engine which implements the behaviour of this search manager.</p>
<p>The combination of <a href="qgeosearchmanager.html#managerName">managerName</a>() and managerVersion() should be unique amongst the plugin implementations.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@managerVersion -->
<!-- $$$reverseGeocode[overload1]$$$reverseGeocodeconstQGeoCoordinate&QGeoBoundingArea* -->
<h3 class="fn"><a name="reverseGeocode"></a><span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span> * QGeoSearchManager::<span class="name">reverseGeocode</span> ( const <span class="type"><a href="qgeocoordinate.html">QGeoCoordinate</a></span> &amp; <i>coordinate</i>, <span class="type"><a href="qgeoboundingarea.html">QGeoBoundingArea</a></span> * <i>bounds</i> = 0 )</h3>
<p>Begins the reverse geocoding of <i>coordinate</i>. Reverse geocoding is the process of finding an address that corresponds to a given coordinate.</p>
<p>A <a href="qgeosearchreply.html">QGeoSearchReply</a> object will be returned, which can be used to manage the reverse geocoding operation and to return the results of the operation.</p>
<p>This manager and the returned <a href="qgeosearchreply.html">QGeoSearchReply</a> object will emit signals indicating if the operation completes or if errors occur.</p>
<p>If <a href="qgeosearchmanager.html#supportsReverseGeocoding">supportsReverseGeocoding</a>() returns false an <a href="qgeosearchreply.html#Error-enum">QGeoSearchReply::UnsupportedOptionError</a> will occur.</p>
<p>At that point <a href="qgeosearchreply.html#places">QGeoSearchReply::places</a>() can be used to retrieve the results, which will consist of a list of <a href="qgeoplace.html">QGeoPlace</a> objects. These object represent a combination of coordinate and address data.</p>
<p>The coordinate data returned in the results may be different from <i>coordinate</i>. This will usually occur if the reverse geocoding service backend shifts the coordinates to be closer to the matching addresses, or if the backend returns results at multiple levels of detail.</p>
<p>If multiple results are returned by the reverse geocoding service backend they will be provided in order of specificity. This normally occurs if the backend is configured to reverse geocode across multiple levels of detail. As an example, some services will return address and coordinate pairs for the street address, the city, the state and the country.</p>
<p>If <i>bounds</i> is non-null and a valid <a href="qgeoboundingbox.html">QGeoBoundingBox</a> it will be used to limit the results to thos that are contained within <i>bounds</i>.</p>
<p>The user is responsible for deleting the returned reply object, although this can be done in the slot connected to <a href="qgeosearchmanager.html#finished">QGeoSearchManager::finished</a>(), <a href="qgeosearchmanager.html#error">QGeoSearchManager::error</a>(), <a href="qgeosearchreply.html#finished">QGeoSearchReply::finished</a>() or <a href="qgeosearchreply.html#error">QGeoSearchReply::error</a>() with <a href="http://qt.nokia.com/doc/4.7/qobject.html#deleteLater">deleteLater</a>().</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@reverseGeocode -->
<!-- $$$search[overload1]$$$searchconstQString&SearchTypesintintQGeoBoundingArea* -->
<h3 class="fn"><a name="search"></a><span class="type"><a href="qgeosearchreply.html">QGeoSearchReply</a></span> * QGeoSearchManager::<span class="name">search</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qstring.html">QString</a></span> &amp; <i>searchString</i>, <span class="type"><a href="qgeosearchmanager.html#SearchType-enum">SearchTypes</a></span> <i>searchTypes</i> = SearchTypes( SearchAll ), <span class="type">int</span> <i>limit</i> = -1, <span class="type">int</span> <i>offset</i> = 0, <span class="type"><a href="qgeoboundingarea.html">QGeoBoundingArea</a></span> * <i>bounds</i> = 0 )</h3>
<p>Begins searching for a place matching <i>searchString</i>. The value of <i>searchTypes</i> will determine whether the search is for addresses only, for landmarks only or for both.</p>
<p>A <a href="qgeosearchreply.html">QGeoSearchReply</a> object will be returned, which can be used to manage the geocoding operation and to return the results of the operation.</p>
<p>This manager and the returned <a href="qgeosearchreply.html">QGeoSearchReply</a> object will emit signals indicating if the operation completes or if errors occur.</p>
<p>If <a href="qgeosearchmanager.html#supportsGeocoding">supportsGeocoding</a>() returns false and <i>searchTypes</i> is <a href="qgeosearchmanager.html#SearchType-enum">QGeoSearchManager::SearchGeocode</a> an <a href="qgeosearchreply.html#Error-enum">QGeoSearchReply::UnsupportedOptionError</a> will occur.</p>
<p>Once the operation has completed, <a href="qgeosearchreply.html#places">QGeoSearchReply::places</a>() can be used to retrieve the results, which will consist of a list of <a href="qgeoplace.html">QGeoPlace</a> objects. These object represent a combination of coordinate and address data.</p>
<p>If any of the <a href="qgeoplace.html">QGeoPlace</a> instances in the results have landmark associated data, <a href="qgeoplace.html#isLandmark">QGeoPlace::isLandmark</a>() will return true and QLandmark::QLandmark(const <a href="qgeoplace.html">QGeoPlace</a> &amp;place) can be used to convert the <a href="qgeoplace.html">QGeoPlace</a> instance into a <a href="qlandmark.html">QLandmark</a> instance.</p>
<p>If <i>searchTypes</i> is <a href="qgeosearchmanager.html#SearchType-enum">QGeoSearchManager::SearchLandmarks</a> or <a href="qgeosearchmanager.html#SearchType-enum">QGeoSearchManager::SearchAll</a>, a free text landmark search will be performed. The results will be a combination of the backend specific landmark search and the same free text search applied to each of the <a href="qlandmarkmanager.html">QLandmarkManager</a> instances in <a href="qgeosearchmanager.html#additionalLandmarkManagers">additionalLandmarkManagers</a>().</p>
<p><b>Note:</b> At present the additional landmark managers only search for the search string in the name of the landmarks.</p>
<p>If <i>limit</i> is -1 the entire result set will be returned, otherwise at most <i>limit</i> results will be returned.</p>
<p>The <i>offset</i> parameter is used to ask the search service to not return the first <i>offset</i> results.</p>
<p>The <i>limit</i> and <i>offset</i> results are used together to implement paging.</p>
<p>If additional landmark managers have been setup the number of results returned will be at most (1 + number of additional landmark managers) * <i>limit</i>. This happens because the results are requested from all sources, combined, and returned once all sources have responded.</p>
<p>If <i>bounds</i> is non-null and a valid <a href="qgeoboundingarea.html">QGeoBoundingArea</a> it will be used to limit the results to thos that are contained within <i>bounds</i>.</p>
<p>The user is responsible for deleting the returned reply object, although this can be done in the slot connected to <a href="qgeosearchmanager.html#finished">QGeoSearchManager::finished</a>(), <a href="qgeosearchmanager.html#error">QGeoSearchManager::error</a>(), <a href="qgeosearchreply.html#finished">QGeoSearchReply::finished</a>() or <a href="qgeosearchreply.html#error">QGeoSearchReply::error</a>() with <a href="http://qt.nokia.com/doc/4.7/qobject.html#deleteLater">deleteLater</a>().</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@search -->
<!-- $$$setAdditionalLandmarkManagers[overload1]$$$setAdditionalLandmarkManagersconstQList<QLandmarkManager*>& -->
<h3 class="fn"><a name="setAdditionalLandmarkManagers"></a><span class="type">void</span> QGeoSearchManager::<span class="name">setAdditionalLandmarkManagers</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qlist.html">QList</a></span>&lt;<span class="type"><a href="qlandmarkmanager.html">QLandmarkManager</a></span> *&gt; &amp; <i>landmarkManagers</i> )</h3>
<p>Sets the landmark managers to be used with <a href="qgeosearchmanager.html#search">search</a>() to <i>landmarkManagers</i>.</p>
<p>These landmark managers will be used along with the landmark manager returned by <a href="qgeosearchmanager.html#defaultLandmarkManager">defaultLandmarkManager</a>().</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<p><b>See also </b><a href="qgeosearchmanager.html#additionalLandmarkManagers">additionalLandmarkManagers</a>().</p>
<!-- @@@setAdditionalLandmarkManagers -->
<!-- $$$setLocale[overload1]$$$setLocaleconstQLocale& -->
<h3 class="fn"><a name="setLocale"></a><span class="type">void</span> QGeoSearchManager::<span class="name">setLocale</span> ( const <span class="type"><a href="http://qt.nokia.com/doc/4.7/qlocale.html">QLocale</a></span> &amp; <i>locale</i> )</h3>
<p>Sets the locale to be used by the this manager to <i>locale</i>.</p>
<p>If this search manager supports returning the results in different languages, they will be returned in the language of <i>locale</i>.</p>
<p>The locale used defaults to the system locale if this is not set.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<p><b>See also </b><a href="qgeosearchmanager.html#locale">locale</a>().</p>
<!-- @@@setLocale -->
<!-- $$$supportedSearchTypes[overload1]$$$supportedSearchTypes -->
<h3 class="fn"><a name="supportedSearchTypes"></a><span class="type"><a href="qgeosearchmanager.html#SearchType-enum">SearchTypes</a></span> QGeoSearchManager::<span class="name">supportedSearchTypes</span> () const</h3>
<p>Returns the search types supported by the <a href="qgeosearchmanager.html#search">search</a>() function with this manager.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@supportedSearchTypes -->
<!-- $$$supportsGeocoding[overload1]$$$supportsGeocoding -->
<h3 class="fn"><a name="supportsGeocoding"></a><span class="type">bool</span> QGeoSearchManager::<span class="name">supportsGeocoding</span> () const</h3>
<p>Returns whether this manager supports geocoding.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@supportsGeocoding -->
<!-- $$$supportsReverseGeocoding[overload1]$$$supportsReverseGeocoding -->
<h3 class="fn"><a name="supportsReverseGeocoding"></a><span class="type">bool</span> QGeoSearchManager::<span class="name">supportsReverseGeocoding</span> () const</h3>
<p>Returns whether this manager supports reverse geocoding.</p>
<p>This function was introduced in Qt Mobility 1.1.</p>
<!-- @@@supportsReverseGeocoding -->
</div>
  <div class="ft">
    <span></span>
  </div>
</div> 
<div class="footer">
  <p>
     <acronym title="Copyright">&copy;</acronym> 2008-2011 Nokia Corporation and/or its
     subsidiaries. Nokia, Qt and their respective logos are trademarks of Nokia Corporation 
     in Finland and/or other countries worldwide.</p>
  <p>
     All other trademarks are property of their respective owners. <a title="Privacy Policy"
     href="http://qt.nokia.com/about/privacy-policy">Privacy Policy</a></p>
  <br />
  <p>
    Licensees holding valid Qt Commercial licenses may use this document in accordance with the    Qt Commercial License Agreement provided with the Software or, alternatively, in accordance    with the terms contained in a written agreement between you and Nokia.</p>
  <p>
    Alternatively, this document may be used 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.</p>
</div>
</body>
</html>