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

kstars

Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
StarComponent Class Reference

#include <starcomponent.h>

Inheritance diagram for StarComponent:
Inheritance graph
[legend]

Public Member Functions

virtual ~StarComponent ()
 
void draw (SkyPainter *skyp)
 
void drawLabels ()
 
SkyObject * findByHDIndex (int HDnum)
 
virtual SkyObject * findByName (const QString &name)
 
virtual SkyObject * findStarByGenetiveName (const QString name)
 
virtual SkyObject * objectNearest (SkyPoint *p, double &maxrad)
 
virtual void objectsInArea (QList< SkyObject * > &list, const SkyRegion &region)
 
bool selected ()
 
void starsInAperture (QList< StarObject * > &list, const SkyPoint &center, float radius, float maglim=-29)
 
virtual void update (KSNumbers *num)
 
- Public Member Functions inherited from ListComponent
 ListComponent (SkyComposite *parent)
 
virtual ~ListComponent ()
 
void clear ()
 
const QList< SkyObject * > & objectList () const
 
- Public Member Functions inherited from SkyComponent
 SkyComponent (SkyComposite *parent)
 
virtual ~SkyComponent ()
 
virtual void drawTrails (SkyPainter *skyp)
 
virtual void emitProgressText (const QString &message)
 
QHash< int, QStringList > & objectNames ()
 
QStringList & objectNames (int type)
 
SkyComposite * parent ()
 
virtual void updateMoons (KSNumbers *)
 
virtual void updatePlanets (KSNumbers *)
 

Static Public Member Functions

static void byteSwap (starData *stardata)
 
static StarComponent * Create (SkyComposite *)
 
static StarComponent * Instance ()
 
static float zoomMagnitudeLimit ()
 

Protected Member Functions

 StarComponent (SkyComposite *)
 
- Protected Member Functions inherited from SkyComponent
void removeFromNames (const SkyObject *obj)
 

Additional Inherited Members

- Protected Attributes inherited from ListComponent
QList< SkyObject * > m_ObjectList
 

Detailed Description

Represents the stars on the sky map.

For optimization reasons the stars are not separate objects and are stored in a list.

The StarComponent class manages all stars drawn in KStars. While it handles all stars having names using its own member methods, it shunts the responsibility of unnamed stars to the class 'DeepStarComponent', objects of which it maintains.

Author
Thomas Kabelmann
Akarsh Simha
Version
1.0

Definition at line 59 of file starcomponent.h.

Constructor & Destructor Documentation

StarComponent::StarComponent ( SkyComposite *  parent)
protected

Definition at line 55 of file starcomponent.cpp.

StarComponent::~StarComponent ( )
virtual

Definition at line 82 of file starcomponent.cpp.

Member Function Documentation

void StarComponent::byteSwap ( starData *  stardata)
static

Definition at line 642 of file starcomponent.cpp.

StarComponent * StarComponent::Create ( SkyComposite *  parent)
static

Create an instance of StarComponent.

Definition at line 86 of file starcomponent.cpp.

void StarComponent::draw ( SkyPainter *  skyp)
virtual

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

Implements SkyComponent.

Definition at line 232 of file starcomponent.cpp.

void StarComponent::drawLabels ( )

Definition at line 340 of file starcomponent.cpp.

SkyObject * StarComponent::findByHDIndex ( int  HDnum)

Find stars by HD catalog index.

Parameters
HDnumHD Catalog Number of the star to find
Returns
If the star is a static star, a pointer to the star will be returned If it is a dynamic star, a fake copy will be created that survives till the next findByHDIndex() call. If no match was found, returns NULL.

Definition at line 526 of file starcomponent.cpp.

SkyObject * StarComponent::findByName ( const QString &  name)
virtual

Find stars by name (including genetive name)

Overrides ListComponent::findByName() to include genetive names of stars as well.

Parameters
nameName to search for. Could be trivial name or genetive name
Returns
Pointer to the star with the given name as a SkyObject, NULL if no match was found

Reimplemented from ListComponent.

Definition at line 503 of file starcomponent.cpp.

SkyObject * StarComponent::findStarByGenetiveName ( const QString  name)
virtual

Definition at line 498 of file starcomponent.cpp.

static StarComponent* StarComponent::Instance ( )
inlinestatic
Returns
the instance of StarComponent if already created, NULL otherwise

Definition at line 74 of file starcomponent.h.

SkyObject * StarComponent::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 from ListComponent.

Definition at line 571 of file starcomponent.cpp.

void StarComponent::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

Reimplemented from SkyComponent.

Definition at line 514 of file starcomponent.cpp.

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

Reimplemented from SkyComponent.

Definition at line 92 of file starcomponent.cpp.

void StarComponent::starsInAperture ( QList< StarObject * > &  list,
const SkyPoint &  center,
float  radius,
float  maglim = -29 
)

Add to the given list, the stars from this component, that lie within the specified circular aperture, and that are brighter than the limiting magnitude specified.

center The center point of the aperture radius The radius around the center point that defines the aperture maglim Optional parameter indicating the limiting magnitude. If magnitude limit is numerically < -28, the limiting magnitude is assumed to be the limiting magnitude of the catalog (i.e. no magnitude limit) list The list to operate on

Definition at line 611 of file starcomponent.cpp.

void StarComponent::update ( KSNumbers *  num)
virtual

Update the sky positions of this component.

This function usually just updates the Horizontal (Azimuth/Altitude) coordinates of the objects in this component. If the KSNumbers* argument is not NULL, this function also recomputes precession and nutation for the date in KSNumbers. 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 ListComponent.

Definition at line 124 of file starcomponent.cpp.

float StarComponent::zoomMagnitudeLimit ( )
static

Definition at line 199 of file starcomponent.cpp.


The documentation for this class was generated from the following files:
  • starcomponent.h
  • starcomponent.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