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

marble

  • Marble
  • MarbleModel
Public Slots | Signals | Public Member Functions | Properties | List of all members
Marble::MarbleModel Class Reference

#include <MarbleModel.h>

Inheritance diagram for Marble::MarbleModel:
Inheritance graph
[legend]

Public Slots

void clearPersistentTileCache ()
 
void setPersistentTileCacheLimit (quint64 kiloBytes)
 
void setTrackedPlacemark (const GeoDataPlacemark *placemark)
 
void updateProperty (const QString &property, bool value)
 

Signals

void creatingTilesStart (TileCreator *, const QString &name, const QString &description)
 
void homeChanged (const GeoDataCoordinates newHomePoint)
 
void themeChanged (QString mapTheme)
 
void trackedPlacemarkChanged (const GeoDataPlacemark *placemark)
 
void workOfflineChanged ()
 

Public Member Functions

 MarbleModel (QObject *parent=0)
 
virtual ~MarbleModel ()
 
void addGeoDataFile (const QString &filename)
 
void addGeoDataString (const QString &data, const QString &key="data")
 
BookmarkManager * bookmarkManager ()
 
MarbleClock * clock ()
 
const MarbleClock * clock () const
 
QDateTime clockDateTime () const
 
int clockSpeed () const
 
int clockTimezone () const
 
HttpDownloadManager * downloadManager ()
 
const HttpDownloadManager * downloadManager () const
 
ElevationModel * elevationModel ()
 
const ElevationModel * elevationModel () const
 
FileManager * fileManager ()
 
QAbstractItemModel * groundOverlayModel ()
 
const QAbstractItemModel * groundOverlayModel () const
 
void home (qreal &lon, qreal &lat, int &zoom) const
 
QTextDocument * legend ()
 
GeoSceneDocument * mapTheme ()
 
const GeoSceneDocument * mapTheme () const
 
QString mapThemeId () const
 
quint64 persistentTileCacheLimit () const
 
QAbstractItemModel * placemarkModel ()
 
const QAbstractItemModel * placemarkModel () const
 
QItemSelectionModel * placemarkSelectionModel ()
 
const Planet * planet () const
 
QString planetId () const
 
QString planetName () const
 
qreal planetRadius () const
 
const PluginManager * pluginManager () const
 
PluginManager * pluginManager ()
 
PositionTracking * positionTracking () const
 
void removeGeoData (const QString &key)
 
RoutingManager * routingManager ()
 
const RoutingManager * routingManager () const
 
void setClockDateTime (const QDateTime &datetime)
 
void setClockSpeed (int speed)
 
void setClockTimezone (int timeInSec)
 
void setHome (qreal lon, qreal lat, int zoom=1050)
 
void setHome (const GeoDataCoordinates &homePoint, int zoom=1050)
 
void setLegend (QTextDocument *document)
 
void setMapThemeId (const QString &mapThemeId)
 
void setWorkOffline (bool workOffline)
 
SunLocator * sunLocator ()
 
const SunLocator * sunLocator () const
 
const GeoDataPlacemark * trackedPlacemark () const
 
GeoDataTreeModel * treeModel ()
 
const GeoDataTreeModel * treeModel () const
 
quint64 volatileTileCacheLimit () const
 
bool workOffline () const
 

Properties

QString mapThemeId
 
bool workOffline
 

Detailed Description

The data model (not based on QAbstractModel) for a MarbleWidget.

This class provides a data storage and indexer that can be displayed in a MarbleWidget. It contains 3 different datatypes: tiles which provide the background, vectors which provide things like country borders and coastlines and placemarks which can show points of interest, such as cities, mountain tops or the poles.

The tiles provide the background of the image and can be for instance height and depth fields, magnetic strength, topographic data or anything else that is area based.

The vectors provide things like country borders and coastlines. They are stored in separate files and can be added or removed at anytime.

The placemarks contain points of interest, such as cities, mountain tops or the poles. These are sorted by size (for cities) and category (capitals, other important cities, less important cities, etc) and are displayed with different color or shape like square or round.

See also
MarbleWidget

Definition at line 96 of file MarbleModel.h.

Constructor & Destructor Documentation

Marble::MarbleModel::MarbleModel ( QObject *  parent = 0)
explicit

Construct a new MarbleModel.

Parameters
parentthe parent widget

Definition at line 161 of file MarbleModel.cpp.

Marble::MarbleModel::~MarbleModel ( )
virtual

Definition at line 196 of file MarbleModel.cpp.

Member Function Documentation

void Marble::MarbleModel::addGeoDataFile ( const QString &  filename)

Handle file loading into the treeModel.

Parameters
filenamethe file to load

Definition at line 655 of file MarbleModel.cpp.

void Marble::MarbleModel::addGeoDataString ( const QString &  data,
const QString &  key = "data" 
)

Handle raw data loading into the treeModel.

Parameters
datathe raw data to load
keythe name to remove this raw data later

Definition at line 661 of file MarbleModel.cpp.

