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 | |
| void | draw (QPainter &psky) |
| virtual void | init (KStarsData *data) |
| void | setSizeScale (float scale) |
| SolarSystemSingleComponent (SolarSystemComposite *, KSPlanetBase *kspb, bool(*visibleMethod)(), int msize) | |
| virtual void | update (KStarsData *data, KSNumbers *num) |
| virtual void | updatePlanets (KStarsData *data, KSNumbers *num) |
| ~SolarSystemSingleComponent () | |
Protected Member Functions | |
| virtual bool | addTrail (SkyObject *o) |
| virtual void | clearTrailsExcept (SkyObject *exOb) |
| void | drawTrails (QPainter &psky) |
| KSPlanet * | earth () |
| virtual bool | hasTrail (SkyObject *o, bool &found) |
| KSPlanetBase * | ksp () |
| virtual bool | removeTrail (SkyObject *o) |
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 41 of file solarsystemsinglecomponent.h.
Constructor & Destructor Documentation
| SolarSystemSingleComponent::SolarSystemSingleComponent | ( | SolarSystemComposite * | parent, | |
| KSPlanetBase * | kspb, | |||
| bool(*)() | visibleMethod, | |||
| int | msize | |||
| ) |
Initialize visible method, minimum size and sizeScale.
Definition at line 32 of file solarsystemsinglecomponent.cpp.
| SolarSystemSingleComponent::~SolarSystemSingleComponent | ( | ) |
Definition at line 41 of file solarsystemsinglecomponent.cpp.
Member Function Documentation
| bool SolarSystemSingleComponent::addTrail | ( | SkyObject * | o | ) | [protected, virtual] |
Add a Trail to the specified SkyObject.
o Pointer to the SkyObject to which a Trail will be added
Reimplemented from SkyComponent.
Definition at line 69 of file solarsystemsinglecomponent.cpp.
| void SolarSystemSingleComponent::clearTrailsExcept | ( | SkyObject * | exOb | ) | [protected, virtual] |
| void SolarSystemSingleComponent::draw | ( | QPainter & | ) | [virtual] |
Draw the object on the SkyMap psky Reference to the QPainter on which to paint.
Reimplemented from SingleComponent.
Definition at line 102 of file solarsystemsinglecomponent.cpp.
| void SolarSystemSingleComponent::drawTrails | ( | QPainter & | psky | ) | [protected, virtual] |
Draws the planet's trail, if necessary.
Reimplemented from SkyComponent.
Definition at line 177 of file solarsystemsinglecomponent.cpp.
| KSPlanet* SolarSystemSingleComponent::earth | ( | ) | [inline, protected] |
Definition at line 77 of file solarsystemsinglecomponent.h.
| bool SolarSystemSingleComponent::hasTrail | ( | SkyObject * | o, | |
| bool & | found | |||
| ) | [protected, virtual] |
- Returns:
- true if the specified SkyObject is a member of this component, and it contains a Trail.
oPointer to the SkyObject to which a Trail will be added
Reimplemented from SkyComponent.
Definition at line 80 of file solarsystemsinglecomponent.cpp.
| void SolarSystemSingleComponent::init | ( | KStarsData * | data | ) | [virtual] |
Initialize the solar system body Reads in the orbital data from data files.
data Pointer to the KStarsData object
Reimplemented from SkyComponent.
Definition at line 46 of file solarsystemsinglecomponent.cpp.
| KSPlanetBase* SolarSystemSingleComponent::ksp | ( | ) | [inline, protected] |
Definition at line 79 of file solarsystemsinglecomponent.h.
| bool SolarSystemSingleComponent::removeTrail | ( | SkyObject * | o | ) | [protected, virtual] |
| void SolarSystemSingleComponent::setSizeScale | ( | float | scale | ) |
Set the size scale.
Default value is 1.0 and only Saturn uses a scale of 2.5.
Definition at line 230 of file solarsystemsinglecomponent.cpp.
| void SolarSystemSingleComponent::update | ( | KStarsData * | data, | |
| KSNumbers * | num | |||
| ) | [virtual] |
Update the sky position of this component.
This function usually just updates the Horizontal (Azimuth/Altitude) coordinates of the object in this component. However, the precession and nutation must also be recomputed periodically. Requests to do so are sent through the doPrecess parameter. data Pointer to the KStarsData object num Pointer to the KSNumbers object
- Note:
- By default, the num parameter is NULL, indicating that Precession/Nutation computation should be skipped; this computation is only occasionally required.
Reimplemented from SingleComponent.
Definition at line 54 of file solarsystemsinglecomponent.cpp.
| void SolarSystemSingleComponent::updatePlanets | ( | KStarsData * | data, | |
| KSNumbers * | num | |||
| ) | [virtual] |
Update the coordinates of the planet.
This function updates the position of the moving solar system body. data Pointer to the KStarsData object num Pointer to the KSNumbers object
Reimplemented from SkyComponent.
Definition at line 59 of file solarsystemsinglecomponent.cpp.
The documentation for this class was generated from the following files:
KDE 4.2 API Reference