/usr/share/qt5/doc/qtpositioning/qnmeapositioninfosource.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 | <?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" />
<!-- qnmeapositioninfosource.cpp -->
<title>QNmeaPositionInfoSource 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>QNmeaPositionInfoSource</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="#public-functions">Public Functions</a></li>
<li class="level1"><a href="#public-slots">Public Slots</a></li>
<li class="level1"><a href="#protected-functions">Protected Functions</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<h1 class="title">QNmeaPositionInfoSource Class</h1>
<!-- $$$QNmeaPositionInfoSource-brief -->
<p>The QNmeaPositionInfoSource class provides positional information using a NMEA data source. <a href="#details">More...</a></p>
<!-- @@@QNmeaPositionInfoSource -->
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign"> </b><tt><span class="preprocessor">#include <QNmeaPositionInfoSource></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"> Inherits:</td><td class="memItemRight bottomAlign"> <a href="qgeopositioninfosource.html">QGeoPositionInfoSource</a>.</td></tr></table><ul>
<li><a href="qnmeapositioninfosource-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="qnmeapositioninfosource.html#UpdateMode-enum">UpdateMode</a></b> { RealTimeMode, SimulationMode }</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="qnmeapositioninfosource.html#QNmeaPositionInfoSource">QNmeaPositionInfoSource</a></b>(UpdateMode<i> updateMode</i>, QObject *<i> parent</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#dtor.QNmeaPositionInfoSource">~QNmeaPositionInfoSource</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QIODevice * </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#device">device</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#setDevice">setDevice</a></b>(QIODevice *<i> device</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> UpdateMode </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#updateMode">updateMode</a></b>() const</td></tr>
</table>
<a name="reimplemented-public-functions"></a>
<h2>Reimplemented Public Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual Error </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#error">error</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual QGeoPositionInfo </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#lastKnownPosition">lastKnownPosition</a></b>(bool<i> fromSatellitePositioningMethodsOnly</i> = false) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual int </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#minimumUpdateInterval">minimumUpdateInterval</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#setUpdateInterval">setUpdateInterval</a></b>(int<i> msec</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual PositioningMethods </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#supportedPositioningMethods">supportedPositioningMethods</a></b>() const</td></tr>
</table>
<ul>
<li class="fn">9 public functions inherited from <a href="qgeopositioninfosource.html#public-functions">QGeoPositionInfoSource</a></li>
</ul>
<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="qnmeapositioninfosource.html#requestUpdate">requestUpdate</a></b>(int<i> msec</i> = 0)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#startUpdates">startUpdates</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> virtual void </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#stopUpdates">stopUpdates</a></b>()</td></tr>
</table>
<ul>
<li class="fn">3 public slots inherited from <a href="qgeopositioninfosource.html#public-slots">QGeoPositionInfoSource</a></li>
</ul>
<a name="protected-functions"></a>
<h2>Protected Functions</h2>
<table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> virtual bool </td><td class="memItemRight bottomAlign"><b><a href="qnmeapositioninfosource.html#parsePosInfoFromNmeaData">parsePosInfoFromNmeaData</a></b>(const char *<i> data</i>, int<i> size</i>, QGeoPositionInfo *<i> posInfo</i>, bool *<i> hasFix</i>)</td></tr>
</table>
<h3>Additional Inherited Members</h3>
<ul>
<li class="fn">3 properties inherited from <a href="qgeopositioninfosource.html#properties">QGeoPositionInfoSource</a></li>
<li class="fn">3 signals inherited from <a href="qgeopositioninfosource.html#signals">QGeoPositionInfoSource</a></li>
<li class="fn">3 static public members inherited from <a href="qgeopositioninfosource.html#static-public-members">QGeoPositionInfoSource</a></li>
</ul>
<a name="details"></a>
<!-- $$$QNmeaPositionInfoSource-description -->
<div class="descr">
<h2>Detailed Description</h2>
<p>The QNmeaPositionInfoSource class provides positional information using a NMEA data source.</p>
<p>NMEA is a commonly used protocol for the specification of one's global position at a certain point in time. The QNmeaPositionInfoSource class reads NMEA data and uses it to provide positional data in the form of <a href="qgeopositioninfo.html">QGeoPositionInfo</a> objects.</p>
<p>A QNmeaPositionInfoSource instance operates in either <a href="qnmeapositioninfosource.html#UpdateMode-enum">RealTimeMode</a> or <a href="qnmeapositioninfosource.html#UpdateMode-enum">SimulationMode</a>. These modes allow NMEA data to be read from either a live source of positional data, or replayed for simulation purposes from previously recorded NMEA data.</p>
<p>The source of NMEA data is set with <a href="qnmeapositioninfosource.html#setDevice">setDevice</a>().</p>
<p>Use <a href="qnmeapositioninfosource.html#startUpdates">startUpdates</a>() to start receiving regular position updates and <a href="qnmeapositioninfosource.html#stopUpdates">stopUpdates</a>() to stop these updates. If you only require updates occasionally, you can call <a href="qnmeapositioninfosource.html#requestUpdate">requestUpdate</a>() to request a single update.</p>
<p>In both cases the position information is received via the <a href="qgeopositioninfosource.html#positionUpdated">positionUpdated</a>() signal and the last known position can be accessed with <a href="qnmeapositioninfosource.html#lastKnownPosition">lastKnownPosition</a>().</p>
</div>
<!-- @@@QNmeaPositionInfoSource -->
<div class="types">
<h2>Member Type Documentation</h2>
<!-- $$$UpdateMode$$$RealTimeMode$$$SimulationMode -->
<h3 class="fn"><a name="UpdateMode-enum"></a>enum QNmeaPositionInfoSource::<span class="name">UpdateMode</span></h3>
<p>Defines the available update modes.</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>QNmeaPositionInfoSource::RealTimeMode</tt></td><td class="topAlign"><tt>1</tt></td><td class="topAlign">Positional data is read and distributed from the data source as it becomes available. Use this mode if you are using a live source of positional data (for example, a GPS hardware device).</td></tr>
<tr><td class="topAlign"><tt>QNmeaPositionInfoSource::SimulationMode</tt></td><td class="topAlign"><tt>2</tt></td><td class="topAlign">The data and time information in the NMEA source data is used to provide positional updates at the rate at which the data was originally recorded. Use this mode if the data source contains previously recorded NMEA data and you want to replay the data for simulation purposes.</td></tr>
</table>
<!-- @@@UpdateMode -->
</div>
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QNmeaPositionInfoSource[overload1]$$$QNmeaPositionInfoSourceUpdateModeQObject* -->
<h3 class="fn"><a name="QNmeaPositionInfoSource"></a>QNmeaPositionInfoSource::<span class="name">QNmeaPositionInfoSource</span>(<span class="type"><a href="qnmeapositioninfosource.html#UpdateMode-enum">UpdateMode</a></span><i> updateMode</i>, <span class="type">QObject</span> *<i> parent</i> = 0)</h3>
<p>Constructs a <a href="qnmeapositioninfosource.html">QNmeaPositionInfoSource</a> instance with the given <i>parent</i> and <i>updateMode</i>.</p>
<!-- @@@QNmeaPositionInfoSource -->
<!-- $$$~QNmeaPositionInfoSource[overload1]$$$~QNmeaPositionInfoSource -->
<h3 class="fn"><a name="dtor.QNmeaPositionInfoSource"></a>QNmeaPositionInfoSource::<span class="name">~QNmeaPositionInfoSource</span>()</h3>
<p>Destroys the position source.</p>
<!-- @@@~QNmeaPositionInfoSource -->
<!-- $$$device[overload1]$$$device -->
<h3 class="fn"><a name="device"></a><span class="type">QIODevice</span> * QNmeaPositionInfoSource::<span class="name">device</span>() const</h3>
<p>Returns the NMEA data source.</p>
<p><b>See also </b><a href="qnmeapositioninfosource.html#setDevice">setDevice</a>().</p>
<!-- @@@device -->
<!-- $$$error[overload1]$$$error -->
<h3 class="fn"><a name="error"></a><span class="type"><a href="qgeopositioninfosource.html#Error-enum">Error</a></span> QNmeaPositionInfoSource::<span class="name">error</span>() const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgeopositioninfosource.html#error">QGeoPositionInfoSource::error</a>().</p>
<!-- @@@error -->
<!-- $$$lastKnownPosition[overload1]$$$lastKnownPositionbool -->
<h3 class="fn"><a name="lastKnownPosition"></a><span class="type"><a href="qgeopositioninfo.html">QGeoPositionInfo</a></span> QNmeaPositionInfoSource::<span class="name">lastKnownPosition</span>(<span class="type">bool</span><i> fromSatellitePositioningMethodsOnly</i> = false) const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgeopositioninfosource.html#lastKnownPosition">QGeoPositionInfoSource::lastKnownPosition</a>().</p>
<!-- @@@lastKnownPosition -->
<!-- $$$minimumUpdateInterval[overload1]$$$minimumUpdateInterval -->
<h3 class="fn"><a name="minimumUpdateInterval"></a><span class="type">int</span> QNmeaPositionInfoSource::<span class="name">minimumUpdateInterval</span>() const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgeopositioninfosource.html#minimumUpdateInterval-prop">QGeoPositionInfoSource::minimumUpdateInterval</a>().</p>
<!-- @@@minimumUpdateInterval -->
<!-- $$$parsePosInfoFromNmeaData[overload1]$$$parsePosInfoFromNmeaDataconstchar*intQGeoPositionInfo*bool* -->
<h3 class="fn"><a name="parsePosInfoFromNmeaData"></a><span class="type">bool</span> QNmeaPositionInfoSource::<span class="name">parsePosInfoFromNmeaData</span>(const <span class="type">char</span> *<i> data</i>, <span class="type">int</span><i> size</i>, <span class="type"><a href="qgeopositioninfo.html">QGeoPositionInfo</a></span> *<i> posInfo</i>, <span class="type">bool</span> *<i> hasFix</i>)<tt> [virtual protected]</tt></h3>
<p>Parses an NMEA sentence string into a <a href="qgeopositioninfo.html">QGeoPositionInfo</a>.</p>
<p>The default implementation will parse standard NMEA sentences. This method should be reimplemented in a subclass whenever the need to deal with non-standard NMEA sentences arises.</p>
<p>The parser reads <i>size</i> bytes from <i>data</i> and uses that information to setup <i>posInfo</i> and <i>hasFix</i>. If <i>hasFix</i> is set to false then <i>posInfo</i> may contain only the time or the date and the time.</p>
<p>Returns true if the sentence was succsesfully parsed, otherwise returns false and should not modifiy <i>posInfo</i> or <i>hasFix</i>.</p>
<!-- @@@parsePosInfoFromNmeaData -->
<!-- $$$requestUpdate[overload1]$$$requestUpdateint -->
<h3 class="fn"><a name="requestUpdate"></a><span class="type">void</span> QNmeaPositionInfoSource::<span class="name">requestUpdate</span>(<span class="type">int</span><i> msec</i> = 0)<tt> [virtual slot]</tt></h3>
<p>Reimplemented from <a href="qgeopositioninfosource.html#requestUpdate">QGeoPositionInfoSource::requestUpdate</a>().</p>
<!-- @@@requestUpdate -->
<!-- $$$setDevice[overload1]$$$setDeviceQIODevice* -->
<h3 class="fn"><a name="setDevice"></a><span class="type">void</span> QNmeaPositionInfoSource::<span class="name">setDevice</span>(<span class="type">QIODevice</span> *<i> device</i>)</h3>
<p>Sets the NMEA data source to <i>device</i>. If the device is not open, it will be opened in QIODevice::ReadOnly mode.</p>
<p>The source device can only be set once and must be set before calling <a href="qnmeapositioninfosource.html#startUpdates">startUpdates</a>() or <a href="qnmeapositioninfosource.html#requestUpdate">requestUpdate</a>().</p>
<p><b>Note:</b> The <i>device</i> must emit QIODevice::readyRead() for the source to be notified when data is available for reading. <a href="qnmeapositioninfosource.html">QNmeaPositionInfoSource</a> does not assume the ownership of the device, and hence does not deallocate it upon destruction.</p>
<p><b>See also </b><a href="qnmeapositioninfosource.html#device">device</a>().</p>
<!-- @@@setDevice -->
<!-- $$$setUpdateInterval[overload1]$$$setUpdateIntervalint -->
<h3 class="fn"><a name="setUpdateInterval"></a><span class="type">void</span> QNmeaPositionInfoSource::<span class="name">setUpdateInterval</span>(<span class="type">int</span><i> msec</i>)<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgeopositioninfosource.html#updateInterval-prop">QGeoPositionInfoSource::setUpdateInterval</a>().</p>
<!-- @@@setUpdateInterval -->
<!-- $$$startUpdates[overload1]$$$startUpdates -->
<h3 class="fn"><a name="startUpdates"></a><span class="type">void</span> QNmeaPositionInfoSource::<span class="name">startUpdates</span>()<tt> [virtual slot]</tt></h3>
<p>Reimplemented from <a href="qgeopositioninfosource.html#startUpdates">QGeoPositionInfoSource::startUpdates</a>().</p>
<!-- @@@startUpdates -->
<!-- $$$stopUpdates[overload1]$$$stopUpdates -->
<h3 class="fn"><a name="stopUpdates"></a><span class="type">void</span> QNmeaPositionInfoSource::<span class="name">stopUpdates</span>()<tt> [virtual slot]</tt></h3>
<p>Reimplemented from <a href="qgeopositioninfosource.html#stopUpdates">QGeoPositionInfoSource::stopUpdates</a>().</p>
<!-- @@@stopUpdates -->
<!-- $$$supportedPositioningMethods[overload1]$$$supportedPositioningMethods -->
<h3 class="fn"><a name="supportedPositioningMethods"></a><span class="type"><a href="qgeopositioninfosource.html#PositioningMethod-enum">PositioningMethods</a></span> QNmeaPositionInfoSource::<span class="name">supportedPositioningMethods</span>() const<tt> [virtual]</tt></h3>
<p>Reimplemented from <a href="qgeopositioninfosource.html#supportedPositioningMethods">QGeoPositionInfoSource::supportedPositioningMethods</a>().</p>
<!-- @@@supportedPositioningMethods -->
<!-- $$$updateMode[overload1]$$$updateMode -->
<h3 class="fn"><a name="updateMode"></a><span class="type"><a href="qnmeapositioninfosource.html#UpdateMode-enum">UpdateMode</a></span> QNmeaPositionInfoSource::<span class="name">updateMode</span>() const</h3>
<p>Returns the update mode.</p>
<!-- @@@updateMode -->
</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>
|