libosmscout  0.1
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules
osmscout::TiledMapRenderer Class Reference

#include <TiledMapRenderer.h>

+ Inheritance diagram for osmscout::TiledMapRenderer:

Public Slots

virtual void FlushVisualCaches (const std::chrono::milliseconds &idleMs)
 
virtual void Initialize ()
 
virtual void InvalidateVisualCache ()
 
void offlineTileRequest (uint32_t zoomLevel, uint32_t xtile, uint32_t ytile)
 
virtual void onDatabaseLoaded (osmscout::GeoBox boundingBox)
 
void onlineTileProviderChanged (const OnlineTileProvider &)
 
void onlineTileRequest (uint32_t zoomLevel, uint32_t xtile, uint32_t ytile)
 
void onlineTilesEnabledChanged (bool)
 
void onLoadJobFinished (QMap< QString, QMap< osmscout::TileKey, osmscout::TileRef >>)
 
void onOfflineMapChanged (bool)
 
virtual void onStylesheetFilenameChanged ()
 
void tileDownloaded (uint32_t zoomLevel, uint32_t x, uint32_t y, QImage image, QByteArray downloadedData)
 
void tileDownloadFailed (uint32_t zoomLevel, uint32_t x, uint32_t y, bool zoomLevelOutOfRange)
 
- Public Slots inherited from osmscout::MapRenderer
virtual void FlushVisualCaches (const std::chrono::milliseconds &idleMs)=0
 
virtual void Initialize ()=0
 
virtual void InvalidateVisualCache ()=0
 
virtual void onDatabaseLoaded (osmscout::GeoBox boundingBox)=0
 
virtual void onFontNameChanged (const QString &)
 
virtual void onFontSizeChanged (double)
 
virtual void onMapDPIChange (double dpi)
 
virtual void onRenderSeaChanged (bool)
 
virtual void onShowAltLanguageChanged (bool)
 
virtual void onStylesheetFilenameChanged ()
 
virtual void onUnitsChanged (const QString &)
 
virtual void SetScreen (const QScreen *)
 

Signals

void offlineMapChangedSignal (bool)
 
void onlineTileProviderSignal (OnlineTileProvider provider)
 
void onlineTilesEnabledSignal (bool)
 
- Signals inherited from osmscout::MapRenderer
void databaseLoadFinished (const osmscout::GeoBox &geoBox)
 
void fontNameSignal (QString)
 
void fontSizeSignal (double)
 
void mapDpiChangeSignal (double)
 
void Redraw ()
 
void renderSeaSignal (bool)
 
void showAltLanguageSignal (bool)
 
void stylesheetFilenameChanged ()
 
void TriggerDrawMap ()
 
void unitsSignal (QString)
 

Public Member Functions

virtual bool RenderMap (QPainter &painter, const MapViewStruct &request)
 Render map defined by request to painter. More...
 
 TiledMapRenderer (QThread *thread, SettingsRef settings, DBThreadRef dbThread, QString iconDirectory, QString tileCacheDirectory, size_t onlineTileCacheSize, size_t offlineTileCacheSize)
 
virtual ~TiledMapRenderer ()
 
- Public Member Functions inherited from osmscout::MapRenderer
void addOverlayObject (int id, const OverlayObjectRef &obj)
 
std::map< int, OverlayObjectRefgetOverlayObjects () const
 
void removeAllOverlayObjects ()
 
void removeOverlayObject (int id)
 
virtual ~MapRenderer ()
 

Additional Inherited Members

- Protected Member Functions inherited from osmscout::MapRenderer
void getOverlayObjects (std::vector< OverlayObjectRef > &objs, osmscout::GeoBox requestBox) const
 
 MapRenderer (QThread *thread, SettingsRef settings, DBThreadRef dbThread, QString iconDirectory)
 
osmscout::GeoBox overlayObjectsBox () const
 
- Protected Attributes inherited from osmscout::MapRenderer
DBThreadRef dbThread
 
QString fontName
 
double fontSize
 
QString iconDirectory
 
QRecursiveMutex lock
 
double mapDpi
 
QMutex overlayLock
 
std::map< int, OverlayObjectRefoverlayObjectMap
 
bool renderSea
 
double screenPixelRatio {1.0}
 
SettingsRef settings
 
bool showAltLanguage {false}
 
QThread * thread
 
QString units
 

Constructor & Destructor Documentation

◆ TiledMapRenderer()

osmscout::TiledMapRenderer::TiledMapRenderer ( QThread *  thread,
SettingsRef  settings,
DBThreadRef  dbThread,
QString  iconDirectory,
QString  tileCacheDirectory,
size_t  onlineTileCacheSize,
size_t  offlineTileCacheSize 
)

◆ ~TiledMapRenderer()

osmscout::TiledMapRenderer::~TiledMapRenderer ( )
virtual

Member Function Documentation

◆ FlushVisualCaches

void osmscout::TiledMapRenderer::FlushVisualCaches ( const std::chrono::milliseconds &  idleMs)
virtualslot

◆ Initialize

◆ InvalidateVisualCache

void osmscout::TiledMapRenderer::InvalidateVisualCache ( )
virtualslot

