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
qgeomapmapboxgl_p.h
Go to the documentation of this file.
1// Copyright (C) 2017 The Qt Company Ltd.
2// Copyright (C) 2017 Mapbox, Inc.
3// SPDX-License-Identifier: LicenseRef-Qt-Commercial OR LGPL-3.0-only OR GPL-2.0-only OR GPL-3.0-only
4
5#ifndef QGEOMAPMAPBOXGL_P_H
6#define QGEOMAPMAPBOXGL_P_H
7
8#include <QtCore/QHash>
9#include <QtCore/QList>
10#include <QtCore/QSharedPointer>
11#include <QtCore/QTimer>
12#include <QtCore/QVariant>
13#include <QtCore/QRectF>
14#include <QtLocation/private/qgeomap_p_p.h>
15
16class QMapboxGL;
18
20{
21 Q_DECLARE_PUBLIC(QGeoMapMapboxGL)
22
23public:
25
27
29
30 QGeoMap::ItemTypes supportedMapItemTypes() const override;
33
34 /* Data members */
35 enum SyncState : int {
36 NoSync = 0,
37 ViewportSync = 1 << 0,
39 MapTypeSync = 1 << 2,
40 VisibleAreaSync = 1 << 3
41 };
43
44 QMapboxGLSettings m_settings;
45 bool m_useFBO = true;
46 bool m_developmentMode = false;
48
50 bool m_shouldRefresh = true;
51 bool m_warned = false;
52 bool m_threadedRendering = false;
53 bool m_styleLoaded = false;
54
55 SyncStates m_syncState = NoSync;
56
57 QList<QSharedPointer<QMapboxGLStyleChange>> m_styleChanges;
58
59protected:
60 void changeViewportSize(const QSize &size) override;
61 void changeCameraData(const QGeoCameraData &oldCameraData) override;
62 void changeActiveMapType(const QGeoMapType &mapType) override;
63
64 void setVisibleArea(const QRectF &visibleArea) override;
65 QRectF visibleArea() const override;
66
67private:
68 Q_DISABLE_COPY(QGeoMapMapboxGLPrivate);
69
70 void syncStyleChanges(QMapboxGL *map);
71 void threadedRenderingHack(QQuickWindow *window, QMapboxGL *map);
72
73 QRectF m_visibleArea;
74};
75
76Q_DECLARE_OPERATORS_FOR_FLAGS(QGeoMapMapboxGLPrivate::SyncStates)
77
78#endif // QGEOMAPMAPBOXGL_P_H
QRectF visibleArea() const override
void setVisibleArea(const QRectF &visibleArea) override
QMapboxGLSettings m_settings
void addMapItem(QDeclarativeGeoMapItemBase *item) override
void changeActiveMapType(const QGeoMapType &mapType) override
QList< QSharedPointer< QMapboxGLStyleChange > > m_styleChanges
QGeoMap::ItemTypes supportedMapItemTypes() const override
void changeCameraData(const QGeoCameraData &oldCameraData) override
Q_DECLARE_FLAGS(SyncStates, SyncState)
void removeMapItem(QDeclarativeGeoMapItemBase *item) override
QGeoMapMapboxGLPrivate(QGeoMappingManagerEngineMapboxGL *engine)
void changeViewportSize(const QSize &size) override
QSGNode * updateSceneGraph(QSGNode *oldNode, QQuickWindow *window)
\qmltype Window \instantiates QQuickWindow \inqmlmodule QtQuick
\inmodule QtCore\reentrant
Definition qrect.h:484
\group qtquick-scenegraph-nodes \title Qt Quick Scene Graph Node classes
Definition qsgnode.h:37
\inmodule QtCore
Definition qsize.h:25
\macro QT_RESTRICTED_CAST_FROM_ASCII
Definition qstring.h:129
\inmodule QtCore
Definition qtimer.h:20
QMap< QString, QString > map
[6]
#define Q_DECLARE_OPERATORS_FOR_FLAGS(Flags)
Definition qflags.h:194
GLenum GLuint GLintptr GLsizeiptr size
[1]
QGraphicsItem * item
aWidget window() -> setWindowTitle("New Window Title")
[2]
QJSEngine engine
[0]