• 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.cpp
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 2006-2007 Torsten Rahn <tackat@kde.org>
9 // Copyright 2007 Inge Wallin <ingwa@kde.org>
10 // Copyright 2008, 2009, 2010 Jens-Michael Hoffmann <jmho@c-xx.com>
11 // Copyright 2008-2009 Patrick Spendrin <ps_ml@gmx.de>
12 // Copyright 2010-2013 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
13 //
14 
15 #include "MarbleModel.h"
16 
17 #include <cmath>
18 
19 #include <QAtomicInt>
20 #include <QPointer>
21 #include <QTime>
22 #include <QTimer>
23 #include <QAbstractItemModel>
24 #include <QSet>
25 #include <QItemSelectionModel>
26 #include <QSortFilterProxyModel>
27 
28 #if (QT_VERSION < 0x040800)
29 // See comment below why this is needed
30 #include <QNetworkConfigurationManager>
31 #endif
32 
33 #include "kdescendantsproxymodel.h"
34 
35 #include "MapThemeManager.h"
36 #include "MarbleGlobal.h"
37 #include "MarbleDebug.h"
38 
39 #include "GeoSceneDocument.h"
40 #include "GeoSceneGeodata.h"
41 #include "GeoSceneHead.h"
42 #include "GeoSceneLayer.h"
43 #include "GeoSceneMap.h"
44 #include "GeoScenePalette.h"
45 #include "GeoSceneTiled.h"
46 #include "GeoSceneVector.h"
47 
48 #include "GeoDataDocument.h"
49 #include "GeoDataFeature.h"
50 #include "GeoDataPlacemark.h"
51 #include "GeoDataStyle.h"
52 #include "GeoDataStyleMap.h"
53 #include "GeoDataPolyStyle.h"
54 #include "GeoDataTypes.h"
55 
56 #include "DgmlAuxillaryDictionary.h"
57 #include "MarbleClock.h"
58 #include "FileStoragePolicy.h"
59 #include "FileStorageWatcher.h"
60 #include "PositionTracking.h"
61 #include "HttpDownloadManager.h"
62 #include "MarbleDirs.h"
63 #include "FileManager.h"
64 #include "GeoDataTreeModel.h"
65 #include "Planet.h"
66 #include "PluginManager.h"
67 #include "StoragePolicy.h"
68 #include "SunLocator.h"
69 #include "TileCreator.h"
70 #include "TileCreatorDialog.h"
71 #include "TileLoader.h"
72 #include "routing/RoutingManager.h"
73 #include "BookmarkManager.h"
74 #include "ElevationModel.h"
75 
76 namespace Marble
77 {
78 
79 class MarbleModelPrivate
80 {
81  public:
82  MarbleModelPrivate()
83  : m_clock(),
84  m_planet( new Planet( "earth" ) ),
85  m_sunLocator( &m_clock, m_planet ),
86  m_pluginManager(),
87  m_homePoint( -9.4, 54.8, 0.0, GeoDataCoordinates::Degree ), // Some point that tackat defined. :-)
88  m_homeZoom( 1050 ),
89  m_mapTheme( 0 ),
90  m_storagePolicy( MarbleDirs::localPath() ),
91  m_downloadManager( &m_storagePolicy ),
92  m_storageWatcher( MarbleDirs::localPath() ),
93  m_fileManager( 0 ),
94  m_treeModel(),
95  m_descendantProxy(),
96  m_placemarkProxyModel(),
97  m_placemarkSelectionModel( 0 ),
98  m_positionTracking( &m_treeModel ),
99  m_trackedPlacemark( 0 ),
100  m_bookmarkManager( &m_treeModel ),
101  m_routingManager( 0 ),
102  m_legend( 0 ),
103  m_workOffline( false ),
104  m_elevationModel( 0 )
105  {
106  m_descendantProxy.setSourceModel( &m_treeModel );
107 
108  m_placemarkProxyModel.setFilterFixedString( GeoDataTypes::GeoDataPlacemarkType );
109  m_placemarkProxyModel.setFilterKeyColumn( 1 );
110  m_placemarkProxyModel.setSourceModel( &m_descendantProxy );
111 
112  m_groundOverlayProxyModel.setFilterFixedString( GeoDataTypes::GeoDataGroundOverlayType );
113  m_groundOverlayProxyModel.setFilterKeyColumn( 1 );
114  m_groundOverlayProxyModel.setSourceModel( &m_descendantProxy );
115  }
116 
117  ~MarbleModelPrivate()
118  {
119  delete m_fileManager;
120  delete m_mapTheme;
121  delete m_planet;
122  }
123 
124  // Misc stuff.
125  MarbleClock m_clock;
126  Planet *m_planet;
127  SunLocator m_sunLocator;
128 
129  PluginManager m_pluginManager;
130 
131  // The home position
132  GeoDataCoordinates m_homePoint;
133  int m_homeZoom;
134 
135  // View and paint stuff
136  GeoSceneDocument *m_mapTheme;
137 
138  FileStoragePolicy m_storagePolicy;
139  HttpDownloadManager m_downloadManager;
140 
141  // Cache related
142  FileStorageWatcher m_storageWatcher;
143 
144  // Places on the map
145  FileManager *m_fileManager;
146 
147  GeoDataTreeModel m_treeModel;
148  KDescendantsProxyModel m_descendantProxy;
149  QSortFilterProxyModel m_placemarkProxyModel;
150  QSortFilterProxyModel m_groundOverlayProxyModel;
151 
152  // Selection handling
153  QItemSelectionModel m_placemarkSelectionModel;
154 
155  //Gps Stuff
156  PositionTracking m_positionTracking;
157 
158  const GeoDataPlacemark *m_trackedPlacemark;
159 
160  BookmarkManager m_bookmarkManager;
161  RoutingManager *m_routingManager;
162  QTextDocument *m_legend;
163 
164  bool m_workOffline;
165 
166  ElevationModel *m_elevationModel;
167 };
168 
169 MarbleModel::MarbleModel( QObject *parent )
170  : QObject( parent ),
171  d( new MarbleModelPrivate() )
172 {
173 #if (QT_VERSION < 0x040800)
174  // fix for KDE bug 288612
175  // Due to a race condition in Qt 4.7 (https://bugreports.qt-project.org/browse/QTBUG-22107),
176  // a segfault might occur at startup when e.g. reverse geocoding is called very early.
177  // The race condition can be avoided by instantiating QNetworkConfigurationManager
178  // when only one thread is running (i.e. here).
179  // QNetworkConfigurationManager was introduced in Qt 4.7, the bug is fixed
180  // in 4.8, thus the Qt version check.
181  new QNetworkConfigurationManager( this );
182 #endif
183 
184  // The thread will be started at setting persistent tile cache size.
185  connect( this, SIGNAL(themeChanged(QString)),
186  &d->m_storageWatcher, SLOT(updateTheme(QString)) );
187 
188  // connect the StoragePolicy used by the download manager to the FileStorageWatcher
189  connect( &d->m_storagePolicy, SIGNAL(cleared()),
190  &d->m_storageWatcher, SLOT(resetCurrentSize()) );
191  connect( &d->m_storagePolicy, SIGNAL(sizeChanged(qint64)),
192  &d->m_storageWatcher, SLOT(addToCurrentSize(qint64)) );
193 
194  d->m_fileManager = new FileManager( this );
195  connect( d->m_fileManager, SIGNAL(fileAdded( QString)),
196  this, SLOT(assignFillColors( QString)) );
197 
198  d->m_routingManager = new RoutingManager( this, this );
199 
200  connect(&d->m_clock, SIGNAL(timeChanged()),
201  &d->m_sunLocator, SLOT(update()) );
202 
203  d->m_elevationModel = new ElevationModel( this );
204 }
205 
206 MarbleModel::~MarbleModel()
207 {
208  delete d;
209 
210  mDebug() << "Model deleted:" << this;
211 }
212 
213 BookmarkManager *MarbleModel::bookmarkManager()
214 {
215  return &d->m_bookmarkManager;
216 }
217 
218 QString MarbleModel::mapThemeId() const
219 {
220  QString mapThemeId = "";
221 
222  if (d->m_mapTheme)
223  mapThemeId = d->m_mapTheme->head()->mapThemeId();
224 
225  return mapThemeId;
226 }
227 
228 GeoSceneDocument *MarbleModel::mapTheme()
229 {
230  return d->m_mapTheme;
231 }
232 
233 const GeoSceneDocument *MarbleModel::mapTheme() const
234 {
235  return d->m_mapTheme;
236 }
237 
238 // Set a particular theme for the map and load the appropriate tile level.
239 // If the tiles (for the lowest tile level) haven't been created already
240 // then create them here and now.
241 //
242 // FIXME: Move the tile creation dialogs out of this function. Change
243 // them into signals instead.
244 // FIXME: Get rid of 'currentProjection' here. It's totally misplaced.
245 //
246 
247 void MarbleModel::setMapThemeId( const QString &mapThemeId )
248 {
249  if ( !mapThemeId.isEmpty() && mapThemeId == this->mapThemeId() )
250  return;
251 
252  GeoSceneDocument *mapTheme = MapThemeManager::loadMapTheme( mapThemeId );
253  if ( !mapTheme ) {
254  // Check whether the previous theme works
255  if ( d->m_mapTheme ){
256  qWarning() << "Selected theme doesn't work, so we stick to the previous one";
257  return;
258  }
259 
260  // Fall back to default theme
261  QString defaultTheme = "earth/srtm/srtm.dgml";
262  qWarning() << "Falling back to default theme:" << defaultTheme;
263  mapTheme = MapThemeManager::loadMapTheme( defaultTheme );
264  }
265 
266  // If this last resort doesn't work either shed a tear and exit
267  if ( !mapTheme ) {
268  qWarning() << "Couldn't find a valid DGML map.";
269  return;
270  }
271 
272  // find the list of previous theme's geodata
273  QList<GeoSceneGeodata> currentDatasets;
274  if ( d->m_mapTheme ) {
275  foreach ( GeoSceneLayer *layer, d->m_mapTheme->map()->layers() ) {
276  if ( layer->backend() != dgml::dgmlValue_geodata
277  && layer->backend() != dgml::dgmlValue_vector )
278  continue;
279 
280  // look for documents
281  foreach ( GeoSceneAbstractDataset *dataset, layer->datasets() ) {
282  GeoSceneGeodata *data = dynamic_cast<GeoSceneGeodata*>( dataset );
283  Q_ASSERT( data );
284  currentDatasets << *data;
285  }
286  }
287  }
288 
289  delete d->m_mapTheme;
290  d->m_mapTheme = mapTheme;
291 
292  addDownloadPolicies( d->m_mapTheme );
293 
294  // Some output to show how to use this stuff ...
295  mDebug() << "DGML2 Name : " << d->m_mapTheme->head()->name();
296 /*
297  mDebug() << "DGML2 Description: " << d->m_mapTheme->head()->description();
298 
299  if ( d->m_mapTheme->map()->hasTextureLayers() )
300  mDebug() << "Contains texture layers! ";
301  else
302  mDebug() << "Does not contain any texture layers! ";
303 
304  mDebug() << "Number of SRTM textures: " << d->m_mapTheme->map()->layer("srtm")->datasets().count();
305 
306  if ( d->m_mapTheme->map()->hasVectorLayers() )
307  mDebug() << "Contains vector layers! ";
308  else
309  mDebug() << "Does not contain any vector layers! ";
310 */
311  //Don't change the planet unless we have to...
312  qreal const radiusAttributeValue = d->m_mapTheme->head()->radius();
313  if( d->m_mapTheme->head()->target().toLower() != d->m_planet->id() || radiusAttributeValue != d->m_planet->radius() ) {
314  mDebug() << "Changing Planet";
315  *(d->m_planet) = Planet( d->m_mapTheme->head()->target().toLower() );
316  if ( radiusAttributeValue > 0.0 ) {
317  d->m_planet->setRadius( radiusAttributeValue );
318  }
319  sunLocator()->setPlanet(d->m_planet);
320  }
321 
322  QStringList fileList;
323  QStringList propertyList;
324  QList<const GeoDataStyle*> styleList;
325 
326  bool skip = false;
327  bool sourceFileMatch = false;
328  int datasetIndex = -1;
329  foreach ( GeoSceneLayer *layer, d->m_mapTheme->map()->layers() ) {
330  if ( layer->backend() != dgml::dgmlValue_geodata
331  && layer->backend() != dgml::dgmlValue_vector )
332  continue;
333 
334  // look for datasets which are different from currentDatasets
335  foreach ( const GeoSceneAbstractDataset *dataset, layer->datasets() ) {
336  const GeoSceneGeodata *data = dynamic_cast<const GeoSceneGeodata*>( dataset );
337  Q_ASSERT( data );
338  skip = false;
339  sourceFileMatch = false;
340  for ( int i = 0; i < currentDatasets.size(); ++i ) {
341  if ( currentDatasets[i] == *data ) {
342  currentDatasets.removeAt( i );
343  skip = true;
344  break;
345  }
351  if ( currentDatasets[i].sourceFile() == data->sourceFile() ) {
352  sourceFileMatch = true;
353  datasetIndex = i;
354  }
355  }
356  if ( skip ) {
357  continue;
358  }
359 
360  QString filename = data->sourceFile();
361  QString property = data->property();
362  QPen pen = data->pen();
363  QBrush brush = data->brush();
364  GeoDataStyle* style = 0;
365 
374  if ( data->colors().isEmpty() ) {
375  GeoDataLineStyle lineStyle( pen.color() );
376  lineStyle.setPenStyle( pen.style() );
377  lineStyle.setWidth( pen.width() );
378  GeoDataPolyStyle polyStyle( brush.color() );
379  polyStyle.setFill( true );
380  style = new GeoDataStyle;
381  style->setLineStyle( lineStyle );
382  style->setPolyStyle( polyStyle );
383  style->setId( "default" );
384  }
385  if ( sourceFileMatch && !currentDatasets[datasetIndex].colors().isEmpty() ) {
390  currentDatasets.removeAt( datasetIndex );
391  if ( data->colors().isEmpty() ) {
392  qDebug() << "setMapThemeId-> color: " << style->polyStyle().color() << " file: " << filename;
393  assignNewStyle( filename, style );
394  }
395  else {
396  assignFillColors( data->sourceFile() );
397  }
398  }
399  else {
400  fileList << filename;
401  propertyList << property;
402  styleList << style;
403  }
404  }
405  }
406  // unload old currentDatasets which are not part of the new map
407  foreach(const GeoSceneGeodata data, currentDatasets) {
408  d->m_fileManager->removeFile( data.sourceFile() );
409  }
410  // load new datasets
411  d->m_fileManager->addFile( fileList, propertyList, styleList, MapDocument );
412 
413  mDebug() << "THEME CHANGED: ***" << mapTheme->head()->mapThemeId();
414  emit themeChanged( mapTheme->head()->mapThemeId() );
415 }
416 
417 void MarbleModel::assignNewStyle( const QString &filePath, GeoDataStyle *style )
418 {
419  GeoDataDocument *doc = d->m_fileManager->at( filePath );
420  Q_ASSERT( doc );
421  GeoDataStyleMap styleMap;
422  styleMap.setId("default-map");
423  styleMap.insert( "normal", QString("#").append(style->id()) );
424  doc->addStyleMap( styleMap );
425  doc->addStyle( *style );
426 
427  QVector<GeoDataFeature*>::iterator iter = doc->begin();
428  QVector<GeoDataFeature*>::iterator const end = doc->end();
429 
430  for ( ; iter != end; ++iter ) {
431  if ( (*iter)->nodeType() == GeoDataTypes::GeoDataPlacemarkType ) {
432  GeoDataPlacemark *placemark = static_cast<GeoDataPlacemark*>( *iter );
433  if ( placemark ) {
434  if ( placemark->geometry()->nodeType() != GeoDataTypes::GeoDataTrackType &&
435  placemark->geometry()->nodeType() != GeoDataTypes::GeoDataPointType )
436  {
437  placemark->setStyleUrl( QString("#").append( style->id() ) );
438  }
439  }
440  }
441  }
442  delete style;
443  style = 0;
444 }
445 
446 void MarbleModel::home( qreal &lon, qreal &lat, int& zoom ) const
447 {
448  d->m_homePoint.geoCoordinates( lon, lat, GeoDataCoordinates::Degree );
449  zoom = d->m_homeZoom;
450 }
451 
452 void MarbleModel::setHome( qreal lon, qreal lat, int zoom )
453 {
454  d->m_homePoint = GeoDataCoordinates( lon, lat, 0, GeoDataCoordinates::Degree );
455  d->m_homeZoom = zoom;
456  emit homeChanged( d->m_homePoint );
457 }
458 
459 void MarbleModel::setHome( const GeoDataCoordinates& homePoint, int zoom )
460 {
461  d->m_homePoint = homePoint;
462  d->m_homeZoom = zoom;
463  emit homeChanged( d->m_homePoint );
464 }
465 
466 HttpDownloadManager *MarbleModel::downloadManager()
467 {
468  return &d->m_downloadManager;
469 }
470 
471 const HttpDownloadManager *MarbleModel::downloadManager() const
472 {
473  return &d->m_downloadManager;
474 }
475 
476 
477 GeoDataTreeModel *MarbleModel::treeModel()
478 {
479  return &d->m_treeModel;
480 }
481 
482 const GeoDataTreeModel *MarbleModel::treeModel() const
483 {
484  return &d->m_treeModel;
485 }
486 
487 QAbstractItemModel *MarbleModel::placemarkModel()
488 {
489  return &d->m_placemarkProxyModel;
490 }
491 
492 const QAbstractItemModel *MarbleModel::placemarkModel() const
493 {
494  return &d->m_placemarkProxyModel;
495 }
496 
497 QAbstractItemModel *MarbleModel::groundOverlayModel()
498 {
499  return &d->m_groundOverlayProxyModel;
500 }
501 
502 const QAbstractItemModel *MarbleModel::groundOverlayModel() const
503 {
504  return &d->m_groundOverlayProxyModel;
505 }
506 
507 QItemSelectionModel *MarbleModel::placemarkSelectionModel()
508 {
509  return &d->m_placemarkSelectionModel;
510 }
511 
512 PositionTracking *MarbleModel::positionTracking() const
513 {
514  return &d->m_positionTracking;
515 }
516 
517 FileManager *MarbleModel::fileManager()
518 {
519  return d->m_fileManager;
520 }
521 
522 qreal MarbleModel::planetRadius() const
523 {
524  return d->m_planet->radius();
525 }
526 
527 QString MarbleModel::planetName() const
528 {
529  return d->m_planet->name();
530 }
531 
532 QString MarbleModel::planetId() const
533 {
534  return d->m_planet->id();
535 }
536 
537 MarbleClock *MarbleModel::clock()
538 {
539  return &d->m_clock;
540 }
541 
542 const MarbleClock *MarbleModel::clock() const
543 {
544  return &d->m_clock;
545 }
546 
547 SunLocator *MarbleModel::sunLocator()
548 {
549  return &d->m_sunLocator;
550 }
551 
552 const SunLocator *MarbleModel::sunLocator() const
553 {
554  return &d->m_sunLocator;
555 }
556 
557 quint64 MarbleModel::persistentTileCacheLimit() const
558 {
559  return d->m_storageWatcher.cacheLimit() / 1024;
560 }
561 
562 void MarbleModel::clearPersistentTileCache()
563 {
564  d->m_storagePolicy.clearCache();
565 
566  // Now create base tiles again if needed
567  if ( d->m_mapTheme->map()->hasTextureLayers() || d->m_mapTheme->map()->hasVectorLayers() ) {
568  // If the tiles aren't already there, put up a progress dialog
569  // while creating them.
570 
571  // As long as we don't have an Layer Management Class we just lookup
572  // the name of the layer that has the same name as the theme ID
573  QString themeID = d->m_mapTheme->head()->theme();
574 
575  const GeoSceneLayer *layer =
576  static_cast<const GeoSceneLayer*>( d->m_mapTheme->map()->layer( themeID ) );
577  const GeoSceneTiled *texture =
578  static_cast<const GeoSceneTiled*>( layer->groundDataset() );
579 
580  QString sourceDir = texture->sourceDir();
581  QString installMap = texture->installMap();
582  QString role = d->m_mapTheme->map()->layer( themeID )->role();
583 
584  if ( !TileLoader::baseTilesAvailable( *texture )
585  && !installMap.isEmpty() )
586  {
587  mDebug() << "Base tiles not available. Creating Tiles ... \n"
588  << "SourceDir: " << sourceDir << "InstallMap:" << installMap;
589  MarbleDirs::debug();
590 
591  TileCreator *tileCreator = new TileCreator(
592  sourceDir,
593  installMap,
594  (role == "dem") ? "true" : "false" );
595  tileCreator->setTileFormat( texture->fileFormat().toLower() );
596 
597  QPointer<TileCreatorDialog> tileCreatorDlg = new TileCreatorDialog( tileCreator, 0 );
598  tileCreatorDlg->setSummary( d->m_mapTheme->head()->name(),
599  d->m_mapTheme->head()->description() );
600  tileCreatorDlg->exec();
601  qDebug("Tile creation completed");
602  delete tileCreatorDlg;
603  }
604  }
605 }
606 
607 void MarbleModel::setPersistentTileCacheLimit(quint64 kiloBytes)
608 {
609  d->m_storageWatcher.setCacheLimit( kiloBytes * 1024 );
610 
611  if( kiloBytes != 0 )
612  {
613  if( !d->m_storageWatcher.isRunning() )
614  d->m_storageWatcher.start( QThread::IdlePriority );
615  }
616  else
617  {
618  d->m_storageWatcher.quit();
619  }
620  // TODO: trigger update
621 }
622 
623 void MarbleModel::setTrackedPlacemark( const GeoDataPlacemark *placemark )
624 {
625  d->m_trackedPlacemark = placemark;
626  emit trackedPlacemarkChanged( placemark );
627 }
628 
629 const GeoDataPlacemark* MarbleModel::trackedPlacemark() const
630 {
631  return d->m_trackedPlacemark;
632 }
633 
634 const PluginManager* MarbleModel::pluginManager() const
635 {
636  return &d->m_pluginManager;
637 }
638 
639 PluginManager* MarbleModel::pluginManager()
640 {
641  return &d->m_pluginManager;
642 }
643 
644 const Planet *MarbleModel::planet() const
645 {
646  return d->m_planet;
647 }
648 
649 void MarbleModel::addDownloadPolicies( const GeoSceneDocument *mapTheme )
650 {
651  if ( !mapTheme )
652  return;
653  if ( !mapTheme->map()->hasTextureLayers() && !mapTheme->map()->hasVectorLayers() )
654  return;
655 
656  // As long as we don't have an Layer Management Class we just lookup
657  // the name of the layer that has the same name as the theme ID
658  const QString themeId = mapTheme->head()->theme();
659  const GeoSceneLayer * const layer = static_cast<const GeoSceneLayer*>( mapTheme->map()->layer( themeId ));
660  if ( !layer )
661  return;
662 
663  const GeoSceneTiled * const texture = static_cast<const GeoSceneTiled*>( layer->groundDataset() );
664  if ( !texture )
665  return;
666 
667  QList<const DownloadPolicy *> policies = texture->downloadPolicies();
668  QList<const DownloadPolicy *>::const_iterator pos = policies.constBegin();
669  QList<const DownloadPolicy *>::const_iterator const end = policies.constEnd();
670  for (; pos != end; ++pos ) {
671  d->m_downloadManager.addDownloadPolicy( **pos );
672  }
673 }
674 
675 RoutingManager* MarbleModel::routingManager()
676 {
677  return d->m_routingManager;
678 }
679 
680 const RoutingManager* MarbleModel::routingManager() const
681 {
682  return d->m_routingManager;
683 }
684 
685 void MarbleModel::setClockDateTime( const QDateTime& datetime )
686 {
687  d->m_clock.setDateTime( datetime );
688 }
689 
690 QDateTime MarbleModel::clockDateTime() const
691 {
692  return d->m_clock.dateTime();
693 }
694 
695 int MarbleModel::clockSpeed() const
696 {
697  return d->m_clock.speed();
698 }
699 
700 void MarbleModel::setClockSpeed( int speed )
701 {
702  d->m_clock.setSpeed( speed );
703 }
704 
705 void MarbleModel::setClockTimezone( int timeInSec )
706 {
707  d->m_clock.setTimezone( timeInSec );
708 }
709 
710 int MarbleModel::clockTimezone() const
711 {
712  return d->m_clock.timezone();
713 }
714 
715 QTextDocument * MarbleModel::legend()
716 {
717  return d->m_legend;
718 }
719 
720 void MarbleModel::setLegend( QTextDocument * legend )
721 {
722  d->m_legend = legend;
723 }
724 
725 void MarbleModel::addGeoDataFile( const QString& filename )
726 {
727  GeoDataStyle* dummyStyle = new GeoDataStyle;
728  d->m_fileManager->addFile( filename, filename, dummyStyle, UserDocument, true );
729 }
730 
731 void MarbleModel::addGeoDataString( const QString& data, const QString& key )
732 {
733  d->m_fileManager->addData( key, data, UserDocument );
734 }
735 
736 void MarbleModel::removeGeoData( const QString& fileName )
737 {
738  d->m_fileManager->removeFile( fileName );
739 }
740 
741 void MarbleModel::updateProperty( const QString &property, bool value )
742 {
743  foreach( GeoDataFeature *feature, d->m_treeModel.rootDocument()->featureList()) {
744  if( feature->nodeType() == GeoDataTypes::GeoDataDocumentType ) {
745  GeoDataDocument *document = static_cast<GeoDataDocument*>( feature );
746  if( document->property() == property ){
747  document->setVisible( value );
748  d->m_treeModel.updateFeature( document );
749  }
750  }
751  }
752 }
753 
754 void MarbleModel::assignFillColors( const QString &filePath ) {
755  foreach( GeoSceneLayer *layer, d->m_mapTheme->map()->layers() ) {
756  if ( layer->backend() == dgml::dgmlValue_geodata
757  || layer->backend() == dgml::dgmlValue_vector )
758  {
759  foreach( GeoSceneAbstractDataset *dataset, layer->datasets() ) {
760  GeoSceneGeodata *data = static_cast<GeoSceneGeodata*>( dataset );
761  if ( data ) {
762  if ( data->sourceFile() == filePath ) {
763  GeoDataDocument *doc = d->m_fileManager->at( filePath );
764  Q_ASSERT( doc );
765  QPen pen = data->pen();
766  QBrush brush = data->brush();
767  QList<QColor> colors = data->colors();
768  GeoDataLineStyle lineStyle( pen.color() );
769  lineStyle.setPenStyle( pen.style() );
770  lineStyle.setWidth( pen.width() );
771 
772  if ( !colors.isEmpty() ) {
773  qreal alpha = data->alpha();
774  QVector<GeoDataFeature*>::iterator it = doc->begin();
775  QVector<GeoDataFeature*>::iterator itEnd = doc->end();
776  for ( ; it != itEnd; ++it ) {
777  GeoDataPlacemark *placemark = dynamic_cast<GeoDataPlacemark*>( *it );
778  if ( placemark ) {
779  GeoDataStyle *style = new GeoDataStyle;
780  style->setLineStyle( lineStyle );
781  quint8 colorIndex = placemark->style()->polyStyle().colorIndex();
782  GeoDataPolyStyle polyStyle;
783  // Set the colorIndex so that it's not lost after setting new style.
784  polyStyle.setColorIndex( colorIndex );
785  QColor color;
786  // color index having value 99 is undefined
787  Q_ASSERT( colors.size() );
788  if ( colorIndex > colors.size() || ( colorIndex - 1 ) < 0 )
789  {
790  color = colors[0]; // Assign the first color as default
791  }
792  else {
793  color = colors[colorIndex-1];
794  }
795  color.setAlphaF( alpha );
796  polyStyle.setColor( color );
797  polyStyle.setFill( true );
798  style->setPolyStyle( polyStyle );
799  placemark->setStyle( style );
800  }
801  }
802  }
803  else {
804  GeoDataStyle style;
805  GeoDataPolyStyle polyStyle( brush.color() );
806  polyStyle.setFill( true );
807  style.setLineStyle( lineStyle );
808  style.setPolyStyle( polyStyle );
809  style.setId( "default" );
810  GeoDataStyleMap styleMap;
811  styleMap.setId("default-map");
812  styleMap.insert( "normal", QString("#").append(style.id()) );
813  doc->addStyle( style );
814  doc->addStyleMap( styleMap );
815 
816  QVector<GeoDataFeature*>::iterator iter = doc->begin();
817  QVector<GeoDataFeature*>::iterator const end = doc->end();
818 
819  for ( ; iter != end; ++iter ) {
820  if ( (*iter)->nodeType() == GeoDataTypes::GeoDataPlacemarkType ) {
821  GeoDataPlacemark *placemark = dynamic_cast<GeoDataPlacemark*>( *iter );
822  Q_ASSERT( placemark );
823  if ( placemark->geometry()->nodeType() != GeoDataTypes::GeoDataTrackType &&
824  placemark->geometry()->nodeType() != GeoDataTypes::GeoDataPointType )
825  {
826  placemark->setStyleUrl( QString("#").append( style.id() ) );
827  }
828  }
829  }
830  }
831  }
832  }
833  }
834  }
835  }
836 }
837 
838 bool MarbleModel::workOffline() const
839 {
840  return d->m_workOffline;
841 }
842 
843 void MarbleModel::setWorkOffline( bool workOffline )
844 {
845  if ( d->m_workOffline != workOffline ) {
846  downloadManager()->setDownloadEnabled( !workOffline );
847 
848  d->m_workOffline = workOffline;
849  emit workOfflineChanged();
850  }
851 }
852 
853 ElevationModel* MarbleModel::elevationModel()
854 {
855  return d->m_elevationModel;
856 }
857 
858 const ElevationModel* MarbleModel::elevationModel() const
859 {
860  return d->m_elevationModel;
861 }
862 
863 }
864 
865 #include "MarbleModel.moc"
GeoSceneHead.h
GeoDataDocument.h
Marble::MarbleModel::clearPersistentTileCache
void clearPersistentTileCache()
Definition: MarbleModel.cpp:562
Marble::GeoSceneLayer::groundDataset
const GeoSceneAbstractDataset * groundDataset() const
Definition: GeoSceneLayer.cpp:108
Marble::GeoDataLineStyle
specifies the style how lines are drawn
Definition: GeoDataLineStyle.h:36
TileLoader.h
Marble::GeoDataDocument::property
QString property() const
Definition: GeoDataDocument.cpp:91
Marble::MarbleModel::homeChanged
void homeChanged(const GeoDataCoordinates &newHomePoint)
Emitted when the home location is changed.
Marble::GeoDataCoordinates
A 3d point representation.
Definition: GeoDataCoordinates.h:52
Marble::GeoSceneTiled::installMap
QString installMap() const
Definition: GeoSceneTiled.cpp:66
Marble::GeoDataGeometry::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoData.
Definition: GeoDataGeometry.cpp:77
QPen::style
Qt::PenStyle style() const
Marble::GeoDataDocument::addStyleMap
void addStyleMap(const GeoDataStyleMap &map)
Add a stylemap to the stylemap storage.
Definition: GeoDataDocument.cpp:166
FileStoragePolicy.h
Marble::GeoSceneDocument::map
const GeoSceneMap * map() const
Definition: GeoSceneDocument.cpp:96
GeoScenePalette.h
FileManager.h
Marble::PluginManager
The class that handles Marble's plugins.
Definition: PluginManager.h:45
Marble::MarbleModel::setPersistentTileCacheLimit
void setPersistentTileCacheLimit(quint64 kiloBytes)
Set the limit of the persistent (on hard disc) tile cache.
Definition: MarbleModel.cpp:607
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Marble::MarbleModel::removeGeoData
void removeGeoData(const QString &key)
Remove the file or raw data from the treeModel.
Definition: MarbleModel.cpp:736
Marble::GeoDataTypes::GeoDataPointType
const char * GeoDataPointType
Definition: GeoDataTypes.cpp:68
Marble::MarbleModel::setMapThemeId
void setMapThemeId(const QString &mapThemeId)
Set a new map theme to use.
Definition: MarbleModel.cpp:247
Marble::MarbleModel::mapTheme
GeoSceneDocument * mapTheme()
Definition: MarbleModel.cpp:228
Marble::GeoDataTreeModel
The representation of GeoData in a model This class represents all available data given by kml-data f...
Definition: GeoDataTreeModel.h:32
GeoSceneGeodata.h
Marble::MarbleModel::workOffline
bool workOffline() const
KDescendantsProxyModel
Proxy Model for restructuring a Tree into a list.
Definition: kdescendantsproxymodel.h:69
Marble::GeoSceneHead::mapThemeId
QString mapThemeId() const
Definition: GeoSceneHead.cpp:116
Marble::MarbleModel::workOfflineChanged
void workOfflineChanged()
TileCreator.h
DgmlAuxillaryDictionary.h
Marble::MarbleModel::placemarkSelectionModel
QItemSelectionModel * placemarkSelectionModel()
Definition: MarbleModel.cpp:507
Marble::MarbleModel::treeModel
GeoDataTreeModel * treeModel()
Return the list of Placemarks as a QAbstractItemModel *.
Definition: MarbleModel.cpp:477
Marble::TileLoader::baseTilesAvailable
static bool baseTilesAvailable(GeoSceneTiled const &texture)
Returns whether the mandatory most basic tile level is fully available for the given texture layer...
Definition: TileLoader.cpp:168
Marble::MarbleModel::clockTimezone
int clockTimezone() const
Definition: MarbleModel.cpp:710
Marble::MarbleModel::fileManager
FileManager * fileManager()
Definition: MarbleModel.cpp:517
MarbleModel.h
This file contains the headers for MarbleModel.
Marble::GeoSceneGeodata::pen
QPen pen() const
Definition: GeoSceneGeodata.cpp:73
Marble::HttpDownloadManager::setDownloadEnabled
void setDownloadEnabled(const bool enable)
Switches loading on/off, useful for offline mode.
Definition: HttpDownloadManager.cpp:108
Marble::GeoSceneMap::layer
GeoSceneLayer * layer(const QString &name)
Return a layer by its name.
Definition: GeoSceneMap.cpp:102
Marble::GeoDataStyle::polyStyle
GeoDataPolyStyle & polyStyle()
Return the label style of this style.
Definition: GeoDataStyle.cpp:153
Marble::MarbleModel::sunLocator
SunLocator * sunLocator()
Definition: MarbleModel.cpp:547
Marble::GeoDataContainer::begin
QVector< GeoDataFeature * >::Iterator begin()
Definition: GeoDataContainer.cpp:331
Marble::MarbleModel::planetId
QString planetId() const
Definition: MarbleModel.cpp:532
Marble::GeoDataColorStyle::setColor
void setColor(const QColor &value)
Set a new color.
Definition: GeoDataColorStyle.cpp:84
Marble::TileCreatorDialog
Definition: TileCreatorDialog.h:31
Marble::GeoDataTypes::GeoDataPlacemarkType
const char * GeoDataPlacemarkType
Definition: GeoDataTypes.cpp:66
QPointer
QList::removeAt
void removeAt(int i)
Marble::MarbleModel::clock
MarbleClock * clock()
Definition: MarbleModel.cpp:537
Marble::GeoDataTypes::GeoDataDocumentType
const char * GeoDataDocumentType
Definition: GeoDataTypes.cpp:38
Marble::GeoSceneGeodata::brush
QBrush brush() const
Definition: GeoSceneGeodata.cpp:93
Marble::GeoSceneGeodata::sourceFile
QString sourceFile() const
Definition: GeoSceneGeodata.cpp:53
HttpDownloadManager.h
GeoDataStyle.h
Marble::MarbleModel::addGeoDataString
void addGeoDataString(const QString &data, const QString &key="data")
Handle raw data loading into the treeModel.
Definition: MarbleModel.cpp:731
Marble::GeoSceneAbstractDataset::fileFormat
QString fileFormat() const
Definition: GeoSceneAbstractDataset.cpp:43
Marble::MarbleModel::setTrackedPlacemark
void setTrackedPlacemark(const GeoDataPlacemark *placemark)
Change the placemark tracked by this model.
Definition: MarbleModel.cpp:623
Marble::GeoSceneTiled
Definition: GeoSceneTiled.h:43
Marble::GeoDataFeature::style
const GeoDataStyle * style() const
Return the style assigned to the placemark, or a default style if none has been set.
Definition: GeoDataFeature.cpp:709
QBrush
GeoSceneDocument.h
Marble::GeoDataTypes::GeoDataGroundOverlayType
const char * GeoDataGroundOverlayType
Definition: GeoDataTypes.cpp:44
SunLocator.h
Marble::GeoDataStyleMap
a class to map different styles to one style
Definition: GeoDataStyleMap.h:38
Marble::MarbleModel::pluginManager
const PluginManager * pluginManager() const
Definition: MarbleModel.cpp:634
Planet.h
Marble::MarbleModel::planet
const Planet * planet() const
Returns the planet object for the current map.
Definition: MarbleModel.cpp:644
Marble::GeoSceneGeodata::property
QString property() const
Definition: GeoSceneGeodata.cpp:43
Marble::MarbleModel::trackedPlacemark
const GeoDataPlacemark * trackedPlacemark() const
Returns the placemark being tracked by this model or 0 if no placemark is currently tracked...
Definition: MarbleModel.cpp:629
MarbleDebug.h
FileStorageWatcher.h
QList::const_iterator
Marble::GeoDataCoordinates::Degree
Definition: GeoDataCoordinates.h:66
Marble::GeoSceneGeodata::colors
QList< QColor > colors() const
Definition: GeoSceneGeodata.cpp:103
BookmarkManager.h
QList::size
int size() const
Marble::GeoSceneAbstractDataset
Contents used inside a layer.
Definition: GeoSceneAbstractDataset.h:37
Marble::GeoDataPlacemark::geometry
GeoDataGeometry * geometry()
The geometry of the GeoDataPlacemark is to be rendered to the marble map along with the icon at the c...
Definition: GeoDataPlacemark.cpp:152
Marble::PositionTracking
Definition: PositionTracking.h:31
QBrush::color
const QColor & color() const
Marble::GeoSceneTiled::downloadPolicies
QList< const DownloadPolicy * > downloadPolicies() const
Definition: GeoSceneTiled.cpp:248
Marble::BookmarkManager
This class is responsible for loading the book mark objects from the files and various book mark oper...
Definition: BookmarkManager.h:35
QPen::color
QColor color() const
Marble::GeoDataStyle
an addressable style group
Definition: GeoDataStyle.h:55
Marble::MarbleModel::mapThemeId
QString mapThemeId() const
Return the name of the current map theme.
Marble::SunLocator
Definition: SunLocator.h:33
Marble::MarbleModel::addGeoDataFile
void addGeoDataFile(const QString &filename)
Handle file loading into the treeModel.
Definition: MarbleModel.cpp:725
GeoDataFeature.h
StoragePolicy.h
RoutingManager.h
Marble::MarbleModel::MarbleModel
MarbleModel(QObject *parent=0)
Construct a new MarbleModel.
Definition: MarbleModel.cpp:169
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
QObject::property
QVariant property(const char *name) const
Marble::MarbleModel::setWorkOffline
void setWorkOffline(bool workOffline)
Definition: MarbleModel.cpp:843
Marble::MarbleModel::routingManager
RoutingManager * routingManager()
Definition: MarbleModel.cpp:675
Marble::MarbleModel::assignFillColors
void assignFillColors(const QString &filePath)
Definition: MarbleModel.cpp:754
QObject
Marble::MarbleModel::assignNewStyle
void assignNewStyle(const QString &filePath, GeoDataStyle *style)
Definition: MarbleModel.cpp:417
Marble::MarbleModel::themeChanged
void themeChanged(QString mapTheme)
Signal that the map theme has changed, and to which theme.
Marble::MarbleModel::home
void home(qreal &lon, qreal &lat, int &zoom) const
get the home point
Definition: MarbleModel.cpp:446
Marble::UserDocument
Definition: GeoDataDocument.h:42
QList::isEmpty
bool isEmpty() const
Marble::TileCreator
Definition: TileCreator.h:53
Marble::MarbleModel::clockSpeed
int clockSpeed() const
Definition: MarbleModel.cpp:695
MarbleDirs.h
Marble::GeoSceneLayer::backend
QString backend() const
Definition: GeoSceneLayer.cpp:134
Marble::FileManager
This class is responsible for loading the different files into Geodata model.
Definition: FileManager.h:36
QString::isEmpty
bool isEmpty() const
Marble::GeoDataPolyStyle::setFill
void setFill(const bool &fill)
Set whether to fill the polygon.
Definition: GeoDataPolyStyle.cpp:90
Marble::MarbleModel::positionTracking
PositionTracking * positionTracking() const
Definition: MarbleModel.cpp:512
Marble::Planet
Definition: Planet.h:25
GeoSceneVector.h
Marble::MapThemeManager::loadMapTheme
static GeoSceneDocument * loadMapTheme(const QString &mapThemeStringID)
Returns the map theme as a GeoSceneDocument object.
Definition: MapThemeManager.cpp:155
Marble::MarbleModel::persistentTileCacheLimit
quint64 persistentTileCacheLimit() const
Returns the limit in kilobytes of the persistent (on hard disc) tile cache.
Definition: MarbleModel.cpp:557
Marble::GeoDataLineStyle::setPenStyle
void setPenStyle(Qt::PenStyle style)
Set pen cap style.
Definition: GeoDataLineStyle.cpp:130
Marble::GeoDataDocument::addStyle
void addStyle(const GeoDataStyle &style)
Add a style to the style storage.
Definition: GeoDataDocument.cpp:134
Marble::SunLocator::setPlanet
void setPlanet(const Planet *planet)
Definition: SunLocator.cpp:189
Marble::MarbleModel::updateProperty
void updateProperty(const QString &property, bool value)
Definition: MarbleModel.cpp:741
Marble::MarbleModel::setClockTimezone
void setClockTimezone(int timeInSec)
Definition: MarbleModel.cpp:705
QString
QList
QColor
kdescendantsproxymodel.h
MarbleGlobal.h
Marble::MarbleModel::setClockDateTime
void setClockDateTime(const QDateTime &datetime)
Definition: MarbleModel.cpp:685
GeoDataPlacemark.h
Marble::MarbleModel::elevationModel
ElevationModel * elevationModel()
Definition: MarbleModel.cpp:853
GeoDataTreeModel.h
Marble::GeoSceneHead::theme
QString theme() const
Definition: GeoSceneHead.cpp:111
QStringList
Marble::dgml::dgmlValue_geodata
const char * dgmlValue_geodata
Definition: DgmlAuxillaryDictionary.cpp:41
GeoDataStyleMap.h
Marble::GeoSceneTiled::sourceDir
QString sourceDir() const
Definition: GeoSceneTiled.cpp:56
Marble::GeoSceneDocument::head
const GeoSceneHead * head() const
Definition: GeoSceneDocument.cpp:86
Marble::ElevationModel
Definition: ElevationModel.h:33
Marble::GeoDataFeature::setStyleUrl
void setStyleUrl(const QString &value)
Set the styleUrl of this feature to value.
Definition: GeoDataFeature.cpp:631
QString::toLower
QString toLower() const
Marble::RoutingManager
Delegates data retrieval and model updates to the appropriate routing provider.
Definition: RoutingManager.h:37
Marble::MarbleDirs::debug
static void debug()
Definition: MarbleDirs.cpp:330
Marble::TileCreator::setTileFormat
void setTileFormat(const QString &format)
Definition: TileCreator.cpp:581
Marble::GeoSceneDocument
A container for features parsed from the DGML file.
Definition: GeoSceneDocument.h:44
QSortFilterProxyModel
MarbleClock.h
Marble::MarbleModel::clockDateTime
QDateTime clockDateTime() const
Definition: MarbleModel.cpp:690
Marble::MarbleModel::setHome
void setHome(qreal lon, qreal lat, int zoom=1050)
Set the home point.
Definition: MarbleModel.cpp:452
Marble::GeoDataFeature::setVisible
void setVisible(bool value)
Set a new value for visibility.
Definition: GeoDataFeature.cpp:661
Marble::MapDocument
Definition: GeoDataDocument.h:41
Marble::GeoDataStyle::setLineStyle
void setLineStyle(const GeoDataLineStyle &style)
set the line style
Definition: GeoDataStyle.cpp:107
Marble::GeoDataContainer::end
QVector< GeoDataFeature * >::Iterator end()
Definition: GeoDataContainer.cpp:336
Marble::GeoDataObject::id
QString id() const
Get the id of the object.
Definition: GeoDataObject.cpp:75
ElevationModel.h
Marble::MarbleModel::groundOverlayModel
QAbstractItemModel * groundOverlayModel()
Definition: MarbleModel.cpp:497
QVector
Marble::GeoDataObject::setId
void setId(const QString &value)
Set the id of the object.
Definition: GeoDataObject.cpp:80
GeoSceneTiled.h
Marble::MarbleModel::~MarbleModel
virtual ~MarbleModel()
Definition: MarbleModel.cpp:206
QPen::width
int width() const
Marble::GeoSceneMap::hasVectorLayers
bool hasVectorLayers() const
Checks for valid layers that contain vector data.
Definition: GeoSceneMap.cpp:203
Marble::GeoSceneLayer::datasets
QVector< GeoSceneAbstractDataset * > datasets() const
Definition: GeoSceneLayer.cpp:124
QTextDocument
Marble::GeoDataFeature
A base class for all geodata features.
Definition: GeoDataFeature.h:57
QNetworkConfigurationManager
PluginManager.h
Marble::GeoDataColorStyle::color
QColor color() const
Return the color component.
Definition: GeoDataColorStyle.cpp:98
Marble::GeoDataPolyStyle::colorIndex
quint8 colorIndex() const
Return the value of color index.
Definition: GeoDataPolyStyle.cpp:125
Marble::MarbleModel::bookmarkManager
BookmarkManager * bookmarkManager()
return instance of BookmarkManager
Definition: MarbleModel.cpp:213
Marble::MarbleModel::planetRadius
qreal planetRadius() const
Definition: MarbleModel.cpp:522
Marble::MarbleModel::legend
QTextDocument * legend()
Definition: MarbleModel.cpp:715
QAbstractItemModel
QPen
QColor::setAlphaF
void setAlphaF(qreal alpha)
QMap::insert
iterator insert(const Key &key, const T &value)
Marble::MarbleModel::downloadManager
HttpDownloadManager * downloadManager()
Return the downloadmanager to load missing tiles.
Definition: MarbleModel.cpp:466
Marble::GeoDataFeature::setStyle
void setStyle(GeoDataStyle *style)
Sets the style of the placemark.
Definition: GeoDataFeature.cpp:735
GeoDataTypes.h
QList::constEnd
const_iterator constEnd() const
QList::constBegin
const_iterator constBegin() const
Marble::GeoDataTypes::GeoDataTrackType
const char * GeoDataTrackType
Definition: GeoDataTypes.cpp:86
PositionTracking.h
QItemSelectionModel
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Marble::MarbleClock
Definition: MarbleClock.h:25
Marble::GeoDataPolyStyle
specifies the style how polygons are drawn
Definition: GeoDataPolyStyle.h:34
Marble::MarbleModel::setLegend
void setLegend(QTextDocument *document)
Definition: MarbleModel.cpp:720
Marble::GeoDataFeature::nodeType
virtual const char * nodeType() const
Provides type information for downcasting a GeoData.
Definition: GeoDataFeature.cpp:158
Marble::MarbleModel::trackedPlacemarkChanged
void trackedPlacemarkChanged(const GeoDataPlacemark *placemark)
Emitted when the placemark tracked by this model has changed.
Marble::GeoDataPlacemark
a class representing a point of interest on the map
Definition: GeoDataPlacemark.h:54
Marble::mDebug
QDebug mDebug()
a function to replace qDebug() in Marble library code
Definition: MarbleDebug.cpp:36
Marble::GeoSceneGeodata::alpha
qreal alpha() const
Definition: GeoSceneGeodata.cpp:83
Marble::GeoDataStyle::setPolyStyle
void setPolyStyle(const GeoDataPolyStyle &style)
set the poly style
Definition: GeoDataStyle.cpp:117
Marble::MarbleModel::planetName
QString planetName() const
Definition: MarbleModel.cpp:527
GeoDataPolyStyle.h
GeoSceneMap.h
Marble::dgml::dgmlValue_vector
const char * dgmlValue_vector
Definition: DgmlAuxillaryDictionary.cpp:39
MapThemeManager.h
Marble::MarbleModel::setClockSpeed
void setClockSpeed(int speed)
Definition: MarbleModel.cpp:700
Marble::MarbleModel::placemarkModel
QAbstractItemModel * placemarkModel()
Definition: MarbleModel.cpp:487
TileCreatorDialog.h
QDateTime
Marble::GeoSceneMap::hasTextureLayers
bool hasTextureLayers() const
Checks for valid layers that contain texture data.
Definition: GeoSceneMap.cpp:190
GeoSceneLayer.h
Marble::HttpDownloadManager
This class manages scheduled downloads.
Definition: HttpDownloadManager.h:44
Marble::GeoSceneGeodata
Definition: GeoSceneGeodata.h:24
Marble::GeoDataPolyStyle::setColorIndex
void setColorIndex(quint8 colorIndex)
Set the color index which will be used to assign color to brush.
Definition: GeoDataPolyStyle.cpp:120
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