fix MapView, so tile provider can be accessible
add MapViewTileProviderBase::maximumLevel()
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
#ifndef mapview_tile_cache_h
|
||||
#define mapview_tile_cache_h
|
||||
|
||||
#include "osm_types_p.h"
|
||||
#include "mapview_types.h"
|
||||
|
||||
#include <QCache>
|
||||
#include <QDir>
|
||||
@@ -48,11 +48,11 @@ public:
|
||||
}
|
||||
void setTileObsoleteTime(int secs) { secs_obsolete = secs; }
|
||||
|
||||
void tileDownloaded(OSM::TileIndex index, const QPixmap & pixmap);
|
||||
OSM::TilePixmap getTile(OSM::TileIndex index, QRectF & rect_src);
|
||||
void tileDownloaded(MapViewTypes::TileIndex index, const QPixmap & pixmap);
|
||||
MapViewTypes::TilePixmap getTile(MapViewTypes::TileIndex index, QRectF & rect_src);
|
||||
void clearCache();
|
||||
|
||||
bool isTileFileExists(OSM::TileIndex index) const;
|
||||
bool isTileFileExists(MapViewTypes::TileIndex index) const;
|
||||
|
||||
QString cacheRoot() const { return cache_root; }
|
||||
void setCacheRoot(const QString & p);
|
||||
@@ -61,10 +61,10 @@ public:
|
||||
void setOfflineMode(bool yes);
|
||||
|
||||
private:
|
||||
OSM::TilePixmap getTileFromCache(OSM::TileIndex index);
|
||||
MapViewTypes::TilePixmap getTileFromCache(MapViewTypes::TileIndex index);
|
||||
void updateCacheSize();
|
||||
void saveTile(OSM::TilePixmap * tile);
|
||||
void writeToDisk(const OSM::TilePixmap & tile);
|
||||
void saveTile(MapViewTypes::TilePixmap * tile);
|
||||
void writeToDisk(const MapViewTypes::TilePixmap & tile);
|
||||
void run() override;
|
||||
|
||||
MapView * parent;
|
||||
@@ -75,15 +75,15 @@ private:
|
||||
int secs_obsolete = -1;
|
||||
int fixed_size_b = 0, add_size_b = 0;
|
||||
bool is_offline = false;
|
||||
QQueue<OSM::TilePixmap> queue;
|
||||
QCache<quint64, OSM::TilePixmap> tile_cache;
|
||||
QQueue<MapViewTypes::TilePixmap> queue;
|
||||
QCache<quint64, MapViewTypes::TilePixmap> tile_cache;
|
||||
|
||||
public slots:
|
||||
|
||||
private slots:
|
||||
|
||||
signals:
|
||||
void tileReady(OSM::TilePixmap);
|
||||
void tileReady(MapViewTypes::TilePixmap);
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user