24 QML_VALUE_TYPE(routeSegment)
27 Q_PROPERTY(
int travelTime READ travelTime CONSTANT)
28 Q_PROPERTY(qreal distance READ distance CONSTANT)
29 Q_PROPERTY(QList<QGeoCoordinate> path READ path CONSTANT)
30 Q_PROPERTY(QGeoManeuver maneuver READ maneuver CONSTANT)
33 QGeoRouteSegment(
const QGeoRouteSegment &other)
noexcept;
34 QGeoRouteSegment(QGeoRouteSegment &&other)
noexcept =
default;
37 QGeoRouteSegment &operator=(
const QGeoRouteSegment &other)
noexcept;
38 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoRouteSegment)
40 void swap(QGeoRouteSegment &other)
noexcept { d_ptr.swap(other.d_ptr); }
42 friend inline bool operator ==(
const QGeoRouteSegment &lhs,
const QGeoRouteSegment &rhs)
noexcept
43 {
return lhs.isEqual(rhs); }
44 friend inline bool operator !=(
const QGeoRouteSegment &lhs,
const QGeoRouteSegment &rhs)
noexcept
45 {
return !lhs.isEqual(rhs); }
48 bool isLegLastSegment()
const;
50 void setNextRouteSegment(
const QGeoRouteSegment &routeSegment);
51 QGeoRouteSegment nextRouteSegment()
const;
53 void setTravelTime(
int secs);
54 int travelTime()
const;
56 void setDistance(qreal distance);
57 qreal distance()
const;
59 void setPath(
const QList<QGeoCoordinate> &path);
60 QList<QGeoCoordinate> path()
const;
62 void setManeuver(
const QGeoManeuver &maneuver);
63 QGeoManeuver maneuver()
const;
66 QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> d_ptr;
67 QGeoRouteSegment(QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> &&dd);
69 bool isEqual(
const QGeoRouteSegment &other)
const noexcept;
71 friend class QGeoRouteSegmentPrivate;