summaryrefslogtreecommitdiff
path: root/src/location/maps/qgeoroutesegment_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/location/maps/qgeoroutesegment_p.h')
-rw-r--r--src/location/maps/qgeoroutesegment_p.h79
1 files changed, 20 insertions, 59 deletions
diff --git a/src/location/maps/qgeoroutesegment_p.h b/src/location/maps/qgeoroutesegment_p.h
index 3807d4b8..42cc428c 100644
--- a/src/location/maps/qgeoroutesegment_p.h
+++ b/src/location/maps/qgeoroutesegment_p.h
@@ -68,77 +68,38 @@ class Q_LOCATION_PRIVATE_EXPORT QGeoRouteSegmentPrivate : public QSharedData
{
public:
QGeoRouteSegmentPrivate();
- QGeoRouteSegmentPrivate(const QGeoRouteSegmentPrivate &other);
- virtual ~QGeoRouteSegmentPrivate();
- virtual QGeoRouteSegmentPrivate *clone() = 0;
-
- bool operator ==(const QGeoRouteSegmentPrivate &other) const;
-
- virtual bool valid() const;
- virtual void setValid(bool valid);
-
- virtual bool isLegLastSegment() const;
- virtual void setLegLastSegment(bool lastSegment);
-
- virtual int travelTime() const;
- virtual void setTravelTime(int travelTime);
-
- virtual qreal distance() const;
- virtual void setDistance(qreal distance);
-
- virtual QList<QGeoCoordinate> path() const;
- virtual void setPath(const QList<QGeoCoordinate> &path);
-
- virtual QGeoManeuver maneuver() const;
- virtual void setManeuver(const QGeoManeuver &maneuver);
-
- virtual QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> nextRouteSegment() const;
- virtual void setNextRouteSegment(const QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> &next);
-
- QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> m_nextSegment;
static QGeoRouteSegmentPrivate *get(QGeoRouteSegment &segment);
-protected:
- virtual bool equals(const QGeoRouteSegmentPrivate &other) const;
-};
-
-
-
-class Q_LOCATION_PRIVATE_EXPORT QGeoRouteSegmentPrivateDefault : public QGeoRouteSegmentPrivate
-{
-public:
- QGeoRouteSegmentPrivateDefault();
- QGeoRouteSegmentPrivateDefault(const QGeoRouteSegmentPrivateDefault &other);
- ~QGeoRouteSegmentPrivateDefault();
- QGeoRouteSegmentPrivate *clone() override;
-
- bool operator ==(const QGeoRouteSegmentPrivateDefault &other) const;
-
- bool valid() const override;
- void setValid(bool valid) override;
+ bool valid() const;
+ void setValid(bool valid);
- bool isLegLastSegment() const override;
- void setLegLastSegment(bool lastSegment) override;
+ bool isLegLastSegment() const;
+ void setLegLastSegment(bool lastSegment);
- int travelTime() const override;
- void setTravelTime(int travelTime) override;
+ int travelTime() const;
+ void setTravelTime(int travelTime);
- qreal distance() const override;
- void setDistance(qreal distance) override;
+ qreal distance() const;
+ void setDistance(qreal distance);
- QList<QGeoCoordinate> path() const override;
- void setPath(const QList<QGeoCoordinate> &path) override;
+ QList<QGeoCoordinate> path() const;
+ void setPath(const QList<QGeoCoordinate> &path);
- QGeoManeuver maneuver() const override;
- void setManeuver(const QGeoManeuver &maneuver) override;
+ QGeoManeuver maneuver() const;
+ void setManeuver(const QGeoManeuver &maneuver);
+ QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> nextRouteSegment() const;
+ void setNextRouteSegment(const QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> &next);
- bool m_valid;
+ QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> m_nextSegment;
+ bool m_valid = false;
bool m_legLastSegment = false;
- int m_travelTime;
- qreal m_distance;
+ int m_travelTime = 0;
+ qreal m_distance = 0.0;
QList<QGeoCoordinate> m_path;
QGeoManeuver m_maneuver;
+
+ friend bool operator==(const QGeoRouteSegmentPrivate &lhs, const QGeoRouteSegmentPrivate &rhs);
};
QT_END_NAMESPACE