/usr/share/qt5/doc/qtpositioning/qgeopositioninfosource.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 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 | <?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" />
<!-- qgeopositioninfosource.cpp -->
<title>QGeoPositionInfoSource Class | QtPositioning 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="qtpositioning-index.html">Qt Positioning</a></li>
<li><a href="qtpositioning-module.html">C++ Classes</a></li>
<li>QGeoPositionInfoSource</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="#public-types">Public Types</a></li>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#static-public-members">Static Public Members</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QGeoPositionInfoSource Class</h1>
<!-- $$$QGeoPositionInfoSource-brief -->
<p>The QGeoPositionInfoSource class is an abstract base class for the distribution of positional updates. <a href="#details">More...</a></p>
<!-- @@@QGeoPositionInfoSource -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include <QGeoPositionInfoSource></span>
</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> <tt>QT += positioning</tt></td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign"> Qt 5.2</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Inherited By:</td><td class="memItemRight bottomAlign"> <p><a href="qnmeapositioninfosource.html">QNmeaPositionInfoSource</a>.</p>
</td></tr></table><ul>
<li><a href="qgeopositioninfosource-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="qgeopositioninfosource.html#Error-enum">Error</a></b> { AccessError, ClosedError, NoError, UnknownSourceError }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> enum </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#PositioningMethod-enum">PositioningMethod</a></b> { NoPositioningMethods, SatellitePositioningMethods, NonSatellitePositioningMethods, AllPositioningMethods }</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> flags </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#PositioningMethod-enum">PositioningMethods</a></b></td></tr>
</table>
<a name="properties"></a>
<h2>Properties</h2>
<ul>
<li class="fn"><b><a href="qgeopositioninfosource.html#minimumUpdateInterval-prop">minimumUpdateInterval</a></b> : const int</li>
<li class="fn"><b><a href="qgeopositioninfosource.html#sourceName-prop">sourceName</a></b> : const QString</li>
<li class="fn"><b><a href="qgeopositioninfosource.html#updateInterval-prop">updateInterval</a></b> : int</li>
</ul>
<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="qgeopositioninfosource.html#QGeoPositionInfoSource">QGeoPositionInfoSource</a></b>(QObject *<i> parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#dtor.QGeoPositionInfoSource">~QGeoPositionInfoSource</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual Error </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#error">error</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QGeoPositionInfo </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#lastKnownPosition">lastKnownPosition</a></b>(bool<i> fromSatellitePositioningMethodsOnly</i> = false) const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#minimumUpdateInterval-prop">minimumUpdateInterval</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> PositioningMethods </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#preferredPositioningMethods">preferredPositioningMethods</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#setPreferredPositioningMethods">setPreferredPositioningMethods</a></b>(PositioningMethods<i> methods</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#updateInterval-prop">setUpdateInterval</a></b>(int<i> msec</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QString </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#sourceName-prop">sourceName</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual PositioningMethods </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#supportedPositioningMethods">supportedPositioningMethods</a></b>() const = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#updateInterval-prop">updateInterval</a></b>() const</td></tr>
</table>
<a name="public-slots"></a>
<h2>Public Slots</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#requestUpdate">requestUpdate</a></b>(int<i> timeout</i> = 0) = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#startUpdates">startUpdates</a></b>() = 0</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#stopUpdates">stopUpdates</a></b>() = 0</td></tr>
</table>
<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="qgeopositioninfosource.html#error-2">error</a></b>(QGeoPositionInfoSource::Error<i> positioningError</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#positionUpdated">positionUpdated</a></b>(const QGeoPositionInfo &<i> update</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#updateTimeout">updateTimeout</a></b>()</td></tr>
</table>
<a name="static-public-members"></a>
<h2>Static Public Members</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QStringList </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#availableSources">availableSources</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoPositionInfoSource * </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#createDefaultSource">createDefaultSource</a></b>(QObject *<i> parent</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoPositionInfoSource * </td><td class="memItemRight bottomAlign"><b><a href="qgeopositioninfosource.html#createSource">createSource</a></b>(const QString &<i> sourceName</i>, QObject *<i> parent</i>)</td></tr>
</table>
<a name="details"></a>
<!-- $$$QGeoPositionInfoSource-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QGeoPositionInfoSource class is an abstract base class for the distribution of positional updates.</p>
<p>The static function <a href="qgeopositioninfosource.html#createDefaultSource">QGeoPositionInfoSource::createDefaultSource</a>() creates a default position source that is appropriate for the platform, if one is available. Otherwise, QGeoPositionInfoSource will check for available plugins that implement the <a href="qgeopositioninfosourcefactory.html">QGeoPositionInfoSourceFactory</a> interface.</p>
<p>Users of a QGeoPositionInfoSource subclass can request the current position using <a href="qgeopositioninfosource.html#requestUpdate">requestUpdate</a>(), or start and stop regular position updates using <a href="qgeopositioninfosource.html#startUpdates">startUpdates</a>() and <a href="qgeopositioninfosource.html#stopUpdates">stopUpdates</a>(). When an update is available, <a href="qgeopositioninfosource.html#positionUpdated">positionUpdated</a>() is emitted. The last known position can be accessed with <a href="qgeopositioninfosource.html#lastKnownPosition">lastKnownPosition</a>().</p>
<p>If regular position updates are required, <a href="qgeopositioninfosource.html#updateInterval-prop">setUpdateInterval</a>() can be used to specify how often these updates should be emitted. If no interval is specified, updates are simply provided whenever they are available. For example:</p>
<pre class="cpp"><span class="comment">// Emit updates every 10 seconds if available</span>
<span class="type">QGeoPositionInfoSource</span> <span class="operator">*</span>source <span class="operator">=</span> <span class="type">QGeoPositionInfoSource</span><span class="operator">::</span><a href="qgeopositioninfosource.html#createDefaultSource">createDefaultSource</a>(<span class="number">0</span>);
<span class="keyword">if</span> (source)
source<span class="operator">-</span><span class="operator">></span><a href="qgeopositioninfosource.html#updateInterval-prop">setUpdateInterval</a>(<span class="number">10000</span>);</pre>
<p>To remove an update interval that was previously set, call <a href="qgeopositioninfosource.html#updateInterval-prop">setUpdateInterval</a>() with a value of 0.</p>
<p>Note that the position source may have a minimum value requirement for update intervals, as returned by <a href="qgeopositioninfosource.html#minimumUpdateInterval-prop">minimumUpdateInterval</a>().</p>
<p><b>Warning:</b> On Windows CE it is not possible to detect if a device is GPS enabled. The default position source on a Windows CE device without GPS support will never provide any position data.</p>
</div>
<!-- @@@QGeoPositionInfoSource -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$Error$$$AccessError$$$ClosedError$$$UnknownSourceError$$$NoError -->
<h3 class="fn"><a name="Error-enum"></a>enum QGeoPositionInfoSource::<span class="name">Error</span></h3>
<p>The Error enumeration represents the errors which can occur.</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>QGeoPositionInfoSource::AccessError</tt></td><td class="topAlign"><tt>0</tt></td><td class="topAlign">The connection setup to the remote positioning backend failed because the application lacked the required privileges.</td></tr>
<tr><td class="topAlign"><tt>QGeoPositionInfoSource::ClosedError</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">The remote positioning backend closed the connection, which happens for example in case the user is switching location services to off. As soon as the location service is re-enabled regular updates will resume.</td></tr>
<tr><td class="topAlign"><tt>QGeoPositionInfoSource::NoError</tt></td><td class="topAlign"><tt>3</tt></td><td class="topAlign">No error has occurred.</td></tr>
<tr><td class="topAlign"><tt>QGeoPositionInfoSource::UnknownSourceError</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">An unidentified error occurred.</td></tr>
</table>
<!-- @@@Error -->
<!-- $$$PositioningMethod$$$NoPositioningMethods$$$SatellitePositioningMethods$$$NonSatellitePositioningMethods$$$AllPositioningMethods -->
<h3 class="flags"><a name="PositioningMethod-enum"></a>enum QGeoPositionInfoSource::<span class="name">PositioningMethod</span><br/>flags QGeoPositionInfoSource::<span class="name">PositioningMethods</span></h3>
<p>Defines the types of positioning methods.</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>QGeoPositionInfoSource::NoPositioningMethods</tt></td><td class="topAlign"><tt>0x00000000</tt></td><td class="topAlign">None of the positioning methods.</td></tr>
<tr><td class="topAlign"><tt>QGeoPositionInfoSource::SatellitePositioningMethods</tt></td><td class="topAlign"><tt>0x000000ff</tt></td><td class="topAlign">Satellite-based positioning methods such as GPS or GLONASS.</td></tr>
<tr><td class="topAlign"><tt>QGeoPositionInfoSource::NonSatellitePositioningMethods</tt></td><td class="topAlign"><tt>0xffffff00</tt></td><td class="topAlign">Other positioning methods such as 3GPP cell identifier or WiFi based positioning.</td></tr>
<tr><td class="topAlign"><tt>QGeoPositionInfoSource::AllPositioningMethods</tt></td><td class="topAlign"><tt>0xffffffff</tt></td><td class="topAlign">Satellite-based positioning methods as soon as available. Otherwise non-satellite based methods.</td></tr>
</table>
<p>The PositioningMethods type is a typedef for <a href="">QFlags</a><PositioningMethod>. It stores an OR combination of PositioningMethod values.</p>
<!-- @@@PositioningMethod -->
</div>
<div class="prop">
<h2>Property Documentation</h2>
<!-- $$$minimumUpdateInterval-prop$$$minimumUpdateInterval -->
<h3 class="fn"><a name="minimumUpdateInterval-prop"></a><span class="name">minimumUpdateInterval</span> : const <span class="type">int</span></h3>
<p>This property holds this property holds the minimum time (in milliseconds) required to retrieve a position update.</p>
<p>This is the minimum value accepted by <a href="qgeopositioninfosource.html#updateInterval-prop">setUpdateInterval</a>() and <a href="qgeopositioninfosource.html#requestUpdate">requestUpdate</a>().</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> virtual int </td><td class="memItemRight bottomAlign"><span class="name"><b>minimumUpdateInterval</b></span>() const = 0</td></tr>
</table>
<!-- @@@minimumUpdateInterval -->
<!-- $$$sourceName-prop$$$sourceName -->
<h3 class="fn"><a name="sourceName-prop"></a><span class="name">sourceName</span> : const <span class="type">QString</span></h3>
<p>This property holds this property holds the unique name of the position source implementation in use.</p>
<p>This is the same name that can be passed to <a href="qgeopositioninfosource.html#createSource">createSource</a>() in order to create a new instance of a particular position source implementation.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> QString </td><td class="memItemRight bottomAlign"><span class="name"><b>sourceName</b></span>() const</td></tr>
</table>
<!-- @@@sourceName -->
<!-- $$$updateInterval-prop$$$updateInterval$$$setUpdateIntervalint -->
<h3 class="fn"><a name="updateInterval-prop"></a><span class="name">updateInterval</span> : <span class="type">int</span></h3>
<p>This property holds this property holds the requested interval in milliseconds between each update.</p>
<p>If the update interval is not set (or is set to 0) the source will provide updates as often as necessary.</p>
<p>If the update interval is set, the source will provide updates at an interval as close to the requested interval as possible. If the requested interval is less than the <a href="qgeopositioninfosource.html#minimumUpdateInterval-prop">minimumUpdateInterval</a>(), the minimum interval is used instead.</p>
<p>Changes to the update interval will happen as soon as is practical, however the time the change takes may vary between implementations. Whether or not the elapsed time from the previous interval is counted as part of the new interval is also implementation dependent.</p>
<p>The default value for this property is 0.</p>
<p>Note: Subclass implementations must call the base implementation of setUpdateInterval() so that updateInterval() returns the correct value.</p>
<p><b>Access functions:</b></p>
<table class="alignedsummary">
<tr><td class="memItemLeft topAlign rightAlign"> int </td><td class="memItemRight bottomAlign"><span class="name"><b>updateInterval</b></span>() const</td></tr>
<tr><td class="memItemLeft topAlign rightAlign"> virtual void </td><td class="memItemRight bottomAlign"><span class="name"><b>setUpdateInterval</b></span>(int<i> msec</i>)</td></tr>
</table>
<!-- @@@updateInterval -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGeoPositionInfoSource[overload1]$$$QGeoPositionInfoSourceQObject* -->
<h3 class="fn"><a name="QGeoPositionInfoSource"></a>QGeoPositionInfoSource::<span class="name">QGeoPositionInfoSource</span>(<span class="type">QObject</span> *<i> parent</i>)</h3>
<p>Creates a position source with the specified <i>parent</i>.</p>
<!-- @@@QGeoPositionInfoSource -->
<!-- $$$~QGeoPositionInfoSource[overload1]$$$~QGeoPositionInfoSource -->
<h3 class="fn"><a name="dtor.QGeoPositionInfoSource"></a>QGeoPositionInfoSource::<span class="name">~QGeoPositionInfoSource</span>()<tt> [virtual]</tt></h3>
<p>Destroys the position source.</p>
<!-- @@@~QGeoPositionInfoSource -->
<!-- $$$availableSources[overload1]$$$availableSources -->
<h3 class="fn"><a name="availableSources"></a><span class="type">QStringList</span> QGeoPositionInfoSource::<span class="name">availableSources</span>()<tt> [static]</tt></h3>
<p>Returns a list of available source plugins. This includes any default backend plugin for the current platform.</p>
<!-- @@@availableSources -->
<!-- $$$createDefaultSource[overload1]$$$createDefaultSourceQObject* -->
<h3 class="fn"><a name="createDefaultSource"></a><span class="type">QGeoPositionInfoSource</span> * QGeoPositionInfoSource::<span class="name">createDefaultSource</span>(<span class="type">QObject</span> *<i> parent</i>)<tt> [static]</tt></h3>
<p>Creates and returns a position source with the given <i>parent</i> that reads from the system's default sources of location data, or the plugin with the highest available priority.</p>
<p>Returns 0 if the system has no default position source, no valid plugins could be found or the user does not have the permission to access the current position.</p>
<!-- @@@createDefaultSource -->
<!-- $$$createSource[overload1]$$$createSourceconstQString&QObject* -->
<h3 class="fn"><a name="createSource"></a><span class="type">QGeoPositionInfoSource</span> * QGeoPositionInfoSource::<span class="name">createSource</span>(const <span class="type">QString</span> &<i> sourceName</i>, <span class="type">QObject</span> *<i> parent</i>)<tt> [static]</tt></h3>
<p>Creates and returns a position source with the given <i>parent</i>, by loading the plugin named <i>sourceName</i>.</p>
<p>Returns 0 if the plugin cannot be found.</p>
<!-- @@@createSource -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn"><a name="error"></a><span class="type"><a href="qgeopositioninfosource.html#Error-enum">Error</a></span> QGeoPositionInfoSource::<span class="name">error</span>() const<tt> [pure virtual]</tt></h3>
<p>Returns the type of error that last occurred.</p>
<!-- @@@error -->
<!-- $$$error$$$errorQGeoPositionInfoSource::Error -->
<h3 class="fn"><a name="error-2"></a><span class="type">void</span> QGeoPositionInfoSource::<span class="name">error</span>(<span class="type"><a href="qgeopositioninfosource.html#Error-enum">QGeoPositionInfoSource::Error</a></span><i> positioningError</i>)<tt> [signal]</tt></h3>
<p>This signal is emitted after an error occurred. The <i>positioningError</i> parameter describes the type of error that occurred.</p>
<p>This signal is not emitted when an <a href="qgeopositioninfosource.html#updateTimeout">updateTimeout</a>() has occurred.</p>
<!-- @@@error -->
<!-- $$$lastKnownPosition[overload1]$$$lastKnownPositionbool -->
<h3 class="fn"><a name="lastKnownPosition"></a><span class="type"><a href="qgeopositioninfo.html">QGeoPositionInfo</a></span> QGeoPositionInfoSource::<span class="name">lastKnownPosition</span>(<span class="type">bool</span><i> fromSatellitePositioningMethodsOnly</i> = false) const<tt> [pure virtual]</tt></h3>
<p>Returns an update containing the last known position, or a null update if none is available.</p>
<p>If <i>fromSatellitePositioningMethodsOnly</i> is true, this returns the last known position received from a satellite positioning method; if none is available, a null update is returned.</p>
<!-- @@@lastKnownPosition -->
<!-- $$$positionUpdated[overload1]$$$positionUpdatedconstQGeoPositionInfo& -->
<h3 class="fn"><a name="positionUpdated"></a><span class="type">void</span> QGeoPositionInfoSource::<span class="name">positionUpdated</span>(const <span class="type"><a href="qgeopositioninfo.html">QGeoPositionInfo</a></span> &<i> update</i>)<tt> [signal]</tt></h3>
<p>If <a href="qgeopositioninfosource.html#startUpdates">startUpdates</a>() or <a href="qgeopositioninfosource.html#requestUpdate">requestUpdate</a>() is called, this signal is emitted when an update becomes available.</p>
<p>The <i>update</i> value holds the value of the new update.</p>
<!-- @@@positionUpdated -->
<!-- $$$preferredPositioningMethods[overload1]$$$preferredPositioningMethods -->
<h3 class="fn"><a name="preferredPositioningMethods"></a><span class="type"><a href="qgeopositioninfosource.html#PositioningMethod-enum">PositioningMethods</a></span> QGeoPositionInfoSource::<span class="name">preferredPositioningMethods</span>() const</h3>
<p>Returns the positioning methods set by <a href="qgeopositioninfosource.html#setPreferredPositioningMethods">setPreferredPositioningMethods</a>().</p>
<p><b>See also </b><a href="qgeopositioninfosource.html#setPreferredPositioningMethods">setPreferredPositioningMethods</a>().</p>
<!-- @@@preferredPositioningMethods -->
<!-- $$$requestUpdate[overload1]$$$requestUpdateint -->
<h3 class="fn"><a name="requestUpdate"></a><span class="type">void</span> QGeoPositionInfoSource::<span class="name">requestUpdate</span>(<span class="type">int</span><i> timeout</i> = 0)<tt> [pure virtual slot]</tt></h3>
<p>Attempts to get the current position and emit <a href="qgeopositioninfosource.html#positionUpdated">positionUpdated</a>() with this information. If the current position cannot be found within the given <i>timeout</i> (in milliseconds) or if <i>timeout</i> is less than the value returned by <a href="qgeopositioninfosource.html#minimumUpdateInterval-prop">minimumUpdateInterval</a>(), <a href="qgeopositioninfosource.html#updateTimeout">updateTimeout</a>() is emitted.</p>
<p>If the timeout is zero, the timeout defaults to a reasonable timeout period as appropriate for the source.</p>
<p>This does nothing if another update request is in progress. However it can be called even if <a href="qgeopositioninfosource.html#startUpdates">startUpdates</a>() has already been called and regular updates are in progress.</p>
<p>If the source uses multiple positioning methods, it tries to get the current position from the most accurate positioning method within the given timeout.</p>
<!-- @@@requestUpdate -->
<!-- $$$setPreferredPositioningMethods[overload1]$$$setPreferredPositioningMethodsPositioningMethods -->
<h3 class="fn"><a name="setPreferredPositioningMethods"></a><span class="type">void</span> QGeoPositionInfoSource::<span class="name">setPreferredPositioningMethods</span>(<span class="type"><a href="qgeopositioninfosource.html#PositioningMethod-enum">PositioningMethods</a></span><i> methods</i>)<tt> [virtual]</tt></h3>
<p>Sets the preferred positioning methods for this source to <i>methods</i>.</p>
<p>If <i>methods</i> includes a method that is not supported by the source, the unsupported method will be ignored.</p>
<p>If <i>methods</i> does not include any methods supported by the source, the preferred methods will be set to the set of methods which the source supports.</p>
<p><b>Note:</b> When reimplementing this method, subclasses must call the base method implementation to ensure <a href="qgeopositioninfosource.html#preferredPositioningMethods">preferredPositioningMethods</a>() returns the correct value.</p>
<p><b>See also </b><a href="qgeopositioninfosource.html#preferredPositioningMethods">preferredPositioningMethods</a>() and <a href="qgeopositioninfosource.html#supportedPositioningMethods">supportedPositioningMethods</a>().</p>
<!-- @@@setPreferredPositioningMethods -->
<!-- $$$startUpdates[overload1]$$$startUpdates -->
<h3 class="fn"><a name="startUpdates"></a><span class="type">void</span> QGeoPositionInfoSource::<span class="name">startUpdates</span>()<tt> [pure virtual slot]</tt></h3>
<p>Starts emitting updates at regular intervals as specified by <a href="qgeopositioninfosource.html#updateInterval-prop">setUpdateInterval</a>().</p>
<p>If <a href="qgeopositioninfosource.html#updateInterval-prop">setUpdateInterval</a>() has not been called, the source will emit updates as soon as they become available.</p>
<p>An <a href="qgeopositioninfosource.html#updateTimeout">updateTimeout</a>() signal will be emitted if this <a href="qgeopositioninfosource.html">QGeoPositionInfoSource</a> subclass determines that it will not be able to provide regular updates. This could happen if a satellite fix is lost or if a hardware error is detected. Position updates will recommence if the data becomes available later on. The <a href="qgeopositioninfosource.html#updateTimeout">updateTimeout</a>() signal will not be emitted again until after the periodic updates resume.</p>
<!-- @@@startUpdates -->
<!-- $$$stopUpdates[overload1]$$$stopUpdates -->
<h3 class="fn"><a name="stopUpdates"></a><span class="type">void</span> QGeoPositionInfoSource::<span class="name">stopUpdates</span>()<tt> [pure virtual slot]</tt></h3>
<p>Stops emitting updates at regular intervals.</p>
<!-- @@@stopUpdates -->
<!-- $$$supportedPositioningMethods[overload1]$$$supportedPositioningMethods -->
<h3 class="fn"><a name="supportedPositioningMethods"></a><span class="type"><a href="qgeopositioninfosource.html#PositioningMethod-enum">PositioningMethods</a></span> QGeoPositionInfoSource::<span class="name">supportedPositioningMethods</span>() const<tt> [pure virtual]</tt></h3>
<p>Returns the positioning methods available to this source.</p>
<p><b>See also </b><a href="qgeopositioninfosource.html#setPreferredPositioningMethods">setPreferredPositioningMethods</a>().</p>
<!-- @@@supportedPositioningMethods -->
<!-- $$$updateTimeout[overload1]$$$updateTimeout -->
<h3 class="fn"><a name="updateTimeout"></a><span class="type">void</span> QGeoPositionInfoSource::<span class="name">updateTimeout</span>()<tt> [signal]</tt></h3>
<p>If <a href="qgeopositioninfosource.html#requestUpdate">requestUpdate</a>() was called, this signal will be emitted if the current position could not be retrieved within the specified timeout.</p>
<p>If <a href="qgeopositioninfosource.html#startUpdates">startUpdates</a>() has been called, this signal will be emitted if this <a href="qgeopositioninfosource.html">QGeoPositionInfoSource</a> subclass determines that it will not be able to provide further regular updates. This signal will not be emitted again until after the regular updates resume.</p>
<p>While the triggering of this signal may be considered an error condition, it does not imply the emission of the <tt>error()</tt> signal. Only the emission of <tt>updateTimeout()</tt> is required to indicate a timeout.</p>
<!-- @@@updateTimeout -->
</div>
</div>
</div>
</div>
</div>
</div>
<div class="footer">
<p>
<acronym title="Copyright">©</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>
|