• 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
  • plugins
  • render
  • satellites
SatellitesPlugin.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 2011 Guillaume Martres <smarter@ubuntu.com>
9 // Copyright 2012 Rene Kuettner <rene@bitkanal.net>
10 //
11 
12 #include "SatellitesPlugin.h"
13 
14 #include "MarbleDebug.h"
15 #include "MarbleWidget.h"
16 #include "MarbleWidgetPopupMenu.h"
17 #include "MarbleModel.h"
18 #include "GeoDataPlacemark.h"
19 #include "SatellitesMSCItem.h"
20 #include "SatellitesTLEItem.h"
21 #include "SatellitesConfigLeafItem.h"
22 #include "SatellitesConfigNodeItem.h"
23 #include "SatellitesConfigModel.h"
24 #include "ViewportParams.h"
25 
26 #include "ui_SatellitesConfigDialog.h"
27 
28 #include <QUrl>
29 #include <QMouseEvent>
30 
31 namespace Marble
32 {
33 
34 SatellitesPlugin::SatellitesPlugin( const MarbleModel *marbleModel )
35  : RenderPlugin( marbleModel ),
36  m_satModel( 0 ),
37  m_isInitialized( false ),
38  m_configDialog( new SatellitesConfigDialog() )
39 {
40  connect( this, SIGNAL(settingsChanged(QString)), SLOT(updateSettings()) );
41  connect( this, SIGNAL(enabledChanged(bool)), SLOT(enableModel(bool)) );
42  connect( this, SIGNAL(visibilityChanged(bool,QString)), SLOT(visibleModel(bool)) );
43 
44  connect( m_configDialog, SIGNAL(activatePluginClicked()), this, SLOT(activate()) );
45  connect( this, SIGNAL(visibilityChanged(bool,QString)),
46  m_configDialog, SLOT(setDialogActive(bool)) );
47 
48  setVisible( false );
49  setSettings( QHash<QString, QVariant>() );
50 
51  m_showOrbitAction = new QAction( tr( "Display orbit" ), this );
52  m_showOrbitAction->setCheckable( true );
53  m_showOrbitAction->setData( 0 );
54 
55  m_trackPlacemarkAction = new QAction( tr( "Keep centered" ), this );
56  m_trackPlacemarkAction->setData( 0 );
57  connect( m_showOrbitAction, SIGNAL(triggered(bool)), SLOT(showOrbit(bool)) );
58  connect( m_trackPlacemarkAction, SIGNAL(triggered(bool)), SLOT(trackPlacemark()) );
59 }
60 
61 SatellitesPlugin::~SatellitesPlugin()
62 {
63  delete m_satModel;
64 
65  delete m_configDialog;
66  delete m_showOrbitAction;
67  delete m_trackPlacemarkAction;
68 }
69 
70 QStringList SatellitesPlugin::backendTypes() const
71 {
72  return QStringList( "satellites" );
73 }
74 
75 QString SatellitesPlugin::renderPolicy() const
76 {
77  return QString( "ALWAYS" );
78 }
79 
80 QStringList SatellitesPlugin::renderPosition() const
81 {
82  return QStringList( "ORBIT" );
83 }
84 
85 QString SatellitesPlugin::name() const
86 {
87  return tr( "Satellites" );
88 }
89 
90 QString SatellitesPlugin::nameId() const
91 {
92  return "satellites";
93 }
94 
95 QString SatellitesPlugin::guiString() const
96 {
97  return tr( "&Satellites" );
98 }
99 
100 QString SatellitesPlugin::version() const
101 {
102  return "2.0";
103 }
104 
105 QString SatellitesPlugin::description() const
106 {
107  return tr( "This plugin displays satellites and their orbits." );
108 }
109 
110 QString SatellitesPlugin::copyrightYears() const
111 {
112  return "2012";
113 }
114 
115 QList<PluginAuthor> SatellitesPlugin::pluginAuthors() const
116 {
117  return QList<PluginAuthor>()
118  << PluginAuthor( "Guillaume Martres", "smarter@ubuntu.com" )
119  << PluginAuthor( "Rene Kuettner", "rene@bitkanal.net" )
120  << PluginAuthor( "Gerhard Holtkamp", "" );
121 }
122 
123 QString SatellitesPlugin::aboutDataText() const
124 {
125  return tr(
126  "Earth-Satellites orbital elements from <ul><li>"
127  "<a href=\"http://www.celestrak.com\">http://www.celestrak.com</a>"
128  "</li></ul>"
129  "Planetary-Satellites orbital elements from <ul><li>"
130  "<a href=\"http://tasc.esa.int/\">ESA TASC service</a></li><li>"
131  "<a href=\"http://ssd.jpl.nasa.gov/?horizons\">"
132  "JPL Horizons</a></li></ul>" );
133 }
134 
135 QIcon SatellitesPlugin::icon() const
136 {
137  return QIcon( ":/data/bitmaps/satellite.png" );
138 }
139 
140 RenderPlugin::RenderType SatellitesPlugin::renderType() const
141 {
142  return OnlineRenderType;
143 }
144 
145 void SatellitesPlugin::initialize()
146 {
147  // FIXME: remove the const_cast, it may be best to create a new type of
148  // plugins where marbleModel() is not const, since traditional
149  // RenderPlugins do not require that
150  m_satModel = new SatellitesModel(
151  const_cast<MarbleModel *>( marbleModel() )->treeModel(),
152  marbleModel()->clock() );
153 
154  m_configModel = new SatellitesConfigModel( this );
155  m_configDialog->configWidget()->treeView->setModel( m_configModel );
156 
157  connect( m_satModel, SIGNAL(fileParsed(QString)),
158  SLOT(dataSourceParsed(QString)) );
159  connect( m_satModel, SIGNAL(fileParsed(QString)),
160  SLOT(updateDataSourceConfig(QString)) );
161  connect( m_configDialog, SIGNAL(dataSourcesReloadRequested()),
162  SLOT(updateSettings()) );
163  connect( m_configDialog, SIGNAL(accepted()), SLOT(writeSettings()) );
164  connect( m_configDialog, SIGNAL(rejected()), SLOT(readSettings()) );
165  connect( m_configDialog->configWidget()->buttonBox->button(
166  QDialogButtonBox::Reset ),
167  SIGNAL(clicked()), SLOT(restoreDefaultSettings()) );
168  connect( m_configDialog, SIGNAL(userDataSourcesChanged()),
169  SLOT(writeSettings()) );
170  connect( m_configDialog, SIGNAL(userDataSourceAdded(QString)),
171  SLOT(userDataSourceAdded(QString)) );
172 
173  m_isInitialized = true;
174  readSettings();
175  updateSettings();
176  enableModel( enabled() );
177 }
178 
179 bool SatellitesPlugin::isInitialized() const
180 {
181  return m_isInitialized;
182 }
183 
184 bool SatellitesPlugin::render( GeoPainter *painter, ViewportParams *viewport,
185  const QString &renderPos, GeoSceneLayer *layer )
186 {
187  Q_UNUSED( painter );
188  Q_UNUSED( viewport );
189  Q_UNUSED( renderPos );
190  Q_UNUSED( layer );
191 
192  enableModel( enabled() );
193 
194  return true;
195 }
196 
197 bool SatellitesPlugin::eventFilter( QObject *object, QEvent *event )
198 {
199  // only if active plugin
200  if( !enabled() || !visible() ) {
201  return false;
202  }
203 
204  if( event->type() != QEvent::MouseButtonPress )
205  {
206  return false;
207  }
208 
209  MarbleWidget *widget = qobject_cast<MarbleWidget*> ( object );
210  Q_ASSERT ( widget );
211 
212  QMouseEvent* mouseEvent = dynamic_cast<QMouseEvent*>(event);
213  Q_ASSERT( mouseEvent );
214 
215  if( mouseEvent->button() == Qt::LeftButton ) {
216  m_trackerList.clear();
217  QVector<const GeoDataPlacemark*> vector = widget->whichFeatureAt( mouseEvent->pos() );
218  foreach (const GeoDataPlacemark *placemark, vector) {
219  foreach (TrackerPluginItem *obj, m_satModel->items() ) {
220  if( obj->placemark() == placemark ) {
221  m_showOrbitAction->data() = m_trackerList.size();
222  m_showOrbitAction->setChecked( obj->isTrackVisible() );
223  widget->popupMenu()->addAction( Qt::LeftButton, m_showOrbitAction );
224 
225  m_trackPlacemarkAction->data() = m_trackerList.size();
226  widget->popupMenu()->addAction( Qt::LeftButton, m_trackPlacemarkAction );
227 
228  m_trackerList.append( obj );
229  }
230  }
231  }
232  }
233  return false;
234 }
235 
236 void SatellitesPlugin::showOrbit(bool show)
237 {
238  QAction *action = qobject_cast<QAction *>( sender() );
239  Q_ASSERT( action );
240 
241  int actionIndex = action->data().toInt();
242  TrackerPluginItem *item = m_trackerList.at( actionIndex );
243  item->setTrackVisible( show );
244  m_satModel->updateVisibility();
245 }
246 
247 void SatellitesPlugin::trackPlacemark()
248 {
249  QAction *action = qobject_cast<QAction *>( sender() );
250  Q_ASSERT( action );
251 
252  int actionIndex = action->data().toInt();
253  TrackerPluginItem *item = m_trackerList.at( actionIndex );
254  const_cast<MarbleModel *>( marbleModel() )->setTrackedPlacemark( item->placemark() );
255 }
256 
257 QHash<QString, QVariant> SatellitesPlugin::settings() const
258 {
259  QHash<QString, QVariant> result = RenderPlugin::settings();
260 
261  typedef QHash<QString, QVariant>::ConstIterator Iterator;
262  Iterator end = m_settings.constEnd();
263  for ( Iterator iter = m_settings.constBegin(); iter != end; ++iter ) {
264  result.insert( iter.key(), iter.value() );
265  }
266 
267  return result;
268 }
269 
270 void SatellitesPlugin::setSettings( const QHash<QString, QVariant> &settings )
271 {
272  RenderPlugin::setSettings( settings );
273 
274  // add default data sources
275  if( !settings.contains( "dataSources" ) ) {
276  QStringList dsList;
277  dsList << "http://www.celestrak.com/NORAD/elements/visual.txt";
278  m_settings.insert( "dataSources", dsList );
279  m_settings.insert( "idList", dsList );
280  }
281  else {
282  // HACK: KConfig can't guess the type of the settings, when we use
283  // KConfigGroup::readEntry() in marble_part it returns a QString which
284  // is then wrapped into a QVariant when added to the settings hash.
285  // QVariant can handle the conversion for some types, like toDateTime()
286  // but when calling toStringList() on a QVariant::String, it will
287  // return a one element list
288  if( settings.value( "dataSources" ).type() == QVariant::String ) {
289  m_settings.insert( "dataSources",
290  settings.value( "dataSources" ).toString().split(QLatin1Char( ',' ) ) );
291  }
292  if( settings.value( "idList" ).type() == QVariant::String ) {
293  m_settings.insert( "idList",
294  settings.value( "idList" ).toString().split(QLatin1Char( ',' ) ) );
295  }
296  }
297 
298  // add default user data source
299  if( !settings.contains( "userDataSources" ) ) {
300  QStringList udsList;
301  udsList << "http://files.kde.org/marble/satellites/PlanetarySatellites.msc";
302  m_settings.insert( "userDataSources", udsList );
303  userDataSourceAdded( udsList[0] );
304  }
305  else if( settings.value( "userDataSources" ).type() == QVariant::String ) {
306  // same HACK as above
307  m_settings.insert( "userDataSources",
308  settings.value( "userDataSources" ).toString().split(QLatin1Char( ',' ) ) );
309  }
310 
311  emit settingsChanged( nameId() );
312 }
313 
314 void SatellitesPlugin::readSettings()
315 {
316  m_configDialog->setUserDataSources(
317  m_settings.value( "userDataSources" ).toStringList() );
318  m_configModel->loadSettings( m_settings );
319  m_satModel->loadSettings( m_settings );
320 }
321 
322 void SatellitesPlugin::writeSettings()
323 {
324  m_settings.insert( "userDataSources", m_configDialog->userDataSources() );
325  m_settings.insert( "dataSources", m_configModel->urlList() );
326  m_settings.insert( "idList", m_configModel->idList() );
327 
328  emit settingsChanged( nameId() );
329 }
330 
331 void SatellitesPlugin::updateSettings()
332 {
333  if (!isInitialized()) {
334  return;
335  }
336 
337  m_satModel->clear();
338 
339  m_configModel->clear();
340  addBuiltInDataSources();
341 
342  // (re)load data sources
343  QStringList dsList = m_settings["dataSources"].toStringList();
344  dsList << m_settings["userDataSources"].toStringList();
345  dsList.removeDuplicates();
346  foreach( const QString &ds, dsList ) {
347  mDebug() << "Loading satellite data from:" << ds;
348  m_satModel->downloadFile( QUrl( ds ), ds );
349  }
350 }
351 
352 void SatellitesPlugin::dataSourceParsed( const QString &source )
353 {
354  m_configDialog->setUserDataSourceLoaded( source, true );
355 }
356 
357 void SatellitesPlugin::userDataSourceAdded( const QString &source )
358 {
359  // items contained in catalog data sources are not known before
360  // the catalog has been parsed. so we store new data sources in
361  // order to activate them later (new datasources are enabled by
362  // default)
363  if( !m_newDataSources.contains( source ) ) {
364  m_newDataSources.append( source );
365  }
366 }
367 
368 SatellitesConfigDialog *SatellitesPlugin::configDialog()
369 {
370  return m_configDialog;
371 }
372 
373 void SatellitesPlugin::activate()
374 {
375  action()->trigger();
376 }
377 
378 void SatellitesPlugin::enableModel( bool enabled )
379 {
380  if ( !m_isInitialized ) {
381  return;
382  }
383 
384  m_satModel->setPlanet( marbleModel()->planetId() );
385  m_satModel->enable( enabled && visible() );
386 }
387 
388 void SatellitesPlugin::visibleModel( bool visible )
389 {
390  if ( !m_isInitialized ) {
391  return;
392  }
393 
394  m_satModel->setPlanet( marbleModel()->planetId() );
395  m_satModel->enable( enabled() && visible );
396 }
397 
398 void SatellitesPlugin::updateDataSourceConfig( const QString &source )
399 {
400  mDebug() << "Updating orbiter configuration";
401 
402  foreach( TrackerPluginItem *obj, m_satModel->items() ) {
403  // catalog items
404  SatellitesMSCItem *item = dynamic_cast<SatellitesMSCItem*>( obj );
405  if( ( item != NULL ) && ( item->catalog() == source ) ) {
406  m_configDialog->addSatelliteItem(
407  item->relatedBody(),
408  item->category(),
409  item->name(),
410  item->id() );
411  }
412  }
413 
414  // activate new datasources by default
415  if( m_newDataSources.contains( source ) ) {
416  m_newDataSources.removeAll( source );
417  activateDataSource( source );
418  }
419 
420  readSettings();
421  m_configDialog->update();
422 }
423 
424 void SatellitesPlugin::activateDataSource( const QString &source )
425 {
426  // activate the given data source (select it)
427  mDebug() << "Activating Data Source:" << source;
428  QStringList list = m_configModel->fullIdList().filter( source );
429  QStringList idList = m_settings["idList"].toStringList();
430  idList << list;
431  m_settings.insert( "idList", idList );
432 }
433 
434 void SatellitesPlugin::addBuiltInDataSources()
435 {
436  QString currentCategory;
437 
438  currentCategory = tr("Special-Interest Satellites" );
439  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Last 30 Days' Launches", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/tle-new.txt" );
440  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Space Stations", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/stations.txt" );
441  m_configDialog->addTLESatelliteItem( currentCategory, tr( "100 (or so) Brightest", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/visual.txt" );
442  m_configDialog->addTLESatelliteItem( currentCategory, tr( "FENGYUN 1C Debris", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/1999-025.txt" );
443  m_configDialog->addTLESatelliteItem( currentCategory, tr( "IRIDIUM 33 Debris", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/iridium-33-debris.txt" );
444  m_configDialog->addTLESatelliteItem( currentCategory, tr( "COSMOS 2251 Debris", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/cosmos-2251-debris.txt" );
445 
446  currentCategory = tr( "Weather & Earth Resources Satellites" );
447  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Weather", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/weather.txt" );
448  m_configDialog->addTLESatelliteItem( currentCategory, tr( "NOAA", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/noaa.txt" );
449  m_configDialog->addTLESatelliteItem( currentCategory, tr( "GOES", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/goes.txt" );
450  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Earth Resources", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/resource.txt" );
451  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Search & Rescue (SARSAT)", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/sarsat.txt" );
452  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Disaster Monitoring", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/dmc.txt" );
453  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Tracking and Data Relay Satellite System (TDRSS)", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/tdrss.txt" );
454 
455  currentCategory = tr( "Communications Satellites" );
456  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Geostationary", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/geo.txt" );
457  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Intelsat", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/intelsat.txt" );
458  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Gorizont", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/gorizont.txt" );
459  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Raduga", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/raduga.txt" );
460  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Molniya", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/molniya.txt" );
461  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Iridium", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/iridium.txt" );
462  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Orbcomm", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/orbcomm.txt" );
463  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Globalstar", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/globalstar.txt" );
464  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Amateur radio", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/amateur.txt" );
465  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Experimental", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/x-comm.txt" );
466  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Other", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/other-comm.txt" );
467 
468  currentCategory = tr( "Navigation Satellites" );
469  m_configDialog->addTLESatelliteItem( currentCategory, tr( "GPS Operational", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/gps-ops.txt" );
470  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Glonass Operational", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/glo-ops.txt" );
471  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Galileo", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/galileo.txt" );
472  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Satellite-Based Augmentation System (WAAS/EGNOS/MSAS)", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/sbas.txt" );
473  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Navy Navigation Satellite System (NNSS)", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/nnss.txt" );
474  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Russian LEO Navigation", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/musson.txt" );
475 
476  currentCategory = tr( "Scientific Satellites" );
477  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Space & Earth Science", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/science.txt" );
478  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Geodetic", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/geodetic.txt" );
479  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Engineering", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/engineering.txt" );
480  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Education", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/education.txt" );
481 
482  currentCategory = tr( "Miscellaneous Satellites" );
483  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Miscellaneous Military", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/military.txt" );
484  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Radar Calibration", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/radar.txt" );
485  m_configDialog->addTLESatelliteItem( currentCategory, tr( "CubeSats", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/cubesat.txt" );
486  m_configDialog->addTLESatelliteItem( currentCategory, tr( "Other", "Name of a satellite group" ), "http://www.celestrak.com/NORAD/elements/other.txt" );
487 
488  readSettings();
489  m_configDialog->update();
490 }
491 
492 } // namespace Marble
493 
494 Q_EXPORT_PLUGIN2( SatellitesPlugin, Marble::SatellitesPlugin )
495 
496 #include "SatellitesPlugin.moc"
497 
Marble::RenderPlugin::visible
bool visible() const
is visible
QEvent
QEvent::type
Type type() const
QHash::insert
iterator insert(const Key &key, const T &value)
Marble::TrackerPluginModel::enable
void enable(bool enabled)
Definition: TrackerPluginModel.cpp:108
Marble::SatellitesPlugin::configDialog
SatellitesConfigDialog * configDialog()
Returns a pointer to the configuration dialog of the plugin.
Definition: SatellitesPlugin.cpp:368
Marble::SatellitesPlugin::~SatellitesPlugin
virtual ~SatellitesPlugin()
Definition: SatellitesPlugin.cpp:61
Marble::SatellitesPlugin::version
QString version() const
Definition: SatellitesPlugin.cpp:100
Marble::SatellitesPlugin::backendTypes
QStringList backendTypes() const
Returns the name(s) of the backend that the plugin can render This method should return the name of t...
Definition: SatellitesPlugin.cpp:70
Marble::SatellitesModel
The model for satellites.
Definition: SatellitesModel.h:27
Marble::GeoPainter
A painter that allows to draw geometric primitives on the map.
Definition: GeoPainter.h:98
Marble::SatellitesPlugin::setSettings
void setSettings(const QHash< QString, QVariant > &settings)
Set the settings of the plugin.
Definition: SatellitesPlugin.cpp:270
QObject::sender
QObject * sender() const
Marble::SatellitesPlugin::copyrightYears
QString copyrightYears() const
Definition: SatellitesPlugin.cpp:110
QAction::setChecked
void setChecked(bool)
MarbleModel.h
This file contains the headers for MarbleModel.
QAction::data
QVariant data() const
Marble::SatellitesConfigDialog::update
void update()
Definition: SatellitesConfigDialog.cpp:90
QStringList::removeDuplicates
int removeDuplicates()
Marble::SatellitesPlugin::render
bool render(GeoPainter *painter, ViewportParams *viewport, const QString &renderPos, GeoSceneLayer *layer)
Renders the content provided by the layer on the viewport.
Definition: SatellitesPlugin.cpp:184
Marble::MarbleWidget::whichFeatureAt
QVector< const GeoDataPlacemark * > whichFeatureAt(const QPoint &) const
Definition: MarbleWidget.cpp:360
Marble::SatellitesConfigDialog
Definition: SatellitesConfigDialog.h:28
Marble::PluginAuthor
Definition: PluginInterface.h:28
QStringList::contains
bool contains(const QString &str, Qt::CaseSensitivity cs) const
SatellitesConfigModel.h
Marble::SatellitesPlugin::guiString
QString guiString() const
String that should be displayed in GUI.
Definition: SatellitesPlugin.cpp:95
Marble::RenderPlugin::restoreDefaultSettings
void restoreDefaultSettings()
Passes an empty set of settings to the plugin.
Definition: RenderPlugin.cpp:221
Marble::SatellitesPlugin::addBuiltInDataSources
void addBuiltInDataSources()
Definition: SatellitesPlugin.cpp:434
Marble::SatellitesModel::setPlanet
void setPlanet(const QString &lcPlanet)
Definition: SatellitesModel.cpp:77
Marble::RenderPlugin::action
QAction * action() const
Plugin's menu action.
Definition: RenderPlugin.cpp:88
QMouseEvent
MarbleDebug.h
QObject::tr
QString tr(const char *sourceText, const char *disambiguation, int n)
Marble::SatellitesPlugin::settings
QHash< QString, QVariant > settings() const
Settings of the plugin.
Definition: SatellitesPlugin.cpp:257
SatellitesMSCItem.h
Marble::SatellitesPlugin::renderPolicy
QString renderPolicy() const
Return how the plugin settings should be used.
Definition: SatellitesPlugin.cpp:75
Marble::SatellitesPlugin
This plugin displays satellites and their orbits.
Definition: SatellitesPlugin.h:31
Marble::SatellitesConfigDialog::configWidget
Ui::SatellitesConfigDialog * configWidget()
Definition: SatellitesConfigDialog.cpp:156
QAction::trigger
void trigger()
Marble::MarbleWidget
A widget class that displays a view of the earth.
Definition: MarbleWidget.h:104
QObject::event
virtual bool event(QEvent *e)
Marble::SatellitesPlugin::activateDataSource
void activateDataSource(const QString &source)
Definition: SatellitesPlugin.cpp:424
Marble::SatellitesPlugin::SatellitesPlugin
SatellitesPlugin(const MarbleModel *marbleModel=0)
Definition: SatellitesPlugin.cpp:34
QList::append
void append(const T &value)
Marble::GeoSceneLayer
Layer of a GeoScene document.
Definition: GeoSceneLayer.h:43
Marble::SatellitesConfigDialog::setUserDataSources
void setUserDataSources(const QStringList &sources)
Definition: SatellitesConfigDialog.cpp:59
QHash::constEnd
const_iterator constEnd() const
QVariant::toInt
int toInt(bool *ok) const
QHash< QString, QVariant >
QObject
Marble::SatellitesConfigDialog::addSatelliteItem
SatellitesConfigAbstractItem * addSatelliteItem(const QString &body, const QString &category, const QString &title, const QString &id, const QString &url=QString())
Definition: SatellitesConfigDialog.cpp:98
Marble::RenderPlugin::settingsChanged
void settingsChanged(QString nameId)
This signal is emitted if the settings of the RenderPlugin changed.
QMouseEvent::button
Qt::MouseButton button() const
Marble::RenderPlugin::visibilityChanged
void visibilityChanged(bool visible, const QString &nameId)
This signal is emitted if the visibility is changed with.
Marble::SatellitesPlugin::name
QString name() const
Returns the user-visible name of the plugin.
Definition: SatellitesPlugin.cpp:85
QList::removeAll
int removeAll(const T &value)
MarbleWidgetPopupMenu.h
Marble::SatellitesModel::updateVisibility
void updateVisibility()
Definition: SatellitesModel.cpp:88
Marble::TrackerPluginItem::placemark
GeoDataPlacemark * placemark()
Returns the wrapped placemark which will be displayed if this item is in a TrackerPluginModel.
Definition: TrackerPluginItem.cpp:49
Marble::TrackerPluginModel::items
QVector< TrackerPluginItem * > items() const
Return all available items.
Definition: TrackerPluginModel.cpp:127
Marble::RenderPlugin::setVisible
void setVisible(bool visible)
settting visible
Definition: RenderPlugin.cpp:151
QString
QList
GeoDataPlacemark.h
Marble::SatellitesPlugin::initialize
void initialize()
Definition: SatellitesPlugin.cpp:145
Marble::SatellitesPlugin::pluginAuthors
QList< PluginAuthor > pluginAuthors() const
Definition: SatellitesPlugin.cpp:115
QStringList
Marble::ViewportParams
A public class that controls what is visible in the viewport of a Marble map.
Definition: ViewportParams.h:44
Marble::TrackerPluginItem
Subclass this to represent items in your TrackerPluginModel.
Definition: TrackerPluginItem.h:29
Q_EXPORT_PLUGIN2
#define Q_EXPORT_PLUGIN2(a, b)
Definition: marble_export.h:34
QAction::setData
void setData(const QVariant &userData)
QHash::value
const T value(const Key &key) const
SatellitesConfigNodeItem.h
QUrl
QLatin1Char
Marble::SatellitesConfigModel::loadSettings
void loadSettings(QHash< QString, QVariant > settings)
Definition: SatellitesConfigModel.cpp:48
ViewportParams.h
This file contains the headers for ViewportParams.
SatellitesConfigLeafItem.h
QAction::setCheckable
void setCheckable(bool)
Marble::SatellitesPlugin::eventFilter
bool eventFilter(QObject *object, QEvent *event)
Definition: SatellitesPlugin.cpp:197
Marble::SatellitesPlugin::description
QString description() const
Returns a user description of the plugin.
Definition: SatellitesPlugin.cpp:105
Marble::SatellitesConfigModel::idList
QStringList idList() const
Definition: SatellitesConfigModel.cpp:30
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
QHash::constBegin
const_iterator constBegin() const
Marble::SatellitesModel::loadSettings
void loadSettings(const QHash< QString, QVariant > &settings)
Definition: SatellitesModel.cpp:69
Marble::TrackerPluginItem::setTrackVisible
virtual void setTrackVisible(bool visible)
Set item track visible/invisible according to visible.
Definition: TrackerPluginItem.cpp:79
Marble::RenderPlugin::enabledChanged
void enabledChanged(bool enable)
This signal is emitted if the enabled property is changed with.
SatellitesTLEItem.h
Marble::SatellitesConfigDialog::setUserDataSourceLoaded
void setUserDataSourceLoaded(const QString &source, bool loaded)
Definition: SatellitesConfigDialog.cpp:76
Marble::SatellitesPlugin::renderType
RenderType renderType() const
Render type of the plugin.
Definition: SatellitesPlugin.cpp:140
QVector
Marble::RenderPlugin::OnlineRenderType
Definition: RenderPlugin.h:63
Marble::SatellitesConfigDialog::addTLESatelliteItem
SatellitesConfigAbstractItem * addTLESatelliteItem(const QString &category, const QString &title, const QString &url)
Definition: SatellitesConfigDialog.cpp:128
QAction
Marble::SatellitesPlugin::icon
QIcon icon() const
Returns an icon for the plugin.
Definition: SatellitesPlugin.cpp:135
MarbleWidget.h
This file contains the headers for MarbleWidget.
Marble::SatellitesPlugin::renderPosition
QStringList renderPosition() const
Preferred level in the layer stack for the rendering.
Definition: SatellitesPlugin.cpp:80
Marble::MarbleWidget::popupMenu
MarbleWidgetPopupMenu * popupMenu()
Definition: MarbleWidget.cpp:309
Marble::MarbleWidgetPopupMenu::addAction
void addAction(Qt::MouseButton button, QAction *action)
Adds the action to the menu associated with the specified mouse button.
Definition: MarbleWidgetPopupMenu.cpp:553
Marble::TrackerPluginItem::isTrackVisible
virtual bool isTrackVisible() const
Return whether the track is visible or invisible.
Definition: TrackerPluginItem.cpp:74
QHash::contains
bool contains(const Key &key) const
Marble::RenderPlugin::enabled
bool enabled() const
is enabled
Marble::TrackerPluginModel::clear
void clear()
Remove all items from the model.
Definition: TrackerPluginModel.cpp:132
Marble::SatellitesConfigDialog::userDataSources
QStringList userDataSources() const
Definition: SatellitesConfigDialog.cpp:71
QMouseEvent::pos
const QPoint & pos() const
QStringList::filter
QStringList filter(const QString &str, Qt::CaseSensitivity cs) const
Marble::SatellitesPlugin::aboutDataText
QString aboutDataText() const
Returns about text (credits) for external data the plugin uses.
Definition: SatellitesPlugin.cpp:123
Marble::RenderPlugin::marbleModel
const MarbleModel * marbleModel() const
Access to the MarbleModel.
Definition: RenderPlugin.cpp:83
QObject::connect
bool connect(const QObject *sender, const char *signal, const QObject *receiver, const char *method, Qt::ConnectionType type)
Marble::TrackerPluginModel::downloadFile
void downloadFile(const QUrl &url, const QString &id)
Adds url to the download queue.
Definition: TrackerPluginModel.cpp:161
Marble::RenderPlugin::settings
virtual QHash< QString, QVariant > settings() const
Settings of the plugin.
Definition: RenderPlugin.cpp:185
Marble::SatellitesConfigModel::fullIdList
QStringList fullIdList() const
Definition: SatellitesConfigModel.cpp:36
Marble::RenderPlugin::RenderType
RenderType
A Type of plugin.
Definition: RenderPlugin.h:59
SatellitesPlugin.h
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::SatellitesPlugin::isInitialized
bool isInitialized() const
Definition: SatellitesPlugin.cpp:179
Marble::RenderPlugin
The abstract class that creates a renderable item.
Definition: RenderPlugin.h:43
Marble::RenderPlugin::setSettings
virtual void setSettings(const QHash< QString, QVariant > &settings)
Set the settings of the plugin.
Definition: RenderPlugin.cpp:195
Marble::SatellitesPlugin::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: SatellitesPlugin.cpp:90
QIcon
Marble::SatellitesConfigModel::urlList
QStringList urlList() const
Definition: SatellitesConfigModel.cpp:42
Marble::SatellitesConfigModel
Definition: SatellitesConfigModel.h:20
Marble::SatellitesConfigModel::clear
void clear()
Definition: SatellitesConfigModel.cpp:58
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 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