kstars
#include <skycomponent.h>

Public Member Functions | |
SkyComponent (SkyComposite *parent) | |
virtual | ~SkyComponent () |
virtual void | draw (SkyPainter *skyp)=0 |
virtual void | drawTrails (SkyPainter *skyp) |
virtual void | emitProgressText (const QString &message) |
virtual SkyObject * | findByName (const QString &name) |
QHash< int, QStringList > & | objectNames () |
QStringList & | objectNames (int type) |
virtual SkyObject * | objectNearest (SkyPoint *p, double &maxrad) |
virtual void | objectsInArea (QList< SkyObject * > &list, const SkyRegion ®ion) |
SkyComposite * | parent () |
virtual bool | selected () |
virtual void | update (KSNumbers *) |
virtual void | updateMoons (KSNumbers *) |
virtual void | updatePlanets (KSNumbers *) |
Protected Member Functions | |
void | removeFromNames (const SkyObject *obj) |
Detailed Description
SkyComponent represents an object on the sky map.
This may be a star, a planet or an imaginary line like the equator. The SkyComponent uses the composite design pattern. So if a new object type is needed, it has to be derived from this class and must be added into the hierarchy of components. ((TODO_DOX: Add outline of Components hierarchy))
Definition at line 44 of file skycomponent.h.
Constructor & Destructor Documentation
|
explicit |
Constructor parent
pointer to the parent SkyComposite.
Definition at line 27 of file skycomponent.cpp.
|
virtual |
Destructor.
Definition at line 31 of file skycomponent.cpp.
Member Function Documentation
|
pure virtual |
Draw the object on the SkyMap skyp
a pointer to the SkyPainter to use.
Implemented in SkyMapComposite, StarComponent, TargetListComponent, TargetListComponent, DeepSkyComponent, DeepStarComponent, ConstellationNamesComponent, LineListIndex, SatellitesComponent, CatalogComponent, SkyComposite, PlanetMoonsComponent, SolarSystemSingleComponent, SupernovaeComponent, FlagComponent, HorizonComponent, MilkyWay, CometsComponent, Equator, AsteroidsComponent, and Ecliptic.
|
virtual |
Draw trails for objects.
Reimplemented in SatellitesComponent, PlanetMoonsComponent, SolarSystemComposite, SolarSystemSingleComponent, and SolarSystemListComponent.
Definition at line 47 of file skycomponent.cpp.
|
virtual |
Emit signal about progress.
Reimplemented in SkyMapComposite.
Definition at line 35 of file skycomponent.cpp.
|
virtual |
Search the children of this SkyComponent for a SkyObject whose name matches the argument name
the name to be matched.
- Returns
- a pointer to the SkyObject whose name matches the argument, or a NULL pointer if no match was found.
- Note
- This function simply returns the NULL pointer; it is reimplemented in various sub-classes
Reimplemented in SkyMapComposite, StarComponent, SkyComposite, DeepSkyComponent, PlanetMoonsComponent, ListComponent, SolarSystemSingleComponent, and SupernovaeComponent.
Definition at line 39 of file skycomponent.cpp.
|
inline |
Definition at line 127 of file skycomponent.h.
|
inline |
Definition at line 129 of file skycomponent.h.
Find the SkyObject nearest the given SkyPoint.
Look for a SkyObject that is nearer to point p than maxrad. If one is found, then maxrad is reset to the separation of the new nearest object. p
pointer to the SkyPoint to search around maxrad
reference to current search radius
- Returns
- a pointer to the nearest SkyObject
- Note
- This function simply returns a NULL pointer; it is reimplemented in various sub-classes.
Reimplemented in SkyMapComposite, DeepSkyComponent, SkyComposite, SatellitesComponent, StarComponent, DeepStarComponent, PlanetMoonsComponent, ListComponent, SolarSystemSingleComponent, SupernovaeComponent, and AsteroidsComponent.
Definition at line 43 of file skycomponent.cpp.
Searches the region(s) and appends the SkyObjects found to the list of sky objects.
Look for a SkyObject that is in one of the regions If found, then append to the list of sky objects list
list of SkyObject to which matching list has to be appended to region
defines the regions in which the search for SkyObject should be done within
- Returns
- void
- Note
- This function simply returns; it is reimplemented in various sub-classes.
Reimplemented in StarComponent, and DeepSkyComponent.
Definition at line 50 of file skycomponent.cpp.
|
inline |
- Returns
- Parent of component. If there is no parent returns NULL.
Definition at line 82 of file skycomponent.h.
|
protected |
Definition at line 58 of file skycomponent.cpp.
|
inlinevirtual |
- Returns
- true if component is to be drawn on the map.
Reimplemented in DeepSkyComponent, StarComponent, ConstellationNamesComponent, ConstellationLines, DeepStarComponent, ConstellationBoundaryLines, HorizonComponent, FlagComponent, PlanetMoonsComponent, SatellitesComponent, SolarSystemComposite, SolarSystemSingleComponent, MilkyWay, SupernovaeComponent, HorizontalCoordinateGrid, CoordinateGrid, Ecliptic, EquatorialCoordinateGrid, AsteroidsComponent, CometsComponent, and Equator.
Definition at line 79 of file skycomponent.h.
|
inlinevirtual |
Update the sky position(s) of this component.
This function usually just updates the Horizontal (Azimuth/Altitude) coordinates of its member object(s). However, the precession and nutation must also be recomputed periodically. num
Pointer to the KSNumbers object
- See also
- SingleComponent::update()
- ListComponent::update()
- ConstellationBoundaryComponent::update()
Reimplemented in DeepSkyComponent, SkyMapComposite, StarComponent, SkyComposite, ConstellationNamesComponent, SatellitesComponent, CatalogComponent, DeepStarComponent, PlanetMoonsComponent, HorizonComponent, PointListComponent, ListComponent, SolarSystemComposite, SolarSystemSingleComponent, SupernovaeComponent, HorizontalCoordinateGrid, and SolarSystemListComponent.
Definition at line 74 of file skycomponent.h.
|
inlinevirtual |
Reimplemented in SkyMapComposite, PlanetMoonsComponent, and SolarSystemComposite.
Definition at line 76 of file skycomponent.h.
|
inlinevirtual |
Reimplemented in SkyMapComposite, SolarSystemComposite, SolarSystemSingleComponent, and SolarSystemListComponent.
Definition at line 75 of file skycomponent.h.
The documentation for this class was generated from the following files:
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:23 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.