◆ offlineMapChangedSignal

void osmscout::TiledMapRenderer::offlineMapChangedSignal ( bool  )
signal

Referenced by TiledMapRenderer().

◆ offlineTileRequest

◆ onDatabaseLoaded

void osmscout::TiledMapRenderer::onDatabaseLoaded ( osmscout::GeoBox  boundingBox)
virtualslot

◆ onlineTileProviderChanged

void osmscout::TiledMapRenderer::onlineTileProviderChanged ( const OnlineTileProvider &  )
slot

◆ onlineTileProviderSignal

void osmscout::TiledMapRenderer::onlineTileProviderSignal ( OnlineTileProvider  provider)
signal

Referenced by Initialize(), and TiledMapRenderer().

◆ onlineTileRequest

void osmscout::TiledMapRenderer::onlineTileRequest ( uint32_t  zoomLevel,
uint32_t  xtile,
uint32_t  ytile 
)
slot

◆ onlineTilesEnabledChanged

void osmscout::TiledMapRenderer::onlineTilesEnabledChanged ( bool  b)
slot

◆ onlineTilesEnabledSignal

void osmscout::TiledMapRenderer::onlineTilesEnabledSignal ( bool  )
signal

Referenced by TiledMapRenderer().

◆ onLoadJobFinished

void osmscout::TiledMapRenderer::onLoadJobFinished ( QMap< QString, QMap< osmscout::TileKey, osmscout::TileRef >>  tiles)
slot

References osmscout::DBLoadJob::Close(), osmscout::MapRenderer::dbThread, osmscout::Log::Error(), osmscout::MapRenderer::fontName, osmscout::MapRenderer::fontSize, osmscout::MagnificationLevel::Get(), osmscout::Projection::GetDimensions(), osmscout::TileCache::getEpoch(), osmscout::MapParameter::GetLocaleRef(), osmscout::MapRenderer::getOverlayObjects(), osmscout::MapRenderer::iconDirectory, osmscout::Imperial, osmscout::DBRenderJob::IsSuccess(), osmscout::MapRenderer::lock, osmscout::log, osmscout::MapRenderer::mapDpi, osmscout::Metrics, osmscout::TransPolygon::none, osmscout::OSMTile::osmTileOriginalWidth(), osmscout::TileCache::put(), osmscout::MapRenderer::Redraw(), osmscout::TileCache::reemitRequests(), osmscout::MapRenderer::renderSea, osmscout::DBRenderJob::Run(), osmscout::MapParameter::Scalable, osmscout::MapRenderer::screenPixelRatio, osmscout::MercatorProjection::Set(), osmscout::MapParameter::SetDebugData(), osmscout::MapParameter::SetDebugPerformance(), osmscout::Locale::SetDistanceUnits(), osmscout::MapParameter::SetFontName(), osmscout::MapParameter::SetFontSize(), osmscout::MapParameter::SetIconMode(), osmscout::MapParameter::SetIconPaths(), osmscout::MapParameter::SetLabelLineFitToArea(), osmscout::MapParameter::SetLabelLineFitToWidth(), osmscout::MapParameter::SetLabelLineMaxCharCount(), osmscout::MapParameter::SetLabelLineMinCharCount(), osmscout::MercatorProjection::SetLinearInterpolationUsage(), osmscout::MapParameter::SetOptimizeAreaNodes(), osmscout::MapParameter::SetOptimizeWayNodes(), osmscout::MapParameter::SetPatternMode(), osmscout::MapParameter::SetPatternPaths(), osmscout::MapParameter::SetRenderBackground(), osmscout::MapParameter::SetRenderSeaLand(), osmscout::MapParameter::SetRenderUnknowns(), osmscout::MapParameter::SetShowAltLanguage(), osmscout::MapRenderer::showAltLanguage, osmscout::OSMTile::tileDPI(), osmscout::OSMTile::tileRelativeCoord(), osmscout::MapRenderer::units, and osmscout::Log::Warn().

Referenced by offlineTileRequest().

◆ onOfflineMapChanged

◆ onStylesheetFilenameChanged

◆ RenderMap()

bool osmscout::TiledMapRenderer::RenderMap ( QPainter &  painter,
const MapViewStruct &  request 
)
virtual

Render map defined by request to painter.

Parameters
painter
request
Returns
true if rendered map is complete

Implements osmscout::MapRenderer.

References osmscout::TileCache::clearPendingRequests(), osmscout::TileCache::isRequestQueueEmpty(), osmscout::log, osmscout::TiledRenderingHelper::RenderTiles(), and osmscout::Log::Warn().

◆ tileDownloaded

void osmscout::TiledMapRenderer::tileDownloaded ( uint32_t  zoomLevel,
uint32_t  x,
uint32_t  y,
QImage  image,
QByteArray  downloadedData 
)
slot

◆ tileDownloadFailed

void osmscout::TiledMapRenderer::tileDownloadFailed ( uint32_t  zoomLevel,
uint32_t  x,
uint32_t  y,
bool  zoomLevelOutOfRange 
)
slot

The documentation for this class was generated from the following files: