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

marble

  • sources
  • kde-4.12
  • 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 GeoDataTreeModel;
62 class GeoSceneDocument;
63 class Planet;
64 class RoutingManager;
65 class BookmarkManager;
66 class FileManager;
67 class ElevationModel;
68 
96 class MARBLE_EXPORT MarbleModel : public QObject
97 {
98  friend class MarbleModelPrivate;
99 
100  Q_OBJECT
101 
102  Q_PROPERTY( QString mapThemeId READ mapThemeId WRITE setMapThemeId NOTIFY themeChanged )
103  Q_PROPERTY( bool workOffline READ workOffline WRITE setWorkOffline NOTIFY workOfflineChanged )
104 
105  public:
110  explicit MarbleModel( QObject *parent = 0 );
111  virtual ~MarbleModel();
112 
117  GeoDataTreeModel *treeModel();
118  const GeoDataTreeModel *treeModel() const;
119 
120  QAbstractItemModel *groundOverlayModel();
121  const QAbstractItemModel *groundOverlayModel() const;
122 
123  QAbstractItemModel *placemarkModel();
124  const QAbstractItemModel *placemarkModel() const;
125 
126  QItemSelectionModel *placemarkSelectionModel();
127 
138  QString mapThemeId() const;
139 
140  GeoSceneDocument *mapTheme();
141  const GeoSceneDocument *mapTheme() const;
142 
159  void setMapThemeId( const QString &mapThemeId );
160 
167  void home( qreal &lon, qreal &lat, int& zoom ) const;
174  void setHome( qreal lon, qreal lat, int zoom = 1050 );
180  void setHome( const GeoDataCoordinates& homePoint, int zoom = 1050 );
181 
186  HttpDownloadManager *downloadManager();
187  const HttpDownloadManager *downloadManager() const;
188 
189 
194  void addGeoDataFile( const QString& filename );
195 
201  void addGeoDataString( const QString& data, const QString& key = "data" );
202 
207  void removeGeoData( const QString& key );
208 
209  FileManager *fileManager();
210 
211  PositionTracking *positionTracking() const;
212 
213  qreal planetRadius() const;
214  QString planetName() const;
215  QString planetId() const;
216 
217  MarbleClock *clock();
218  const MarbleClock *clock() const;
219 
220  SunLocator *sunLocator();
221  const SunLocator *sunLocator() const;
222 
227  quint64 persistentTileCacheLimit() const;
228 
233  quint64 volatileTileCacheLimit() const;
234 
235  const PluginManager* pluginManager() const;
236 
237  PluginManager* pluginManager();
238 
243  const Planet *planet() const;
244 
245  RoutingManager* routingManager();
246  const RoutingManager* routingManager() const;
247 
248  void setClockDateTime( const QDateTime& datetime );
249 
250  QDateTime clockDateTime() const;
251 
252  int clockSpeed() const;
253 
254  void setClockSpeed( int speed );
255 
256  void setClockTimezone( int timeInSec );
257 
258  int clockTimezone() const;
259 
263  BookmarkManager *bookmarkManager();
264 
265  QTextDocument * legend();
266 
267  void setLegend( QTextDocument * document );
268 
269  bool workOffline() const;
270 
271  void setWorkOffline( bool workOffline );
272 
273  ElevationModel* elevationModel();
274  const ElevationModel* elevationModel() const;
275 
281  const GeoDataPlacemark *trackedPlacemark() const;
282 
283  public Q_SLOTS:
284  void clearPersistentTileCache();
285 
290  void setPersistentTileCacheLimit( quint64 kiloBytes );
291 
296  void setTrackedPlacemark( const GeoDataPlacemark *placemark );
297 
298  void updateProperty( const QString &property, bool value );
299 
300  Q_SIGNALS:
301 
306  void creatingTilesStart( TileCreator*, const QString& name, const QString& description );
307 
314  void themeChanged( QString mapTheme );
315 
316  void workOfflineChanged();
317 
322  void trackedPlacemarkChanged( const GeoDataPlacemark *placemark );
323 
327  void homeChanged( const GeoDataCoordinates newHomePoint );
328 
329  private:
330  Q_DISABLE_COPY( MarbleModel )
331 
332  void addDownloadPolicies( const GeoSceneDocument *mapTheme );
333  MarbleModelPrivate * const d;
334 };
335 
336 }
337 
338 #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
QObject
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::SunLocator
Definition: SunLocator.h:33
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
MarbleGlobal.h
QAbstractItemModel
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:96
marble_export.h
Marble::MarbleClock
Definition: MarbleClock.h:25
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
Marble::HttpDownloadManager
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:51 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
  • kstars
  • libkdeedu
  •   keduvocdocument
  • 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