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

kstars

Public Member Functions | Protected Member Functions | List of all members
SkyComponent Class Referenceabstract

#include <skycomponent.h>

Inheritance diagram for SkyComponent:
Inheritance graph
[legend]

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 &region)
 
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))

Author
Thomas Kabelmann

Definition at line 44 of file skycomponent.h.

Constructor & Destructor Documentation

SkyComponent::SkyComponent ( SkyComposite *  parent)
explicit

Constructor parent pointer to the parent SkyComposite.

Definition at line 27 of file skycomponent.cpp.

SkyComponent::~SkyComponent ( )
virtual

Destructor.

Definition at line 31 of file skycomponent.cpp.

Member Function Documentation

virtual void SkyComponent::draw ( SkyPainter *  skyp)
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.

void SkyComponent::drawTrails ( SkyPainter *  skyp)
virtual

Draw trails for objects.

Reimplemented in SatellitesComponent, PlanetMoonsComponent, SolarSystemComposite, SolarSystemSingleComponent, and SolarSystemListComponent.

Definition at line 47 of file skycomponent.cpp.

void SkyComponent::emitProgressText ( const QString &  message)
virtual

Emit signal about progress.

See also
SkyMapComposite::emitProgressText

Reimplemented in SkyMapComposite.

Definition at line 35 of file skycomponent.cpp.

SkyObject * SkyComponent::findByName ( const QString &  name)
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.

QHash<int, QStringList>& SkyComponent::objectNames ( )
inline

Definition at line 127 of file skycomponent.h.

QStringList& SkyComponent::objectNames ( int  type)
inline

Definition at line 129 of file skycomponent.h.

SkyObject * SkyComponent::objectNearest ( SkyPoint *  p,
double &  maxrad 
)
virtual

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.

void SkyComponent::objectsInArea ( QList< SkyObject * > &  list,
const SkyRegion &  region 
)
virtual

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.

SkyComposite* SkyComponent::parent ( )
inline
Returns
Parent of component. If there is no parent returns NULL.

Definition at line 82 of file skycomponent.h.

void SkyComponent::removeFromNames ( const SkyObject *  obj)
protected

Definition at line 58 of file skycomponent.cpp.

virtual bool SkyComponent::selected ( )
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.

virtual void SkyComponent::update ( KSNumbers *  )
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.

virtual void SkyComponent::updateMoons ( KSNumbers *  )
inlinevirtual

Reimplemented in SkyMapComposite, PlanetMoonsComponent, and SolarSystemComposite.

Definition at line 76 of file skycomponent.h.

virtual void SkyComponent::updatePlanets ( KSNumbers *  )
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:
  • skycomponent.h
  • skycomponent.cpp
This file is part of the KDE documentation.
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.

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