ConstellationNamesComponent

Search for usage in LXR

ConstellationNamesComponent Class Reference

#include <constellationnamescomponent.h>

Inheritance diagram for ConstellationNamesComponent:

Public Member Functions

 ConstellationNamesComponent (SkyComposite *parent, CultureList *cultures)
 
void draw (SkyPainter *skyp) override
 
bool isLocalCNames ()
 
void loadData (CultureList *cultures)
 
bool selected () override
 
void update (KSNumbers *num) override
 
- Public Member Functions inherited from ListComponent
 ListComponent (SkyComposite *parent)
 
void appendListObject (SkyObject *object)
 
void clear ()
 
SkyObjectfindByName (const QString &name, bool exact=true) override
 
const QList< SkyObject * > & objectList () const
 
SkyObjectobjectNearest (SkyPoint *p, double &maxrad) override
 
void update (KSNumbers *num=nullptr) override
 
- Public Member Functions inherited from SkyComponent
 SkyComponent (SkyComposite *parent=nullptr)
 
virtual void drawTrails (SkyPainter *skyp)
 
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 ()
 
QStringListobjectNames (int type)
 
virtual void objectsInArea (QList< SkyObject * > &list, const SkyRegion &region)
 
SkyCompositeparent ()
 
void removeFromLists (const SkyObject *obj)
 
void removeFromNames (const SkyObject *obj)
 
virtual void updateMoons (KSNumbers *)
 
virtual void updateSolarSystemBodies (KSNumbers *)
 

Additional Inherited Members

- Protected Attributes inherited from ListComponent
QHash< QString, SkyObject * > m_ObjectHash
 
QList< SkyObject * > m_ObjectList
 

Detailed Description

Represents the constellation names on the sky map.

Author
Thomas Kabelmann
Version
0.1

Definition at line 23 of file constellationnamescomponent.h.

Constructor & Destructor Documentation

◆ ConstellationNamesComponent()

ConstellationNamesComponent::ConstellationNamesComponent ( SkyComposite * parent,
CultureList * cultures )

Constructor parent Pointer to the parent SkyComposite object.

Reads the constellation names data from cnames.dat Each line in the file is parsed according to column position:

  • 0-1 RA hours [int]
  • 2-3 RA minutes [int]
  • 4-5 RA seconds [int]
  • 6 Dec sign [char; '+' or '-']
  • 7-8 Dec degrees [int]
  • 9-10 Dec minutes [int]
  • 11-12 Dec seconds [int]
  • 13-15 IAU Abbreviation [string] e.g., 'Ori' == Orion
  • 17- Constellation name [string]

Definition at line 21 of file constellationnamescomponent.cpp.

Member Function Documentation

◆ draw()

void ConstellationNamesComponent::draw ( SkyPainter * skyp)
overridevirtual

Draw constellation names on the sky map.

psky Reference to the QPainter on which to paint

Implements SkyComponent.

Definition at line 121 of file constellationnamescomponent.cpp.

◆ isLocalCNames()

bool ConstellationNamesComponent::isLocalCNames ( )
inline

Return true if we are using localized constellation names.

Definition at line 59 of file constellationnamescomponent.h.

◆ loadData()

void ConstellationNamesComponent::loadData ( CultureList * cultures)

Definition at line 32 of file constellationnamescomponent.cpp.

◆ selected()

bool ConstellationNamesComponent::selected ( )
overridevirtual
Returns
true if component is to be drawn on the map.

Reimplemented from SkyComponent.

Definition at line 102 of file constellationnamescomponent.cpp.

◆ update()

void ConstellationNamesComponent::update ( KSNumbers * num)
overridevirtual

we need a custom routine (for now) so we don't precess the locations of the names.

Reimplemented from SkyComponent.

Definition at line 112 of file constellationnamescomponent.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Dec 27 2024 11:51:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.