File indexing completed on 2025-01-05 03:59:19
0001 /* 0002 SPDX-License-Identifier: LGPL-2.1-or-later 0003 0004 SPDX-FileCopyrightText: 2008 Patrick Spendrin <ps_ml@gmx.de> 0005 SPDX-FileCopyrightText: 2010 Thibaut Gridel <tgridel@free.fr> 0006 SPDX-FileCopyrightText: 2012 Ander Pijoan <ander.pijoan@deusto.es> 0007 SPDX-FileCopyrightText: 2013 Bernhard Beschow <bbeschow@cs.tu-berlin.de> 0008 */ 0009 0010 #ifndef MARBLE_VECTORTILELAYER_H 0011 #define MARBLE_VECTORTILELAYER_H 0012 0013 #include "TileLayer.h" 0014 0015 #include "MarbleGlobal.h" 0016 0017 namespace Marble 0018 { 0019 0020 class GeoPainter; 0021 class GeoDataDocument; 0022 class GeoSceneGroup; 0023 class GeoSceneVectorTileDataset; 0024 class GeoDataTreeModel; 0025 class PluginManager; 0026 class HttpDownloadManager; 0027 class ViewportParams; 0028 class TileId; 0029 0030 class DIGIKAM_EXPORT VectorTileLayer : public TileLayer 0031 { 0032 Q_OBJECT 0033 0034 public: 0035 VectorTileLayer(HttpDownloadManager *downloadManager, 0036 const PluginManager *pluginManager, 0037 GeoDataTreeModel *treeModel); 0038 0039 ~VectorTileLayer() override; 0040 0041 RenderState renderState() const override; 0042 0043 int tileZoomLevel() const; 0044 0045 QString runtimeTrace() const override; 0046 0047 bool render(GeoPainter *painter, ViewportParams *viewport, 0048 const QString &renderPos = QLatin1String("NONE"), 0049 GeoSceneLayer *layer = nullptr) override; 0050 0051 void reload(); 0052 0053 QSize tileSize() const; 0054 const GeoSceneAbstractTileProjection *tileProjection() const; 0055 0056 int tileColumnCount( int level ) const; 0057 int tileRowCount( int level ) const; 0058 0059 int layerCount() const; 0060 0061 void downloadTile( const TileId &stackedTileId ); 0062 0063 Q_SIGNALS: 0064 void tileLevelChanged(int tileLevel); 0065 0066 public Q_SLOTS: 0067 void setMapTheme(const QVector<const GeoSceneVectorTileDataset *> &textures, const GeoSceneGroup *textureLayerSettings); 0068 0069 void reset(); 0070 0071 private: 0072 Q_PRIVATE_SLOT(d, void updateLayerSettings()) 0073 Q_PRIVATE_SLOT(d, void updateTile(const TileId &tileId, GeoDataDocument* document)) 0074 0075 0076 private: 0077 class Private; 0078 Private *const d; 0079 0080 }; 0081 0082 } 0083 0084 #endif // MARBLE_VECTORTILELAYER_H