• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

SkyObject Class Reference

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. More...

#include <skyobject.h>

Inheritance diagram for SkyObject:

Inheritance graph
[legend]

List of all members.


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,
  TYPE_UNKNOWN
}

Public Member Functions

bool checkCircumpolar (const dms *gLng)
const bool hasLongName () const
const bool hasName () const
const bool hasName2 () const
bool isSolarSystem ()
virtual QString longname (void) const
float mag (void) const
QString messageFromTitle (const QString &imageTitle)
virtual QString name (void) const
QString name2 (void) const
virtual double pa () const
SkyPoint recomputeCoords (const KStarsDateTime &dt, const GeoLocation *geo=0)
QTime riseSetTime (const KStarsDateTime &dt, const GeoLocation *geo, bool rst)
dms riseSetTimeAz (const KStarsDateTime &dt, const GeoLocation *geo, bool rst)
dms riseSetTimeLST (const KStarsDateTime &dt, const GeoLocation *geo, bool rst)
QTime riseSetTimeUT (const KStarsDateTime &dt, const GeoLocation *geo, bool rst)
void saveUserLog (const QString &newLog)
void setLongName (const QString &longname="")
void setMag (float m)
void setName (const QString &name)
void setName2 (const QString &name2="")
void setType (int t)
virtual void showPopupMenu (KSPopupMenu *pmenu, QPoint pos)
 SkyObject (SkyObject &o)
 SkyObject (int t, double r, double d, float m=0.0, QString n="", QString n2="", QString lname="")
 SkyObject (int t=TYPE_UNKNOWN, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, QString n="", QString n2="", QString lname="")
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 (void) const
 ~SkyObject ()

Public Attributes

QStringList ImageList
QStringList ImageTitle
QStringList InfoList
QStringList InfoTitle
QString userLog

Protected Attributes

QString * LongName
QString * Name
QString * Name2

Static Protected Attributes

