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
qgeotiledmappingmanagerengine_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
4#ifndef QGEOTILEDMAPPINGMANAGERENGINE_H
5#define QGEOTILEDMAPPINGMANAGERENGINE_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 <QObject>
19#include <QtLocation/private/qlocationglobal_p.h>
20#include <QtLocation/private/qabstractgeotilecache_p.h>
21#include <QtLocation/private/qgeomappingmanagerengine_p.h>
22#include <QtLocation/private/qgeotiledmap_p.h>
23
24
26
28class QGeoTileFetcher;
29struct QGeoTileTexture;
30class QGeoTileSpec;
31class QSize;
32
33class Q_LOCATION_EXPORT QGeoTiledMappingManagerEngine : public QGeoMappingManagerEngine
34{
35 Q_OBJECT
36
37public:
38 explicit QGeoTiledMappingManagerEngine(QObject *parent = nullptr);
39 virtual ~QGeoTiledMappingManagerEngine();
40
41 QGeoTileFetcher *tileFetcher();
42
43 QGeoMap *createMap() override;
44 void releaseMap(QGeoTiledMap *map);
45
46 QSize tileSize() const;
47 int tileVersion() const;
48
49 virtual void updateTileRequests(QGeoTiledMap *map,
50 const QSet<QGeoTileSpec> &tilesAdded,
51 const QSet<QGeoTileSpec> &tilesRemoved);
52
53 QAbstractGeoTileCache *tileCache();
54 virtual QSharedPointer<QGeoTileTexture> getTileTexture(const QGeoTileSpec &spec);
55
56 QAbstractGeoTileCache::CacheAreas cacheHint() const;
57
58protected Q_SLOTS:
59 virtual void engineTileFinished(const QGeoTileSpec &spec, const QByteArray &bytes, const QString &format);
60 virtual void engineTileError(const QGeoTileSpec &spec, const QString &errorString);
61
62Q_SIGNALS:
63 void tileError(const QGeoTileSpec &spec, const QString &errorString);
64 void tileVersionChanged();
65
66protected:
67 void setTileFetcher(QGeoTileFetcher *fetcher);
68 void setTileSize(const QSize &tileSize);
69 void setTileVersion(int version);
70 void setCacheHint(QAbstractGeoTileCache::CacheAreas cacheHint);
71 void setTileCache(QAbstractGeoTileCache *cache);
72
73 QGeoTiledMap::PrefetchStyle m_prefetchStyle = QGeoTiledMap::PrefetchTwoNeighbourLayers;
74 QGeoTiledMappingManagerEnginePrivate *d_ptr;
75
76 Q_DECLARE_PRIVATE(QGeoTiledMappingManagerEngine)
77 Q_DISABLE_COPY(QGeoTiledMappingManagerEngine)
78
79 friend class QGeoTileFetcher;
80};
81
82QT_END_NAMESPACE
83
84#endif
\inmodule QtCore\reentrant
Definition qpoint.h:231
#define PREFETCH_FRUSTUM_SCALE