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// Qt-Security score:significant reason:default
4
5#ifndef QGEOTILEFETCHER_H
6#define QGEOTILEFETCHER_H
7
8//
9// W A R N I N G
10// -------------
11//
12// This file is not part of the Qt API. It exists purely as an
13// implementation detail. This header file may change from version to
14// version without notice, or even be removed.
15//
16// We mean it.
17//
18
19#include <QObject>
20#include <QtLocation/private/qlocationglobal_p.h>
21#include <QtLocation/private/qabstractgeotilecache_p.h>
22
24
25class QGeoMapRequestOptions;
26class QGeoTileFetcherPrivate;
27class QGeoTiledMappingManagerEngine;
28class QGeoTiledMapReply;
29class QGeoTileSpec;
30
31class Q_LOCATION_EXPORT QGeoTileFetcher : public QObject
32{
33 Q_OBJECT
34 Q_DECLARE_PRIVATE(QGeoTileFetcher)
35
36public:
37 QGeoTileFetcher(QGeoMappingManagerEngine *parent);
38 virtual ~QGeoTileFetcher();
39
40public Q_SLOTS:
41 void updateTileRequests(const QSet<QGeoTileSpec> &tilesAdded, const QSet<QGeoTileSpec> &tilesRemoved);
42
43private Q_SLOTS:
44 void cancelTileRequests(const QSet<QGeoTileSpec> &tiles);
45 void requestNextTile();
46 void finished();
47
48Q_SIGNALS:
49 void tileFinished(const QGeoTileSpec &spec, const QByteArray &bytes, const QString &format);
50 void tileError(const QGeoTileSpec &spec, const QString &errorString);
51
52protected:
53 QGeoTileFetcher(QGeoTileFetcherPrivate &dd, QGeoMappingManagerEngine *parent);
54
55 void timerEvent(QTimerEvent *event) override;
56 QAbstractGeoTileCache::CacheAreas cacheHint() const;
57 virtual bool initialized() const;
58 virtual bool fetchingEnabled() const;
59
60private:
61
62 virtual QGeoTiledMapReply *getTileImage(const QGeoTileSpec &spec) = 0;
63 virtual void handleReply(QGeoTiledMapReply *reply, const QGeoTileSpec &spec);
64
65 Q_DISABLE_COPY(QGeoTileFetcher)
66 friend class QGeoTiledMappingManagerEngine;
67};
68
69QT_END_NAMESPACE
70
71#endif
QHash< QGeoTiledMap *, QSet< QGeoTileSpec > > mapHash_
std::unique_ptr< QAbstractGeoTileCache > tileCache_
QHash< QGeoTileSpec, QSet< QGeoTiledMap * > > tileHash_
Combined button and popup list for selecting options.