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

kstars

Public Member Functions | Protected Member Functions | List of all members
SolarSystemSingleComponent Class Reference

#include <solarsystemsinglecomponent.h>

Inheritance diagram for SolarSystemSingleComponent:
Inheritance graph
[legend]

Public Member Functions

 SolarSystemSingleComponent (SolarSystemComposite *, KSPlanetBase *kspb, bool(*visibleMethod)(), bool isMoon=false)
 
 ~SolarSystemSingleComponent () override
 
void draw (SkyPainter *skyp) override
 
SkyObject * findByName (const QString &name) override
 
SkyObject * objectNearest (SkyPoint *p, double &maxrad) override
 
KSPlanetBase * planet ()
 
bool selected () override
 
void update (KSNumbers *num) override
 
void updateMoons (KSNumbers *num) override
 
void updateSolarSystemBodies (KSNumbers *num) override
 
- Public Member Functions inherited from SkyComponent
 SkyComponent (SkyComposite *parent=nullptr)
 
virtual ~SkyComponent ()=default
 
virtual void emitProgressText (const QString &message)
 
QHash< int, QVector< QPair
< QString, const SkyObject * > > > & 
objectLists ()
 
QVector< QPair< QString, const
SkyObject * > > & 
objectLists (int type)
 
QHash< int, QStringList > & objectNames ()
 
QStringList & objectNames (int type)
 
virtual void objectsInArea (QList< SkyObject * > &list, const SkyRegion &region)
 
SkyComposite * parent ()
 
void removeFromLists (const SkyObject *obj)
 
void removeFromNames (const SkyObject *obj)
 

Protected Member Functions

void drawTrails (SkyPainter *skyp) override
 

Detailed Description

This class encapsulates some methods which are shared between all single-object solar system components (Sun, Moon, Planet, Pluto)

Author
Thomas Kabelmann
Version
0.1

Definition at line 40 of file solarsystemsinglecomponent.h.

Constructor & Destructor Documentation

SolarSystemSingleComponent::SolarSystemSingleComponent ( SolarSystemComposite *  parent,
KSPlanetBase *  kspb,
bool(*)()  visibleMethod,
bool  isMoon = false 
)

Initialize visible method, minimum size and sizeScale.

Definition at line 40 of file solarsystemsinglecomponent.cpp.

SolarSystemSingleComponent::~SolarSystemSingleComponent ( )
override

Definition at line 57 of file solarsystemsinglecomponent.cpp.

Member Function Documentation

void SolarSystemSingleComponent::draw ( SkyPainter *  skyp)
overridevirtual

Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.

Implements SkyComponent.

Definition at line 120 of file solarsystemsinglecomponent.cpp.

void SolarSystemSingleComponent::drawTrails ( SkyPainter *  skyp)
overrideprotectedvirtual

Draw trails for objects.

Reimplemented from SkyComponent.

Definition at line 133 of file solarsystemsinglecomponent.cpp.

SkyObject * SolarSystemSingleComponent::findByName ( const QString &  name)
overridevirtual

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 nullptr pointer if no match was found.
Note
This function simply returns the nullptr pointer; it is reimplemented in various sub-classes

Reimplemented from SkyComponent.

Definition at line 69 of file solarsystemsinglecomponent.cpp.

SkyObject * SolarSystemSingleComponent::objectNearest ( SkyPoint *  p,
double &  maxrad 
)
overridevirtual

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 in degrees

Returns
a pointer to the nearest SkyObject
Note
This function simply returns a nullptr pointer; it is reimplemented in various sub-classes.

Reimplemented from SkyComponent.

Definition at line 78 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 ( )
overridevirtual
Returns
true if component is to be drawn on the map.

Reimplemented from SkyComponent.

Definition at line 64 of file solarsystemsinglecomponent.cpp.

void SolarSystemSingleComponent::update ( KSNumbers *  num)
overridevirtual

update Only convert Equatorial to Horizontal coordinates given current time.

Parameters
numpointer to KSNumbers instance for target time

Reimplemented from SkyComponent.

Definition at line 89 of file solarsystemsinglecomponent.cpp.

void SolarSystemSingleComponent::updateMoons ( KSNumbers *  num)
overridevirtual

update Update Equatorial & Horizontal coordinates.

(Called more frequently.)

Reimplemented from SkyComponent.

Definition at line 111 of file solarsystemsinglecomponent.cpp.

void SolarSystemSingleComponent::updateSolarSystemBodies ( KSNumbers *  num)
overridevirtual

updateSolarSystemBodies Update Equatorial & Horizontal coordinates.

Parameters
numpointer to KSNumbers instance for target time

Reimplemented from SkyComponent.

Definition at line 96 of file solarsystemsinglecomponent.cpp.


The documentation for this class was generated from the following files:
  • solarsystemsinglecomponent.h
  • solarsystemsinglecomponent.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2019 The KDE developers.
Generated on Fri Dec 13 2019 02:57: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
  • Modules
  • Related Pages

edu API Reference

Skip menu "edu API Reference"
  •     core
  • kstars

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