1
0
mirror of https://github.com/tumic0/GPXSee.git synced 2024-10-07 07:13:21 +02:00
GPXSee/src/map.h

42 lines
711 B
C
Raw Normal View History

2015-11-23 02:33:01 +01:00
#ifndef MAP_H
#define MAP_H
#include "tile.h"
2015-11-26 00:21:11 +01:00
class Downloader;
2015-11-23 02:33:01 +01:00
class Map : public QObject
{
Q_OBJECT
public:
Map(const QString &name, const QString &url, Downloader *downloader,
QObject *parent = 0);
2015-11-23 02:33:01 +01:00
2016-02-08 21:08:29 +01:00
const QString &name() const {return _name;}
void loadTiles(QList<Tile> &list, bool block);
2016-04-01 19:25:34 +02:00
void clearCache();
signals:
void loaded();
2015-11-23 02:33:01 +01:00
private slots:
void emitLoaded();
private:
QString tileUrl(const Tile &tile);
QString tileFile(const Tile &tile);
bool loadTileFile(Tile &tile, const QString &file);
void fillTile(Tile &tile);
void loadTilesAsync(QList<Tile> &list);
void loadTilesSync(QList<Tile> &list);
Downloader *_downloader;
2015-11-23 02:33:01 +01:00
QString _name;
QString _url;
};
#endif // MAP_H