BookmarkManager * Marble::MarbleModel::bookmarkManager ( )

return instance of BookmarkManager

Definition at line 206 of file MarbleModel.cpp.

void Marble::MarbleModel::clearPersistentTileCache ( )
slot

Definition at line 492 of file MarbleModel.cpp.

MarbleClock * Marble::MarbleModel::clock ( )

Definition at line 467 of file MarbleModel.cpp.

const MarbleClock * Marble::MarbleModel::clock ( ) const

Definition at line 472 of file MarbleModel.cpp.

QDateTime Marble::MarbleModel::clockDateTime ( ) const

Definition at line 620 of file MarbleModel.cpp.

int Marble::MarbleModel::clockSpeed ( ) const

Definition at line 625 of file MarbleModel.cpp.

int Marble::MarbleModel::clockTimezone ( ) const

Definition at line 640 of file MarbleModel.cpp.

void Marble::MarbleModel::creatingTilesStart ( TileCreator *  ,
const QString &  name,
const QString &  description 
)
signal

Signal that the MarbleModel has started to create a new set of tiles.

Parameters
HttpDownloadManager * Marble::MarbleModel::downloadManager ( )

Return the downloadmanager to load missing tiles.

Returns
the HttpDownloadManager instance.

Definition at line 396 of file MarbleModel.cpp.

const HttpDownloadManager * Marble::MarbleModel::downloadManager ( ) const

Definition at line 401 of file MarbleModel.cpp.

ElevationModel * Marble::MarbleModel::elevationModel ( )

Definition at line 699 of file MarbleModel.cpp.

const ElevationModel * Marble::MarbleModel::elevationModel ( ) const

Definition at line 704 of file MarbleModel.cpp.

FileManager * Marble::MarbleModel::fileManager ( )

Definition at line 447 of file MarbleModel.cpp.

QAbstractItemModel * Marble::MarbleModel::groundOverlayModel ( )

Definition at line 427 of file MarbleModel.cpp.

const QAbstractItemModel * Marble::MarbleModel::groundOverlayModel ( ) const

Definition at line 432 of file MarbleModel.cpp.

void Marble::MarbleModel::home ( qreal &  lon,
qreal &  lat,
int &  zoom 
) const

get the home point

Parameters
lonthe longitude of the home point.
latthe latitude of the home point.
zoomthe default zoom level of the home point.

Definition at line 376 of file MarbleModel.cpp.

void Marble::MarbleModel::homeChanged ( const GeoDataCoordinates  newHomePoint)
signal

Emitted when the home location is changed.

See also
home(), setHome()
QTextDocument * Marble::MarbleModel::legend ( )

Definition at line 645 of file MarbleModel.cpp.

GeoSceneDocument * Marble::MarbleModel::mapTheme ( )

Definition at line 221 of file MarbleModel.cpp.

const GeoSceneDocument * Marble::MarbleModel::mapTheme ( ) const

Definition at line 226 of file MarbleModel.cpp.

QString Marble::MarbleModel::mapThemeId ( ) const

Return the name of the current map theme.

Returns
the identifier of the current MapTheme. To ensure that a unique identifier is being used the theme does NOT get represented by its name but the by relative location of the file that specifies the theme:

Example: maptheme = "earth/bluemarble/bluemarble.dgml"

quint64 Marble::MarbleModel::persistentTileCacheLimit ( ) const

Returns the limit in kilobytes of the persistent (on hard disc) tile cache.

Returns
the limit of persistent tile cache in kilobytes.

Definition at line 487 of file MarbleModel.cpp.

QAbstractItemModel * Marble::MarbleModel::placemarkModel ( )

Definition at line 417 of file MarbleModel.cpp.

const QAbstractItemModel * Marble::MarbleModel::placemarkModel ( ) const

Definition at line 422 of file MarbleModel.cpp.

QItemSelectionModel * Marble::MarbleModel::placemarkSelectionModel ( )

Definition at line 437 of file MarbleModel.cpp.

const Planet * Marble::MarbleModel::planet ( ) const

Returns the planet object for the current map.

Returns
the planet object for the current map

Definition at line 574 of file MarbleModel.cpp.

QString Marble::MarbleModel::planetId ( ) const

Definition at line 462 of file MarbleModel.cpp.

QString Marble::MarbleModel::planetName ( ) const

Definition at line 457 of file MarbleModel.cpp.

qreal Marble::MarbleModel::planetRadius ( ) const

Definition at line 452 of file MarbleModel.cpp.

const PluginManager * Marble::MarbleModel::pluginManager ( ) const

Definition at line 564 of file MarbleModel.cpp.

PluginManager * Marble::MarbleModel::pluginManager ( )

Definition at line 569 of file MarbleModel.cpp.

PositionTracking * Marble::MarbleModel::positionTracking ( ) const

Definition at line 442 of file MarbleModel.cpp.

void Marble::MarbleModel::removeGeoData ( const QString &  key)

