MarbleModel Class Reference
from PyKDE4.marble import *
Inherits: QObject
Namespace: Marble
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
Signals |
| creatingTilesStart (Marble.TileCreator a0, QString name, QString description) |
| modelChanged () |
| themeChanged (QString mapTheme) |
Methods |
| __init__ (self, QObject parent) |
| addGeoDataFile (self, QString filename) |
| addGeoDataString (self, QString data, QString key="data") |
| addPlacemarkData (self, QString data, QString key="data") |
| addPlacemarkFile (self, QString filename) |
| clearPersistentTileCache (self) |
QDateTime | clockDateTime (self) |
int | clockSpeed (self) |
int | clockTimezone (self) |
Marble.MarbleDataFacade | dataFacade (self) |
| home (self, float lon, float lat, int zoom) |
QTextDocument | legend (self) |
QString | mapThemeId (self) |
Marble.MapThemeManager | mapThemeManager (self) |
| openGpxFile (self, QString filename) |
long | persistentTileCacheLimit (self) |
QAbstractItemModel | placemarkModel (self) |
QItemSelectionModel | placemarkSelectionModel (self) |
Marble.Planet | planet (self) |
QString | planetName (self) |
float | planetRadius (self) |
QAbstractItemModel | popSortModel (self) |
Marble.PositionTracking | positionTracking (self) |
| removeGeoData (self, QString key) |
| removePlacemarkKey (self, QString key) |
| setClockDateTime (self, QDateTime datetime) |
| setClockSpeed (self, int speed) |
| setClockTimezone (self, int timeInSec) |
| setHome (self, float lon, float lat, int zoom=1050) |
| setHome (self, Marble.GeoDataCoordinates homePoint, int zoom=1050) |
| setLegend (self, QTextDocument document) |
| setMapTheme (self, GeoSceneDocument mapTheme) |
| setPersistentTileCacheLimit (self, long kiloBytes) |
Marble.SunLocator | sunLocator (self) |
QAbstractItemModel | treeModel (self) |
long | volatileTileCacheLimit (self) |
Signal Documentation
Signal that the MarbleModel has started to create a new set of tiles.
@param
- See also:
- zoomView()
- Signal syntax:
QObject.connect(source, SIGNAL("creatingTilesStart(Marble::TileCreator*, const QString&, const QString&)"), target_slot)
Signal that the MarbleModel has changed in general
- Signal syntax:
QObject.connect(source, SIGNAL("modelChanged()"), target_slot)
Signal that the map theme has changed, and to which theme.
- Parameters:
-
| mapTheme | the identifier of the new map theme.
|
- See also:
- mapTheme
- See also:
- setMapTheme
- Signal syntax:
QObject.connect(source, SIGNAL("themeChanged(QString)"), target_slot)
Method Documentation
Construct a new MarbleModel.
- Parameters:
-
addGeoDataFile |
( |
self, |
|
|
|
QString |
filename |
|
) |
|
|
|
- Deprecated:
- Please use addGeoDataString instead
addPlacemarkFile |
( |
self, |
|
|
|
QString |
filename |
|
) |
|
|
|
- Deprecated:
- Please use addGeoDataFile instead
clearPersistentTileCache |
( |
|
self ) |
|
int clockTimezone |
( |
|
self ) |
|
home |
( |
self, |
|
|
|
float |
lon, |
|
|
float |
lat, |
|
|
int |
zoom |
|
) |
|
|
|
get the home point
- Parameters:
-
| | lon the longitude of the home point.
|
| | lat the latitude of the home point.
|
| | zoom the default zoom level of the home point.
|
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"
openGpxFile |
( |
self, |
|
|
|
QString |
filename |
|
) |
|
|
|
- Deprecated:
- Please use addGeoDataFile instead
long persistentTileCacheLimit |
( |
|
self ) |
|
Returns the limit in kilobytes of the persistent (on hard disc) tile cache.
- Returns:
- the limit of persistent tile cache in kilobytes.
Returns the planet object for the current map.
- Returns:
- the planet object for the current map
float planetRadius |
( |
|
self ) |
|
removeGeoData |
( |
self, |
|
|
|
QString |
key |
|
) |
|
|
|
removePlacemarkKey |
( |
self, |
|
|
|
QString |
key |
|
) |
|
|
|
- Deprecated:
- Please use removeGeoData instead
setClockDateTime |
( |
self, |
|
|
|
QDateTime |
datetime |
|
) |
|
|
|
setClockSpeed |
( |
self, |
|
|
|
int |
speed |
|
) |
|
|
|
setClockTimezone |
( |
self, |
|
|
|
int |
timeInSec |
|
) |
|
|
|
setHome |
( |
self, |
|
|
|
float |
lon, |
|
|
float |
lat, |
|
|
int |
zoom=1050 |
|
) |
|
|
|
Set the home point
- Parameters:
-
| | homePoint the new home point.
|
| | zoom the default zoom level for the new home point.
|
Set the home point
- Parameters:
-
| | homePoint the new home point.
|
| | zoom the default zoom level for the new home point.
|
setMapTheme |
( |
self, |
|
|
|
GeoSceneDocument |
mapTheme |
|
) |
|
|
|
Set a new map theme to use.
- Parameters:
-
| selectedMap | the identifier of the selected map theme
|
| currentProjection | the current projection
|
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.
NOTE: The currentProjection parameters will
disappear soon.
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"
setPersistentTileCacheLimit |
( |
self, |
|
|
|
long |
kiloBytes |
|
) |
|
|
|
Set the limit of the persistent (on hard disc) tile cache.
- Parameters:
-
| | bytes The limit in kilobytes, 0 means no limit.
|
Return the list of Placemarks as a QAbstractItemModel *
- Returns:
- a list of all Placemarks in the MarbleModel.
long volatileTileCacheLimit |
( |
|
self ) |
|
Returns the limit of the volatile (in RAM) tile cache.
- Returns:
- the cache limit in kilobytes