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
qgeolocation.h
Go to the documentation of this file.
1// Copyright (C) 2016 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 QGEOLOCATION_H
5#define QGEOLOCATION_H
6
7#include <QtCore/QSharedDataPointer>
8#include <QtCore/QMetaType>
9#include <QtPositioning/qpositioningglobal.h>
10
12
13class QGeoAddress;
14class QGeoCoordinate;
15class QGeoShape;
18
19class Q_POSITIONING_EXPORT QGeoLocation
20{
21public:
24 QGeoLocation(QGeoLocation &&other) noexcept = default;
26
28 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_PURE_SWAP(QGeoLocation)
29
30 void swap(QGeoLocation &other) noexcept { d.swap(other.d); }
31
32 friend bool operator==(const QGeoLocation &lhs, const QGeoLocation &rhs)
33 {
34 return equals(lhs, rhs);
35 }
36 friend bool operator!=(const QGeoLocation &lhs, const QGeoLocation &rhs)
37 {
38 return !equals(lhs, rhs);
39 }
40
41 QGeoAddress address() const;
42 void setAddress(const QGeoAddress &address);
44 void setCoordinate(const QGeoCoordinate &position);
45 QGeoShape boundingShape() const;
46 void setBoundingShape(const QGeoShape &shape);
48 void setExtendedAttributes(const QVariantMap &data);
49
50 bool isEmpty() const;
51
52private:
53 static bool equals(const QGeoLocation &lhs, const QGeoLocation &rhs);
54 QSharedDataPointer<QGeoLocationPrivate> d;
55};
56
57Q_POSITIONING_EXPORT size_t qHash(const QGeoLocation &location, size_t seed = 0) noexcept;
58
59Q_DECLARE_SHARED(QGeoLocation)
60
62
63QT_DECL_METATYPE_EXTERN(QGeoLocation, Q_POSITIONING_EXPORT)
64
65#endif
\inmodule QtPositioning
Definition qgeoaddress.h:18
\inmodule QtPositioning
QVariantMap extendedAttributes
QGeoCoordinate coordinate
\inmodule QtPositioning
friend bool operator!=(const QGeoLocation &lhs, const QGeoLocation &rhs)
Returns true if the lhs location is not equal to rhs, otherwise returns false.
friend bool operator==(const QGeoLocation &lhs, const QGeoLocation &rhs)
Returns true if the lhs location is equal to rhs, otherwise returns false.
QGeoLocation(QGeoLocation &&other) noexcept=default
\inmodule QtPositioning
Definition qgeoshape.h:17
QSharedData & operator=(const QSharedData &)=delete
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
Q_POSITIONING_EXPORT size_t qHash(const QGeoLocation &location, size_t seed=0) noexcept
#define QT_DECL_METATYPE_EXTERN(TYPE, EXPORT)
Definition qmetatype.h:1388
GLint location
GLint GLsizei GLsizei GLenum GLenum GLsizei void * data
GLuint GLuint64EXT address
static qreal position(const QQuickItem *item, QQuickAnchors::Anchor anchorLine)
static Q_CONSTINIT QBasicAtomicInteger< unsigned > seed
Definition qrandom.cpp:196
#define QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(Class, ExportMacro)
QSharedPointer< T > other(t)
[5]
this swap(other)