QGroundControl
Ground Control Station for MAVLink Drones
Loading...
Searching...
No Matches
Viewer3DTileReply.h
Go to the documentation of this file.
1#pragma once
2
3#include <QtCore/QObject>
4#include <QtCore/qcontainerfwd.h>
5
6#include "Viewer3DTileInfo.h"
7
8struct QGCCacheTile;
9class QNetworkAccessManager;
10class QNetworkReply;
11class QTimer;
12
13class Viewer3DTileReply : public QObject
14{
15 Q_OBJECT
16
17public:
19
20 explicit Viewer3DTileReply(int zoomLevel, int tileX, int tileY, int mapId, const QString &mapType, QNetworkAccessManager *networkManager, QObject *parent = nullptr);
22
23signals:
27
28private:
29 void _prepareDownload();
30 void _onRequestFinished();
31 void _onRequestError();
32 void _onTimeout();
33 void _onCacheHit(QGCCacheTile *tile);
34 void _onCacheMiss();
35 void _disconnectReply();
36 bool _isBingEmptyTile() const;
37
38 static constexpr int kTimeoutMs = 10000;
39 static constexpr int kMaxRetries = 5;
40
41 QNetworkAccessManager *_networkManager = nullptr;
42 QNetworkReply *_reply = nullptr;
43 QTimer *_timeoutTimer = nullptr;
44
45 TileInfo_t _tile;
46 int _timeoutCounter = 0;
47
48 static QByteArray _bingNoTileImage;
49};
void tileDone(TileInfo_t)
void tileEmpty(TileInfo_t)
void tileGiveUp(TileInfo_t)