23 QML_VALUE_TYPE(routeSegment)
26 Q_PROPERTY(
int travelTime READ travelTime CONSTANT)
27 Q_PROPERTY(qreal distance READ distance CONSTANT)
28 Q_PROPERTY(QList<QGeoCoordinate> path READ path CONSTANT)
29 Q_PROPERTY(QGeoManeuver maneuver READ maneuver CONSTANT)
32 QGeoRouteSegment(
const QGeoRouteSegment &other)
noexcept;
33 QGeoRouteSegment(QGeoRouteSegment &&other)
noexcept =
default;
36 QGeoRouteSegment &operator=(
const QGeoRouteSegment &other)
noexcept;
37 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoRouteSegment)
39 void swap(QGeoRouteSegment &other)
noexcept { d_ptr.swap(other.d_ptr); }
41 friend inline bool operator ==(
const QGeoRouteSegment &lhs,
const QGeoRouteSegment &rhs)
noexcept
42 {
return lhs.isEqual(rhs); }
43 friend inline bool operator !=(
const QGeoRouteSegment &lhs,
const QGeoRouteSegment &rhs)
noexcept
44 {
return !lhs.isEqual(rhs); }
47 bool isLegLastSegment()
const;
49 void setNextRouteSegment(
const QGeoRouteSegment &routeSegment);
50 QGeoRouteSegment nextRouteSegment()
const;
52 void setTravelTime(
int secs);
53 int travelTime()
const;
55 void setDistance(qreal distance);
56 qreal distance()
const;
58 void setPath(
const QList<QGeoCoordinate> &path);
59 QList<QGeoCoordinate> path()
const;
61 void setManeuver(
const QGeoManeuver &maneuver);
62 QGeoManeuver maneuver()
const;
65 QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> d_ptr;
66 QGeoRouteSegment(QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> &&dd);
68 bool isEqual(
const QGeoRouteSegment &other)
const noexcept;
70 friend class QGeoRouteSegmentPrivate;