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
qgeomaneuver.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 QGEOMANEUVER_H
5#define QGEOMANEUVER_H
6
7#include <QtCore/QObject>
8#include <QtCore/qshareddata.h>
9#include <QtLocation/qlocationglobal.h>
10#include <QtQml/qqml.h>
11
13
14class QString;
15class QGeoCoordinate;
18
19class Q_LOCATION_EXPORT QGeoManeuver
20{
22 QML_VALUE_TYPE(routeManeuver)
25
26 Q_PROPERTY(bool valid READ isValid CONSTANT)
34
35public:
50
53 QGeoManeuver(QGeoManeuver &&other) noexcept = default;
55
57 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoManeuver)
58
59 void swap(QGeoManeuver &other) noexcept { d_ptr.swap(other.d_ptr); }
60
61 friend inline bool operator==(const QGeoManeuver &lhs, const QGeoManeuver &rhs) noexcept
62 { return lhs.isEqual(rhs); }
63 friend inline bool operator!=(const QGeoManeuver &lhs, const QGeoManeuver &rhs) noexcept
64 { return !lhs.isEqual(rhs); }
65
66 bool isValid() const;
67
70
71 void setInstructionText(const QString &instructionText);
73
74 void setDirection(InstructionDirection direction);
75 InstructionDirection direction() const;
76
77 void setTimeToNextInstruction(int secs);
78 int timeToNextInstruction() const;
79
82
83 void setWaypoint(const QGeoCoordinate &coordinate);
85
88
89private:
90 QSharedDataPointer<QGeoManeuverPrivate> d_ptr;
91
92 bool isEqual(const QGeoManeuver &other) const;
93};
94
95Q_DECLARE_SHARED(QGeoManeuver)
96
98
101
102#endif
static bool isEqual(const aiUVTransform &a, const aiUVTransform &b)
\inmodule QtPositioning
qreal distanceToNextInstruction() const
QGeoCoordinate waypoint() const
void setTimeToNextInstruction(int timeToNextInstruction)
void setDirection(QGeoManeuver::InstructionDirection direction)
int timeToNextInstruction() const
QVariantMap extendedAttributes() const
void setDistanceToNextInstruction(qreal distanceToNextInstruction)
void setExtendedAttributes(const QVariantMap &extendedAttributes)
void setWaypoint(const QGeoCoordinate &waypoint)
\inmodule QtLocation
QGeoManeuver(const QGeoManeuver &other) noexcept
Constructs a maneuver object from the contents of other.
friend bool operator==(const QGeoManeuver &lhs, const QGeoManeuver &rhs) noexcept
Returns whether the lhs maneuver is equal to rhs.
QGeoManeuver(QGeoManeuver &&other) noexcept=default
friend bool operator!=(const QGeoManeuver &lhs, const QGeoManeuver &rhs) noexcept
Returns whether the lhs maneuver is not equal to rhs.
~QGeoManeuver()
Destroys this maneuver object.
InstructionDirection
\qmltype routeManeuver \inqmlmodule QtLocation
QSharedData & operator=(const QSharedData &)=delete
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
direction
Combined button and popup list for selecting options.
DBusConnection const char DBusError DBusBusType DBusError return DBusConnection DBusHandleMessageFunction void DBusFreeFunction return DBusConnection return DBusConnection return const char DBusError return DBusConnection DBusMessage dbus_uint32_t return DBusConnection dbus_bool_t DBusConnection DBusAddWatchFunction DBusRemoveWatchFunction DBusWatchToggledFunction void DBusFreeFunction return DBusConnection DBusDispatchStatusFunction void DBusFreeFunction DBusTimeout return DBusTimeout return DBusWatch return DBusWatch unsigned int return DBusError const DBusError return const DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessage return DBusMessageIter int const void return DBusMessageIter DBusMessageIter return DBusMessageIter void DBusMessageIter void int return DBusMessage DBusMessageIter return DBusMessageIter return DBusMessageIter DBusMessageIter const char const char const char const char return DBusMessage return DBusMessage const char return DBusMessage dbus_bool_t return DBusMessage dbus_uint32_t return DBusMessage void
static QString instructionText(const QJsonObject &step, const QJsonObject &maneuver, QGeoManeuver::InstructionDirection direction)
#define Q_DECLARE_METATYPE(TYPE)
Definition qmetatype.h:1525
n void setPosition(void) \n\
GLsizei GLsizei GLfloat distance
#define QML_VALUE_TYPE(NAME)
#define QML_STRUCTURED_VALUE
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
#define QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(Class, ExportMacro)
#define Q_PROPERTY(...)
#define Q_GADGET
#define Q_ENUMS(x)
double qreal
Definition qtypes.h:187
QSharedPointer< T > other(t)
[5]
this swap(other)