30 Q_PROPERTY(QString routeId READ routeId CONSTANT)
31 Q_PROPERTY(QGeoRectangle bounds READ bounds CONSTANT)
32 Q_PROPERTY(
int travelTime READ travelTime CONSTANT)
33 Q_PROPERTY(qreal distance READ distance CONSTANT)
34 Q_PROPERTY(QList<QGeoCoordinate> path READ path WRITE setPath)
35 Q_PROPERTY(QList<QGeoRoute> routeLegs READ routeLegs CONSTANT)
36 Q_PROPERTY(QVariantMap extendedAttributes READ extendedAttributes CONSTANT)
37 Q_PROPERTY(
int legIndex READ legIndex CONSTANT)
38 Q_PROPERTY(QGeoRoute overallRoute READ overallRoute CONSTANT)
39 Q_PROPERTY(qsizetype segmentsCount READ segmentsCount CONSTANT)
40 Q_PROPERTY(QList<QGeoRouteSegment> segments READ segments CONSTANT)
44 QGeoRoute(
const QGeoRoute &other)
noexcept;
45 QGeoRoute(QGeoRoute &&other)
noexcept =
default;
48 QGeoRoute &operator=(
const QGeoRoute &other)
noexcept;
49 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoRoute)
51 void swap(QGeoRoute &other)
noexcept { d_ptr.swap(other.d_ptr); }
53 friend inline bool operator==(
const QGeoRoute &lhs,
const QGeoRoute &rhs)
noexcept
54 {
return lhs.isEqual(rhs); }
55 friend inline bool operator!=(
const QGeoRoute &lhs,
const QGeoRoute &rhs)
noexcept
56 {
return !lhs.isEqual(rhs); }
58 void setRouteId(
const QString &id);
59 QString routeId()
const;
61 void setRequest(
const QGeoRouteRequest &request);
62 QGeoRouteRequest request()
const;
64 void setBounds(
const QGeoRectangle &bounds);
65 QGeoRectangle bounds()
const;
67 void setFirstRouteSegment(
const QGeoRouteSegment &routeSegment);
68 QGeoRouteSegment firstRouteSegment()
const;
69 qsizetype segmentsCount()
const;
70 QList<QGeoRouteSegment> segments()
const;
72 void setTravelTime(
int secs);
73 int travelTime()
const;
75 void setDistance(qreal distance);
76 qreal distance()
const;
78 void setTravelMode(QGeoRouteRequest::TravelMode mode);
79 QGeoRouteRequest::TravelMode travelMode()
const;
81 void setPath(
const QList<QGeoCoordinate> &path);
82 QList<QGeoCoordinate> path()
const;
84 void setRouteLegs(
const QList<QGeoRoute> &legs);
85 QList<QGeoRoute> routeLegs()
const;
87 void setExtendedAttributes(
const QVariantMap &extendedAttributes);
88 QVariantMap extendedAttributes()
const;
90 void setLegIndex(
int idx);
93 void setOverallRoute(
const QGeoRoute &route);
94 QGeoRoute overallRoute()
const;
97 QExplicitlySharedDataPointer<QGeoRoutePrivate> &d();
98 const QExplicitlySharedDataPointer<QGeoRoutePrivate> &const_d()
const;
101 QExplicitlySharedDataPointer<QGeoRoutePrivate> d_ptr;
102 bool isEqual(
const QGeoRoute &other)
const noexcept;
104 friend class QDeclarativeGeoRoute;
105 friend class QGeoRoutePrivate;