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) |
| homeChanged (Marble.GeoDataCoordinates newHomePoint) |
| themeChanged (QString mapTheme) |
| trackedPlacemarkChanged (Marble.GeoDataPlacemark placemark) |
| workOfflineChanged () |
Methods |
| __init__ (self, QObject parent=0) |
| addGeoDataFile (self, QString filename) |
| addGeoDataString (self, QString data, QString key="data") |
| addPlacemarkData (self, QString data, QString key="data") |
| addPlacemarkFile (self, QString filename) |
Marble.BookmarkManager | bookmarkManager (self) |
| clearPersistentTileCache (self) |
QDateTime | clockDateTime (self) |
int | clockSpeed (self) |
int | clockTimezone (self) |
Marble.ElevationModel | elevationModel (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 | planetId (self) |
QString | planetName (self) |
float | planetRadius (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) |
| setMapThemeId (self, QString mapThemeId) |
| setPersistentTileCacheLimit (self, long kiloBytes) |
| setTrackedPlacemark (self, Marble.GeoDataPlacemark placemark) |
| setWorkOffline (self, bool workOffline) |
Marble.SunLocator | sunLocator (self) |
Marble.GeoDataPlacemark | trackedPlacemark (self) |
bool | workOffline (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)
Emitted when the home location is changed
- See also:
- home(), setHome()
- Signal syntax:
QObject.connect(source, SIGNAL("homeChanged(const Marble::GeoDataCoordinates)"), target_slot)
themeChanged |
( |
QString |
mapTheme |
|
) |
|
|
|
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)
Emitted when the placemark tracked by this model has changed
- See also:
- setTrackedPlacemark(), trackedPlacemark()
- Signal syntax:
QObject.connect(source, SIGNAL("trackedPlacemarkChanged(const Marble::GeoDataPlacemark*)"), target_slot)
- Signal syntax:
QObject.connect(source, SIGNAL("workOfflineChanged()"), target_slot)
Method Documentation
__init__ |
( |
self, |
|
|
|
QObject |
parent=0 |
|
) |
|
|
|
Construct a new MarbleModel.
- Parameters:
-
addGeoDataFile |
( |
self, |
|
|
|
QString |
filename |
|
) |
|
|
|
addGeoDataString |
( |
self, |
|
|
|
QString |
data, |
|
|
QString |
key="data" |
|
) |
|
|
|
addPlacemarkData |
( |
self, |
|
|
|
QString |
data, |
|
|
QString |
key="data" |
|
) |
|
|
|
- Deprecated:
- Please use addGeoDataString instead
addPlacemarkFile |
( |
self, |
|
|
|
QString |
filename |
|
) |
|
|
|
- Deprecated:
- Please use addGeoDataFile instead
return instance of BookmarkManager
clearPersistentTileCache |
( |
|
self ) |
|
QDateTime clockDateTime |
( |
|
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.
|
QTextDocument legend |
( |
|
self ) |
|
QString mapThemeId |
( |
|
self ) |
|
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.
QAbstractItemModel placemarkModel |
( |
|
self ) |
|
QItemSelectionModel placemarkSelectionModel |
( |
|
self ) |
|
Returns the planet object for the current map.
- Returns:
- the planet object for the current map
QString planetId |
( |
|
self ) |
|
QString planetName |
( |
|
self ) |
|
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.
|
setLegend |
( |
self, |
|
|
|
QTextDocument |
document |
|
) |
|
|
|
setMapThemeId |
( |
self, |
|
|
|
QString |
mapThemeId |
|
) |
|
|
|
Set a new map theme to use.
- Parameters:
-
| mapThemeId | the 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"
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.
|
Change the placemark tracked by this model
- See also:
- trackedPlacemark(), trackedPlacemarkChanged()
setWorkOffline |
( |
self, |
|
|
|
bool |
workOffline |
|
) |
|
|
|
Returns the placemark being tracked by this model or 0 if no
placemark is currently tracked.
- See also:
- setTrackedPlacemark(), trackedPlacemarkChanged()
bool workOffline |
( |
|
self ) |
|