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

marble

  • sources
  • kde-4.12
  • 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 #include <QAbstractItemModel>
17 
18 #include "MarbleGlobal.h"
19 #include "GeoSceneTextureTile.h"
20 #include "GeoDataDocument.h"
21 
22 #include <QSize>
23 
24 class QImage;
25 class QRegion;
26 class QRect;
27 
28 namespace Marble
29 {
30 
31 class GeoPainter;
32 class GeoSceneGroup;
33 class HttpDownloadManager;
34 class PluginManager;
35 class SunLocator;
36 class VectorComposer;
37 class ViewportParams;
38 
39 class TextureLayer : public QObject, public LayerInterface
40 {
41  Q_OBJECT
42 
43  public:
44  TextureLayer( HttpDownloadManager *downloadManager,
45  const SunLocator *sunLocator,
46  VectorComposer *veccomposer,
47  const PluginManager *pluginManager,
48  QAbstractItemModel *groundOverlayModel );
49 
50  ~TextureLayer();
51 
52  QStringList renderPosition() const;
53 
54  void addSeaDocument( const GeoDataDocument *seaDocument );
55 
56  void addLandDocument( const GeoDataDocument *landDocument );
57 
58  bool showSunShading() const;
59  bool showCityLights() const;
60 
65  int tileZoomLevel() const;
66 
67  QSize tileSize() const;
68 
69  GeoSceneTiled::Projection tileProjection() const;
70 
71  int tileColumnCount( int level ) const;
72  int tileRowCount( int level ) const;
73 
74  qint64 volatileCacheLimit() const;
75 
76  int preferredRadiusCeil( int radius ) const;
77  int preferredRadiusFloor( int radius ) const;
78 
79  virtual QString runtimeTrace() const;
80 
81  virtual bool render( GeoPainter *painter, ViewportParams *viewport,
82  const QString &renderPos = "NONE", GeoSceneLayer *layer = 0 );
83 
84 public Q_SLOTS:
85  void setShowRelief( bool show );
86 
87  void setShowSunShading( bool show );
88 
89  void setShowCityLights( bool show );
90 
91  void setShowTileId( bool show );
92 
97  void setProjection( Projection projection );
98 
99  void setNeedsUpdate();
100 
101  void setMapTheme( const QVector<const GeoSceneTextureTile *> &textures, const GeoSceneGroup *textureLayerSettings, const QString &seaFile, const QString &landFile );
102 
103  void setVolatileCacheLimit( quint64 kilobytes );
104 
105  void reset();
106 
107  void reload();
108 
109  void downloadStackedTile( const TileId &stackedTileId );
110 
111  Q_SIGNALS:
112  void tileLevelChanged( int );
113  void repaintNeeded();
114 
115  private:
116  Q_PRIVATE_SLOT( d, void requestDelayedRepaint() )
117  Q_PRIVATE_SLOT( d, void updateTextureLayers() )
118  Q_PRIVATE_SLOT( d, void updateTile( const TileId &tileId, const QImage &tileImage ) )
119  Q_PRIVATE_SLOT( d, void addGroundOverlays( QModelIndex parent, int first, int last ) )
120  Q_PRIVATE_SLOT( d, void removeGroundOverlays( QModelIndex parent, int first, int last ) )
121  Q_PRIVATE_SLOT( d, void resetGroundOverlaysCache() )
122 
123  private:
124  class Private;
125  Private *const d;
126 };
127 
128 }
129 
130 #endif
GeoDataDocument.h
Marble::TextureLayer::render
virtual bool render(GeoPainter *painter, ViewportParams *viewport, const QString &renderPos="NONE", GeoSceneLayer *layer=0)
Renders the content provided by the layer on the viewport.
Definition: TextureLayer.cpp:293
Marble::PluginManager
The class that handles Marble's plugins.
Definition: PluginManager.h:45
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:64
Marble::TextureLayer::tileColumnCount
int tileColumnCount(int level) const
Definition: TextureLayer.cpp:487
Marble::TextureLayer::repaintNeeded
void repaintNeeded()
Marble::TextureLayer::setNeedsUpdate
void setNeedsUpdate()
Definition: TextureLayer.cpp:415
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::TextureLayer::setShowCityLights
void setShowCityLights(bool show)
Definition: TextureLayer.cpp:372
Marble::LayerInterface
Definition: LayerInterface.h:25
Marble::TextureLayer::tileLevelChanged
void tileLevelChanged(int)
QObject
Marble::TextureLayer::renderPosition
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: TextureLayer.cpp:262
Marble::TextureLayer::reload
void reload()
Definition: TextureLayer.cpp:437
Marble::TextureLayer::addLandDocument
void addLandDocument(const GeoDataDocument *landDocument)
Definition: TextureLayer.cpp:275
Marble::TextureLayer::setShowSunShading
void setShowSunShading(bool show)
Definition: TextureLayer.cpp:357
Marble::TextureLayer::addSeaDocument
void addSeaDocument(const GeoDataDocument *seaDocument)
Definition: TextureLayer.cpp:267
Marble::TextureLayer::volatileCacheLimit
qint64 volatileCacheLimit() const
Definition: TextureLayer.cpp:497
Marble::SunLocator
Definition: SunLocator.h:33
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
Marble::TextureLayer::setShowRelief
void setShowRelief(bool show)
Definition: TextureLayer.cpp:350
Marble::TextureLayer::tileRowCount
int tileRowCount(int level) const
Definition: TextureLayer.cpp:492
Marble::TextureLayer::reset
void reset()
Definition: TextureLayer.cpp:429
Marble::GeoSceneGroup
Group inside the settings of a GeoScene document.
Definition: GeoSceneGroup.h:40
Marble::TextureLayer
Definition: TextureLayer.h:39
Marble::TextureLayer::setProjection
void setProjection(Projection projection)
Set the Projection used for the map.
Definition: TextureLayer.cpp:386
Marble::VectorComposer
Definition: VectorComposer.h:40
MarbleGlobal.h
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
QAbstractItemModel
Marble::TextureLayer::setVolatileCacheLimit
void setVolatileCacheLimit(quint64 kilobytes)
Definition: TextureLayer.cpp:424
Marble::TextureLayer::runtimeTrace
virtual QString runtimeTrace() const
Returns a debug line for perfo/tracing issues.
Definition: TextureLayer.cpp:345
Marble::TileId
Definition: TileId.h:27
Marble::TextureLayer::preferredRadiusFloor
int preferredRadiusFloor(int radius) const
Definition: TextureLayer.cpp:516
Marble::TextureLayer::downloadStackedTile
void downloadStackedTile(const TileId &stackedTileId)
Definition: TextureLayer.cpp:447
Marble::TextureLayer::showSunShading
bool showSunShading() const
Definition: TextureLayer.cpp:283
Marble::TextureLayer::setMapTheme
void setMapTheme(const QVector< const GeoSceneTextureTile * > &textures, const GeoSceneGroup *textureLayerSettings, const QString &seaFile, const QString &landFile)
Definition: TextureLayer.cpp:452
Marble::TextureLayer::~TextureLayer
~TextureLayer()
Definition: TextureLayer.cpp:255
Marble::Projection
Projection
This enum is used to choose the projection shown in the view.
Definition: MarbleGlobal.h:44
Marble::TextureLayer::tileZoomLevel
int tileZoomLevel() const
Return the current tile zoom level.
Definition: TextureLayer.cpp:472
Marble::TextureLayer::showCityLights
bool showCityLights() const
Definition: TextureLayer.cpp:288
Marble::TextureLayer::tileProjection
GeoSceneTiled::Projection tileProjection() const
Definition: TextureLayer.cpp:482
GeoSceneTextureTile.h
Marble::TextureLayer::setShowTileId
void setShowTileId(bool show)
Definition: TextureLayer.cpp:379
Marble::TextureLayer::TextureLayer
TextureLayer(HttpDownloadManager *downloadManager, const SunLocator *sunLocator, VectorComposer *veccomposer, const PluginManager *pluginManager, QAbstractItemModel *groundOverlayModel)
Definition: TextureLayer.cpp:234
Marble::TextureLayer::tileSize
QSize tileSize() const
Definition: TextureLayer.cpp:477
Marble::TextureLayer::preferredRadiusCeil
int preferredRadiusCeil(int radius) const
Definition: TextureLayer.cpp:502
Marble::HttpDownloadManager
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:53 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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