Marble::MarbleModel
#include <MarbleModel.h>
Properties | |
QString | mapThemeId |
bool | workOffline |
Properties inherited from QObject | |
objectName | |
Signals | |
void | creatingTilesStart (TileCreator *, const QString &name, const QString &description) |
void | homeChanged (const GeoDataCoordinates &newHomePoint) |
void | themeChanged (const QString &mapTheme) |
void | trackedPlacemarkChanged (const GeoDataPlacemark *placemark) |
void | workOfflineChanged () |
Public Slots | |
void | clearPersistentTileCache () |
void | setPersistentTileCacheLimit (quint64 kiloBytes) |
void | setTrackedPlacemark (const GeoDataPlacemark *placemark) |
void | updateProperty (const QString &property, bool value) |
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 86 of file MarbleModel.h.
Property Documentation
◆ mapThemeId
|
readwrite |
Definition at line 92 of file MarbleModel.h.
◆ workOffline
|
readwrite |
Definition at line 93 of file MarbleModel.h.
Constructor & Destructor Documentation
◆ MarbleModel()
Construct a new MarbleModel.
- Parameters
-
parent the parent widget
Definition at line 173 of file MarbleModel.cpp.
◆ ~MarbleModel()
|
override |
Definition at line 195 of file MarbleModel.cpp.
Member Function Documentation
◆ addGeoDataFile()
Handle file loading into the treeModel.
- Parameters
-
filename the file to load
Definition at line 718 of file MarbleModel.cpp.
◆ addGeoDataString()
void Marble::MarbleModel::addGeoDataString | ( | const QString & | data, |
const QString & | key = QLatin1String("data") ) |
Handle raw data loading into the treeModel.
- Parameters
-
data the raw data to load key the name to remove this raw data later
Definition at line 723 of file MarbleModel.cpp.
◆ bookmarkManager()
BookmarkManager * Marble::MarbleModel::bookmarkManager | ( | ) |
return instance of BookmarkManager
Definition at line 202 of file MarbleModel.cpp.
◆ clearPersistentTileCache
|
slot |
Definition at line 554 of file MarbleModel.cpp.
◆ clock() [1/2]
MarbleClock * Marble::MarbleModel::clock | ( | ) |
Definition at line 529 of file MarbleModel.cpp.
◆ clock() [2/2]
const MarbleClock * Marble::MarbleModel::clock | ( | ) | const |
Definition at line 534 of file MarbleModel.cpp.
◆ clockDateTime()
QDateTime Marble::MarbleModel::clockDateTime | ( | ) | const |
Definition at line 682 of file MarbleModel.cpp.
◆ clockSpeed()
int Marble::MarbleModel::clockSpeed | ( | ) | const |
Definition at line 687 of file MarbleModel.cpp.
◆ clockTimezone()
int Marble::MarbleModel::clockTimezone | ( | ) | const |
Definition at line 702 of file MarbleModel.cpp.
◆ creatingTilesStart
|
signal |
Signal that the MarbleModel has started to create a new set of tiles.
- Parameters
-
name name of the set description the set description
◆ downloadManager() [1/2]
HttpDownloadManager * Marble::MarbleModel::downloadManager | ( | ) |
Return the downloadmanager to load missing tiles.
- Returns
- the HttpDownloadManager instance.
Definition at line 458 of file MarbleModel.cpp.
◆ downloadManager() [2/2]
const HttpDownloadManager * Marble::MarbleModel::downloadManager | ( | ) | const |
Definition at line 463 of file MarbleModel.cpp.
◆ elevationModel() [1/2]
ElevationModel * Marble::MarbleModel::elevationModel | ( | ) |
Definition at line 866 of file MarbleModel.cpp.
◆ elevationModel() [2/2]
const ElevationModel * Marble::MarbleModel::elevationModel | ( | ) | const |
Definition at line 871 of file MarbleModel.cpp.
◆ fileManager()
FileManager * Marble::MarbleModel::fileManager | ( | ) |
Definition at line 509 of file MarbleModel.cpp.
◆ groundOverlayModel() [1/2]
QAbstractItemModel * Marble::MarbleModel::groundOverlayModel | ( | ) |
Definition at line 489 of file MarbleModel.cpp.
◆ groundOverlayModel() [2/2]
const QAbstractItemModel * Marble::MarbleModel::groundOverlayModel | ( | ) | const |
Definition at line 494 of file MarbleModel.cpp.
◆ home()
void Marble::MarbleModel::home | ( | qreal & | lon, |
qreal & | lat, | ||
int & | zoom ) const |
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.
Definition at line 438 of file MarbleModel.cpp.
◆ homeChanged
|
signal |
◆ legend()
QTextDocument * Marble::MarbleModel::legend | ( | ) |
Definition at line 707 of file MarbleModel.cpp.
◆ mapTheme() [1/2]
GeoSceneDocument * Marble::MarbleModel::mapTheme | ( | ) |
Definition at line 217 of file MarbleModel.cpp.
◆ mapTheme() [2/2]
const GeoSceneDocument * Marble::MarbleModel::mapTheme | ( | ) | const |
Definition at line 222 of file MarbleModel.cpp.
◆ mapThemeId()
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"
Definition at line 207 of file MarbleModel.cpp.
◆ persistentTileCacheLimit()
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 549 of file MarbleModel.cpp.
◆ placemarkModel() [1/2]
QAbstractItemModel * Marble::MarbleModel::placemarkModel | ( | ) |
Definition at line 479 of file MarbleModel.cpp.
◆ placemarkModel() [2/2]
const QAbstractItemModel * Marble::MarbleModel::placemarkModel | ( | ) | const |
Definition at line 484 of file MarbleModel.cpp.
◆ placemarkSelectionModel()
QItemSelectionModel * Marble::MarbleModel::placemarkSelectionModel | ( | ) |
Definition at line 499 of file MarbleModel.cpp.
◆ planet()
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 636 of file MarbleModel.cpp.
◆ planetId()
QString Marble::MarbleModel::planetId | ( | ) | const |
Definition at line 524 of file MarbleModel.cpp.
◆ planetName()
QString Marble::MarbleModel::planetName | ( | ) | const |
Definition at line 519 of file MarbleModel.cpp.
◆ planetRadius()
qreal Marble::MarbleModel::planetRadius | ( | ) | const |
Definition at line 514 of file MarbleModel.cpp.
◆ pluginManager() [1/2]
PluginManager * Marble::MarbleModel::pluginManager | ( | ) |
Definition at line 631 of file MarbleModel.cpp.
◆ pluginManager() [2/2]
const PluginManager * Marble::MarbleModel::pluginManager | ( | ) | const |
Definition at line 626 of file MarbleModel.cpp.
◆ positionTracking()
PositionTracking * Marble::MarbleModel::positionTracking | ( | ) | const |
Definition at line 504 of file MarbleModel.cpp.
◆ removeGeoData()
Remove the file or raw data from the treeModel.
- Parameters
-
key either the file name or the key for raw data
Definition at line 728 of file MarbleModel.cpp.
◆ routingManager() [1/2]
RoutingManager * Marble::MarbleModel::routingManager | ( | ) |
Definition at line 667 of file MarbleModel.cpp.
◆ routingManager() [2/2]
const RoutingManager * Marble::MarbleModel::routingManager | ( | ) | const |
Definition at line 672 of file MarbleModel.cpp.
◆ setClockDateTime()
Definition at line 677 of file MarbleModel.cpp.
◆ setClockSpeed()
void Marble::MarbleModel::setClockSpeed | ( | int | speed | ) |
Definition at line 692 of file MarbleModel.cpp.
◆ setClockTimezone()
void Marble::MarbleModel::setClockTimezone | ( | int | timeInSec | ) |
Definition at line 697 of file MarbleModel.cpp.
◆ setHome() [1/2]
void Marble::MarbleModel::setHome | ( | const GeoDataCoordinates & | homePoint, |
int | zoom = 1050 ) |
Set the home point.
- Parameters
-
homePoint the new home point. zoom the default zoom level for the new home point.
Definition at line 451 of file MarbleModel.cpp.
◆ setHome() [2/2]
void Marble::MarbleModel::setHome | ( | qreal | lon, |
qreal | lat, | ||
int | zoom = 1050 ) |
Set the home point.
- Parameters
-
lon the longitude of the new home point. lat the latitude of the new home point. zoom the default zoom level for the new home point.
Definition at line 444 of file MarbleModel.cpp.
◆ setLegend()
void Marble::MarbleModel::setLegend | ( | QTextDocument * | document | ) |
Uses the given text document as the new content of the legend Any previous legend content is overwritten.
MarbleModel takes ownership of the passed document.
Definition at line 712 of file MarbleModel.cpp.
◆ setMapTheme()
void Marble::MarbleModel::setMapTheme | ( | GeoSceneDocument * | document | ) |
Definition at line 245 of file MarbleModel.cpp.
◆ setMapThemeId()
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"
Definition at line 236 of file MarbleModel.cpp.
◆ setPersistentTileCacheLimit
|
slot |
Set the limit of the persistent (on hard disc) tile cache.
- Parameters
-
kiloBytes The limit in kilobytes, 0 means no limit.
Definition at line 599 of file MarbleModel.cpp.
◆ setTrackedPlacemark
|
slot |
Change the placemark tracked by this model.
Definition at line 615 of file MarbleModel.cpp.
◆ setWorkOffline()
void Marble::MarbleModel::setWorkOffline | ( | bool | workOffline | ) |
Definition at line 856 of file MarbleModel.cpp.
◆ sunLocator() [1/2]
SunLocator * Marble::MarbleModel::sunLocator | ( | ) |
Definition at line 539 of file MarbleModel.cpp.
◆ sunLocator() [2/2]
const SunLocator * Marble::MarbleModel::sunLocator | ( | ) | const |
Definition at line 544 of file MarbleModel.cpp.
◆ themeChanged
Signal that the map theme has changed, and to which theme.
- Parameters
-
mapTheme the identifier of the new map theme.
- See also
- mapTheme
- setMapTheme
◆ trackedPlacemark()
const GeoDataPlacemark * Marble::MarbleModel::trackedPlacemark | ( | ) | const |
Returns the placemark being tracked by this model or 0 if no placemark is currently tracked.
Definition at line 621 of file MarbleModel.cpp.
◆ trackedPlacemarkChanged
|
signal |
Emitted when the placemark tracked by this model has changed.
- See also
- setTrackedPlacemark(), trackedPlacemark()
◆ treeModel() [1/2]
GeoDataTreeModel * Marble::MarbleModel::treeModel | ( | ) |
Return the list of Placemarks as a QAbstractItemModel *.
- Returns
- a list of all Placemarks in the MarbleModel.
Definition at line 469 of file MarbleModel.cpp.
◆ treeModel() [2/2]
const GeoDataTreeModel * Marble::MarbleModel::treeModel | ( | ) | const |
Definition at line 474 of file MarbleModel.cpp.
◆ updateProperty
Definition at line 733 of file MarbleModel.cpp.
◆ volatileTileCacheLimit()
quint64 Marble::MarbleModel::volatileTileCacheLimit | ( | ) | const |
Returns the limit of the volatile (in RAM) tile cache.
- Returns
- the cache limit in kilobytes
◆ workOffline()
bool Marble::MarbleModel::workOffline | ( | ) | const |
Definition at line 851 of file MarbleModel.cpp.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2024 The KDE developers.
Generated on Tue Mar 26 2024 11:18:18 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.