• 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
FileLoader.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 2008 Patrick Spendrin <ps_ml@gmx.de>
9 //
10 
11 #include "FileLoader.h"
12 
13 #include <QBuffer>
14 #include <QDataStream>
15 #include <QDateTime>
16 #include <QFile>
17 #include <QThread>
18 
19 #include "GeoDataParser.h"
20 #include "GeoDataDocument.h"
21 #include "GeoDataFolder.h"
22 #include "GeoDataPlacemark.h"
23 #include "GeoDataData.h"
24 #include "GeoDataExtendedData.h"
25 #include "GeoDataStyleMap.h"
26 #include "GeoDataPolyStyle.h"
27 #include "GeoDataLineStyle.h"
28 #include "GeoDataStyle.h"
29 #include "GeoDataTypes.h"
30 #include "MarbleClock.h"
31 #include "MarbleDirs.h"
32 #include "MarbleDebug.h"
33 #include "MarbleModel.h"
34 #include "ParsingRunnerManager.h"
35 
36 namespace Marble
37 {
38 
39 class FileLoaderPrivate
40 {
41 public:
42  FileLoaderPrivate( FileLoader* parent, MarbleModel *model, bool recenter,
43  const QString& file, const QString& property, GeoDataStyle* style, DocumentRole role )
44  : q( parent),
45  m_runner( model->pluginManager() ),
46  m_recenter( recenter ),
47  m_filepath ( file ),
48  m_property( property ),
49  m_style( style ),
50  m_documentRole ( role ),
51  m_styleMap( new GeoDataStyleMap ),
52  m_document( 0 ),
53  m_clock( model->clock() )
54  {
55  if( m_style ) {
56  m_styleMap->setStyleId("default-map");
57  m_styleMap->insert("normal", QString("#").append(m_style->styleId()));
58  }
59  }
60 
61  FileLoaderPrivate( FileLoader* parent, MarbleModel *model,
62  const QString& contents, const QString& file, DocumentRole role )
63  : q( parent ),
64  m_runner( model->pluginManager() ),
65  m_recenter( false ),
66  m_filepath ( file ),
67  m_contents ( contents ),
68  m_documentRole ( role ),
69  m_document( 0 ),
70  m_clock( model->clock() )
71  {
72  }
73 
74  ~FileLoaderPrivate()
75  {
76  }
77 
78  void saveFile(const QString& filename );
79  void savePlacemarks(QDataStream &out, const GeoDataContainer *container);
80 
81  void createFilterProperties( GeoDataContainer *container );
82  int cityPopIdx( qint64 population ) const;
83  int spacePopIdx( qint64 population ) const;
84  int areaPopIdx( qreal area ) const;
85 
86  void documentParsed( GeoDataDocument *doc, const QString& error);
87 
88  FileLoader *q;
89  ParsingRunnerManager m_runner;
90  bool m_recenter;
91  QString m_filepath;
92  QString m_contents;
93  QString m_nonExistentLocalCacheFile;
94  QString m_property;
95  GeoDataStyle* m_style;
96  DocumentRole m_documentRole;
97  GeoDataStyleMap* m_styleMap;
98  GeoDataDocument *m_document;
99  QString m_error;
100 
101  const MarbleClock *m_clock;
102 };
103 
104 FileLoader::FileLoader( QObject* parent, MarbleModel *model, bool recenter,
105  const QString& file, const QString& property, GeoDataStyle* style = new GeoDataStyle(), DocumentRole role = UnknownDocument )
106  : QThread( parent ),
107  d( new FileLoaderPrivate( this, model, recenter, file, property, style, role ) )
108 {
109 }
110 
111 FileLoader::FileLoader( QObject* parent, MarbleModel *model,
112  const QString& contents, const QString& file, DocumentRole role = UnknownDocument)
113  : QThread( parent ),
114  d( new FileLoaderPrivate( this, model, contents, file, role ) )
115 {
116 }
117 
118 FileLoader::~FileLoader()
119 {
120  delete d;
121 }
122 
123 QString FileLoader::path() const
124 {
125  return d->m_filepath;
126 }
127 
128 GeoDataDocument* FileLoader::document()
129 {
130  return d->m_document;
131 }
132 
133 QString FileLoader::error() const
134 {
135  return d->m_error;
136 }
137 
138 void FileLoader::run()
139 {
140  if ( d->m_contents.isEmpty() ) {
141  QString defaultSourceName;
142 
143  mDebug() << "starting parser for" << d->m_filepath;
144 
145  QFileInfo fileinfo( d->m_filepath );
146  QString path = fileinfo.path();
147  if ( path == "." ) path.clear();
148  QString name = fileinfo.completeBaseName();
149  QString suffix = fileinfo.suffix();
150  QString cacheFile;
151 
152  // determine source, cache names
153  if ( fileinfo.isAbsolute() ) {
154  // We got an _absolute_ path now: e.g. "/patrick.kml"
155  defaultSourceName = path + '/' + name + '.' + suffix;
156  }
157  else if ( d->m_filepath.contains( '/' ) ) {
158  // _relative_ path: "maps/mars/viking/patrick.kml"
159  defaultSourceName = MarbleDirs::path( path + '/' + name + '.' + suffix );
160  }
161  else {
162  // _standard_ shared placemarks: "placemarks/patrick.kml"
163  defaultSourceName = MarbleDirs::path( "placemarks/" + path + name + '.' + suffix );
164 
165  cacheFile = MarbleDirs::path( "placemarks/" + path + name + ".cache" );
166  if ( cacheFile.isEmpty()) {
167  cacheFile = MarbleDirs::localPath() + "/placemarks/" + path + name + ".cache";
168  if ( !QFileInfo( cacheFile ).exists() ) {
169  d->m_nonExistentLocalCacheFile = cacheFile;
170  }
171  }
172  }
173 
174  // if cache file more recent that source file, load cache file
175  if ( QFile::exists( cacheFile ) ) {
176  mDebug() << "Loading Cache File:" + cacheFile;
177 
178  QDateTime sourceLastModified;
179 
180  if ( QFile::exists( defaultSourceName ) ) {
181  sourceLastModified = QFileInfo( defaultSourceName ).lastModified();
182  }
183 
184  const QDateTime cacheLastModified = QFileInfo( cacheFile ).lastModified();
185 
186  if ( sourceLastModified < cacheLastModified ) {
187  connect( &d->m_runner, SIGNAL(parsingFinished(GeoDataDocument*,QString)),
188  this, SLOT(documentParsed(GeoDataDocument*,QString)) );
189  d->m_runner.parseFile( cacheFile, d->m_documentRole );
190  }
191  }
192  // we load source file, multiple cases
193  else if ( QFile::exists( defaultSourceName ) ) {
194  mDebug() << "No recent Default Placemark Cache File available!";
195 
196  // use runners: pnt, gpx, osm
197  connect( &d->m_runner, SIGNAL(parsingFinished(GeoDataDocument*,QString)),
198  this, SLOT(documentParsed(GeoDataDocument*,QString)) );
199  d->m_runner.parseFile( defaultSourceName, d->m_documentRole );
200  }
201  else {
202  mDebug() << "No Default Placemark Source File for " << name;
203  }
204  // content is not empty, we load from data
205  } else {
206  // Read the KML Data
207  GeoDataParser parser( GeoData_KML );
208 
209  QByteArray ba( d->m_contents.toUtf8() );
210  QBuffer buffer( &ba );
211  buffer.open( QIODevice::ReadOnly );
212 
213  if ( !parser.read( &buffer ) ) {
214  qWarning( "Could not import kml buffer!" );
215  emit loaderFinished( this );
216  return;
217  }
218 
219  GeoDocument* document = parser.releaseDocument();
220  Q_ASSERT( document );
221 
222  d->m_document = static_cast<GeoDataDocument*>( document );
223  d->m_document->setProperty( d->m_property );
224  d->m_document->setDocumentRole( d->m_documentRole );
225  d->createFilterProperties( d->m_document );
226  buffer.close();
227 
228  mDebug() << "newGeoDataDocumentAdded" << d->m_filepath;
229 
230  emit newGeoDataDocumentAdded( d->m_document );
231  emit loaderFinished( this );
232  }
233 
234 }
235 
236 bool FileLoader::recenter() const
237 {
238  return d->m_recenter;
239 }
240 
241 const quint32 MarbleMagicNumber = 0x31415926;
242 
243 void FileLoaderPrivate::saveFile( const QString& filename )
244 {
245 
246  if ( !QDir( MarbleDirs::localPath() + "/placemarks/" ).exists() )
247  ( QDir::root() ).mkpath( MarbleDirs::localPath() + "/placemarks/" );
248 
249  mDebug() << "Creating cache at " << filename ;
250 
251  QFile file( filename );
252  if ( !file.open( QIODevice::WriteOnly ) ) {
253  mDebug() << Q_FUNC_INFO << "Can't open" << filename << "for writing";
254  return;
255  }
256  QDataStream out( &file );
257 
258  // Write a header with a "magic number" and a version
259  // out << (quint32)0xA0B0C0D0;
260  out << (quint32)MarbleMagicNumber;
261  out << (qint32)015;
262 
263  out.setVersion( QDataStream::Qt_4_2 );
264 
265  savePlacemarks(out, m_document);
266 }
267 
268 void FileLoaderPrivate::savePlacemarks(QDataStream &out, const GeoDataContainer *container)
269 {
270 
271  qreal lon;
272  qreal lat;
273  qreal alt;
274 
275  const QVector<GeoDataPlacemark*> placemarks = container->placemarkList();
276  QVector<GeoDataPlacemark*>::const_iterator it = placemarks.constBegin();
277  QVector<GeoDataPlacemark*>::const_iterator const end = placemarks.constEnd();
278  for (; it != end; ++it ) {
279  out << (*it)->name();
280  (*it)->coordinate( m_clock->dateTime() ).geoCoordinates( lon, lat, alt );
281 
282  // Use double to provide a single cache file format across architectures
283  out << (double)(lon) << (double)(lat) << (double)(alt);
284  out << QString( (*it)->role() );
285  out << QString( (*it)->description() );
286  out << QString( (*it)->countryCode() );
287  out << QString( (*it)->state() );
288  out << (double) (*it)->area();
289  out << (qint64) (*it)->population();
290  out << ( qint16 ) ( (*it)->extendedData().value("gmt").value().toInt() );
291  out << ( qint8 ) ( (*it)->extendedData().value("dst").value().toInt() );
292  }
293 
294  const QVector<GeoDataFolder*> folders = container->folderList();
295  QVector<GeoDataFolder*>::const_iterator cont = folders.constBegin();
296  QVector<GeoDataFolder*>::const_iterator endcont = folders.constEnd();
297  for (; cont != endcont; ++cont ) {
298  savePlacemarks(out, *cont);
299  }
300 }
301 
302 void FileLoaderPrivate::documentParsed( GeoDataDocument* doc, const QString& error )
303 {
304  m_error = error;
305  if ( doc ) {
306  m_document = doc;
307  doc->setProperty( m_property );
308  if( m_style ) {
309  doc->addStyleMap( *m_styleMap );
310  doc->addStyle( *m_style );
311  }
312 
313  createFilterProperties( doc );
314  emit q->newGeoDataDocumentAdded( m_document );
315  if ( !m_nonExistentLocalCacheFile.isEmpty() ) {
316  saveFile( m_nonExistentLocalCacheFile );
317  }
318  }
319  emit q->loaderFinished( q );
320 }
321 
322 void FileLoaderPrivate::createFilterProperties( GeoDataContainer *container )
323 {
324  QVector<GeoDataFeature*>::Iterator i = container->begin();
325  QVector<GeoDataFeature*>::Iterator const end = container->end();
326  for (; i != end; ++i ) {
327  if ( (*i)->nodeType() == GeoDataTypes::GeoDataFolderType
328  || (*i)->nodeType() == GeoDataTypes::GeoDataDocumentType ) {
329  GeoDataContainer *child = static_cast<GeoDataContainer*>( *i );
330  createFilterProperties( child );
331  } else if ( (*i)->nodeType() == GeoDataTypes::GeoDataGroundOverlayType
332  || (*i)->nodeType() == GeoDataTypes::GeoDataPhotoOverlayType
333  || (*i)->nodeType() == GeoDataTypes::GeoDataScreenOverlayType ) {
335  } else if ( (*i)->nodeType() == GeoDataTypes::GeoDataPlacemarkType ) {
336  Q_ASSERT( dynamic_cast<GeoDataPlacemark*>( *i ) );
337 
338  GeoDataPlacemark* placemark = static_cast<GeoDataPlacemark*>( *i );
339  Q_ASSERT( placemark->geometry() );
340 
341  bool hasPopularity = false;
342 
343  if ( placemark->geometry()->nodeType() != GeoDataTypes::GeoDataTrackType &&
344  placemark->geometry()->nodeType() != GeoDataTypes::GeoDataPointType
345  && m_documentRole == MapDocument
346  && m_style ) {
347  placemark->setStyleUrl( QString("#").append( m_styleMap->styleId() ) );
348  }
349 
350  // Mountain (H), Volcano (V), Shipwreck (W)
351  if ( placemark->role() == "H" || placemark->role() == "V" || placemark->role() == "W" )
352  {
353  qreal altitude = placemark->coordinate( m_clock->dateTime() ).altitude();
354  if ( altitude != 0.0 )
355  {
356  hasPopularity = true;
357  placemark->setPopularity( (qint64)(altitude * 1000.0) );
358  placemark->setZoomLevel( cityPopIdx( qAbs( (qint64)(altitude * 1000.0) ) ) );
359  }
360  }
361  // Continent (K), Ocean (O), Nation (S)
362  else if ( placemark->role() == "K" || placemark->role() == "O" || placemark->role() == "S" )
363  {
364  qreal area = placemark->area();
365  if ( area >= 0.0 )
366  {
367  hasPopularity = true;
368  // mDebug() << placemark->name() << " " << (qint64)(area);
369  placemark->setPopularity( (qint64)(area * 100) );
370  placemark->setZoomLevel( areaPopIdx( area ) );
371  }
372  }
373  // Pole (P)
374  else if ( placemark->role() == "P" )
375  {
376  placemark->setPopularity( 1000000000 );
377  placemark->setZoomLevel( 1 );
378  }
379  // Magnetic Pole (M)
380  else if ( placemark->role() == "M" )
381  {
382  placemark->setPopularity( 10000000 );
383  placemark->setZoomLevel( 3 );
384  }
385  // MannedLandingSite (h)
386  else if ( placemark->role() == "h" )
387  {
388  placemark->setPopularity( 1000000000 );
389  placemark->setZoomLevel( 1 );
390  }
391  // RoboticRover (r)
392  else if ( placemark->role() == "r" )
393  {
394  placemark->setPopularity( 10000000 );
395  placemark->setZoomLevel( 2 );
396  }
397  // UnmannedSoftLandingSite (u)
398  else if ( placemark->role() == "u" )
399  {
400  placemark->setPopularity( 1000000 );
401  placemark->setZoomLevel( 3 );
402  }
403  // UnmannedSoftLandingSite (i)
404  else if ( placemark->role() == "i" )
405  {
406  placemark->setPopularity( 1000000 );
407  placemark->setZoomLevel( 3 );
408  }
409  // Space Terrain: Craters, Maria, Montes, Valleys, etc.
410  else if ( placemark->role() == "m" || placemark->role() == "v"
411  || placemark->role() == "o" || placemark->role() == "c"
412  || placemark->role() == "a" )
413  {
414  qint64 diameter = placemark->population();
415  if ( diameter >= 0 )
416  {
417  hasPopularity = true;
418  placemark->setPopularity( diameter );
419  if ( placemark->role() == "c" ) {
420  placemark->setZoomLevel( spacePopIdx( diameter ) );
421  if ( placemark->name() == "Tycho" || placemark->name() == "Copernicus" ) {
422  placemark->setZoomLevel( 1 );
423  }
424  }
425  else {
426  placemark->setZoomLevel( spacePopIdx( diameter ) );
427  }
428 
429  if ( placemark->role() == "a" && diameter == 0 ) {
430  placemark->setPopularity( 1000000000 );
431  placemark->setZoomLevel( 1 );
432  }
433  }
434  }
435  else
436  {
437  qint64 population = placemark->population();
438  if ( population >= 0 )
439  {
440  hasPopularity = true;
441  placemark->setPopularity( population );
442  placemark->setZoomLevel( cityPopIdx( population ) );
443  }
444  }
445 
446  // Then we set the visual category:
447 
448  if ( placemark->role() == "H" ) placemark->setVisualCategory( GeoDataPlacemark::Mountain );
449  else if ( placemark->role() == "V" ) placemark->setVisualCategory( GeoDataPlacemark::Volcano );
450 
451  else if ( placemark->role() == "m" ) placemark->setVisualCategory( GeoDataPlacemark::Mons );
452  else if ( placemark->role() == "v" ) placemark->setVisualCategory( GeoDataPlacemark::Valley );
453  else if ( placemark->role() == "o" ) placemark->setVisualCategory( GeoDataPlacemark::OtherTerrain );
454  else if ( placemark->role() == "c" ) placemark->setVisualCategory( GeoDataPlacemark::Crater );
455  else if ( placemark->role() == "a" ) placemark->setVisualCategory( GeoDataPlacemark::Mare );
456 
457  else if ( placemark->role() == "P" ) placemark->setVisualCategory( GeoDataPlacemark::GeographicPole );
458  else if ( placemark->role() == "M" ) placemark->setVisualCategory( GeoDataPlacemark::MagneticPole );
459  else if ( placemark->role() == "W" ) placemark->setVisualCategory( GeoDataPlacemark::ShipWreck );
460  else if ( placemark->role() == "F" ) placemark->setVisualCategory( GeoDataPlacemark::AirPort );
461  else if ( placemark->role() == "A" ) placemark->setVisualCategory( GeoDataPlacemark::Observatory );
462  else if ( placemark->role() == "K" ) placemark->setVisualCategory( GeoDataPlacemark::Continent );
463  else if ( placemark->role() == "O" ) placemark->setVisualCategory( GeoDataPlacemark::Ocean );
464  else if ( placemark->role() == "S" ) placemark->setVisualCategory( GeoDataPlacemark::Nation );
465  else
466  if ( placemark->role()=="PPL"
467  || placemark->role()=="PPLF"
468  || placemark->role()=="PPLG"
469  || placemark->role()=="PPLL"
470  || placemark->role()=="PPLQ"
471  || placemark->role()=="PPLR"
472  || placemark->role()=="PPLS"
473  || placemark->role()=="PPLW" ) placemark->setVisualCategory(
474  ( GeoDataPlacemark::GeoDataVisualCategory )( GeoDataPlacemark::SmallCity
475  + (( 20- ( 2*placemark->zoomLevel()) ) / 4 * 4 ) ) );
476  else if ( placemark->role() == "PPLA" ) placemark->setVisualCategory(
477  ( GeoDataPlacemark::GeoDataVisualCategory )( GeoDataPlacemark::SmallStateCapital
478  + (( 20- ( 2*placemark->zoomLevel()) ) / 4 * 4 ) ) );
479  else if ( placemark->role()=="PPLC" ) placemark->setVisualCategory(
480  ( GeoDataPlacemark::GeoDataVisualCategory )( GeoDataPlacemark::SmallNationCapital
481  + (( 20- ( 2*placemark->zoomLevel()) ) / 4 * 4 ) ) );
482  else if ( placemark->role()=="PPLA2" || placemark->role()=="PPLA3" ) placemark->setVisualCategory(
483  ( GeoDataPlacemark::GeoDataVisualCategory )( GeoDataPlacemark::SmallCountyCapital
484  + (( 20- ( 2*placemark->zoomLevel()) ) / 4 * 4 ) ) );
485  else if ( placemark->role()==" " && !hasPopularity && placemark->visualCategory() == GeoDataPlacemark::Unknown ) {
486  placemark->setVisualCategory( GeoDataPlacemark::Unknown ); // default location
487  placemark->setZoomLevel(0);
488  }
489  else if ( placemark->role() == "h" ) placemark->setVisualCategory( GeoDataPlacemark::MannedLandingSite );
490  else if ( placemark->role() == "r" ) placemark->setVisualCategory( GeoDataPlacemark::RoboticRover );
491  else if ( placemark->role() == "u" ) placemark->setVisualCategory( GeoDataPlacemark::UnmannedSoftLandingSite );
492  else if ( placemark->role() == "i" ) placemark->setVisualCategory( GeoDataPlacemark::UnmannedHardLandingSite );
493 
494  if ( placemark->role() == "W" && placemark->zoomLevel() < 4 )
495  placemark->setZoomLevel( 4 );
496  if ( placemark->role() == "O" )
497  placemark->setZoomLevel( 2 );
498  if ( placemark->role() == "K" )
499  placemark->setZoomLevel( 0 );
500  if ( !placemark->isVisible() ) {
501  placemark->setZoomLevel( 18 );
502  }
503  // Workaround: Emulate missing "setVisible" serialization by allowing for population
504  // values smaller than -1 which are considered invisible.
505  if ( placemark->population() < -1 ) {
506  placemark->setZoomLevel( 18 );
507  }
508  } else {
509  qWarning() << Q_FUNC_INFO << "Unknown feature" << (*i)->nodeType() << ". Skipping.";
510  }
511  }
512 }
513 
514 int FileLoaderPrivate::cityPopIdx( qint64 population ) const
515 {
516  int popidx = 3;
517 
518  if ( population < 2500 ) popidx=10;
519  else if ( population < 5000) popidx=9;
520  else if ( population < 25000) popidx=8;
521  else if ( population < 75000) popidx=7;
522  else if ( population < 250000) popidx=6;
523  else if ( population < 750000) popidx=5;
524  else if ( population < 2500000) popidx=4;
525 
526  return popidx;
527 }
528 
529 int FileLoaderPrivate::spacePopIdx( qint64 population ) const
530 {
531  int popidx = 1;
532 
533  if ( population < 1000 ) popidx=10;
534  else if ( population < 2000) popidx=9;
535  else if ( population < 8000) popidx=8;
536  else if ( population < 20000) popidx=7;
537  else if ( population < 60000) popidx=6;
538  else if ( population < 100000) popidx=5;
539  else if ( population < 200000 ) popidx=4;
540  else if ( population < 400000 ) popidx=2;
541  else if ( population < 600000 ) popidx=1;
542 
543  return popidx;
544 }
545 
546 int FileLoaderPrivate::areaPopIdx( qreal area ) const
547 {
548  int popidx = 1;
549  if ( area < 200000 ) popidx=5;
550  else if ( area < 1000000 ) popidx=4;
551  else if ( area < 2500000 ) popidx=3;
552  else if ( area < 5000000 ) popidx=2;
553 
554  return popidx;
555 }
556 
557 
558 
559 #include "FileLoader.moc"
560 } // namespace Marble
GeoDataDocument.h
Marble::FileLoader::path
QString path() const
Definition: FileLoader.cpp:123
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:64
Marble::GeoDataTypes::GeoDataPointType
const char * GeoDataPointType
Definition: GeoDataTypes.cpp:64
Marble::GeoDataParser
Definition: GeoDataParser.h:40
Marble::MarbleDirs::path
static QString path(const QString &relativePath)
Definition: MarbleDirs.cpp:53
Marble::FileLoader::newGeoDataDocumentAdded
void newGeoDataDocumentAdded(GeoDataDocument *)
Marble::GeoDataFeature::Continent
Definition: GeoDataFeature.h:105
Marble::FileLoader::document
GeoDataDocument * document()
Definition: FileLoader.cpp:128
Marble::GeoDataFeature::Unknown
Definition: GeoDataFeature.h:78
Marble::GeoDataFeature::Mons
Definition: GeoDataFeature.h:103
Marble::GeoDataFeature::SmallNationCapital
Definition: GeoDataFeature.h:85
MarbleModel.h
This file contains the headers for MarbleModel.
Marble::GeoDataFeature::Mountain
Definition: GeoDataFeature.h:101
Marble::GeoDataTypes::GeoDataPlacemarkType
const char * GeoDataPlacemarkType
Definition: GeoDataTypes.cpp:62
Marble::GeoDataTypes::GeoDataDocumentType
const char * GeoDataDocumentType
Definition: GeoDataTypes.cpp:34
GeoDataStyle.h
Marble::GeoDataFeature::Crater
Definition: GeoDataFeature.h:110
Marble::GeoDataTypes::GeoDataGroundOverlayType
const char * GeoDataGroundOverlayType
Definition: GeoDataTypes.cpp:40
GeoDataParser.h
Marble::MarbleDirs::localPath
static QString localPath()
Definition: MarbleDirs.cpp:217
Marble::GeoDataFeature::OtherTerrain
Definition: GeoDataFeature.h:107
GeoDataExtendedData.h
Marble::GeoDataFeature::Valley
Definition: GeoDataFeature.h:104
FileLoader.h
Marble::GeoDataFeature::AirPort
Definition: GeoDataFeature.h:117
QObject
GeoDataLineStyle.h
Marble::GeoDataFeature::Nation
Definition: GeoDataFeature.h:98
MarbleDebug.h
Marble::FileLoader::error
QString error() const
Definition: FileLoader.cpp:133
ParsingRunnerManager.h
Marble::UnknownDocument
Definition: GeoDataDocument.h:40
Marble::GeoData_KML
Definition: GeoDataParser.h:36
Marble::MarbleMagicNumber
const quint32 MarbleMagicNumber
Definition: FileLoader.cpp:241
Marble::GeoDataFeature::SmallStateCapital
Definition: GeoDataFeature.h:84
Marble::GeoDataStyle
an addressable style group
Definition: GeoDataStyle.h:55
Marble::GeoDataTypes::GeoDataScreenOverlayType
const char * GeoDataScreenOverlayType
Definition: GeoDataTypes.cpp:79
Marble::GeoParser::read
bool read(QIODevice *)
Main API for reading the XML document.
Definition: GeoParser.cpp:74
Marble::GeoDataFeature::MannedLandingSite
Definition: GeoDataFeature.h:126
Marble::GeoDataFeature::Volcano
Definition: GeoDataFeature.h:102
Marble::FileLoader::loaderFinished
void loaderFinished(FileLoader *)
Marble::GeoDataFeature::Ocean
Definition: GeoDataFeature.h:106
MarbleDirs.h
Marble::GeoDataTypes::GeoDataFolderType
const char * GeoDataFolderType
Definition: GeoDataTypes.cpp:38
GeoDataPlacemark.h
GeoDataStyleMap.h
Marble::FileLoader::recenter
bool recenter() const
Definition: FileLoader.cpp:236
Marble::GeoDataFeature::MagneticPole
Definition: GeoDataFeature.h:115
MarbleClock.h
Marble::FileLoader::~FileLoader
virtual ~FileLoader()
Definition: FileLoader.cpp:118
Marble::FileLoader::run
void run()
Definition: FileLoader.cpp:138
Marble::MapDocument
Definition: GeoDataDocument.h:41
GeoDataFolder.h
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:96
GeoDataData.h
Marble::GeoDataFeature::RoboticRover
Definition: GeoDataFeature.h:127
Marble::GeoDataFeature::UnmannedHardLandingSite
Definition: GeoDataFeature.h:129
Marble::FileLoader::FileLoader
FileLoader(QObject *parent, MarbleModel *model, bool recenter, const QString &file, const QString &property, GeoDataStyle *style, DocumentRole role)
Definition: FileLoader.cpp:104
Marble::GeoDocument
A shared base class between GeoDataDocument/GeoSourceDocument.
Definition: GeoDocument.h:42
Marble::GeoDataFeature::GeographicPole
Definition: GeoDataFeature.h:114
Marble::GeoDataFeature::SmallCountyCapital
Definition: GeoDataFeature.h:83
Marble::GeoDataFeature::UnmannedSoftLandingSite
Definition: GeoDataFeature.h:128
Marble::GeoDataFeature::GeoDataVisualCategory
GeoDataVisualCategory
A categorization of a placemark as defined by ...FIXME.
Definition: GeoDataFeature.h:75
Marble::GeoDataFeature::Observatory
Definition: GeoDataFeature.h:118
GeoDataTypes.h
Marble::GeoDataTypes::GeoDataTrackType
const char * GeoDataTrackType
Definition: GeoDataTypes.cpp:77
QThread
Marble::mDebug
QDebug mDebug()
a function to replace qDebug() in Marble library code
Definition: MarbleDebug.cpp:31
Marble::DocumentRole
DocumentRole
Definition: GeoDataDocument.h:39
GeoDataPolyStyle.h
Marble::GeoDataFeature::ShipWreck
Definition: GeoDataFeature.h:116
Marble::GeoDataFeature::Mare
Definition: GeoDataFeature.h:111
Marble::GeoDataTypes::GeoDataPhotoOverlayType
const char * GeoDataPhotoOverlayType
Definition: GeoDataTypes.cpp:61
Marble::GeoParser::releaseDocument
GeoDocument * releaseDocument()
retrieve the parsed document and reset the parser If parsing was successful, retrieve the resulting d...
Definition: GeoParser.cpp:205
Marble::GeoDataFeature::SmallCity
Definition: GeoDataFeature.h:82
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:49 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