Qt
Internal/Contributor docs for the Qt SDK. Note: These are NOT official API docs; those are found at https://doc.qt.io/
Loading...
Searching...
No Matches
qgeocameradata_p.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#ifndef QGEOCAMERADATA_P_H
4#define QGEOCAMERADATA_P_H
5
6//
7// W A R N I N G
8// -------------
9//
10// This file is not part of the Qt API. It exists purely as an
11// implementation detail. This header file may change from version to
12// version without notice, or even be removed.
13//
14// We mean it.
15//
16
17#include <QtLocation/private/qlocationglobal_p.h>
18
19#include <QtCore/QSharedDataPointer>
20#include <QtCore/QMetaType>
21
22QT_BEGIN_NAMESPACE
23
24class QGeoCoordinate;
25class QGeoCameraDataPrivate;
26QT_DECLARE_QSDP_SPECIALIZATION_DTOR_WITH_EXPORT(QGeoCameraDataPrivate, Q_LOCATION_EXPORT)
27
28class Q_LOCATION_EXPORT QGeoCameraData
29{
30public:
31 QGeoCameraData();
32 QGeoCameraData(const QGeoCameraData &other) noexcept;
33 QGeoCameraData(QGeoCameraData &&other) noexcept = default;
34 ~QGeoCameraData();
35
36 QGeoCameraData &operator = (const QGeoCameraData &other) noexcept;
37 QT_MOVE_ASSIGNMENT_OPERATOR_IMPL_VIA_MOVE_AND_SWAP(QGeoCameraData)
38
39 void swap(QGeoCameraData &other) noexcept { d.swap(other.d); }
40
41 friend inline bool operator==(const QGeoCameraData &lhs, const QGeoCameraData &rhs) noexcept
42 { return lhs.isEqual(rhs); }
43 friend inline bool operator!=(const QGeoCameraData &lhs, const QGeoCameraData &rhs) noexcept
44 { return !lhs.isEqual(rhs); }
45
46 void setCenter(const QGeoCoordinate &coordinate);
47 QGeoCoordinate center() const;
48
49 void setBearing(double bearing);
50 double bearing() const;
51
52 void setTilt(double tilt);
53 double tilt() const;
54
55 void setRoll(double roll);
56 double roll() const;
57
58 void setFieldOfView(double fieldOfView);
59 double fieldOfView() const;
60
61 // Zoom level is intended to be relative to a tileSize of 256^2 pixels.
62 // E.g., a zoom level of 0 must result in a mapWidth of 256, and so on.
63 void setZoomLevel(double zoomLevel);
64 double zoomLevel() const;
65
66private:
67 QSharedDataPointer<QGeoCameraDataPrivate> d;
68
69 bool isEqual(const QGeoCameraData &other) const;
70};
71
72QT_END_NAMESPACE
73
74Q_DECLARE_METATYPE(QGeoCameraData)
75
76#endif // QGEOCAMERADATA_P_H
QVariant cameraInterpolator(const QGeoCameraData &start, const QGeoCameraData &end, qreal progress)