static QString emptyString = QString("")
static QString starString = QString("star")
static QString unnamedObjectString = QString(i18n("unnamed object"))
static QString unnamedString = QString(i18n("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 43 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 
TYPE_UNKNOWN 

Definition at line 83 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,
QString  n = "",
QString  n2 = "",
QString  lname = "" 
)

Constructor.

Set SkyObject data according to arguments.

Parameters:
t Type of object
r catalog Right Ascension
d catalog Declination
m magnitude (brightness)
n Primary name
n2 Secondary name
lname Long name (common name)

Definition at line 51 of file skyobject.cpp.

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

Constructor.

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

Parameters:
t Type of object
r catalog Right Ascension
d catalog Declination
m magnitude (brightness)
n Primary name
n2 Secondary name
lname Long name (common name)

Definition at line 63 of file skyobject.cpp.

SkyObject::SkyObject ( SkyObject &  o  ) 

Copy constructor.

Parameters:
o SkyObject from which to copy data

Definition at line 39 of file skyobject.cpp.

SkyObject::~SkyObject (  ) 

Destructor (empty).

Definition at line 75 of file skyobject.cpp.


Member Function Documentation

bool SkyObject::checkCircumpolar ( const dms *  gLng  ) 

Check whether a source is circumpolar or not.

True = cirmcumpolar False = Not circumpolar

Returns:
true if circumpolar

Definition at line 302 of file skyobject.cpp.

const bool SkyObject::hasLongName (  )  const [inline]

Definition at line 241 of file skyobject.h.

const bool SkyObject::hasName (  )  const [inline]

Definition at line 237 of file skyobject.h.

const bool SkyObject::hasName2 (  )  const [inline]

Definition at line 239 of file skyobject.h.

bool SkyObject::isSolarSystem (  )  [inline]

Returns:
true if the object is a solar system body.

Definition at line 157 of file skyobject.h.

virtual QString SkyObject::longname ( void   )  const [inline, virtual]

Returns:
object's common (long) name

Reimplemented in StarObject.

Definition at line 115 of file skyobject.h.

float SkyObject::mag ( void   )  const [inline]

Returns:
object's magnitude

Definition at line 143 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 341 of file skyobject.cpp.

virtual QString SkyObject::name ( void   )  const [inline, virtual]

Returns:
object's primary name.

Reimplemented in StarObject.

Definition at line 89 of file skyobject.h.

QString SkyObject::name2 ( void   )  const [inline]

Returns:
object's secondary name

Definition at line 102 of file skyobject.h.

virtual double SkyObject::pa (  )  const [inline, virtual]

Returns:
the object's position angle. This is overridden in KSPlanetBase and DeepSkyObject; for all other SkyObjects, this returns 0.0.

Reimplemented in DeepSkyObject, and KSPlanetBase.

Definition at line 153 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:
dt date/time for which the coords will be computed.
geo pointer to geographic location (used for solar system only)

Definition at line 279 of file skyobject.cpp.

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

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:
dt current UT date/time
geo current geographic location
rst If TRUE, compute rise time. If FALSE, compute set time.

Definition at line 95 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:
dt target date/time
geo GeoLocation object
rst Boolen. If TRUE will compute rise time. If FALSE will compute set time.

Definition at line 167 of file skyobject.cpp.

dms SkyObject::riseSetTimeLST ( const KStarsDateTime &  dt,
const GeoLocation *  geo,
bool  rst 
)

Returns:
the LST time when the object will rise or set
Parameters:
dt target date/time
geo pointer to Geographic location
rst Boolean. If TRUE will compute rise time. If FALSE will compute set time.

Definition at line 142 of file skyobject.cpp.

QTime SkyObject::riseSetTimeUT ( const KStarsDateTime &  dt,
const GeoLocation *  geo,
bool  rst 
)

Returns:
the UT time when the object will rise or set
Parameters:
dt target date/time
geo pointer to Geographic location
rst Boolean. If TRUE will compute rise time. If FALSE will compute set time.

Definition at line 116 of file skyobject.cpp.

void SkyObject::saveUserLog ( const QString &  newLog  ) 

Save new user log text.

Definition at line 380 of file skyobject.cpp.

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

Set the object's long name.

Parameters:
longname the object's long name.

Definition at line 81 of file skyobject.cpp.

void SkyObject::setMag ( float  m  )  [inline]

Set the object's magnitude.

Parameters:
m the object's magnitude.

Definition at line 148 of file skyobject.h.

void SkyObject::setName ( const QString &  name  ) 

Set the object's primary name.

Parameters:
name the object's primary name

Definition at line 324 of file skyobject.cpp.

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

Set the object's secondary name.

Parameters:
name2 the object's secondary name.

Definition at line 333 of file skyobject.cpp.

void SkyObject::setType ( int  t  )  [inline]

Set the object's type identifier to the argument.

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

Definition at line 135 of file skyobject.h.

virtual void SkyObject::showPopupMenu ( KSPopupMenu *  pmenu,
QPoint  pos 
) [inline, virtual]

Show Type-specific popup menu.

This is a two-line function that needs to be overloaded by each subclass of SkyObject, to make sure that the correct popupmenu function gets called. By overloading the function, we don't have to check the object type when we need the menu.

Reimplemented in DeepSkyObject, KSPlanetBase, and StarObject.

Definition at line 164 of file skyobject.h.

dms SkyObject::transitAltitude ( const KStarsDateTime &  dt,
const GeoLocation *  geo 
)

Returns:
the altitude of the object at the moment it transits the meridian.
Parameters:
dt target date/time
geo pointer to the geographic location

Definition at line 223 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:
dt target date/time
geo pointer to the geographic location

Definition at line 219 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:
dt target date/time
geo pointer to the geographic location

Definition at line 198 of file skyobject.cpp.

QString SkyObject::translatedLongName (  )  const [inline]

Returns:
object's common (long) name, translated to local language.

Definition at line 119 of file skyobject.h.

QString SkyObject::translatedName (  )  const [inline]

Returns:
object's primary name, translated to local language.

Definition at line 93 of file skyobject.h.

QString SkyObject::translatedName2 (  )  const [inline]

Returns:
object's secondary name, translated to local language.

Definition at line 106 of file skyobject.h.

int SkyObject::type ( void   )  const [inline]

Returns:
object's type identifier (int)
See also:
enum TYPE

Definition at line 129 of file skyobject.h.

QString SkyObject::typeName ( void   )  const

Returns:
a string describing object's type.

Definition at line 310 of file skyobject.cpp.


Member Data Documentation

QString SkyObject::emptyString = QString("") [static, protected]

Definition at line 317 of file skyobject.h.

QStringList SkyObject::ImageList

Definition at line 251 of file skyobject.h.

QStringList SkyObject::ImageTitle

Definition at line 251 of file skyobject.h.

QStringList SkyObject::InfoList

Definition at line 252 of file skyobject.h.

QStringList SkyObject::InfoTitle

Definition at line 252 of file skyobject.h.

QString * SkyObject::LongName [protected]

Definition at line 314 of file skyobject.h.

QString* SkyObject::Name [protected]

Definition at line 314 of file skyobject.h.

QString * SkyObject::Name2 [protected]

Definition at line 314 of file skyobject.h.

QString SkyObject::starString = QString("star") [static, protected]

Definition at line 320 of file skyobject.h.

QString SkyObject::unnamedObjectString = QString(i18n("unnamed object")) [static, protected]

Definition at line 319 of file skyobject.h.

QString SkyObject::unnamedString = QString(i18n("unnamed")) [static, protected]

Definition at line 318 of file skyobject.h.

QString SkyObject::userLog

Definition at line 253 of file skyobject.h.


The documentation for this class was generated from the following files:
  • skyobject.h
  • skyobject.cpp

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal