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
qgeotilefetcher_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 QGEOTILEFETCHER_H
5#define QGEOTILEFETCHER_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
23
24class QGeoMapRequestOptions;
25class QGeoTileFetcherPrivate;
26class QGeoTiledMappingManagerEngine;
27class QGeoTiledMapReply;
28class QGeoTileSpec;
29
30class Q_LOCATION_EXPORT QGeoTileFetcher : public QObject
31{
32 Q_OBJECT
33 Q_DECLARE_PRIVATE(QGeoTileFetcher)
34
35public:
36 QGeoTileFetcher(QGeoMappingManagerEngine *parent);
37 virtual ~QGeoTileFetcher();
38
39public Q_SLOTS:
40 void updateTileRequests(const QSet<QGeoTileSpec> &tilesAdded, const QSet<QGeoTileSpec> &tilesRemoved);
41
42private Q_SLOTS:
43 void cancelTileRequests(const QSet<QGeoTileSpec> &tiles);
44 void requestNextTile();
45 void finished();
46
47Q_SIGNALS:
48 void tileFinished(const QGeoTileSpec &spec, const QByteArray &bytes, const QString &format);
49 void tileError(const QGeoTileSpec &spec, const QString &errorString);
50
51protected:
52 QGeoTileFetcher(QGeoTileFetcherPrivate &dd, QGeoMappingManagerEngine *parent);
53
54 void timerEvent(QTimerEvent *event) override;
55 QAbstractGeoTileCache::CacheAreas cacheHint() const;
56 virtual bool initialized() const;
57 virtual bool fetchingEnabled() const;
58
59private:
60
61 virtual QGeoTiledMapReply *getTileImage(const QGeoTileSpec &spec) = 0;
62 virtual void handleReply(QGeoTiledMapReply *reply, const QGeoTileSpec &spec);
63
64 Q_DISABLE_COPY(QGeoTileFetcher)
65 friend class QGeoTiledMappingManagerEngine;
66};
67
68QT_END_NAMESPACE
69
70#endif
QHash< QGeoTiledMap *, QSet< QGeoTileSpec > > mapHash_
std::unique_ptr< QAbstractGeoTileCache > tileCache_
QHash< QGeoTileSpec, QSet< QGeoTiledMap * > > tileHash_