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

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
MarbleModel.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2005-2007 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 // Copyright 2010-2013 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
11 //
12 
13 //
14 // MarbleModel is the data store and index class for the MarbleWidget.
15 //
16 
17 #ifndef MARBLE_MARBLEMODEL_H
18 #define MARBLE_MARBLEMODEL_H
19 
20 
30 #include "marble_export.h"
31 
32 #include <QDateTime>
33 #include <QList>
34 #include <QObject>
35 #include <QString>
36 #include <QVector>
37 
38 #include "MarbleGlobal.h"
39 
40 class QItemSelectionModel;
41 class QAbstractItemModel;
42 class QTextDocument;
43 
44 namespace Marble
45 {
46 
47 class AbstractDataPlugin;
48 class AbstractDataPluginItem;
49 class GeoDataPlacemark;
50 class GeoPainter;
51 class MeasureTool;
52 class PositionTracking;
53 class HttpDownloadManager;
54 class MarbleModelPrivate;
55 class MarbleClock;
56 class SunLocator;
57 class TileCreator;
58 class PluginManager;
59 class GeoDataCoordinates;
60 class GeoDataDocument;
61 class GeoDataStyle;
62 class GeoDataTreeModel;
63 class GeoSceneDocument;
64 class Planet;
65 class RoutingManager;
66 class BookmarkManager;
67 class FileManager;
68 class ElevationModel;
69 
97 class MARBLE_EXPORT MarbleModel : public QObject
98 {
99  friend class MarbleModelPrivate;
100 
101  Q_OBJECT
102 
103  Q_PROPERTY( QString mapThemeId READ mapThemeId WRITE setMapThemeId NOTIFY themeChanged )
104  Q_PROPERTY( bool workOffline READ workOffline WRITE setWorkOffline NOTIFY workOfflineChanged )
105 
106  public:
111  explicit MarbleModel( QObject *parent = 0 );
112  virtual ~MarbleModel();
113 
118  GeoDataTreeModel *treeModel();
119  const GeoDataTreeModel *treeModel() const;
120 
121  QAbstractItemModel *groundOverlayModel();
122  const QAbstractItemModel *groundOverlayModel() const;
123 
124  QAbstractItemModel *placemarkModel();
125  const QAbstractItemModel *placemarkModel() const;
126 
127  QItemSelectionModel *placemarkSelectionModel();
128 
139  QString mapThemeId() const;
140 
141  GeoSceneDocument *mapTheme();
142  const GeoSceneDocument *mapTheme() const;
143 
160  void setMapThemeId( const QString &mapThemeId );
161 
168  void home( qreal &lon, qreal &lat, int& zoom ) const;
175  void setHome( qreal lon, qreal lat, int zoom = 1050 );
181  void setHome( const GeoDataCoordinates& homePoint, int zoom = 1050 );
182 
187  HttpDownloadManager *downloadManager();
188  const HttpDownloadManager *downloadManager() const;
189 
190 
195  void addGeoDataFile( const QString& filename );
196 
202  void addGeoDataString( const QString& data, const QString& key = "data" );
203 
208  void removeGeoData( const QString& key );
209 
210  FileManager *fileManager();
211 
212  PositionTracking *positionTracking() const;
213 
214  qreal planetRadius() const;
215  QString planetName() const;
216  QString planetId() const;
217 
218  MarbleClock *clock();
219  const MarbleClock *clock() const;
220 
221  SunLocator *sunLocator();
222  const SunLocator *sunLocator() const;
223 
228  quint64 persistentTileCacheLimit() const;
229 
234  quint64 volatileTileCacheLimit() const;
235 
236  const PluginManager* pluginManager() const;
237 
238  PluginManager* pluginManager();
239 
244  const Planet *planet() const;
245 
246  RoutingManager* routingManager();
247  const RoutingManager* routingManager() const;
248 
249  void setClockDateTime( const QDateTime& datetime );
250 
251  QDateTime clockDateTime() const;
252 
253  int clockSpeed() const;
254 
255  void setClockSpeed( int speed );
256 
257  void setClockTimezone( int timeInSec );
258 
259  int clockTimezone() const;
260 
264  BookmarkManager *bookmarkManager();
265 
266  QTextDocument * legend();
267 
268  void setLegend( QTextDocument * document );
269 
270  bool workOffline() const;
271 
272  void setWorkOffline( bool workOffline );
273 
274  ElevationModel* elevationModel();
275  const ElevationModel* elevationModel() const;
276 
282  const GeoDataPlacemark *trackedPlacemark() const;
283 
284  void assignNewStyle( const QString &filePath, GeoDataStyle *style );
285 
286  public Q_SLOTS:
287  void clearPersistentTileCache();
288 
293  void setPersistentTileCacheLimit( quint64 kiloBytes );
294 
299  void setTrackedPlacemark( const GeoDataPlacemark *placemark );
300 
301  void updateProperty( const QString &property, bool value );
302 
303  void assignFillColors( const QString &filePath );
304 
305  Q_SIGNALS:
306 
311  void creatingTilesStart( TileCreator*, const QString& name, const QString& description );
312 
319  void themeChanged( QString mapTheme );
320 
321  void workOfflineChanged();
322 
327  void trackedPlacemarkChanged( const GeoDataPlacemark *placemark );
328 
332  void homeChanged( const GeoDataCoordinates &newHomePoint );
333 
334  private:
335  Q_DISABLE_COPY( MarbleModel )
336 
337  void addDownloadPolicies( const GeoSceneDocument *mapTheme );
338  MarbleModelPrivate * const d;
339 };
340 
341 }
342 
343 #endif
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::PluginManager
The class that handles Marble's plugins.
Definition: PluginManager.h:45
Marble::GeoDataTreeModel
The representation of GeoData in a model This class represents all available data given by kml-data f...
Definition: GeoDataTreeModel.h:32
Marble::PositionTracking
Definition: PositionTracking.h:31
Marble::BookmarkManager
This class is responsible for loading the book mark objects from the files and various book mark oper...
Definition: BookmarkManager.h:35
Marble::GeoDataStyle
an addressable style group
Definition: GeoDataStyle.h:55
Marble::SunLocator
Definition: SunLocator.h:33
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
Marble::TileCreator
Definition: TileCreator.h:53
Marble::FileManager
This class is responsible for loading the different files into Geodata model.
Definition: FileManager.h:36
Marble::Planet
Definition: Planet.h:25
QString
MarbleGlobal.h
Marble::ElevationModel
Definition: ElevationModel.h:33
Marble::RoutingManager
Delegates data retrieval and model updates to the appropriate routing provider.
Definition: RoutingManager.h:37
Marble::GeoSceneDocument
A container for features parsed from the DGML file.
Definition: GeoSceneDocument.h:44
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
marble_export.h
QTextDocument
QAbstractItemModel
QItemSelectionModel
Marble::MarbleClock
Definition: MarbleClock.h:25
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
QDateTime
Marble::HttpDownloadManager
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:40 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
  • 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