29 Q_PROPERTY(QString routeId READ routeId CONSTANT)
30 Q_PROPERTY(QGeoRectangle bounds READ bounds CONSTANT)
31 Q_PROPERTY(
int travelTime READ travelTime CONSTANT)
32 Q_PROPERTY(qreal distance READ distance CONSTANT)
33 Q_PROPERTY(QList<QGeoCoordinate> path READ path WRITE setPath)
34 Q_PROPERTY(QList<QGeoRoute> routeLegs READ routeLegs CONSTANT)
35 Q_PROPERTY(QVariantMap extendedAttributes READ extendedAttributes CONSTANT)
36 Q_PROPERTY(
int legIndex READ legIndex CONSTANT)
37 Q_PROPERTY(QGeoRoute overallRoute READ overallRoute CONSTANT)
38 Q_PROPERTY(qsizetype segmentsCount READ segmentsCount CONSTANT)
39 Q_PROPERTY(QList<QGeoRouteSegment> segments READ segments CONSTANT)
43 QGeoRoute(
const QGeoRoute &other)
noexcept;
44 QGeoRoute(QGeoRoute &&other)
noexcept =
default;
47 QGeoRoute &operator=(
const QGeoRoute &other)
noexcept;
48 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoRoute)
50 void swap(QGeoRoute &other)
noexcept { d_ptr.swap(other.d_ptr); }
52 friend inline bool operator==(
const QGeoRoute &lhs,
const QGeoRoute &rhs)
noexcept
53 {
return lhs.isEqual(rhs); }
54 friend inline bool operator!=(
const QGeoRoute &lhs,
const QGeoRoute &rhs)
noexcept
55 {
return !lhs.isEqual(rhs); }
57 void setRouteId(
const QString &id);
58 QString routeId()
const;
60 void setRequest(
const QGeoRouteRequest &request);
61 QGeoRouteRequest request()
const;
63 void setBounds(
const QGeoRectangle &bounds);
64 QGeoRectangle bounds()
const;
66 void setFirstRouteSegment(
const QGeoRouteSegment &routeSegment);
67 QGeoRouteSegment firstRouteSegment()
const;
68 qsizetype segmentsCount()
const;
69 QList<QGeoRouteSegment> segments()
const;
71 void setTravelTime(
int secs);
72 int travelTime()
const;
74 void setDistance(qreal distance);
75 qreal distance()
const;
77 void setTravelMode(QGeoRouteRequest::TravelMode mode);
78 QGeoRouteRequest::TravelMode travelMode()
const;
80 void setPath(
const QList<QGeoCoordinate> &path);
81 QList<QGeoCoordinate> path()
const;
83 void setRouteLegs(
const QList<QGeoRoute> &legs);
84 QList<QGeoRoute> routeLegs()
const;
86 void setExtendedAttributes(
const QVariantMap &extendedAttributes);
87 QVariantMap extendedAttributes()
const;
89 void setLegIndex(
int idx);
92 void setOverallRoute(
const QGeoRoute &route);
93 QGeoRoute overallRoute()
const;
96 QExplicitlySharedDataPointer<QGeoRoutePrivate> &d();
97 const QExplicitlySharedDataPointer<QGeoRoutePrivate> &const_d()
const;
100 QExplicitlySharedDataPointer<QGeoRoutePrivate> d_ptr;
101 bool isEqual(
const QGeoRoute &other)
const noexcept;
103 friend class QDeclarativeGeoRoute;
104 friend class QGeoRoutePrivate;