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

marble/src

TileLoader Class Reference

#include <TileLoader.h>

Inheritance diagram for TileLoader:

Inheritance graph
[legend]

List of all members.


Detailed Description

Definition at line 51 of file TileLoader.h.


Public Slots

void reloadTile (QString relativeUrlString, QString id)
void message (const QString &test)

Signals

void tileUpdateAvailable ()

Public Member Functions

 TileLoader (HttpDownloadManager *downloadManager)
 TileLoader (const QString &theme, HttpDownloadManager *downloadManager)
virtual ~TileLoader ()
void setDownloadManager (HttpDownloadManager *downloadManager)
TextureTile * loadTile (int tilx, int tily, int tileLevel)
void setMapTheme (const QString &)
const QString mapTheme () const
void resetTilehash ()
void cleanupTilehash ()
void flush ()
int tileWidth () const
int tileHeight () const
int globalWidth (int level) const
int globalHeight (int level) const

Static Public Member Functions

static int levelToRow (int level)
static int levelToColumn (int level)
static int rowToLevel (int row)
static int columnToLevel (int column)
static int maxCompleteTileLevel (const QString &theme)
static int maxPartialTileLevel (const QString &theme)
static bool baseTilesAvailable (const QString &theme)

Protected Attributes

HttpDownloadManager * m_downloadManager
QString m_theme
QHash< int, TextureTile * > m_tileHash
int m_tileWidth
int m_tileHeight
TileCache m_tileCache

Constructor & Destructor Documentation

TileLoader::TileLoader ( HttpDownloadManager *  downloadManager  ) 

This file is part of the Marble Desktop Globe.

Copyright 2005-2007 Torsten Rahn <tackat@kde.org>" Copyright 2007 Inge Wallin <ingwa@kde.org>"

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details.

You should have received a copy of the GNU Library General Public License along with this library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.

Definition at line 42 of file TileLoader.cpp.

TileLoader::TileLoader ( const QString &  theme,
HttpDownloadManager *  downloadManager 
)

Definition at line 49 of file TileLoader.cpp.

TileLoader::~TileLoader (  )  [virtual]

Definition at line 57 of file TileLoader.cpp.


Member Function Documentation

void TileLoader::setDownloadManager ( HttpDownloadManager *  downloadManager  ) 

Definition at line 71 of file TileLoader.cpp.

TextureTile * TileLoader::loadTile ( int  tilx,
int  tily,
int  tileLevel 
)

Definition at line 149 of file TileLoader.cpp.

void TileLoader::setMapTheme ( const QString &  theme  ) 

Definition at line 87 of file TileLoader.cpp.

const QString TileLoader::mapTheme (  )  const [inline]

Definition at line 63 of file TileLoader.h.

void TileLoader::resetTilehash (  ) 

Definition at line 105 of file TileLoader.cpp.

void TileLoader::cleanupTilehash (  ) 

Definition at line 114 of file TileLoader.cpp.

void TileLoader::flush (  ) 

Definition at line 132 of file TileLoader.cpp.

int TileLoader::tileWidth (  )  const [inline]

Definition at line 70 of file TileLoader.h.

int TileLoader::tileHeight (  )  const [inline]

Definition at line 71 of file TileLoader.h.

int TileLoader::globalWidth ( int  level  )  const [inline]

Definition at line 73 of file TileLoader.h.

int TileLoader::globalHeight ( int  level  )  const [inline]

Definition at line 77 of file TileLoader.h.

int TileLoader::levelToRow ( int  level  )  [static]

Get the maximum number of tile rows for a given tile level.

Parameters:
level the tile level
Returns:
the maximum number of rows that a map level was tiled into. If the tile level number is invalid then "-1" gets returned so this case of wrong input data can get catched by the code which makes use of it.

Definition at line 190 of file TileLoader.cpp.

int TileLoader::levelToColumn ( int  level  )  [static]

Get the maximum number of tile columns for a given tile level.

Parameters:
level the tile level
Returns:
the maximum number of columns that a map level was tiled into. If the tile level number is invalid then "-1" gets returned so this case of wrong input data can get catched by the code which makes use of it.

Definition at line 202 of file TileLoader.cpp.

int TileLoader::rowToLevel ( int  row  )  [static]

Get the tile level for the given maximum number of tile columns.

Parameters:
row the maximum number of rows that a map level was tiled into.
Returns:
the corresponding tile level. If the number of rows is invalid then "-1" gets returned so this case of wrong input data can get catched by the code which makes use of it.

Definition at line 214 of file TileLoader.cpp.

int TileLoader::columnToLevel ( int  column  )  [static]

Get the tile level for the given maximum number of tile columns.

Parameters:
column the maximum number of columns that a map level was tiled into.
Returns:
the corresponding tile level. If the number of columns is invalid then "-1" gets returned so this case of wrong input data can get catched by the code which makes use of it.

Definition at line 226 of file TileLoader.cpp.

int TileLoader::maxCompleteTileLevel ( const QString &  theme  )  [static]

Definition at line 238 of file TileLoader.cpp.

int TileLoader::maxPartialTileLevel ( const QString &  theme  )  [static]

Definition at line 280 of file TileLoader.cpp.

bool TileLoader::baseTilesAvailable ( const QString &  theme  )  [static]

Definition at line 307 of file TileLoader.cpp.

void TileLoader::tileUpdateAvailable (  )  [signal]

void TileLoader::reloadTile ( QString  relativeUrlString,
QString  id 
) [slot]

Definition at line 326 of file TileLoader.cpp.

void TileLoader::message ( const QString &  test  )  [inline, slot]

Definition at line 154 of file TileLoader.h.


Member Data Documentation

HttpDownloadManager* TileLoader::m_downloadManager [protected]

Definition at line 136 of file TileLoader.h.

QString TileLoader::m_theme [protected]

Definition at line 138 of file TileLoader.h.

QHash<int, TextureTile*> TileLoader::m_tileHash [protected]

Definition at line 140 of file TileLoader.h.

int TileLoader::m_tileWidth [protected]

Definition at line 142 of file TileLoader.h.

int TileLoader::m_tileHeight [protected]

Definition at line 143 of file TileLoader.h.

TileCache TileLoader::m_tileCache [protected]

Definition at line 145 of file TileLoader.h.


The documentation for this class was generated from the following files:
  • TileLoader.h
  • TileLoader.cpp

marble/src

Skip menu "marble/src"
  • Main Page
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members

kdeedu

Skip menu "kdeedu"
  • kalzium
  • kanagram
  • kig
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  •   docs
  •   src
  • parley
Generated for kdeedu by doxygen 1.5.4
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal