Marble::MarbleModel

Search for usage in LXR

Marble::MarbleModel Class Reference

#include <MarbleModel.h>

Inheritance diagram for Marble::MarbleModel:

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)
 

Public Member Functions

 MarbleModel (QObject *parent=nullptr)
 
void addGeoDataFile (const QString &filename)
 
void addGeoDataString (const QString &data, const QString &key=QLatin1String("data"))
 
BookmarkManagerbookmarkManager ()
 
MarbleClock * clock ()
 
const MarbleClock * clock () const
 
QDateTime clockDateTime () const
 
int clockSpeed () const
 
int clockTimezone () const
 
HttpDownloadManagerdownloadManager ()
 
const HttpDownloadManagerdownloadManager () const
 
ElevationModel * elevationModel ()
 
const ElevationModel * elevationModel () const
 
FileManagerfileManager ()
 
QAbstractItemModelgroundOverlayModel ()
 
const QAbstractItemModelgroundOverlayModel () const
 
void home (qreal &lon, qreal &lat, int &zoom) const
 
QTextDocumentlegend ()
 
GeoSceneDocumentmapTheme ()
 
const GeoSceneDocumentmapTheme () const
 
QString mapThemeId () const
 
quint64 persistentTileCacheLimit () const
 
QAbstractItemModelplacemarkModel ()
 
const QAbstractItemModelplacemarkModel () const
 
QItemSelectionModelplacemarkSelectionModel ()
 
const Planet * planet () const
 
QString planetId () const
 
QString planetName () const
 
qreal planetRadius () const
 
const PluginManagerpluginManager () const
 
PluginManagerpluginManager ()
 
PositionTracking * positionTracking () const
 
void removeGeoData (const QString &key)
 
RoutingManagerroutingManager ()
 
const RoutingManagerroutingManager () 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 setMapTheme (GeoSceneDocument *document)
 
void setMapThemeId (const QString &mapThemeId)
 
void setWorkOffline (bool workOffline)
 
SunLocator * sunLocator ()
 
const SunLocator * sunLocator () const
 
const GeoDataPlacemarktrackedPlacemark () const
 
GeoDataTreeModeltreeModel ()
 
const GeoDataTreeModeltreeModel () const
 
quint64 volatileTileCacheLimit () const
 
bool workOffline () const
 
- Public Member Functions inherited from QObject
 QObject (QObject *parent)
 
bool blockSignals (bool block)
 
const QObjectListchildren () const const
 
QMetaObject::Connection connect (const QObject *sender, const char *signal, const char *method, Qt::ConnectionType type) const const
 
void deleteLater ()
 
void destroyed (QObject *obj)
 
bool disconnect (const char *signal, const QObject *receiver, const char *method) const const
 
bool disconnect (const QObject *receiver, const char *method) const const
 
void dumpObjectInfo ()
 
void dumpObjectInfo () const const
 
void dumpObjectTree ()
 
void dumpObjectTree () const const
 
QList< QByteArraydynamicPropertyNames () const const
 
virtual bool event (QEvent *e)
 
virtual bool eventFilter (QObject *watched, QEvent *event)
 
findChild (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QString &name, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegExp &regExp, Qt::FindChildOptions options) const const
 
QList< T > findChildren (const QRegularExpression &re, Qt::FindChildOptions options) const const
 
bool inherits (const char *className) const const
 
void installEventFilter (QObject *filterObj)
 
bool isWidgetType () const const
 
bool isWindowType () const const
 
void killTimer (int id)
 
virtual const QMetaObjectmetaObject () const const
 
void moveToThread (QThread *targetThread)
 
QString objectName () const const
 
void objectNameChanged (const QString &objectName)
 
QObjectparent () const const
 
QVariant property (const char *name) const const
 
 Q_CLASSINFO (Name, Value)
 
 Q_DISABLE_COPY (Class)
 
 Q_DISABLE_COPY_MOVE (Class)
 
 Q_DISABLE_MOVE (Class)
 
 Q_EMIT Q_EMIT
 
 Q_ENUM (...)
 
 Q_ENUM_NS (...)
 
 Q_ENUMS (...)
 
 Q_FLAG (...)
 
 Q_FLAG_NS (...)
 
 Q_FLAGS (...)
 
 Q_GADGET Q_GADGET
 
 Q_INTERFACES (...)
 
 Q_INVOKABLE Q_INVOKABLE
 
 Q_NAMESPACE Q_NAMESPACE
 
 Q_NAMESPACE_EXPORT (EXPORT_MACRO)
 
 Q_OBJECT Q_OBJECT
 
 Q_PROPERTY (...)
 
 Q_REVISION Q_REVISION
 
 Q_SET_OBJECT_NAME (Object)
 
 Q_SIGNAL Q_SIGNAL
 
 Q_SIGNALS Q_SIGNALS
 
 Q_SLOT Q_SLOT
 
 Q_SLOTS Q_SLOTS
 
qFindChild (const QObject *obj, const QString &name)
 
QList< T > qFindChildren (const QObject *obj, const QRegExp &regExp)
 
QList< T > qFindChildren (const QObject *obj, const QString &name)
 
qobject_cast (QObject *object)
 
qobject_cast (const QObject *object)
 
 QT_NO_NARROWING_CONVERSIONS_IN_CONNECT QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
 
void removeEventFilter (QObject *obj)
 
void setObjectName (const QString &name)
 
void setParent (QObject *parent)
 
bool setProperty (const char *name, const QVariant &value)
 
bool signalsBlocked () const const
 
int startTimer (int interval, Qt::TimerType timerType)
 
int startTimer (std::chrono::milliseconds time, Qt::TimerType timerType)
 
QThreadthread () const const
 

Additional Inherited Members

- Static Public Member Functions inherited from QObject
QMetaObject::Connection connect (const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method, Qt::ConnectionType type)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, Functor functor)
 
QMetaObject::Connection connect (const QObject *sender, PointerToMemberFunction signal, const QObject *context, Functor functor, Qt::ConnectionType type)
 
bool disconnect (const QMetaObject::Connection &connection)
 
bool disconnect (const QObject *sender, const char *signal, const QObject *receiver, const char *method)
 
bool disconnect (const QObject *sender, PointerToMemberFunction signal, const QObject *receiver, PointerToMemberFunction method)
 
bool disconnect (const QObject *sender, const QMetaMethod &signal, const QObject *receiver, const QMetaMethod &method)
 
QString tr (const char *sourceText, const char *disambiguation, int n)
 
QString trUtf8 (const char *sourceText, const char *disambiguation, int n)
 
- Public Attributes inherited from QObject
typedef QObjectList
 
- Protected Member Functions inherited from QObject
virtual void childEvent (QChildEvent *event)
 
virtual void connectNotify (const QMetaMethod &signal)
 
virtual void customEvent (QEvent *event)
 
virtual void disconnectNotify (const QMetaMethod &signal)
 
bool isSignalConnected (const QMetaMethod &signal) const const
 
int receivers (const char *signal) const const
 
QObjectsender () const const
 
int senderSignalIndex () const const
 
virtual void timerEvent (QTimerEvent *event)
 

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 91 of file MarbleModel.h.

Constructor & Destructor Documentation

Marble::MarbleModel::MarbleModel ( QObject parent = nullptr)
explicit

Construct a new MarbleModel.

Parameters
parentthe parent widget

Definition at line 178 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 723 of file MarbleModel.cpp.

void Marble::MarbleModel::addGeoDataString ( const QString data,
const QString key = QLatin1String("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 728 of file MarbleModel.cpp.

BookmarkManager * Marble::MarbleModel::bookmarkManager ( )

return instance of BookmarkManager

Definition at line 207 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
namename of the set
descriptionthe set description
HttpDownloadManager * Marble::MarbleModel::downloadManager ( )

Return the downloadmanager to load missing tiles.

Returns
the HttpDownloadManager instance.

Definition at line 463 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 443 of file MarbleModel.cpp.

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

Emitted when the home location is changed.

See also
home(), setHome()
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 554 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 641 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 733 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 449 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 456 of file MarbleModel.cpp.

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 717 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 241 of file MarbleModel.cpp.

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

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

Parameters
kiloBytesThe limit in kilobytes, 0 means no limit.

Definition at line 604 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 620 of file MarbleModel.cpp.

void Marble::MarbleModel::themeChanged ( const 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 626 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 474 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

The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2021 The KDE developers.
Generated on Sat May 15 2021 23:20:28 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.