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