• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • layers
TextureLayer.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2010,2011 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
9 //
10 
11 #ifndef MARBLE_MARBLETEXTURELAYER_H
12 #define MARBLE_MARBLETEXTURELAYER_H
13 
14 #include "LayerInterface.h"
15 #include <QObject>
16 
17 #include "MarbleGlobal.h"
18 #include "GeoSceneTiled.h"
19 
20 #include <QSize>
21 
22 class QAbstractItemModel;
23 class QImage;
24 class QRegion;
25 class QRect;
26 
27 namespace Marble
28 {
29 
30 class GeoPainter;
31 class GeoDataDocument;
32 class GeoSceneGroup;
33 class GeoSceneTextureTile;
34 class HttpDownloadManager;
35 class SunLocator;
36 class ViewportParams;
37 
38 class MARBLE_EXPORT TextureLayer : public QObject, public LayerInterface
39 {
40  Q_OBJECT
41 
42  public:
43  TextureLayer( HttpDownloadManager *downloadManager,
44  const SunLocator *sunLocator,
45  QAbstractItemModel *groundOverlayModel );
46 
47  ~TextureLayer();
48 
49  QStringList renderPosition() const;
50 
51  void addSeaDocument( const GeoDataDocument *seaDocument );
52 
53  void addLandDocument( const GeoDataDocument *landDocument );
54 
55  bool showSunShading() const;
56  bool showCityLights() const;
57 
62  int tileZoomLevel() const;
63 
64  QSize tileSize() const;
65 
66  GeoSceneTiled::Projection tileProjection() const;
67 
68  int tileColumnCount( int level ) const;
69  int tileRowCount( int level ) const;
70 
71  qint64 volatileCacheLimit() const;
72 
73  int preferredRadiusCeil( int radius ) const;
74  int preferredRadiusFloor( int radius ) const;
75 
76  RenderState renderState() const;
77 
78  virtual QString runtimeTrace() const;
79 
80  virtual bool render( GeoPainter *painter, ViewportParams *viewport,
81  const QString &renderPos = "NONE", GeoSceneLayer *layer = 0 );
82 
83 public Q_SLOTS:
84  void setShowRelief( bool show );
85 
86  void setShowSunShading( bool show );
87 
88  void setShowCityLights( bool show );
89 
90  void setShowTileId( bool show );
91 
96  void setProjection( Projection projection );
97 
98  void setNeedsUpdate();
99 
100  void setMapTheme( const QVector<const GeoSceneTextureTile *> &textures, const GeoSceneGroup *textureLayerSettings, const QString &seaFile, const QString &landFile );
101 
102  void setVolatileCacheLimit( quint64 kilobytes );
103 
104  void reset();
105 
106  void reload();
107 
108  void downloadStackedTile( const TileId &stackedTileId );
109 
110  Q_SIGNALS:
111  void tileLevelChanged( int );
112  void repaintNeeded();
113 
114  private:
115  Q_PRIVATE_SLOT( d, void requestDelayedRepaint() )
116  Q_PRIVATE_SLOT( d, void updateTextureLayers() )
117  Q_PRIVATE_SLOT( d, void updateTile( const TileId &tileId, const QImage &tileImage ) )
118  Q_PRIVATE_SLOT( d, void addGroundOverlays( QModelIndex parent, int first, int last ) )
119  Q_PRIVATE_SLOT( d, void removeGroundOverlays( QModelIndex parent, int first, int last ) )
120  Q_PRIVATE_SLOT( d, void resetGroundOverlaysCache() )
121 
122  private:
123  class Private;
124  Private *const d;
125 };
126 
127 }
128 
129 #endif
QModelIndex
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::GeoSceneTiled::Projection
Projection
Definition: GeoSceneTiled.h:47
LayerInterface.h
Marble::LayerInterface
Definition: LayerInterface.h:26
QRect
Marble::SunLocator
Definition: SunLocator.h:33
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::radius
static qreal radius(qreal zoom)
Definition: thumbnailer.cpp:99
Marble::GeoSceneGroup
Group inside the settings of a GeoScene document.
Definition: GeoSceneGroup.h:40
Marble::TextureLayer
Definition: TextureLayer.h:38
QString
MarbleGlobal.h
Marble::RenderState
Definition: RenderState.h:22
QStringList
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QSize
QImage
Marble::TileId
Definition: TileId.h:27
QVector
GeoSceneTiled.h
Marble::Projection
Projection
This enum is used to choose the projection shown in the view.
Definition: MarbleGlobal.h:44
QAbstractItemModel
QRegion
Marble::HttpDownloadManager
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:42 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal