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

kstars

Public Types | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions | Protected Attributes | Static Protected Attributes | List of all members
SkyObject Class Reference

#include <skyobject.h>

Inheritance diagram for SkyObject:
Inheritance graph
[legend]

Public Types

enum  TYPE {
  STAR =0, CATALOG_STAR =1, PLANET =2, OPEN_CLUSTER =3,
  GLOBULAR_CLUSTER =4, GASEOUS_NEBULA =5, PLANETARY_NEBULA =6, SUPERNOVA_REMNANT =7,
  GALAXY =8, COMET =9, ASTEROID =10, CONSTELLATION =11,
  MOON =12, ASTERISM =13, GALAXY_CLUSTER =14, DARK_NEBULA =15,
  QUASAR =16, MULT_STAR =17, RADIO_SOURCE =18, SATELLITE =19,
  SUPERNOVA =20, TYPE_UNKNOWN
}
 
typedef qint64 UID
 

Public Member Functions

 SkyObject (int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n=QString(), const QString &n2=QString(), const QString &lname=QString())
 
 SkyObject (int t, double r, double d, float m=0.0, const QString &n=QString(), const QString &n2=QString(), const QString &lname=QString())
 
virtual ~SkyObject ()
 
virtual SkyObject * clone () const
 
virtual UID getUID () const
 
bool hasAuxInfo ()
 
bool hasLongName () const
 
bool hasName () const
 
bool hasName2 () const
 
QStringList & ImageList ()
 
QStringList & ImageTitle ()
 
QStringList & InfoList ()
 
QStringList & InfoTitle ()
 
bool isSolarSystem () const
 
virtual double labelOffset () const
 
virtual QString labelString () const
 
virtual QString longname (void) const
 
float mag (void) const
 
float mag (const QString &band) const
 
QString messageFromTitle (const QString &imageTitle)
 
virtual QString name (void) const
 
QString name2 (void) const
 
QString & notes ()
 
virtual double pa () const
 
SkyPoint recomputeCoords (const KStarsDateTime &dt, const GeoLocation *geo=0)
 
QTime riseSetTime (const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true)
 
dms riseSetTimeAz (const KStarsDateTime &dt, const GeoLocation *geo, bool rst)
 
QTime riseSetTimeUT (const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true)
 
void saveUserLog (const QString &newLog)
 
void setLongName (const QString &longname=QString())
 
void setNotes (QString _notes)
 
void setType (int t)
 
void showPopupMenu (KSPopupMenu *pmenu, const QPoint &pos)
 
dms transitAltitude (const KStarsDateTime &dt, const GeoLocation *geo)
 
QTime transitTime (const KStarsDateTime &dt, const GeoLocation *geo)
 
QTime transitTimeUT (const KStarsDateTime &dt, const GeoLocation *geo)
 
QString translatedLongName () const
 
QString translatedName () const
 
QString translatedName2 () const
 
int type (void) const
 
QString typeName () const
 
QString & userLog ()
 
- Public Member Functions inherited from SkyPoint
 SkyPoint (const dms &r, const dms &d)
 
 SkyPoint (double r, double d)
 
 SkyPoint ()
 
virtual ~SkyPoint ()
 
void aberrate (const KSNumbers *num)
 
void addEterms (void)
 
const dms & alt () const
 
dms altRefracted () const
 
dms angularDistanceTo (const SkyPoint *sp, double *const positionAngle=0) const
 
void apparentCoord (long double jd0, long double jdf)
 
const dms & az () const
 
void B1950ToJ2000 (void)
 
bool bendlight ()
 
bool checkBendLight ()
 
bool checkCircumpolar (const dms *gLat)
 
const dms & dec () const
 
const dms & dec0 () const
 
SkyPoint deprecess (const KSNumbers *num, long double epoch=J2000)
 
void Equatorial1950ToGalactic (dms &galLong, dms &galLat)
 
void EquatorialToHorizontal (const dms *LST, const dms *lat)
 
SkyPoint Eterms (void)
 
void findEcliptic (const dms *Obliquity, dms &EcLong, dms &EcLat)
 
void GalacticToEquatorial1950 (const dms *galLong, const dms *galLat)
 
void HorizontalToEquatorial (const dms *LST, const dms *lat)
 
void J2000ToB1950 (void)
 
SkyPoint moveAway (const SkyPoint &from, double dist)
 
void nutate (const KSNumbers *num)
 
bool operator== (SkyPoint &p)
 
void precessFromAnyEpoch (long double jd0, long double jdf)
 
const dms & ra () const
 
const dms & ra0 () const
 
void set (const dms &r, const dms &d)
 
void setAlt (dms alt)
 
void setAlt (double alt)
 
void setAz (dms az)
 
void setAz (double az)
 
void setDec (dms d)
 
void setDec (double d)
 
void setDec0 (dms d)
 
void setDec0 (double d)
 
void setFromEcliptic (const dms *Obliquity, const dms &EcLong, const dms &EcLat)
 
void setRA (dms r)
 
void setRA (double r)
 
void setRA0 (dms r)
 
void setRA0 (double r)
 
void subtractEterms (void)
 
virtual void updateCoords (KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0, bool forceRecompute=false)
 
double vGeocentric (double vhelio, long double jd)
 
double vGeoToVHelio (double vgeo, long double jd)
 
double vHeliocentric (double vlsr, long double jd)
 
double vHelioToVlsr (double vhelio, long double jd)
 
double vREarth (long double jd0)
 
double vRSite (double vsite[3])
 
double vRSun (long double jd)
 
double vTopocentric (double vgeo, double vsite[3])
 
double vTopoToVGeo (double vtopo, double vsite[3])
 

Static Public Member Functions

static QString typeName (const int t)
 
- Static Public Member Functions inherited from SkyPoint
static double refract (const double alt)
 
static dms refract (const dms alt)
 
static double refractionCorr (double alt)
 
static double unrefract (const double alt)
 
static dms unrefract (const dms alt)
 

Static Public Attributes

static const UID invalidUID = ~0
 
static const UID UID_DEEPSKY = 2
 
static const UID UID_GALAXY = 1
 
static const UID UID_SOLARSYS = 3
 
static const UID UID_STAR = 0
 
- Static Public Attributes inherited from SkyPoint
static const double altCrit = -1.0
 

Protected Member Functions

void setMag (float m)
 
void setMag (const QString &band, const double mag)
 
void setName (const QString &name)
 
void setName2 (const QString &name2=QString())
 
- Protected Member Functions inherited from SkyPoint
void precess (const KSNumbers *num)
 

Protected Attributes

QSharedDataPointer< AuxInfo > info
 
QString LongName
 
QString Name
 
QString Name2
 
- Protected Attributes inherited from SkyPoint
long double lastPrecessJD
 

Static Protected Attributes

static QString emptyString
 
static QString starString = QString("star")
 
static QString unnamedObjectString = QString(I18N_NOOP("unnamed object"))
 
static QString unnamedString = QString(I18N_NOOP("unnamed"))
 

Detailed Description

Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.

Information about an object in the sky.

Author
Jason Harris
Version
1.0

Definition at line 46 of file skyobject.h.

Member Typedef Documentation

typedef qint64 SkyObject::UID

Type for Unique object IDenticator.

Each object has unique ID (UID). For different objects UIDs must be different.

Definition at line 53 of file skyobject.h.

Member Enumeration Documentation

enum SkyObject::TYPE

The type classification of the SkyObject.

Enumerator
STAR 
CATALOG_STAR 
PLANET 
OPEN_CLUSTER 
GLOBULAR_CLUSTER 
GASEOUS_NEBULA 
PLANETARY_NEBULA 
SUPERNOVA_REMNANT 
GALAXY 
COMET 
ASTEROID 
CONSTELLATION 
MOON 
ASTERISM 
GALAXY_CLUSTER 
DARK_NEBULA 
QUASAR 
MULT_STAR 
RADIO_SOURCE 
SATELLITE 
SUPERNOVA 
TYPE_UNKNOWN 

Definition at line 108 of file skyobject.h.

Constructor & Destructor Documentation

SkyObject::SkyObject ( int  t = TYPE_UNKNOWN,
dms  r = dms(0.0),
dms  d = dms(0.0),
float  m = 0.0,
const QString &  n = QString(),
const QString &  n2 = QString(),
const QString &  lname = QString() 
)
explicit

Constructor.

Set SkyObject data according to arguments.

Parameters
tType of object
rcatalog Right Ascension
dcatalog Declination
mmagnitude (brightness)
nPrimary name
n2Secondary name
lnameLong name (common name)

Definition at line 50 of file skyobject.cpp.

SkyObject::SkyObject ( int  t,
double  r,
double  d,
float  m = 0.0,
const QString &  n = QString(),
const QString &  n2 = QString(),
const QString &  lname = QString() 
)

Constructor.

Set SkyObject data according to arguments. Differs from above function only in data type of RA and Dec.

Parameters
tType of object
rcatalog Right Ascension
dcatalog Declination
mmagnitude (brightness)
nPrimary name
n2Secondary name
lnameLong name (common name)

Definition at line 63 of file skyobject.cpp.

SkyObject::~SkyObject ( )
virtual

Destructor (empty)

Definition at line 81 of file skyobject.cpp.

Member Function Documentation

SkyObject * SkyObject::clone ( ) const
virtual

Create copy of object.

This method is virtual copy constructor. It allows for safe copying of objects. In other words, KSPlanet object stored in SkyObject pointer will be copied as KSPlanet. Each subclass of SkyObject MUST implement clone method.

Returns
pointer to newly allocated object. Caller takes full responsibility for deallocating it.

Reimplemented in StarObject, DeepSkyObject, KSComet, KSAsteroid, KSPlanet, KSPluto, KSMoon, TrailObject, and KSSun.

Definition at line 76 of file skyobject.cpp.

SkyObject::UID SkyObject::getUID ( ) const
virtual

Return UID for object.

This method should be reimplemented in all concrete subclasses. Implementation for SkyObject just returns invalidUID. It's required SkyObject is not an abstract class.

Reimplemented in StarObject, DeepSkyObject, KSComet, KSAsteroid, KSPlanet, KSMoon, and KSSun.

Definition at line 484 of file skyobject.cpp.

bool SkyObject::hasAuxInfo ( )
inline

Query whether this SkyObject has a valid AuxInfo structure associated with it.

Returns
true if this SkyObject has a valid AuxInfo structure associated with it, false if not.

Definition at line 294 of file skyobject.h.

bool SkyObject::hasLongName ( ) const
inline

Definition at line 272 of file skyobject.h.

bool SkyObject::hasName ( ) const
inline

Definition at line 268 of file skyobject.h.

bool SkyObject::hasName2 ( ) const
inline

Definition at line 270 of file skyobject.h.

QStringList& SkyObject::ImageList ( )
inline
Returns
a reference to a QStringList storing a list of Image URLs associated with this SkyObject

Definition at line 299 of file skyobject.h.

QStringList& SkyObject::ImageTitle ( )
inline
Returns
a reference to a QStringList storing a list of Image Titles associated with this SkyObject

Definition at line 304 of file skyobject.h.

QStringList& SkyObject::InfoList ( )
inline
Returns
a reference to a QStringList storing a list of Information Links associated with this SkyObject

Definition at line 309 of file skyobject.h.

QStringList& SkyObject::InfoTitle ( )
inline
Returns
a reference to a QStringList storing a list of Information Link Titles associated with this SkyObject

Definition at line 314 of file skyobject.h.

bool SkyObject::isSolarSystem ( ) const
inline

Returns
true if the object is a solar system body.

Definition at line 197 of file skyobject.h.

double SkyObject::labelOffset ( ) const
virtual
Returns
the pixel distance for offseting the object's name label
Note
overridden in StarObject, DeepSkyObject, KSPlanetBase

Reimplemented in StarObject, KSPlanetBase, and DeepSkyObject.

Definition at line 474 of file skyobject.cpp.

QString SkyObject::labelString ( ) const
virtual
Returns
the string used to label the object on the map In the default implementation, this just returns translatedName() Overridden by StarObject.

Reimplemented in StarObject, and DeepSkyObject.

Definition at line 470 of file skyobject.cpp.

virtual QString SkyObject::longname ( void  ) const
inlinevirtual
Returns
object's common (long) name

Reimplemented in StarObject.

Definition at line 140 of file skyobject.h.

float SkyObject::mag ( void  ) const
inline
Returns
object's magnitude

Definition at line 182 of file skyobject.h.

float SkyObject::mag ( const QString &  band) const
inline
Returns
object's magnitude in given band. NaN if magnitude unavailable.
Parameters
banda string specifying which spectral band to look for

Definition at line 188 of file skyobject.h.

QString SkyObject::messageFromTitle ( const QString &  imageTitle)

Given the Image title from a URL file, try to convert it to an image credit string.

Definition at line 374 of file skyobject.cpp.

virtual QString SkyObject::name ( void  ) const
inlinevirtual
Returns
object's primary name.

Reimplemented in StarObject, and Supernova.

Definition at line 124 of file skyobject.h.

QString SkyObject::name2 ( void  ) const
inline
Returns
object's secondary name

Definition at line 132 of file skyobject.h.

QString& SkyObject::notes ( )
inline

Definition at line 321 of file skyobject.h.

virtual double SkyObject::pa ( ) const
inlinevirtual
Returns
the object's position angle. This is overridden in KSPlanetBase and DeepSkyObject; for all other SkyObjects, this returns 0.0.

Reimplemented in KSPlanetBase, and DeepSkyObject.

Definition at line 194 of file skyobject.h.

SkyPoint SkyObject::recomputeCoords ( const KStarsDateTime &  dt,
const GeoLocation *  geo = 0 
)

The coordinates for the object on date dt are computed and returned, but the object's internal coordinates are not permanently modified.

Returns
the coordinates of the selected object for the time given by jd
Parameters
dtdate/time for which the coords will be computed.
geopointer to geographic location (used for solar system only)

Definition at line 296 of file skyobject.cpp.

QTime SkyObject::riseSetTime ( const KStarsDateTime &  dt,
const GeoLocation *  geo,
bool  rst,
bool  exact = true 
)

Determine the time at which the point will rise or set.

Because solar system objects move across the sky, it is necessary to iterate on the solution. We compute the rise/set time for the object's current position, then compute the object's position at that time. Finally, we recompute then rise/set time for the new coordinates. Further iteration is not necessary, even for the most swiftly-moving object (the Moon).

Returns
the local time that the object will rise
Parameters
dtcurrent UT date/time
geocurrent geographic location
rstIf true, compute rise time. If false, compute set time.
exactIf true, use a second iteration for more accurate time

Definition at line 105 of file skyobject.cpp.

dms SkyObject::riseSetTimeAz ( const KStarsDateTime &  dt,
const GeoLocation *  geo,
bool  rst 
)
Returns
the Azimuth time when the object will rise or set. This function recomputes set or rise UT times.
Parameters
dttarget date/time
geoGeoLocation object
rstBoolen. If true will compute rise time. If false will compute set time.

Definition at line 192 of file skyobject.cpp.

QTime SkyObject::riseSetTimeUT ( const KStarsDateTime &  dt,
const GeoLocation *  geo,
bool  rst,
bool  exact = true 
)
Returns
the UT time when the object will rise or set
Parameters
dttarget date/time
geopointer to Geographic location
rstBoolean. If true will compute rise time. If false will compute set time.
exactIf true, use a second iteration for more accurate time

Definition at line 135 of file skyobject.cpp.

void SkyObject::saveUserLog ( const QString &  newLog)

Save new user log text.

Definition at line 412 of file skyobject.cpp.

void SkyObject::setLongName ( const QString &  longname = QString())

Set the object's long name.

Parameters
longnamethe object's long name.

Definition at line 92 of file skyobject.cpp.

void SkyObject::setMag ( float  m)
inlineprotected

Set the object's sorting magnitude.

Parameters
mthe object's magnitude.

Definition at line 409 of file skyobject.h.

void SkyObject::setMag ( const QString &  band,
const double  mag 
)
protected

Set the object's magnitude in a particular band.

Parameters
bandthe band (U, B, V, R, I, J, K etc.)
magthe object's (apparent) magnitude.
void SkyObject::setName ( const QString &  name)
inlineprotected

Set the object's primary name.

Parameters
namethe object's primary name

Definition at line 419 of file skyobject.h.

void SkyObject::setName2 ( const QString &  name2 = QString())
inlineprotected

Set the object's secondary name.

Parameters
name2the object's secondary name.

Definition at line 423 of file skyobject.h.

void SkyObject::setNotes ( QString  _notes)
inline

Definition at line 323 of file skyobject.h.

void SkyObject::setType ( int  t)
inline

Set the object's type identifier to the argument.

Parameters
tthe object's type identifier (e.g., "SkyObject::PLANETARY_NEBULA")
See also
enum TYPE

Definition at line 171 of file skyobject.h.

void SkyObject::showPopupMenu ( KSPopupMenu *  pmenu,
const QPoint &  pos 
)

Show Type-specific popup menu.

Oveloading is done in the function initPopupMenu

Definition at line 83 of file skyobject.cpp.

dms SkyObject::transitAltitude ( const KStarsDateTime &  dt,
const GeoLocation *  geo 
)
Returns
the altitude of the object at the moment it transits the meridian.
Parameters
dttarget date/time
geopointer to the geographic location

Definition at line 245 of file skyobject.cpp.

QTime SkyObject::transitTime ( const KStarsDateTime &  dt,
const GeoLocation *  geo 
)

The same iteration technique described in riseSetTime() is used here.

Returns
the local time that the object will transit the meridian.
Parameters
dttarget date/time
geopointer to the geographic location

Definition at line 241 of file skyobject.cpp.

QTime SkyObject::transitTimeUT ( const KStarsDateTime &  dt,
const GeoLocation *  geo 
)
Returns
the universal time that the object will transit the meridian.
Parameters
dttarget date/time
geopointer to the geographic location

Definition at line 221 of file skyobject.cpp.

QString SkyObject::translatedLongName ( ) const
inline
Returns
object's common (long) name, translated to local language.

Definition at line 145 of file skyobject.h.

QString SkyObject::translatedName ( ) const
inline
Returns
object's primary name, translated to local language.

Definition at line 129 of file skyobject.h.

QString SkyObject::translatedName2 ( ) const
inline
Returns
object's secondary name, translated to local language.

Definition at line 135 of file skyobject.h.

int SkyObject::type ( void  ) const
inline
Returns
object's type identifier (int)
See also
enum TYPE

Definition at line 164 of file skyobject.h.

QString SkyObject::typeName ( const int  t)
static
Returns
A translated string indicating the type name for a given type number
Parameters
tThe type number
Note
Note the existence of a SkyObject::typeName( void ) method that is not static and returns the type of this object.

Definition at line 319 of file skyobject.cpp.

QString SkyObject::typeName ( void  ) const
Returns
the type name for this object
Note
This just calls the static method by the same name, with the appropriate type number. See SkyObject::typeName( const int )

Definition at line 370 of file skyobject.cpp.

QString& SkyObject::userLog ( )
inline
Returns
a reference to a QString storing the users' log for this SkyObject

Definition at line 319 of file skyobject.h.

Member Data Documentation

QString SkyObject::emptyString
staticprotected

Definition at line 431 of file skyobject.h.

QSharedDataPointer<AuxInfo> SkyObject::info
protected

Definition at line 428 of file skyobject.h.

const SkyObject::UID SkyObject::invalidUID = ~0
static

Invalid UID.

Real sky object could not have such UID

Definition at line 62 of file skyobject.h.

QString SkyObject::LongName
protected

Definition at line 425 of file skyobject.h.

QString SkyObject::Name
protected

Definition at line 425 of file skyobject.h.

QString SkyObject::Name2
protected

Definition at line 425 of file skyobject.h.

QString SkyObject::starString = QString("star")
staticprotected

Definition at line 434 of file skyobject.h.

const SkyObject::UID SkyObject::UID_DEEPSKY = 2
static

Definition at line 58 of file skyobject.h.

const SkyObject::UID SkyObject::UID_GALAXY = 1
static

Definition at line 57 of file skyobject.h.

const SkyObject::UID SkyObject::UID_SOLARSYS = 3
static

Definition at line 59 of file skyobject.h.

const SkyObject::UID SkyObject::UID_STAR = 0
static

Kind of UID.

Definition at line 56 of file skyobject.h.

QString SkyObject::unnamedObjectString = QString(I18N_NOOP("unnamed object"))
staticprotected

Definition at line 433 of file skyobject.h.

QString SkyObject::unnamedString = QString(I18N_NOOP("unnamed"))
staticprotected

Definition at line 432 of file skyobject.h.


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