Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > 2c21526e2a037dc4eaceb3895021e482 > files > 81

qtlocation5-doc-5.12.6-1.mga7.noarch.rpm

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html>
<html lang="en">
<head>
  <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<!-- qgeoroutesegment.cpp -->
  <title>QGeoRouteSegment Class | Qt Location 5.12.6</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 >Qt 5.12</td><td ><a href="qtlocation-index.html">Qt Location</a></td><td ><a href="qtlocation-module.html">C++ Classes</a></td><td >QGeoRouteSegment</td></tr></table><table class="buildversion"><tr>
<td id="buildversion" width="100%" align="right"><a href="qtlocation-index.html">Qt 5.12.6 Reference Documentation</a></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="#public-functions">Public Functions</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>
<div class="sidebar-content" id="sidebar-content"></div></div>
<h1 class="title">QGeoRouteSegment Class</h1>
<!-- $$$QGeoRouteSegment-brief -->
<p>The <a href="qgeoroutesegment.html">QGeoRouteSegment</a> class represents a segment of a route. <a href="#details">More...</a></p>
<!-- @@@QGeoRouteSegment -->
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> Header:</td><td class="memItemRight bottomAlign">   <span class="preprocessor">#include &lt;QGeoRouteSegment&gt;</span>
</td></tr><tr><td class="memItemLeft rightAlign topAlign"> qmake:</td><td class="memItemRight bottomAlign"> QT += location</td></tr><tr><td class="memItemLeft rightAlign topAlign"> Since:</td><td class="memItemRight bottomAlign">  Qt 5.6</td></tr></table></div><ul>
<li><a href="qgeoroutesegment-members.html">List of all members, including inherited members</a></li>
</ul>
<a name="public-functions"></a>
<h2 id="public-functions">Public Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#QGeoRouteSegment">QGeoRouteSegment</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#QGeoRouteSegment-1">QGeoRouteSegment</a></b>(const QGeoRouteSegment &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#dtor.QGeoRouteSegment">~QGeoRouteSegment</a></b>()</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> qreal </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#distance">distance</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#isLegLastSegment">isLegLastSegment</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#isValid">isValid</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoManeuver </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#maneuver">maneuver</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoRouteSegment </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#nextRouteSegment">nextRouteSegment</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QList&lt;QGeoCoordinate&gt; </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#path">path</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#setDistance">setDistance</a></b>(qreal <i>distance</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#setManeuver">setManeuver</a></b>(const QGeoManeuver &amp;<i>maneuver</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#setNextRouteSegment">setNextRouteSegment</a></b>(const QGeoRouteSegment &amp;<i>routeSegment</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#setPath">setPath</a></b>(const QList&lt;QGeoCoordinate&gt; &amp;<i>path</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> void </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#setTravelTime">setTravelTime</a></b>(int <i>secs</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> int </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#travelTime">travelTime</a></b>() const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#operator-not-eq">operator!=</a></b>(const QGeoRouteSegment &amp;<i>other</i>) const</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> QGeoRouteSegment &amp;</td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#operator-eq">operator=</a></b>(const QGeoRouteSegment &amp;<i>other</i>)</td></tr>
<tr><td class="memItemLeft rightAlign topAlign"> bool </td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#operator-eq-eq">operator==</a></b>(const QGeoRouteSegment &amp;<i>other</i>) const</td></tr>
</table></div>
<a name="protected-functions"></a>
<h2 id="protected-functions">Protected Functions</h2>
<div class="table"><table class="alignedsummary">
<tr><td class="memItemLeft rightAlign topAlign"> QExplicitlySharedDataPointer&lt;QGeoRouteSegmentPrivate&gt; &amp;</td><td class="memItemRight bottomAlign"><b><a href="qgeoroutesegment.html#d">d</a></b>()</td></tr>
</table></div>
<a name="details"></a>
<!-- $$$QGeoRouteSegment-description -->
<div class="descr">
<h2 id="details">Detailed Description</h2>
<p>The <a href="qgeoroutesegment.html">QGeoRouteSegment</a> class represents a segment of a route.</p>
<p>A <a href="qgeoroutesegment.html">QGeoRouteSegment</a> instance has information about the physical layout of the route segment, the length of the route and estimated time required to traverse the route segment and an optional <a href="qgeomaneuver.html">QGeoManeuver</a> associated with the beginning of the route segment.</p>
<p><a href="qgeoroutesegment.html">QGeoRouteSegment</a> instances can be thought of as edges on a routing graph, with <a href="qgeomaneuver.html">QGeoManeuver</a> instances as optional labels attached to the vertices of the graph.</p>
</div>
<!-- @@@QGeoRouteSegment -->
<div class="func">
<h2>Member Function Documentation</h2>
<!-- $$$QGeoRouteSegment[overload1]$$$QGeoRouteSegment -->
<h3 class="fn" id="QGeoRouteSegment"><a name="QGeoRouteSegment"></a>QGeoRouteSegment::<span class="name">QGeoRouteSegment</span>()</h3>
<p>Constructs an invalid route segment object.</p>
<p>The route segment will remain invalid until one of <a href="qgeoroutesegment.html#setNextRouteSegment">setNextRouteSegment</a>(), <a href="qgeoroutesegment.html#setTravelTime">setTravelTime</a>(), <a href="qgeoroutesegment.html#setDistance">setDistance</a>(), <a href="qgeoroutesegment.html#setPath">setPath</a>() or <a href="qgeoroutesegment.html#setManeuver">setManeuver</a>() is called.</p>
<!-- @@@QGeoRouteSegment -->
<!-- $$$QGeoRouteSegment$$$QGeoRouteSegmentconstQGeoRouteSegment& -->
<h3 class="fn" id="QGeoRouteSegment-1"><a name="QGeoRouteSegment-1"></a>QGeoRouteSegment::<span class="name">QGeoRouteSegment</span>(const <span class="type"><a href="qgeoroutesegment.html#QGeoRouteSegment">QGeoRouteSegment</a></span> &amp;<i>other</i>)</h3>
<p>Constructs a route segment object from the contents of <i>other</i>.</p>
<!-- @@@QGeoRouteSegment -->
<!-- $$$~QGeoRouteSegment[overload1]$$$~QGeoRouteSegment -->
<h3 class="fn" id="dtor.QGeoRouteSegment"><a name="dtor.QGeoRouteSegment"></a>QGeoRouteSegment::<span class="name">~QGeoRouteSegment</span>()</h3>
<p>Destroys this route segment object.</p>
<!-- @@@~QGeoRouteSegment -->
<!-- $$$d[overload1]$$$d -->
<h3 class="fn" id="d"><a name="d"></a><code>[protected] </code><span class="type">QExplicitlySharedDataPointer</span>&lt;<span class="type">QGeoRouteSegmentPrivate</span>&gt; &amp;QGeoRouteSegment::<span class="name">d</span>()</h3>
<p>Returns the private implementation.</p>
<!-- @@@d -->
<!-- $$$distance[overload1]$$$distance -->
<h3 class="fn" id="distance"><a name="distance"></a><span class="type">qreal</span> QGeoRouteSegment::<span class="name">distance</span>() const</h3>
<p>Returns the distance covered by this segment of the route, in meters.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#setDistance">setDistance</a>().</p>
<!-- @@@distance -->
<!-- $$$isLegLastSegment[overload1]$$$isLegLastSegment -->
<h3 class="fn" id="isLegLastSegment"><a name="isLegLastSegment"></a><span class="type">bool</span> QGeoRouteSegment::<span class="name">isLegLastSegment</span>() const</h3>
<p>Returns whether this route segment is the last segment of a route leg.</p>
<p>This function was introduced in  Qt 5.12.</p>
<!-- @@@isLegLastSegment -->
<!-- $$$isValid[overload1]$$$isValid -->
<h3 class="fn" id="isValid"><a name="isValid"></a><span class="type">bool</span> QGeoRouteSegment::<span class="name">isValid</span>() const</h3>
<p>Returns whether this route segment is valid or not.</p>
<p>If <a href="qgeoroutesegment.html#nextRouteSegment">nextRouteSegment</a>() is called on the last route segment of a route, the returned value will be an invalid route segment.</p>
<!-- @@@isValid -->
<!-- $$$maneuver[overload1]$$$maneuver -->
<h3 class="fn" id="maneuver"><a name="maneuver"></a><span class="type"><a href="qgeomaneuver.html">QGeoManeuver</a></span> QGeoRouteSegment::<span class="name">maneuver</span>() const</h3>
<p>Returns the maneuver for this route segment.</p>
<p>Will return an invalid <a href="qgeomaneuver.html">QGeoManeuver</a> if no information has been attached to the starting point of this route segment.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#setManeuver">setManeuver</a>().</p>
<!-- @@@maneuver -->
<!-- $$$nextRouteSegment[overload1]$$$nextRouteSegment -->
<h3 class="fn" id="nextRouteSegment"><a name="nextRouteSegment"></a><span class="type"><a href="qgeoroutesegment.html#QGeoRouteSegment">QGeoRouteSegment</a></span> QGeoRouteSegment::<span class="name">nextRouteSegment</span>() const</h3>
<p>Returns the next route segment in the route.</p>
<p>Will return an invalid route segment if this is the last route segment in the route.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#setNextRouteSegment">setNextRouteSegment</a>().</p>
<!-- @@@nextRouteSegment -->
<!-- $$$path[overload1]$$$path -->
<h3 class="fn" id="path"><a name="path"></a><span class="type">QList</span>&lt;<span class="type">QGeoCoordinate</span>&gt; QGeoRouteSegment::<span class="name">path</span>() const</h3>
<p>Returns the geometric shape of this route segment of the route.</p>
<p>The coordinates should be listed in the order in which they would be traversed by someone traveling along this segment of the route.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#setPath">setPath</a>().</p>
<!-- @@@path -->
<!-- $$$setDistance[overload1]$$$setDistanceqreal -->
<h3 class="fn" id="setDistance"><a name="setDistance"></a><span class="type">void</span> QGeoRouteSegment::<span class="name">setDistance</span>(<span class="type">qreal</span> <i>distance</i>)</h3>
<p>Sets the distance covered by this segment of the route, in meters, to <i>distance</i>.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#distance">distance</a>().</p>
<!-- @@@setDistance -->
<!-- $$$setManeuver[overload1]$$$setManeuverconstQGeoManeuver& -->
<h3 class="fn" id="setManeuver"><a name="setManeuver"></a><span class="type">void</span> QGeoRouteSegment::<span class="name">setManeuver</span>(const <span class="type"><a href="qgeomaneuver.html">QGeoManeuver</a></span> &amp;<i>maneuver</i>)</h3>
<p>Sets the maneuver for this route segment to <i>maneuver</i>.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#maneuver">maneuver</a>().</p>
<!-- @@@setManeuver -->
<!-- $$$setNextRouteSegment[overload1]$$$setNextRouteSegmentconstQGeoRouteSegment& -->
<h3 class="fn" id="setNextRouteSegment"><a name="setNextRouteSegment"></a><span class="type">void</span> QGeoRouteSegment::<span class="name">setNextRouteSegment</span>(const <span class="type"><a href="qgeoroutesegment.html#QGeoRouteSegment">QGeoRouteSegment</a></span> &amp;<i>routeSegment</i>)</h3>
<p>Sets the next route segment in the route to <i>routeSegment</i>.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#nextRouteSegment">nextRouteSegment</a>().</p>
<!-- @@@setNextRouteSegment -->
<!-- $$$setPath[overload1]$$$setPathconstQList<QGeoCoordinate>& -->
<h3 class="fn" id="setPath"><a name="setPath"></a><span class="type">void</span> QGeoRouteSegment::<span class="name">setPath</span>(const <span class="type">QList</span>&lt;<span class="type">QGeoCoordinate</span>&gt; &amp;<i>path</i>)</h3>
<p>Sets the geometric shape of this segment of the route to <i>path</i>.</p>
<p>The coordinates in <i>path</i> should be listed in the order in which they would be traversed by someone traveling along this segment of the route.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#path">path</a>().</p>
<!-- @@@setPath -->
<!-- $$$setTravelTime[overload1]$$$setTravelTimeint -->
<h3 class="fn" id="setTravelTime"><a name="setTravelTime"></a><span class="type">void</span> QGeoRouteSegment::<span class="name">setTravelTime</span>(<span class="type">int</span> <i>secs</i>)</h3>
<p>Sets the estimated amount of time it will take to traverse this segment of the route, in seconds, to <i>secs</i>.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#travelTime">travelTime</a>().</p>
<!-- @@@setTravelTime -->
<!-- $$$travelTime[overload1]$$$travelTime -->
<h3 class="fn" id="travelTime"><a name="travelTime"></a><span class="type">int</span> QGeoRouteSegment::<span class="name">travelTime</span>() const</h3>
<p>Returns the estimated amount of time it will take to traverse this segment of the route, in seconds.</p>
<p><b>See also </b><a href="qgeoroutesegment.html#setTravelTime">setTravelTime</a>().</p>
<!-- @@@travelTime -->
<!-- $$$operator!=[overload1]$$$operator!=constQGeoRouteSegment& -->
<h3 class="fn" id="operator-not-eq"><a name="operator-not-eq"></a><span class="type">bool</span> QGeoRouteSegment::<span class="name">operator!=</span>(const <span class="type"><a href="qgeoroutesegment.html#QGeoRouteSegment">QGeoRouteSegment</a></span> &amp;<i>other</i>) const</h3>
<p>Returns whether this route segment and <i>other</i> are not equal.</p>
<p>The value of <a href="qgeoroutesegment.html#nextRouteSegment">nextRouteSegment</a>() is not considered in the comparison.</p>
<!-- @@@operator!= -->
<!-- $$$operator=[overload1]$$$operator=constQGeoRouteSegment& -->
<h3 class="fn" id="operator-eq"><a name="operator-eq"></a><span class="type"><a href="qgeoroutesegment.html#QGeoRouteSegment">QGeoRouteSegment</a></span> &amp;QGeoRouteSegment::<span class="name">operator=</span>(const <span class="type"><a href="qgeoroutesegment.html#QGeoRouteSegment">QGeoRouteSegment</a></span> &amp;<i>other</i>)</h3>
<p>Assigns <i>other</i> to this route segment object and then returns a reference to this route segment object.</p>
<!-- @@@operator= -->
<!-- $$$operator==[overload1]$$$operator==constQGeoRouteSegment& -->
<h3 class="fn" id="operator-eq-eq"><a name="operator-eq-eq"></a><span class="type">bool</span> QGeoRouteSegment::<span class="name">operator==</span>(const <span class="type"><a href="qgeoroutesegment.html#QGeoRouteSegment">QGeoRouteSegment</a></span> &amp;<i>other</i>) const</h3>
<p>Returns whether this route segment and <i>other</i> are equal.</p>
<p>The value of <a href="qgeoroutesegment.html#nextRouteSegment">nextRouteSegment</a>() is not considered in the comparison.</p>
<!-- @@@operator== -->
</div>
        </div>
       </div>
   </div>
   </div>
</div>
<div class="footer">
   <p>
   <acronym title="Copyright">&copy;</acronym> 2019 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>