• 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.cpp
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 2006-2007 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 // Copyright 2008, 2009, 2010 Jens-Michael Hoffmann <jmho@c-xx.com>
11 // Copyright 2010-2012 Bernhard Beschow <bbeschow@cs.tu-berlin.de>//
12 
13 #include "TextureLayer.h"
14 
15 #include <qmath.h>
16 #include <QTimer>
17 #include <QList>
18 #include <QSortFilterProxyModel>
19 
20 #include "SphericalScanlineTextureMapper.h"
21 #include "EquirectScanlineTextureMapper.h"
22 #include "MercatorScanlineTextureMapper.h"
23 #include "TileScalingTextureMapper.h"
24 #include "GeoDataGroundOverlay.h"
25 #include "GeoPainter.h"
26 #include "GeoSceneGroup.h"
27 #include "GeoSceneTypes.h"
28 #include "MergedLayerDecorator.h"
29 #include "MarbleDebug.h"
30 #include "MarbleDirs.h"
31 #include "MarblePlacemarkModel.h"
32 #include "StackedTile.h"
33 #include "StackedTileLoader.h"
34 #include "SunLocator.h"
35 #include "TextureColorizer.h"
36 #include "TileLoader.h"
37 #include "ViewportParams.h"
38 
39 namespace Marble
40 {
41 
42 const int REPAINT_SCHEDULING_INTERVAL = 1000;
43 
44 class TextureLayer::Private
45 {
46 public:
47  Private( HttpDownloadManager *downloadManager,
48  const SunLocator *sunLocator,
49  QAbstractItemModel *groundOverlayModel,
50  TextureLayer *parent );
51 
52  void requestDelayedRepaint();
53  void updateTextureLayers();
54  void updateTile( const TileId &tileId, const QImage &tileImage );
55 
56  void addGroundOverlays( QModelIndex parent, int first, int last );
57  void removeGroundOverlays( QModelIndex parent, int first, int last );
58  void resetGroundOverlaysCache();
59 
60  void updateGroundOverlays();
61 
62  static bool drawOrderLessThan( const GeoDataGroundOverlay* o1, const GeoDataGroundOverlay* o2 );
63 
64 public:
65  TextureLayer *const m_parent;
66  const SunLocator *const m_sunLocator;
67  TileLoader m_loader;
68  MergedLayerDecorator m_layerDecorator;
69  StackedTileLoader m_tileLoader;
70  GeoDataCoordinates m_centerCoordinates;
71  int m_tileZoomLevel;
72  TextureMapperInterface *m_texmapper;
73  TextureColorizer *m_texcolorizer;
74  QVector<const GeoSceneTextureTile *> m_textures;
75  const GeoSceneGroup *m_textureLayerSettings;
76  QString m_runtimeTrace;
77  QSortFilterProxyModel m_groundOverlayModel;
78  QList<const GeoDataGroundOverlay *> m_groundOverlayCache;
79  // For scheduling repaints
80  QTimer m_repaintTimer;
81  RenderState m_renderState;
82 };
83 
84 TextureLayer::Private::Private( HttpDownloadManager *downloadManager,
85  const SunLocator *sunLocator,
86  QAbstractItemModel *groundOverlayModel,
87  TextureLayer *parent )
88  : m_parent( parent )
89  , m_sunLocator( sunLocator )
90  , m_loader( downloadManager, 0 )
91  , m_layerDecorator( &m_loader, sunLocator )
92  , m_tileLoader( &m_layerDecorator )
93  , m_centerCoordinates()
94  , m_tileZoomLevel( -1 )
95  , m_texmapper( 0 )
96  , m_texcolorizer( 0 )
97  , m_textureLayerSettings( 0 )
98  , m_repaintTimer()
99 {
100  m_groundOverlayModel.setSourceModel( groundOverlayModel );
101  m_groundOverlayModel.setDynamicSortFilter( true );
102  m_groundOverlayModel.setSortRole ( MarblePlacemarkModel::PopularityIndexRole );
103  m_groundOverlayModel.sort (0, Qt::AscendingOrder );
104 
105  connect( &m_groundOverlayModel, SIGNAL(rowsInserted(QModelIndex,int,int)),
106  m_parent, SLOT(addGroundOverlays(QModelIndex,int,int)) );
107 
108  connect( &m_groundOverlayModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)),
109  m_parent, SLOT(removeGroundOverlays(QModelIndex,int,int)) );
110 
111  connect( &m_groundOverlayModel, SIGNAL(dataChanged(QModelIndex,QModelIndex)),
112  m_parent, SLOT(resetGroundOverlaysCache()) );
113 
114  connect( &m_groundOverlayModel, SIGNAL(modelReset()),
115  m_parent, SLOT(resetGroundOverlaysCache()) );
116 
117  updateGroundOverlays();
118 }
119 
120 void TextureLayer::Private::requestDelayedRepaint()
121 {
122  if ( m_texmapper ) {
123  m_texmapper->setRepaintNeeded();
124  }
125 
126  if ( !m_repaintTimer.isActive() ) {
127  m_repaintTimer.start();
128  }
129 }
130 
131 void TextureLayer::Private::updateTextureLayers()
132 {
133  QVector<GeoSceneTextureTile const *> result;
134 
135  foreach ( const GeoSceneTextureTile *candidate, m_textures ) {
136  bool enabled = true;
137  if ( m_textureLayerSettings ) {
138  const bool propertyExists = m_textureLayerSettings->propertyValue( candidate->name(), enabled );
139  enabled |= !propertyExists; // if property doesn't exist, enable texture nevertheless
140  }
141  if ( enabled ) {
142  result.append( candidate );
143  mDebug() << "enabling texture" << candidate->name();
144  } else {
145  mDebug() << "disabling texture" << candidate->name();
146  }
147  }
148 
149  updateGroundOverlays();
150 
151  m_layerDecorator.setTextureLayers( result );
152  m_tileLoader.clear();
153 
154  m_parent->setNeedsUpdate();
155 }
156 
157 void TextureLayer::Private::updateTile( const TileId &tileId, const QImage &tileImage )
158 {
159  if ( tileImage.isNull() )
160  return; // keep tiles in cache to improve performance
161 
162  m_tileLoader.updateTile( tileId, tileImage );
163 
164  requestDelayedRepaint();
165 }
166 
167 bool TextureLayer::Private::drawOrderLessThan( const GeoDataGroundOverlay* o1, const GeoDataGroundOverlay* o2 )
168 {
169  return o1->drawOrder() < o2->drawOrder();
170 }
171 
172 void TextureLayer::Private::addGroundOverlays( QModelIndex parent, int first, int last )
173 {
174  for ( int i = first; i <= last; ++i ) {
175  QModelIndex index = m_groundOverlayModel.index( i, 0, parent );
176  const GeoDataGroundOverlay *overlay = static_cast<GeoDataGroundOverlay *>( qvariant_cast<GeoDataObject *>( index.data( MarblePlacemarkModel::ObjectPointerRole ) ) );
177 
178  if ( overlay->icon().isNull() ) {
179  continue;
180  }
181 
182  int pos = qLowerBound( m_groundOverlayCache.begin(), m_groundOverlayCache.end(), overlay, drawOrderLessThan ) - m_groundOverlayCache.begin();
183  m_groundOverlayCache.insert( pos, overlay );
184  }
185 
186  updateGroundOverlays();
187 
188  m_parent->reset();
189 }
190 
191 void TextureLayer::Private::removeGroundOverlays( QModelIndex parent, int first, int last )
192 {
193  for ( int i = first; i <= last; ++i ) {
194  QModelIndex index = m_groundOverlayModel.index( i, 0, parent );
195  const GeoDataGroundOverlay *overlay = static_cast<GeoDataGroundOverlay *>( qvariant_cast<GeoDataObject *>( index.data( MarblePlacemarkModel::ObjectPointerRole ) ) );
196 
197  int pos = qLowerBound( m_groundOverlayCache.begin(), m_groundOverlayCache.end(), overlay, drawOrderLessThan ) - m_groundOverlayCache.begin();
198  if (pos >= 0 && pos < m_groundOverlayCache.size() ) {
199  m_groundOverlayCache.removeAt( pos );
200  }
201  }
202 
203  updateGroundOverlays();
204 
205  m_parent->reset();
206 }
207 
208 void TextureLayer::Private::resetGroundOverlaysCache()
209 {
210  m_groundOverlayCache.clear();
211 
212  updateGroundOverlays();
213 
214  m_parent->reset();
215 }
216 
217 void TextureLayer::Private::updateGroundOverlays()
218 {
219  if ( !m_texcolorizer ) {
220  m_layerDecorator.updateGroundOverlays( m_groundOverlayCache );
221  }
222  else {
223  m_layerDecorator.updateGroundOverlays( QList<const GeoDataGroundOverlay *>() );
224  }
225 }
226 
227 
228 TextureLayer::TextureLayer( HttpDownloadManager *downloadManager,
229  const SunLocator *sunLocator,
230  QAbstractItemModel *groundOverlayModel )
231  : QObject()
232  , d( new Private( downloadManager, sunLocator, groundOverlayModel, this ) )
233 {
234  connect( &d->m_loader, SIGNAL(tileCompleted(TileId,QImage)),
235  this, SLOT(updateTile(TileId,QImage)) );
236 
237  // Repaint timer
238  d->m_repaintTimer.setSingleShot( true );
239  d->m_repaintTimer.setInterval( REPAINT_SCHEDULING_INTERVAL );
240  connect( &d->m_repaintTimer, SIGNAL(timeout()),
241  this, SIGNAL(repaintNeeded()) );
242 }
243 
244 TextureLayer::~TextureLayer()
245 {
246  delete d->m_texmapper;
247  delete d->m_texcolorizer;
248  delete d;
249 }
250 
251 QStringList TextureLayer::renderPosition() const
252 {
253  return QStringList() << "SURFACE";
254 }
255 
256 void TextureLayer::addSeaDocument( const GeoDataDocument *seaDocument )
257 {
258  if( d->m_texcolorizer ) {
259  d->m_texcolorizer->addSeaDocument( seaDocument );
260  reset();
261  }
262 }
263 
264 void TextureLayer::addLandDocument( const GeoDataDocument *landDocument )
265 {
266  if( d->m_texcolorizer ) {
267  d->m_texcolorizer->addLandDocument( landDocument );
268  reset();
269  }
270 }
271 
272 bool TextureLayer::showSunShading() const
273 {
274  return d->m_layerDecorator.showSunShading();
275 }
276 
277 bool TextureLayer::showCityLights() const
278 {
279  return d->m_layerDecorator.showCityLights();
280 }
281 
282 bool TextureLayer::render( GeoPainter *painter, ViewportParams *viewport,
283  const QString &renderPos, GeoSceneLayer *layer )
284 {
285  Q_UNUSED( renderPos );
286  Q_UNUSED( layer );
287  d->m_renderState = RenderState( "Texture Tiles" );
288 
289  // Stop repaint timer if it is already running
290  d->m_repaintTimer.stop();
291 
292  if ( d->m_textures.isEmpty() )
293  return false;
294 
295  if ( d->m_layerDecorator.textureLayersSize() == 0 )
296  return false;
297 
298  if ( !d->m_texmapper )
299  return false;
300 
301  if ( d->m_centerCoordinates.longitude() != viewport->centerLongitude() ||
302  d->m_centerCoordinates.latitude() != viewport->centerLatitude() ) {
303  d->m_centerCoordinates.setLongitude( viewport->centerLongitude() );
304  d->m_centerCoordinates.setLatitude( viewport->centerLatitude() );
305  d->m_texmapper->setRepaintNeeded();
306  }
307 
308  // choose the smaller dimension for selecting the tile level, leading to higher-resolution results
309  const int levelZeroWidth = d->m_layerDecorator.tileSize().width() * d->m_layerDecorator.tileColumnCount( 0 );
310  const int levelZeroHight = d->m_layerDecorator.tileSize().height() * d->m_layerDecorator.tileRowCount( 0 );
311  const int levelZeroMinDimension = qMin( levelZeroWidth, levelZeroHight );
312 
313  // limit to 1 as dirty fix for invalid entry linearLevel
314  const qreal linearLevel = qMax<qreal>( 1.0, viewport->radius() * 4.0 / levelZeroMinDimension );
315 
316  // As our tile resolution doubles with each level we calculate
317  // the tile level from tilesize and the globe radius via log(2)
318  const qreal tileLevelF = qLn( linearLevel ) / qLn( 2.0 ) * 1.00001; // snap to the sharper tile level a tiny bit earlier
319  // to work around rounding errors when the radius
320  // roughly equals the global texture width
321 
322  const int tileLevel = qMin<int>( d->m_layerDecorator.maximumTileLevel(), tileLevelF );
323 
324  if ( tileLevel != d->m_tileZoomLevel ) {
325  d->m_tileZoomLevel = tileLevel;
326  emit tileLevelChanged( d->m_tileZoomLevel );
327  }
328 
329  const QRect dirtyRect = QRect( QPoint( 0, 0), viewport->size() );
330  d->m_texmapper->mapTexture( painter, viewport, d->m_tileZoomLevel, dirtyRect, d->m_texcolorizer );
331  d->m_renderState.addChild( d->m_tileLoader.renderState() );
332  d->m_runtimeTrace = QString("Texture Cache: %1 ").arg(d->m_tileLoader.tileCount());
333  return true;
334 }
335 
336 QString TextureLayer::runtimeTrace() const
337 {
338  return d->m_runtimeTrace;
339 }
340 
341 void TextureLayer::setShowRelief( bool show )
342 {
343  if ( d->m_texcolorizer ) {
344  d->m_texcolorizer->setShowRelief( show );
345  }
346 }
347 
348 void TextureLayer::setShowSunShading( bool show )
349 {
350  disconnect( d->m_sunLocator, SIGNAL(positionChanged(qreal,qreal)),
351  this, SLOT(reset()) );
352 
353  if ( show ) {
354  connect( d->m_sunLocator, SIGNAL(positionChanged(qreal,qreal)),
355  this, SLOT(reset()) );
356  }
357 
358  d->m_layerDecorator.setShowSunShading( show );
359 
360  reset();
361 }
362 
363 void TextureLayer::setShowCityLights( bool show )
364 {
365  d->m_layerDecorator.setShowCityLights( show );
366 
367  reset();
368 }
369 
370 void TextureLayer::setShowTileId( bool show )
371 {
372  d->m_layerDecorator.setShowTileId( show );
373 
374  reset();
375 }
376 
377 void TextureLayer::setProjection( Projection projection )
378 {
379  if ( d->m_textures.isEmpty() ) {
380  return;
381  }
382 
383  // FIXME: replace this with an approach based on the factory method pattern.
384  delete d->m_texmapper;
385 
386  switch( projection ) {
387  case Spherical:
388  d->m_texmapper = new SphericalScanlineTextureMapper( &d->m_tileLoader );
389  break;
390  case Equirectangular:
391  d->m_texmapper = new EquirectScanlineTextureMapper( &d->m_tileLoader );
392  break;
393  case Mercator:
394  if ( d->m_tileLoader.tileProjection() == GeoSceneTiled::Mercator ) {
395  d->m_texmapper = new TileScalingTextureMapper( &d->m_tileLoader );
396  } else {
397  d->m_texmapper = new MercatorScanlineTextureMapper( &d->m_tileLoader );
398  }
399  break;
400  default:
401  d->m_texmapper = 0;
402  }
403  Q_ASSERT( d->m_texmapper );
404 }
405 
406 void TextureLayer::setNeedsUpdate()
407 {
408  if ( d->m_texmapper ) {
409  d->m_texmapper->setRepaintNeeded();
410  }
411 
412  emit repaintNeeded();
413 }
414 
415 void TextureLayer::setVolatileCacheLimit( quint64 kilobytes )
416 {
417  d->m_tileLoader.setVolatileCacheLimit( kilobytes );
418 }
419 
420 void TextureLayer::reset()
421 {
422  mDebug() << Q_FUNC_INFO;
423 
424  d->m_tileLoader.clear();
425  setNeedsUpdate();
426 }
427 
428 void TextureLayer::reload()
429 {
430  foreach ( const TileId &id, d->m_tileLoader.visibleTiles() ) {
431  // it's debatable here, whether DownloadBulk or DownloadBrowse should be used
432  // but since "reload" or "refresh" seems to be a common action of a browser and it
433  // allows for more connections (in our model), use "DownloadBrowse"
434  d->m_layerDecorator.downloadStackedTile( id, DownloadBrowse );
435  }
436 }
437 
438 void TextureLayer::downloadStackedTile( const TileId &stackedTileId )
439 {
440  d->m_layerDecorator.downloadStackedTile( stackedTileId, DownloadBulk );
441 }
442 
443 void TextureLayer::setMapTheme( const QVector<const GeoSceneTextureTile *> &textures, const GeoSceneGroup *textureLayerSettings, const QString &seaFile, const QString &landFile )
444 {
445  delete d->m_texcolorizer;
446  d->m_texcolorizer = 0;
447 
448  if ( QFileInfo( seaFile ).isReadable() || QFileInfo( landFile ).isReadable() ) {
449  d->m_texcolorizer = new TextureColorizer( seaFile, landFile );
450  }
451 
452  d->m_textures = textures;
453  d->m_textureLayerSettings = textureLayerSettings;
454 
455  if ( d->m_textureLayerSettings ) {
456  connect( d->m_textureLayerSettings, SIGNAL(valueChanged(QString,bool)),
457  this, SLOT(updateTextureLayers()) );
458  }
459 
460  d->updateTextureLayers();
461 }
462 
463 int TextureLayer::tileZoomLevel() const
464 {
465  return d->m_tileZoomLevel;
466 }
467 
468 QSize TextureLayer::tileSize() const
469 {
470  return d->m_layerDecorator.tileSize();
471 }
472 
473 GeoSceneTiled::Projection TextureLayer::tileProjection() const
474 {
475  return d->m_layerDecorator.tileProjection();
476 }
477 
478 int TextureLayer::tileColumnCount( int level ) const
479 {
480  return d->m_layerDecorator.tileColumnCount( level );
481 }
482 
483 int TextureLayer::tileRowCount( int level ) const
484 {
485  return d->m_layerDecorator.tileRowCount( level );
486 }
487 
488 qint64 TextureLayer::volatileCacheLimit() const
489 {
490  return d->m_tileLoader.volatileCacheLimit();
491 }
492 
493 int TextureLayer::preferredRadiusCeil( int radius ) const
494 {
495  const int tileWidth = d->m_layerDecorator.tileSize().width();
496  const int levelZeroColumns = d->m_layerDecorator.tileColumnCount( 0 );
497  const qreal linearLevel = 4.0 * (qreal)( radius ) / (qreal)( tileWidth * levelZeroColumns );
498  const qreal tileLevelF = qLn( linearLevel ) / qLn( 2.0 );
499  const int tileLevel = qCeil( tileLevelF );
500 
501  if ( tileLevel < 0 )
502  return ( tileWidth * levelZeroColumns / 4 ) >> (-tileLevel);
503 
504  return ( tileWidth * levelZeroColumns / 4 ) << tileLevel;
505 }
506 
507 int TextureLayer::preferredRadiusFloor( int radius ) const
508 {
509  const int tileWidth = d->m_layerDecorator.tileSize().width();
510  const int levelZeroColumns = d->m_layerDecorator.tileColumnCount( 0 );
511  const qreal linearLevel = 4.0 * (qreal)( radius ) / (qreal)( tileWidth * levelZeroColumns );
512  const qreal tileLevelF = qLn( linearLevel ) / qLn( 2.0 );
513  const int tileLevel = qFloor( tileLevelF );
514 
515  if ( tileLevel < 0 )
516  return ( tileWidth * levelZeroColumns / 4 ) >> (-tileLevel);
517 
518  return ( tileWidth * levelZeroColumns / 4 ) << tileLevel;
519 }
520 
521 RenderState TextureLayer::renderState() const
522 {
523  return d->m_renderState;
524 }
525 
526 }
527 
528 #include "TextureLayer.moc"
GeoSceneTypes.h
TileLoader.h
QModelIndex
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
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:282
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Marble::ViewportParams::size
QSize size() const
Definition: ViewportParams.cpp:260
Marble::TextureLayer::tileColumnCount
int tileColumnCount(int level) const
Definition: TextureLayer.cpp:478
GeoDataGroundOverlay.h
Marble::TextureLayer::repaintNeeded
void repaintNeeded()
QVector::append
void append(const T &value)
GeoSceneGroup.h
Marble::TextureLayer::setNeedsUpdate
void setNeedsUpdate()
Definition: TextureLayer.cpp:406
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
Marble::TextureLayer::setShowCityLights
void setShowCityLights(bool show)
Definition: TextureLayer.cpp:363
Marble::DownloadBrowse
Browsing mode, normal operation of Marble, like a web browser.
Definition: MarbleGlobal.h:166
SunLocator.h
QPoint
QImage::isNull
bool isNull() const
Marble::TextureLayer::tileLevelChanged
void tileLevelChanged(int)
Marble::TextureLayer::renderPosition
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: TextureLayer.cpp:251
QObject::disconnect
bool disconnect(const QObject *sender, const char *signal, const QObject *receiver, const char *method)
MarbleDebug.h
TextureColorizer.h
Marble::StackedTileLoader
Tile loading from a quad tree.
Definition: StackedTileLoader.h:59
Marble::TextureLayer::reload
void reload()
Definition: TextureLayer.cpp:428
Marble::TextureLayer::addLandDocument
void addLandDocument(const GeoDataDocument *landDocument)
Definition: TextureLayer.cpp:264
Marble::MergedLayerDecorator
Definition: MergedLayerDecorator.h:39
Marble::TextureLayer::setShowSunShading
void setShowSunShading(bool show)
Definition: TextureLayer.cpp:348
Marble::Equirectangular
Flat projection ("plate carree")
Definition: MarbleGlobal.h:46
Marble::TextureLayer::addSeaDocument
void addSeaDocument(const GeoDataDocument *seaDocument)
Definition: TextureLayer.cpp:256
Marble::TextureLayer::volatileCacheLimit
qint64 volatileCacheLimit() const
Definition: TextureLayer.cpp:488
TextureLayer.h
QRect
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:341
Marble::TextureLayer::tileRowCount
int tileRowCount(int level) const
Definition: TextureLayer.cpp:483
QTimer
Marble::TextureLayer::reset
void reset()
Definition: TextureLayer.cpp:420
Marble::Mercator
Mercator projection.
Definition: MarbleGlobal.h:47
Marble::TextureMapperInterface
Definition: TextureMapperInterface.h:27
SphericalScanlineTextureMapper.h
QObject
EquirectScanlineTextureMapper.h
MarbleDirs.h
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
Marble::TextureLayer::setProjection
void setProjection(Projection projection)
Set the Projection used for the map.
Definition: TextureLayer.cpp:377
TileScalingTextureMapper.h
QString
QList
MarblePlacemarkModel.h
GeoPainter.h
MercatorScanlineTextureMapper.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
Marble::TileScalingTextureMapper
Definition: TileScalingTextureMapper.h:27
QFileInfo
Marble::TextureColorizer
Definition: TextureColorizer.h:33
Marble::TextureLayer::setVolatileCacheLimit
void setVolatileCacheLimit(quint64 kilobytes)
Definition: TextureLayer.cpp:415
QSize
Marble::GeoSceneTiled::Mercator
Definition: GeoSceneTiled.h:47
Marble::REPAINT_SCHEDULING_INTERVAL
const int REPAINT_SCHEDULING_INTERVAL
Definition: TextureLayer.cpp:42
QSortFilterProxyModel
MergedLayerDecorator.h
ViewportParams.h
This file contains the headers for ViewportParams.
QImage
Marble::MarblePlacemarkModel::PopularityIndexRole
The popularity index.
Definition: MarblePlacemarkModel.h:60
Marble::ViewportParams::centerLatitude
qreal centerLatitude() const
Definition: ViewportParams.cpp:294
Marble::TextureLayer::runtimeTrace
virtual QString runtimeTrace() const
Returns a debug line for perfo/tracing issues.
Definition: TextureLayer.cpp:336
Marble::EquirectScanlineTextureMapper
Definition: EquirectScanlineTextureMapper.h:28
Marble::SphericalScanlineTextureMapper
Definition: SphericalScanlineTextureMapper.h:39
Marble::TileId
Definition: TileId.h:27
QVector
QModelIndex::data
QVariant data(int role) const
Marble::TextureLayer::preferredRadiusFloor
int preferredRadiusFloor(int radius) const
Definition: TextureLayer.cpp:507
Marble::ViewportParams::radius
int radius() const
Definition: ViewportParams.cpp:195
Marble::ViewportParams::centerLongitude
qreal centerLongitude() const
Definition: ViewportParams.cpp:289
StackedTile.h
Marble::TextureLayer::downloadStackedTile
void downloadStackedTile(const TileId &stackedTileId)
Definition: TextureLayer.cpp:438
Marble::TextureLayer::showSunShading
bool showSunShading() const
Definition: TextureLayer.cpp:272
Marble::TextureLayer::setMapTheme
void setMapTheme(const QVector< const GeoSceneTextureTile * > &textures, const GeoSceneGroup *textureLayerSettings, const QString &seaFile, const QString &landFile)
Definition: TextureLayer.cpp:443
Marble::TextureLayer::~TextureLayer
~TextureLayer()
Definition: TextureLayer.cpp:244
Marble::TextureLayer::tileZoomLevel
int tileZoomLevel() const
Return the current tile zoom level.
Definition: TextureLayer.cpp:463
Marble::Projection
Projection
This enum is used to choose the projection shown in the view.
Definition: MarbleGlobal.h:44
QAbstractItemModel
Marble::GeoDataGroundOverlay
Definition: GeoDataGroundOverlay.h:24
Marble::TextureLayer::showCityLights
bool showCityLights() const
Definition: TextureLayer.cpp:277
Marble::TextureLayer::tileProjection
GeoSceneTiled::Projection tileProjection() const
Definition: TextureLayer.cpp:473
Marble::MercatorScanlineTextureMapper
Definition: MercatorScanlineTextureMapper.h:28
Marble::TextureLayer::setShowTileId
void setShowTileId(bool show)
Definition: TextureLayer.cpp:370
Marble::Spherical
Spherical projection.
Definition: MarbleGlobal.h:45
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
QObject::parent
QObject * parent() const
QString::arg
QString arg(qlonglong a, int fieldWidth, int base, const QChar &fillChar) const
Marble::mDebug
QDebug mDebug()
a function to replace qDebug() in Marble library code
Definition: MarbleDebug.cpp:36
Marble::TextureLayer::renderState
RenderState renderState() const
Definition: TextureLayer.cpp:521
Marble::TextureLayer::tileSize
QSize tileSize() const
Definition: TextureLayer.cpp:468
Marble::TextureLayer::preferredRadiusCeil
int preferredRadiusCeil(int radius) const
Definition: TextureLayer.cpp:493
Marble::DownloadBulk
Bulk download, for example "File/Download region".
Definition: MarbleGlobal.h:165
Marble::HttpDownloadManager
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
StackedTileLoader.h
Marble::TileLoader
Definition: TileLoader.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