kstars
SolarSystemSingleComponent Class Reference
This class encapsulates some methods which are shared between all single-object solar system components (Sun, Moon, Planet, Pluto). More...
#include <solarsystemsinglecomponent.h>

Public Member Functions | |
| SolarSystemSingleComponent (SolarSystemComposite *, KSPlanetBase *kspb, bool(*visibleMethod)()) | |
| virtual | ~SolarSystemSingleComponent () |
| virtual void | draw (QPainter &psky) |
| virtual SkyObject * | findByName (const QString &name) |
| virtual SkyObject * | objectNearest (SkyPoint *p, double &maxrad) |
| KSPlanetBase * | planet () |
| virtual bool | selected () |
| virtual void | update (KSNumbers *num) |
| virtual void | updatePlanets (KSNumbers *num) |
Protected Member Functions | |
| virtual void | drawTrails (QPainter &psky) |
Detailed Description
This class encapsulates some methods which are shared between all single-object solar system components (Sun, Moon, Planet, Pluto).
- Version:
- 0.1
Definition at line 40 of file solarsystemsinglecomponent.h.
Constructor & Destructor Documentation
| SolarSystemSingleComponent::SolarSystemSingleComponent | ( | SolarSystemComposite * | parent, | |
| KSPlanetBase * | kspb, | |||
| bool(*)() | visibleMethod | |||
| ) |
Initialize visible method, minimum size and sizeScale.
Definition at line 33 of file solarsystemsinglecomponent.cpp.
| SolarSystemSingleComponent::~SolarSystemSingleComponent | ( | ) | [virtual] |
Definition at line 46 of file solarsystemsinglecomponent.cpp.
Member Function Documentation
| void SolarSystemSingleComponent::draw | ( | QPainter & | psky | ) | [virtual] |
Draw the object on the SkyMap psky Reference to the QPainter on which to paint.
Implements SkyComponent.
Definition at line 90 of file solarsystemsinglecomponent.cpp.
| void SolarSystemSingleComponent::drawTrails | ( | QPainter & | ) | [protected, virtual] |
Draw trails for objects.
Reimplemented from SkyComponent.
Definition at line 166 of file solarsystemsinglecomponent.cpp.
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 from SkyComponent.
Definition at line 56 of file solarsystemsinglecomponent.cpp.
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 from SkyComponent.
Definition at line 65 of file solarsystemsinglecomponent.cpp.
| KSPlanetBase* SolarSystemSingleComponent::planet | ( | ) | [inline] |
Return pointer to stored planet object.
Definition at line 49 of file solarsystemsinglecomponent.h.
| bool SolarSystemSingleComponent::selected | ( | ) | [virtual] |
- Returns:
- true if component is to be drawn on the map.
Reimplemented from SkyComponent.
Definition at line 52 of file solarsystemsinglecomponent.cpp.
| void SolarSystemSingleComponent::update | ( | KSNumbers * | ) | [virtual] |
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 from SkyComponent.
Definition at line 74 of file solarsystemsinglecomponent.cpp.
| void SolarSystemSingleComponent::updatePlanets | ( | KSNumbers * | num | ) | [virtual] |
Reimplemented from SkyComponent.
Definition at line 80 of file solarsystemsinglecomponent.cpp.
The documentation for this class was generated from the following files:
KDE 4.5 API Reference