13#ifndef TILEPYRAMIDLAYER_H
14#define TILEPYRAMIDLAYER_H
110 mutable QMutex m_tileMutex;
111 QCache<QString, CachedTile> m_tileCache{256};
116 mutable QHash<QString, QPair<MapExtent, int>> m_tileIndex;
118 void pruneIndexLocked();
An axis-aligned bounding box in the coordinate space of a given CRS.
Definition mapextent.h:26
Abstract base class for all layers displayed in the MapCanvas.
Definition openswmmvislayer.h:116
MapExtent extent() const
Returns the layer extent in the layer's own CRS.
Definition openswmmvislayer.cpp:252
Top-level project container managing sessions, the SWMM model layer, and persistence paths for one SW...
Definition openswmmvisworkspace.h:42
Base class owning the tile cache + parent-fallback compositor shared by tile-pyramid layers.
Definition tilepyramidlayer.h:47
void cacheTile(const QString &key, const QImage &img, const MapExtent &extent, int level)
Insert a produced tile (no-op for null images). extent is the tile's geographic extent in the subclas...
Definition tilepyramidlayer.cpp:18
~TilePyramidLayer() override
bool isTileCached(const QString &key) const
True when key holds a non-null cached tile. Does not promote the entry in the LRU.
Definition tilepyramidlayer.cpp:30
int tileCacheCapacity() const
Definition tilepyramidlayer.cpp:56
bool resolveTileForDraw(const QString &key, const MapExtent &tileExtent, double maxSpanRatio, TileDraw &out) const
Resolve the image + source sub-rect that should paint the tile key with geographic extent tileExtent.
Definition tilepyramidlayer.cpp:75
void setTileCacheCapacity(int maxTiles)
Definition tilepyramidlayer.cpp:50
void clearTiles()
Drop every cached tile (style / CRS / source change).
Definition tilepyramidlayer.cpp:43
QImage cachedTileImage(const QString &key) const
The cached image for key, or a null QImage.
Definition tilepyramidlayer.cpp:36
const char * key
Definition meshcellparams.cpp:24
Abstract base class for all map layers displayed in the MapCanvas.
QVector< int > parent
union-find
Definition pslgminsize.cpp:176
A resolved per-tile draw: paint src (a sub-rect of img, in image pixels with row 0 = the tile extent'...
Definition tilepyramidlayer.h:60
QImage img
Definition tilepyramidlayer.h:61
QRectF src
Definition tilepyramidlayer.h:62
bool exact
Definition tilepyramidlayer.h:63