• 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
  • tools
  • mapreproject
NwwMapImage.h
Go to the documentation of this file.
1 #ifndef NWWIMAGE_H
2 #define NWWIMAGE_H
3 
4 #include "mapreproject.h"
5 #include "ReadOnlyMapImage.h"
6 
7 #include <QCache>
8 #include <QDir>
9 #include <QPair>
10 #include <QSet>
11 #include <QColor>
12 #include <QImage>
13 
14 class InterpolationMethod;
15 
16 class NwwMapImage: public ReadOnlyMapImage
17 {
18 public:
19  NwwMapImage( QDir const & baseDirectory, int const tileLevel );
20 
21  virtual QRgb pixel( double const lonRad, double const latRad );
22  virtual QRgb pixel( int const x, int const y );
23 
24  void setBaseDirectory( QDir const & baseDirectory );
25  void setCacheSizeBytes( int const cacheSizeBytes );
26  void setInterpolationMethod( InterpolationMethod * const method );
27  void setTileLevel( int const level );
28 
29 private:
30  enum { DefaultCacheSizeBytes = 32 * 1024 * 1024 };
31 
32  static int tileId( int const tileX, int const tileY );
33  QPair<QImage, bool> tile( int const tileX, int const tileY );
34  double lonRadToPixelX( double const lonRad ) const;
35  double latRadToPixelY( double const latRad ) const;
36 
37  // Interpolation methods
38  QRgb nearestNeighbor( double const x, double const y );
39  QRgb bilinearInterpolation( double const x, double const y );
40 
41  int const m_tileEdgeLengthPixel;
42  QRgb const m_emptyPixel;
43 
44  QDir m_baseDirectory;
45  int m_tileLevel;
46  int m_mapWidthTiles;
47  int m_mapHeightTiles;
48  int m_mapWidthPixel;
49  int m_mapHeightPixel;
50 
51 
52  InterpolationMethod * m_interpolationMethod;
53 
54  QSet<int> m_tileMissing;
55  QCache<int, QImage> m_tileCache;
56 };
57 
58 #endif
ReadOnlyMapImage.h
NwwMapImage::NwwMapImage
NwwMapImage(QDir const &baseDirectory, int const tileLevel)
Definition: NwwMapImage.cpp:8
InterpolationMethod
Definition: InterpolationMethod.h:8
NwwMapImage::setCacheSizeBytes
void setCacheSizeBytes(int const cacheSizeBytes)
Definition: NwwMapImage.cpp:60
ReadOnlyMapImage
Definition: ReadOnlyMapImage.h:8
NwwMapImage::setTileLevel
void setTileLevel(int const level)
Definition: NwwMapImage.cpp:71
NwwMapImage::pixel
virtual QRgb pixel(double const lonRad, double const latRad)
Definition: NwwMapImage.cpp:30
NwwMapImage
Definition: NwwMapImage.h:16
NwwMapImage::setBaseDirectory
void setBaseDirectory(QDir const &baseDirectory)
Definition: NwwMapImage.cpp:55
mapreproject.h
NwwMapImage::setInterpolationMethod
void setInterpolationMethod(InterpolationMethod *const method)
Definition: NwwMapImage.cpp:65
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 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