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

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • skycomponents
skymapcomposite.h
Go to the documentation of this file.
1 /***************************************************************************
2  skymapcomposite.h - K Desktop Planetarium
3  -------------------
4  begin : 2005/07/08
5  copyright : (C) 2005 by Thomas Kabelmann
6  email : thomas.kabelmann@gmx.de
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef SKYMAPCOMPOSITE_H
19 #define SKYMAPCOMPOSITE_H
20 
21 #include <QList>
22 
23 #include "skycomposite.h"
24 #include "ksnumbers.h"
25 
26 class SkyMesh;
27 class SkyLabeler;
28 class SkyMap;
29 
30 class QPolygonF;
31 
32 class CultureList;
33 class ConstellationBoundaryLines;
34 class ConstellationLines;
35 class ConstellationNamesComponent;
36 class EquatorialCoordinateGrid;
37 class HorizontalCoordinateGrid;
38 class DeepSkyComponent;
39 class Ecliptic;
40 class Equator;
41 class FlagComponent;
42 class HorizonComponent;
43 class MilkyWay;
44 class SolarSystemComposite;
45 class StarComponent;
46 class DeepStarComponent;
47 class TargetListComponent;
48 class TargetListComponent;
49 class SatellitesComponent;
50 class SupernovaeComponent;
51 
52 class DeepSkyObject;
53 class KSPlanetBase;
54 class KSPlanet;
55 
65 class SkyMapComposite : public QObject, public SkyComposite
66 {
67  Q_OBJECT
68 
69 public:
74  explicit SkyMapComposite(SkyComposite *parent);
75 
76  ~SkyMapComposite();
77 
78  virtual void update( KSNumbers *num=0 );
79 
93  virtual void updatePlanets( KSNumbers *num );
94 
109  virtual void updateMoons( KSNumbers *num );
110 
115  virtual void draw( SkyPainter *skyp );
116 
124  virtual SkyObject* objectNearest( SkyPoint *p, double &maxrad );
125 
133  SkyObject* starNearest( SkyPoint *p, double &maxrad );
134 
147  virtual SkyObject* findByName( const QString &name );
148 
154  QList<SkyObject*> findObjectsInArea( const SkyPoint& p1, const SkyPoint& p2 );
155 
156  void addCustomCatalog( const QString &filename, int index );
157  void removeCustomCatalog( const QString &name );
158 
159  bool addNameLabel( SkyObject *o );
160  bool removeNameLabel( SkyObject *o );
161 
162  void reloadDeepSky();
163  void reloadAsteroids();
164  void reloadComets();
165  void reloadCLines();
166  void reloadCNames();
167 
168  FlagComponent* flags();
169  SatellitesComponent* satellites();
170  SupernovaeComponent* supernovaeComponent();
171 
172  //Accessors for StarComponent
173  SkyObject* findStarByGenetiveName( const QString name );
174  virtual void emitProgressText( const QString &message );
175  QList<SkyObject*>& labelObjects() { return m_LabeledObjects; }
176 
177  const QList<DeepSkyObject*>& deepSkyObjects() const;
178  const QList<SkyObject*>& constellationNames() const;
179  const QList<SkyObject*>& stars() const;
180  const QList<SkyObject*>& asteroids() const;
181  const QList<SkyObject*>& comets() const;
182  const QList<SkyObject*>& supernovae() const;
183 
184  KSPlanet* earth();
185  KSPlanetBase* planet( int n );
186  QStringList getCultureNames();
187  QString getCultureName( int index );
188  QString currentCulture();
189  void setCurrentCulture( QString culture );
190  bool isLocalCNames();
191 
192  QList<SkyComponent*> customCatalogs();
193 
194  ConstellationBoundaryLines* getConstellationBoundary() { return m_CBoundLines; }
195  inline TargetListComponent *getStarHopRouteList() { return m_StarHopRouteList; }
196 
197  SolarSystemComposite *solarSystemComposite();
198 
199 signals:
200  void progressText( const QString &message );
201 
202 private:
203  virtual QHash<int, QStringList>& getObjectNames();
204 
205  CultureList *m_Cultures;
206  ConstellationBoundaryLines *m_CBoundLines;
207  ConstellationNamesComponent *m_CNames;
208  ConstellationLines *m_CLines;
209  EquatorialCoordinateGrid *m_EquatorialCoordinateGrid;
210  HorizontalCoordinateGrid *m_HorizontalCoordinateGrid;
211  DeepSkyComponent *m_DeepSky;
212  Equator *m_Equator;
213  Ecliptic *m_Ecliptic;
214  HorizonComponent *m_Horizon;
215  MilkyWay *m_MilkyWay;
216  SolarSystemComposite *m_SolarSystem;
217  SkyComposite *m_CustomCatalogs;
218  StarComponent *m_Stars;
219  FlagComponent *m_Flags;
220  TargetListComponent *m_ObservingList;
221  TargetListComponent *m_StarHopRouteList;
222  SatellitesComponent *m_Satellites;
223  SupernovaeComponent *m_Supernovae;
224 
225  SkyMesh* m_skyMesh;
226  SkyLabeler* m_skyLabeler;
227 
228  KSNumbers m_reindexNum;
229 
230  QList<DeepStarComponent *> m_DeepStars;
231 
232  QList<SkyObject*> m_LabeledObjects;
233  QHash<int, QStringList> m_ObjectNames;
234  QHash<QString, QString> m_ConstellationNames;
235 };
236 
237 #endif
HorizontalCoordinateGrid
Collection of all the circles in the horizontal coordinate grid.
Definition: horizontalcoordinategrid.h:30
SatellitesComponent
Represents artificial satellites on the sky map.
Definition: satellitescomponent.h:36
SkyMapComposite::updateMoons
virtual void updateMoons(KSNumbers *num)
Delegate moon position updates to the SolarSystemComposite.
Definition: skymapcomposite.cpp:159
SkyComponent::parent
SkyComposite * parent()
Definition: skycomponent.h:82
FlagComponent
Represents a flag on the sky map.
Definition: flagcomponent.h:44
SkyMapComposite::labelObjects
QList< SkyObject * > & labelObjects()
Definition: skymapcomposite.h:175
SkyMapComposite::updatePlanets
virtual void updatePlanets(KSNumbers *num)
Delegate planet position updates to the SolarSystemComposite.
Definition: skymapcomposite.cpp:154
DeepStarComponent
Stores and manages unnamed stars, most of which are dynamically loaded into memory.
Definition: deepstarcomponent.h:49
TargetListComponent
Highlights objects present in certain lists by drawing "target" symbols around them.
Definition: skycomponents/targetlistcomponent.h:50
KSPlanet
A subclass of KSPlanetBase for seven of the major planets in the solar system (Earth and Pluto have t...
Definition: ksplanet.h:40
Equator
Represents the equator on the sky map.
Definition: equator.h:32
SkyMapComposite::asteroids
const QList< SkyObject * > & asteroids() const
Definition: skymapcomposite.cpp:568
DeepSkyComponent
Represents the deep sky objects separated by catalogs.
Definition: deepskycomponent.h:55
SkyMapComposite::findStarByGenetiveName
SkyObject * findStarByGenetiveName(const QString name)
Definition: skymapcomposite.cpp:449
SkyMapComposite::deepSkyObjects
const QList< DeepSkyObject * > & deepSkyObjects() const
Definition: skymapcomposite.cpp:554
SkyMapComposite::draw
virtual void draw(SkyPainter *skyp)
Delegate draw requests to all sub components psky Reference to the QPainter on which to paint...
Definition: skymapcomposite.cpp:170
SkyMapComposite::constellationNames
const QList< SkyObject * > & constellationNames() const
Definition: skymapcomposite.cpp:558
ConstellationNamesComponent
Represents the constellation names on the sky map.
Definition: constellationnamescomponent.h:34
SkyMapComposite::findObjectsInArea
QList< SkyObject * > findObjectsInArea(const SkyPoint &p1, const SkyPoint &p2)
Definition: skymapcomposite.cpp:413
SkyMapComposite::setCurrentCulture
void setCurrentCulture(QString culture)
Definition: skymapcomposite.cpp:597
QObject
SkyMapComposite::reloadCNames
void reloadCNames()
Definition: skymapcomposite.cpp:499
SkyMapComposite::starNearest
SkyObject * starNearest(SkyPoint *p, double &maxrad)
Definition: skymapcomposite.cpp:379
SkyMapComposite::objectNearest
virtual SkyObject * objectNearest(SkyPoint *p, double &maxrad)
Definition: skymapcomposite.cpp:309
SkyMapComposite::isLocalCNames
bool isLocalCNames()
Definition: skymapcomposite.cpp:544
SkyMapComposite::reloadCLines
void reloadCLines()
Definition: skymapcomposite.cpp:490
EquatorialCoordinateGrid
Collection of all the circles in the equatorial coordinate grid.
Definition: equatorialcoordinategrid.h:30
SkyMapComposite::addCustomCatalog
void addCustomCatalog(const QString &filename, int index)
Definition: skymapcomposite.cpp:468
SkyMapComposite::satellites
SatellitesComponent * satellites()
Definition: skymapcomposite.cpp:609
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
SkyMapComposite::flags
FlagComponent * flags()
Definition: skymapcomposite.cpp:605
SkyMapComposite::SkyMapComposite
SkyMapComposite(SkyComposite *parent)
Constructor parent pointer to the parent SkyComponent.
Definition: skymapcomposite.cpp:58
SkyMapComposite::getCultureName
QString getCultureName(int index)
Definition: skymapcomposite.cpp:593
SkyMapComposite::comets
const QList< SkyObject * > & comets() const
Definition: skymapcomposite.cpp:572
SkyMapComposite::addNameLabel
bool addNameLabel(SkyObject *o)
Definition: skymapcomposite.cpp:395
SkyMapComposite::earth
KSPlanet * earth()
Definition: skymapcomposite.cpp:581
SkyMapComposite::supernovaeComponent
SupernovaeComponent * supernovaeComponent()
Definition: skymapcomposite.cpp:618
SkyMapComposite::stars
const QList< SkyObject * > & stars() const
Definition: skymapcomposite.cpp:563
SkyMapComposite::reloadDeepSky
void reloadDeepSky()
Definition: skymapcomposite.cpp:512
SkyMapComposite
SkyMapComposite is the root object in the object hierarchy of the sky map.
Definition: skymapcomposite.h:65
ksnumbers.h
Ecliptic
Represents the ecliptic on the sky map.
Definition: ecliptic.h:31
SkyMapComposite::customCatalogs
QList< SkyComponent * > customCatalogs()
Definition: skymapcomposite.cpp:585
SkyMapComposite::reloadComets
void reloadComets()
skycomposite.h
SkyComposite
SkyComposite is a kind of container class for SkyComponent objects.
Definition: skycomposite.h:43
SupernovaeComponent
encapsulates Supernovae.
Definition: supernovaecomponent.h:39
SkyMapComposite::~SkyMapComposite
~SkyMapComposite()
Definition: skymapcomposite.cpp:109
SkyMapComposite::getCultureNames
QStringList getCultureNames()
Definition: skymapcomposite.cpp:589
SkyMapComposite::planet
KSPlanetBase * planet(int n)
Definition: skymapcomposite.cpp:453
ConstellationBoundaryLines
Definition: constellationboundarylines.h:41
SkyMapComposite::progressText
void progressText(const QString &message)
DeepSkyObject
Provides all necessary information about a deep-sky object: data inherited from SkyObject (coordinate...
Definition: deepskyobject.h:43
KSNumbers
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
SkyMapComposite::solarSystemComposite
SolarSystemComposite * solarSystemComposite()
Definition: skymapcomposite.cpp:613
SkyMesh
Definition: skymesh.h:93
ConstellationLines
Definition: constellationlines.h:36
SkyMap
This is the canvas on which the sky is painted.
Definition: skymap.h:72
SkyMapComposite::findByName
virtual SkyObject * findByName(const QString &name)
Search the children of this SkyMapComposite for a SkyObject whose name matches the argument...
Definition: skymapcomposite.cpp:426
SkyMapComposite::getConstellationBoundary
ConstellationBoundaryLines * getConstellationBoundary()
Definition: skymapcomposite.h:194
KSPlanetBase
A subclass of TrailObject that provides additional information needed for most solar system objects...
Definition: ksplanetbase.h:63
SkyMapComposite::supernovae
const QList< SkyObject * > & supernovae() const
Definition: skymapcomposite.cpp:576
MilkyWay
Definition: milkyway.h:35
SkyMapComposite::removeCustomCatalog
void removeCustomCatalog(const QString &name)
Definition: skymapcomposite.cpp:477
SkyMapComposite::removeNameLabel
bool removeNameLabel(SkyObject *o)
Definition: skymapcomposite.cpp:401
SkyLabeler
The purpose of this class is to prevent labels from overlapping.
Definition: skylabeler.h:112
HorizonComponent
Represents the horizon on the sky map.
Definition: horizoncomponent.h:34
SkyObject
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.
Definition: skyobject.h:46
SkyMapComposite::update
virtual void update(KSNumbers *num=0)
Delegate update-position requests to all sub components.
Definition: skymapcomposite.cpp:117
SkyPainter
Draws things on the sky, without regard to backend.
Definition: skypainter.h:47
SkyMapComposite::reloadAsteroids
void reloadAsteroids()
StarComponent
Represents the stars on the sky map.
Definition: starcomponent.h:59
SolarSystemComposite
The solar system composite manages all planets, asteroids and comets.
Definition: solarsystemcomposite.h:41
SkyMapComposite::emitProgressText
virtual void emitProgressText(const QString &message)
Emit signal about progress.
Definition: skymapcomposite.cpp:548
CultureList
A list of all cultures.
Definition: culturelist.h:26
SkyMapComposite::currentCulture
QString currentCulture()
Definition: skymapcomposite.cpp:601
QList
SkyMapComposite::getStarHopRouteList
TargetListComponent * getStarHopRouteList()
Definition: skymapcomposite.h:195
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

Skip menu "kstars"
  • 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