Remove the file or raw data from the treeModel.

Parameters
keyeither the file name or the key for raw data

Definition at line 666 of file MarbleModel.cpp.

RoutingManager * Marble::MarbleModel::routingManager ( )

Definition at line 605 of file MarbleModel.cpp.

const RoutingManager * Marble::MarbleModel::routingManager ( ) const

Definition at line 610 of file MarbleModel.cpp.

void Marble::MarbleModel::setClockDateTime ( const QDateTime &  datetime)

Definition at line 615 of file MarbleModel.cpp.

void Marble::MarbleModel::setClockSpeed ( int  speed)

Definition at line 630 of file MarbleModel.cpp.

void Marble::MarbleModel::setClockTimezone ( int  timeInSec)

Definition at line 635 of file MarbleModel.cpp.

void Marble::MarbleModel::setHome ( qreal  lon,
qreal  lat,
int  zoom = 1050 
)

Set the home point.

Parameters
lonthe longitude of the new home point.
latthe latitude of the new home point.
zoomthe default zoom level for the new home point.

Definition at line 382 of file MarbleModel.cpp.

void Marble::MarbleModel::setHome ( const GeoDataCoordinates &  homePoint,
int  zoom = 1050 
)

Set the home point.

Parameters
homePointthe new home point.
zoomthe default zoom level for the new home point.

Definition at line 389 of file MarbleModel.cpp.

void Marble::MarbleModel::setLegend ( QTextDocument *  document)

Definition at line 650 of file MarbleModel.cpp.

void Marble::MarbleModel::setMapThemeId ( const QString &  mapThemeId)

Set a new map theme to use.

Parameters
mapThemeIdthe identifier of the new map theme

This function sets the map theme, i.e. combination of tile set and color scheme to use. If the map theme is not previously used, some basic tiles are created and a progress dialog is shown.

The ID of the new maptheme. To ensure that a unique identifier is being used the theme does NOT get represented by its name but the by relative location of the file that specifies the theme:

Example: maptheme = "earth/bluemarble/bluemarble.dgml"

Definition at line 240 of file MarbleModel.cpp.

void Marble::MarbleModel::setPersistentTileCacheLimit ( quint64  kiloBytes)
slot

Set the limit of the persistent (on hard disc) tile cache.

Parameters
bytesThe limit in kilobytes, 0 means no limit.

Definition at line 537 of file MarbleModel.cpp.

void Marble::MarbleModel::setTrackedPlacemark ( const GeoDataPlacemark *  placemark)
slot

Change the placemark tracked by this model.

See also
trackedPlacemark(), trackedPlacemarkChanged()

Definition at line 553 of file MarbleModel.cpp.

void Marble::MarbleModel::setWorkOffline ( bool  workOffline)

Definition at line 689 of file MarbleModel.cpp.

SunLocator * Marble::MarbleModel::sunLocator ( )

Definition at line 477 of file MarbleModel.cpp.

const SunLocator * Marble::MarbleModel::sunLocator ( ) const

Definition at line 482 of file MarbleModel.cpp.

void Marble::MarbleModel::themeChanged ( QString  mapTheme)
signal

Signal that the map theme has changed, and to which theme.

Parameters
mapThemethe identifier of the new map theme.
See also
mapTheme
setMapTheme
const GeoDataPlacemark * Marble::MarbleModel::trackedPlacemark ( ) const

Returns the placemark being tracked by this model or 0 if no placemark is currently tracked.

See also
setTrackedPlacemark(), trackedPlacemarkChanged()

Definition at line 559 of file MarbleModel.cpp.

void Marble::MarbleModel::trackedPlacemarkChanged ( const GeoDataPlacemark *  placemark)
signal

Emitted when the placemark tracked by this model has changed.

See also
setTrackedPlacemark(), trackedPlacemark()
GeoDataTreeModel * Marble::MarbleModel::treeModel ( )

Return the list of Placemarks as a QAbstractItemModel *.

Returns
a list of all Placemarks in the MarbleModel.

Definition at line 407 of file MarbleModel.cpp.

const GeoDataTreeModel * Marble::MarbleModel::treeModel ( ) const

Definition at line 412 of file MarbleModel.cpp.

void Marble::MarbleModel::updateProperty ( const QString &  property,
bool  value 
)
slot

Definition at line 671 of file MarbleModel.cpp.

quint64 Marble::MarbleModel::volatileTileCacheLimit ( ) const

Returns the limit of the volatile (in RAM) tile cache.

Returns
the cache limit in kilobytes
bool Marble::MarbleModel::workOffline ( ) const
void Marble::MarbleModel::workOfflineChanged ( )
signal

Property Documentation

QString Marble::MarbleModel::mapThemeId
readwrite

Definition at line 102 of file MarbleModel.h.

bool Marble::MarbleModel::workOffline
readwrite

Definition at line 103 of file MarbleModel.h.


The documentation for this class was generated from the following files:
  • MarbleModel.h
  • MarbleModel.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:56 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