Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
qgeoroutesegment.h
Go to the documentation of this file.
1// Copyright (C) 2015 The Qt Company Ltd.
2// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
3
4#ifndef QGEOROUTESEGMENT_H
5#define QGEOROUTESEGMENT_H
6
7#include <QtCore/QObject>
8#include <QtCore/QExplicitlySharedDataPointer>
9#include <QtCore/QList>
10#include <QtLocation/qlocationglobal.h>
11#include <QtQml/qqml.h>
12
14
15class QGeoCoordinate;
16class QGeoManeuver;
18
20class Q_LOCATION_EXPORT QGeoRouteSegment
21{
23 QML_VALUE_TYPE(routeSegment)
25
26 Q_PROPERTY(int travelTime READ travelTime CONSTANT)
30public:
35
36 QGeoRouteSegment &operator=(const QGeoRouteSegment &other) noexcept;
37 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoRouteSegment)
38
39 void swap(QGeoRouteSegment &other) noexcept { d_ptr.swap(other.d_ptr); }
40
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); }
45
46 bool isValid() const;
47 bool isLegLastSegment() const;
48
49 void setNextRouteSegment(const QGeoRouteSegment &routeSegment);
51
52 void setTravelTime(int secs);
53 int travelTime() const;
54
56 qreal distance() const;
57
58 void setPath(const QList<QGeoCoordinate> &path);
59 QList<QGeoCoordinate> path() const;
60
62 QGeoManeuver maneuver() const;
63
64private:
65 QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> d_ptr;
66 QGeoRouteSegment(QExplicitlySharedDataPointer<QGeoRouteSegmentPrivate> &&dd);
67
68 bool isEqual(const QGeoRouteSegment &other) const noexcept;
69
71};
72
74
75#endif
static bool isEqual(const aiUVTransform &a, const aiUVTransform &b)
\inmodule QtPositioning
\inmodule QtLocation
void setNextRouteSegment(const QExplicitlySharedDataPointer< QGeoRouteSegmentPrivate > &next)
QExplicitlySharedDataPointer< QGeoRouteSegmentPrivate > nextRouteSegment() const
void setDistance(qreal distance)
void setTravelTime(int travelTime)
void setManeuver(const QGeoManeuver &maneuver)
void setPath(const QList< QGeoCoordinate > &path)
QGeoManeuver maneuver() const
\inmodule QtLocation
void swap(QGeoRouteSegment &other) noexcept
Definition qlist.h:75
Combined button and popup list for selecting options.
constexpr bool operator!=(const timespec &t1, const timespec &t2)
GLsizei GLsizei GLfloat distance
GLsizei const GLchar *const * path
#define QML_VALUE_TYPE(NAME)
#define QML_STRUCTURED_VALUE
bool operator==(const QRandomGenerator &rng1, const QRandomGenerator &rng2)
Definition qrandom.cpp:1220
#define QT_DECLARE_QESDP_SPECIALIZATION_DTOR_WITH_EXPORT(Class, ExportMacro)
#define Q_PROPERTY(...)
#define Q_GADGET
double qreal
Definition qtypes.h:187
QSharedPointer< T > other(t)
[5]
this swap(other)