You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
38 lines
937 B
C++
38 lines
937 B
C++
#pragma once
|
|
#include <private/qgeotiledmapreply_p.h>
|
|
#include <QNetworkReply>
|
|
#include <QTimer>
|
|
|
|
#include "timapengine.h"
|
|
|
|
class TiQGeoTiledMapReply : public QGeoTiledMapReply
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
TiQGeoTiledMapReply(QNetworkAccessManager* networkManger, const QNetworkRequest& reply,
|
|
const QGeoTileSpec& spec, QObject* parent = nullptr);
|
|
~TiQGeoTiledMapReply();
|
|
void abort() override;
|
|
|
|
private slots:
|
|
void networkReplyFinished();
|
|
void networkReplyError(QNetworkReply::NetworkError error);
|
|
|
|
void onCacheReply(TiMapTile* tile);
|
|
void onCacheError(TiMapTask::TaskType type, QString errorString);
|
|
|
|
void onTimeout();
|
|
|
|
private:
|
|
void closeReply();
|
|
quint32 hash();
|
|
|
|
private:
|
|
QNetworkReply* m_reply;
|
|
QNetworkRequest m_request;
|
|
QNetworkAccessManager* m_networkManager;
|
|
QByteArray m_noTitle;
|
|
QTimer m_timer;
|
|
};
|
|
|