File indexing completed on 2024-04-21 03:49:48

0001 // SPDX-FileCopyrightText: 2008 David Roberts <dvdr18@gmail.com>
0002 //
0003 // SPDX-License-Identifier: LGPL-2.1-or-later
0004 
0005 #ifndef MARBLE_MERGEDLAYERDECORATOR_H
0006 #define MARBLE_MERGEDLAYERDECORATOR_H
0007 
0008 #include <QVector>
0009 #include <QList>
0010 
0011 #include "MarbleGlobal.h"
0012 
0013 class QImage;
0014 class QString;
0015 class QSize;
0016 
0017 namespace Marble
0018 {
0019 
0020 class GeoDataGroundOverlay;
0021 class GeoSceneAbstractTileProjection;
0022 class GeoSceneTextureTileDataset;
0023 class SunLocator;
0024 class StackedTile;
0025 class Tile;
0026 class TileId;
0027 class TileLoader;
0028 class RenderState;
0029 
0030 class MergedLayerDecorator
0031 {
0032  public:
0033     MergedLayerDecorator( TileLoader * const tileLoader, const SunLocator* sunLocator );
0034     virtual ~MergedLayerDecorator();
0035 
0036     void setTextureLayers( const QVector<const GeoSceneTextureTileDataset *> &textureLayers );
0037     void updateGroundOverlays( const QList<const GeoDataGroundOverlay *> &groundOverlays );
0038 
0039     int textureLayersSize() const;
0040 
0041     /**
0042      * Returns the highest level in which some tiles are theoretically
0043      * available for the current texture layers.
0044      */
0045     int maximumTileLevel() const;
0046 
0047     int tileColumnCount( int level ) const;
0048 
0049     int tileRowCount( int level ) const;
0050 
0051     const GeoSceneAbstractTileProjection *tileProjection() const;
0052 
0053     QSize tileSize() const;
0054 
0055     StackedTile *loadTile( const TileId &id );
0056 
0057     StackedTile *updateTile( const StackedTile &stackedTile, const TileId &tileId, const QImage &tileImage );
0058 
0059     void downloadStackedTile( const TileId &id, DownloadUsage usage );
0060 
0061     void setShowSunShading( bool show );
0062     bool showSunShading() const;
0063 
0064     void setShowCityLights( bool show );
0065     bool showCityLights() const;
0066 
0067     void setShowTileId(bool show);
0068 
0069     RenderState renderState( const TileId &stackedTileId ) const;
0070 
0071     bool hasTextureLayer() const;
0072 
0073  protected:
0074     Q_DISABLE_COPY( MergedLayerDecorator )
0075 
0076     class Private;
0077     Private *const d;
0078 };
0079 
0080 }
0081 
0082 #endif