qml-navigator.html 13.2 KB
Newer Older
xuebingbing's avatar
xuebingbing committed
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
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qdeclarativenavigator.cpp -->
  <title>Navigator QML Type | Qt Location 5.11</title>
  <link rel="stylesheet" type="text/css" href="style/offline-simple.css" />
  <script type="text/javascript">
    document.getElementsByTagName("link").item(0).setAttribute("href", "style/offline.css");
    // loading style sheet breaks anchors that were jumped to before
    // so force jumping to anchor again
    setTimeout(function() {
        var anchor = location.hash;
        // need to jump to different anchor first (e.g. none)
        location.hash = "#";
        setTimeout(function() {
            location.hash = anchor;
        }, 0);
    }, 0);
  </script>
</head>
<body>
<div class="header" id="qtdocheader">
  <div class="main">
    <div class="main-rounded">
      <div class="navigationbar">
        <table><tr>
<td ><a href="../qtdoc/index.html">Qt 5.11</a></td><td ><a href="qtlocation-index.html">Qt Location</a></td><td ><a href="qtlocation-qmlmodule.html">QML Types</a></td><td >Navigator QML Type</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right">Qt 5.11.2 Reference Documentation</td>
        </tr></table>
      </div>
    </div>
<div class="content">
<div class="line">
<div class="content mainContent">
<div class="sidebar">
<div class="toc">
<h3><a name="toc">Contents</a></h3>
<ul>
<li class="level1"><a href="#properties">Properties</a></li>
<li class="level1"><a href="#signals">Signals</a></li>
<li class="level1"><a href="#details">Detailed Description</a></li>
</ul>
</div>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">Navigator QML Type</h1>
<span class="subtitle"></span>
<!-- $$$Navigator-brief -->
<p>The Navigator type offers functionalities to perform turn-by-turn navigation. <a href="#details">More...</a></p>
<!-- @@@Navigator -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Import Statement:</td><td class="memItemRight bottomAlign"> import  .</td></tr></table></div><ul>
<li><a href="qml-navigator-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="properties"></a>
<h2 id="properties">Properties</h2>
<ul>
<li class="fn"><b><b><a href="qml-navigator.html#active-prop">active</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-navigator.html#currentRoute-prop">currentRoute</a></b></b> : Route</li>
<li class="fn"><b><b><a href="qml-navigator.html#currentSegment-prop">currentSegment</a></b></b> : int</li>
<li class="fn"><b><b><a href="qml-navigator.html#map-prop">map</a></b></b> : Map</li>
<li class="fn"><b><b><a href="qml-navigator.html#navigatorReady-prop">navigatorReady</a></b></b> : bool</li>
<li class="fn"><b><b><a href="qml-navigator.html#plugin-prop">plugin</a></b></b> : Plugin</li>
<li class="fn"><b><b><a href="qml-navigator.html#positionSource-prop">positionSource</a></b></b> : PositionSource</li>
<li class="fn"><b><b><a href="qml-navigator.html#route-prop">route</a></b></b> : Route</li>
<li class="fn"><b><b><a href="qml-navigator.html#trackPositionSource-prop">trackPositionSource</a></b></b> : bool</li>
</ul>
<a name="signals"></a>
<h2 id="signals">Signals</h2>
<ul>
<li class="fn"><b><b><a href="qml-navigator.html#destinationReached-signal">destinationReached</a></b></b>()</li>
<li class="fn"><b><b><a href="qml-navigator.html#waypointReached-signal">waypointReached</a></b></b>(Waypoint <i>waypoint</i>)</li>
</ul>
<!-- $$$Navigator-description -->
<a name="details"></a>
<h2 id="details">Detailed Description</h2>
<p>The Navigator purpose is to use a plugin's turn-by-turn navigation implementation in a QML application in a seamless manner. This object may take control of the map position, orientation, tilting and zoom, as well as changing the map style, elements on the map such as direction information. In certain cases, it may also restrict user interaction with the Map and with the items on it.</p>
<!-- @@@Navigator -->
<h2>Property Documentation</h2>
<!-- $$$active -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="active-prop">
<td class="tblQmlPropNode"><p>
<a name="active-prop"></a><span class="name">active</span> : <span class="type"><a href="../qtqml/qml-bool.html">bool</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property tells whether the Navigator is navigating or not. Set this property to <code>true</code> to start the navigation. Set it to <code>false</code> to stop an active navigation session.</p>
</div></div><!-- @@@active -->
<br/>
<!-- $$$currentRoute -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="currentRoute-prop">
<td class="tblQmlPropNode"><p>
<a name="currentRoute-prop"></a><span class="name">currentRoute</span> : <span class="type"><a href="qml-qtlocation-route.html">Route</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This read-only property holds the current route the navigator following. This can be the same as <a href="qml-navigator.html#route-prop">route</a>, or can be different, if the navigator cannot follow the user-specified route. For example if the position coming from <a href="qml-navigator.html#positionSource-prop">positionSource</a> is considerably off route, the navigation engine might recalculate and start following a new route.</p>
<p><b>See also </b><a href="qml-qtlocation-route.html">Route</a>.</p>
</div></div><!-- @@@currentRoute -->
<br/>
<!-- $$$currentSegment -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="currentSegment-prop">
<td class="tblQmlPropNode"><p>
<a name="currentSegment-prop"></a><span class="name">currentSegment</span> : <span class="type"><a href="../qtqml/qml-int.html">int</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This read-only property holds the index of the current <a href="qml-qtlocation-routesegment.html">RouteSegment</a> in the <a href="qml-navigator.html#currentRoute-prop">currentRoute</a>.</p>
<p><b>See also </b><a href="qml-qtlocation-routesegment.html">RouteSegment</a>.</p>
</div></div><!-- @@@currentSegment -->
<br/>
<!-- $$$map -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="map-prop">
<td class="tblQmlPropNode"><p>
<a name="map-prop"></a><span class="name">map</span> : <span class="type"><a href="qml-qtlocation-map.html">Map</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the Map that the navigator is in charge of controlling.</p>
<p>This is a write-once property. Once the Navigator has a Map associated with it, any attempted modifications of the map property will be ignored.</p>
<p><b>See also </b><a href="qml-qtlocation-map.html">Map</a>.</p>
</div></div><!-- @@@map -->
<br/>
<!-- $$$navigatorReady -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="navigatorReady-prop">
<td class="tblQmlPropNode"><p>
<a name="navigatorReady-prop"></a><span class="name">navigatorReady</span> : <span class="type"><a href="../qtqml/qml-bool.html">bool</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This read-only property tells whether the navigator is ready to start the navigation or not. A Navigator becomes ready once the plugin is attached and a navigation engine has been instantiated, and the other required properties are set to valid values.</p>
</div></div><!-- @@@navigatorReady -->
<br/>
<!-- $$$plugin -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="plugin-prop">
<td class="tblQmlPropNode"><p>
<a name="plugin-prop"></a><span class="name">plugin</span> : <span class="type"><a href="qml-qtlocation-plugin.html">Plugin</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the plugin which provides the navigation functionality.</p>
<p>This is a write-once property. Once the Navigator has a plugin associated with it, any attempted modifications of the plugin property will be ignored.</p>
<p><b>See also </b><a href="location-places-qml.html#plugin">Plugin</a>.</p>
</div></div><!-- @@@plugin -->
<br/>
<!-- $$$positionSource -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="positionSource-prop">
<td class="tblQmlPropNode"><p>
<a name="positionSource-prop"></a><span class="name">positionSource</span> : <span class="type"><a href="../qtpositioning/qml-qtpositioning-positionsource.html">PositionSource</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the <a href="../qtpositioning/qml-qtpositioning-positionsource.html">PositionSource</a> that the navigator will receive position updates from to perform the navigation.</p>
<p>This is a write-once property. Once the Navigator has a <a href="../qtpositioning/qml-qtpositioning-positionsource.html">PositionSource</a> associated with it, any attempted modifications of the positionSource property will be ignored.</p>
<p><b>See also </b><a href="../qtpositioning/qml-qtpositioning-positionsource.html">PositionSource</a>.</p>
</div></div><!-- @@@positionSource -->
<br/>
<!-- $$$route -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="route-prop">
<td class="tblQmlPropNode"><p>
<a name="route-prop"></a><span class="name">route</span> : <span class="type"><a href="qml-qtlocation-route.html">Route</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property holds the Route that the navigator is supposed to use to perform the navigation.</p>
<p><b>Note: </b>This property is not necessarily the same as <a href="qml-navigator.html#currentRoute-prop">currentRoute</a>. <a href="qml-navigator.html#currentRoute-prop">currentRoute</a> may differ, during routing, for various reasons. It is reasonable to assume, however, that <a href="qml-navigator.html#currentRoute-prop">currentRoute</a>'s destination will be the same as route's destination. Setting this property while a navigation session is ongoing will stop the navigation.</p><p><b>See also </b><a href="qml-qtlocation-route.html">Route</a>.</p>
</div></div><!-- @@@route -->
<br/>
<!-- $$$trackPositionSource -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="trackPositionSource-prop">
<td class="tblQmlPropNode"><p>
<a name="trackPositionSource-prop"></a><span class="name">trackPositionSource</span> : <span class="type"><a href="../qtqml/qml-bool.html">bool</a></span></p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This property tells whether the Navigator should control the Map camera to keep track of position source updates. This property is enabled (<code>true</code>) by default, and setting it to <code>false</code> is useful in cases where e.g&#x2e; the user starts gesturing over the map area.</p>
<p>Navigator plugins can also control this property directly e.g&#x2e; user map interaction could trigger the property change. Honoring the user-specified value of this property is plugin dependent.</p>
</div></div><!-- @@@trackPositionSource -->
<br/>
<h2>Signal Documentation</h2>
<!-- $$$destinationReached -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="destinationReached-signal">
<td class="tblQmlFuncNode"><p>
<a name="destinationReached-signal"></a><span class="name">destinationReached</span>()</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the last waypoint of the route, the destination, has been reached.</p>
</div></div><!-- @@@destinationReached -->
<br/>
<!-- $$$waypointReached -->
<div class="qmlitem"><div class="qmlproto">
<div class="table"><table class="qmlname">
<tr valign="top" class="odd" id="waypointReached-signal">
<td class="tblQmlFuncNode"><p>
<a name="waypointReached-signal"></a><span class="name">waypointReached</span>(<span class="type"><a href="qml-qtlocation-waypoint.html">Waypoint</a></span> <i>waypoint</i>)</p></td></tr>
</table></div>
</div><div class="qmldoc"><p>This signal is emitted when the waypoint <i>waypoint</i> has been reached.</p>
<p><b>See also </b><a href="qml-qtlocation-waypoint.html">Waypoint</a>.</p>
</div></div><!-- @@@waypointReached -->
<br/>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2018 The Qt Company Ltd.
   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/>    Qt and respective logos are trademarks of The Qt Company Ltd.     in Finland and/or other countries worldwide. All other trademarks are property
   of their respective owners. </p>
</div>
</body>
</html>