kstars
StarObject Class Reference
This is a subclass of SkyObject. More...
#include <starobject.h>

Public Member Functions | |
QChar | color (void) const |
QString | constell (void) const |
double | distance () const |
void | draw (QPainter &psky, QPixmap *sky, QPixmap *starpix, int x, int y, bool drawMultiple=true, double scale=1.0) |
void | drawLabel (QPainter &psky, int x, int y, double zoom, bool drawName, bool drawMag, double scale) |
QString | gname (bool useGreekChars=true) const |
QString | greekLetter (bool useGreekChars=true) const |
bool | isMultiple () const |
bool | isVariable () const |
virtual QString | longname (void) const |
virtual QString | name (void) const |
double | parallax () const |
double | pmDec () const |
double | pmRA () const |
void | setMultiple (bool m) |
void | setParallax (double plx) |
void | setProperMotion (double pmra, double pmdec) |
void | setVariable (bool v) |
virtual void | showPopupMenu (KSPopupMenu *pmenu, QPoint pos) |
QString | sptype (void) const |
StarObject (double r, double d, float m=0.0, QString n="", QString n2="", QString sptype="--", double pmra=0.0, double pmdec=0.0, double par=0.0, bool mult=false, bool var=false) | |
StarObject (dms r=dms(0.0), dms d=dms(0.0), float m=0.0, QString n="", QString n2="", QString sptype="--", double pmra=0.0, double pmdec=0.0, double par=0.0, bool mult=false, bool var=false) | |
StarObject (StarObject &o) | |
virtual void | updateCoords (KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0) |
~StarObject () |
Detailed Description
This is a subclass of SkyObject.It adds the Spectral type, and flags for variability and multiplicity. For stars, the primary name (n) is the latin name (e.g., "Betelgeuse"). The secondary name (n2) is the genetive name (e.g., "alpha Orionis"). subclass of SkyObject specialized for stars.
- Version:
- 1.0
Definition at line 39 of file starobject.h.
Constructor & Destructor Documentation
StarObject::StarObject | ( | StarObject & | o | ) |
StarObject::StarObject | ( | dms | r = dms(0.0) , |
|
dms | d = dms(0.0) , |
|||
float | m = 0.0 , |
|||
QString | n = "" , |
|||
QString | n2 = "" , |
|||
QString | sptype = "--" , |
|||
double | pmra = 0.0 , |
|||
double | pmdec = 0.0 , |
|||
double | par = 0.0 , |
|||
bool | mult = false , |
|||
bool | var = false | |||
) |
Constructor.
Sets sky coordinates, magnitude, latin name, genetive name, and spectral type.
- Parameters:
-
r Right Ascension d Declination m magnitude n common name n2 genetive name sptype Spectral Type pmra Proper motion in RA direction [mas/yr] pmdec Proper motion in Dec direction [mas/yr] par Parallax angle [mas] mult Multiplicity flag (false=dingle star; true=multiple star) var Variability flag (true if star is a known periodic variable)
Definition at line 39 of file starobject.cpp.
StarObject::StarObject | ( | double | r, | |
double | d, | |||
float | m = 0.0 , |
|||
QString | n = "" , |
|||
QString | n2 = "" , |
|||
QString | sptype = "--" , |
|||
double | pmra = 0.0 , |
|||
double | pmdec = 0.0 , |
|||
double | par = 0.0 , |
|||
bool | mult = false , |
|||
bool | var = false | |||
) |
Constructor.
Sets sky coordinates, magnitude, latin name, genetive name, and spectral type. Differs from above function only in data type of RA and Dec.
- Parameters:
-
r Right Ascension d Declination m magnitude n common name n2 genetive name sptype Spectral Type pmra Proper motion in RA direction [mas/yr] pmdec Proper motion in Dec direction [mas/yr] par Parallax angle [mas] mult Multiplicity flag (false=dingle star; true=multiple star) var Variability flag (true if star is a known periodic variable)
Definition at line 59 of file starobject.cpp.
StarObject::~StarObject | ( | ) | [inline] |
Member Function Documentation
QChar StarObject::color | ( | void | ) | const [inline] |
Returns first character of Spectral Type string, which is used to select the temperature-color of the star.
- Returns:
- first character of Spectral Type string
Definition at line 103 of file starobject.h.
QString StarObject::constell | ( | void | ) | const |
- Returns:
- the genitive form of the star's constellation.
Definition at line 131 of file starobject.cpp.
double StarObject::distance | ( | ) | const [inline] |
- Returns:
- the star's distance from the Sun in parsecs, as computed from the parallax.
Definition at line 163 of file starobject.h.
void StarObject::draw | ( | QPainter & | psky, | |
QPixmap * | sky, | |||
QPixmap * | starpix, | |||
int | x, | |||
int | y, | |||
bool | drawMultiple = true , |
|||
double | scale = 1.0 | |||
) |
set the range in brightness covered by the star's variability
- Parameters:
-
r the range of brightness, in magnitudes
- Returns:
- the range in brightness covered by the star's variability, in magnitudesset the period of the star's brightness variation, in days.
the period of the star's brightness variation, in days.
Definition at line 225 of file starobject.cpp.
void StarObject::drawLabel | ( | QPainter & | psky, | |
int | x, | |||
int | y, | |||
double | zoom, | |||
bool | drawName, | |||
bool | drawMag, | |||
double | scale | |||
) |
Definition at line 242 of file starobject.cpp.
QString StarObject::gname | ( | bool | useGreekChars = true |
) | const |
Returns the genetive name of the star.
- Returns:
- genetive name of the star
Definition at line 89 of file starobject.cpp.
QString StarObject::greekLetter | ( | bool | useGreekChars = true |
) | const |
Returns the greek letter portion of the star's genetive name.
Returns empty string if star has no genetive name defined.
- Returns:
- greek letter portion of genetive name
Definition at line 93 of file starobject.cpp.
bool StarObject::isMultiple | ( | ) | const [inline] |
- Returns:
- whether the star is a binary or multiple starobject
Definition at line 172 of file starobject.h.
bool StarObject::isVariable | ( | ) | const [inline] |
- Returns:
- whether the star is a binary or multiple starobject
Definition at line 181 of file starobject.h.
virtual QString StarObject::longname | ( | void | ) | const [inline, virtual] |
If star is unnamed return "star" otherwise return the longname.
Reimplemented from SkyObject.
Definition at line 97 of file starobject.h.
virtual QString StarObject::name | ( | void | ) | const [inline, virtual] |
If star is unnamed return "star" otherwise return the name.
Reimplemented from SkyObject.
Definition at line 92 of file starobject.h.
double StarObject::parallax | ( | ) | const [inline] |
double StarObject::pmDec | ( | ) | const [inline] |
- Returns:
- the Dec component of the star's proper motion, in mas/yr
Definition at line 151 of file starobject.h.
double StarObject::pmRA | ( | ) | const [inline] |
- Returns:
- the RA component of the star's proper motion, in mas/yr (multiplied by cos(dec))
Definition at line 147 of file starobject.h.
void StarObject::setMultiple | ( | bool | m | ) | [inline] |
set the star's multiplicity flag (i.e., is it a binary or multiple star?)
- Parameters:
-
m true if binary/multiple star system
Definition at line 168 of file starobject.h.
void StarObject::setParallax | ( | double | plx | ) | [inline] |
void StarObject::setProperMotion | ( | double | pmra, | |
double | pmdec | |||
) | [inline] |
Set the Ra and Dec components of the star's proper motion, in milliarcsec/year.
Note that the RA component is multiplied by cos(dec).
- Parameters:
-
pmra the new RA propoer motion pmdec the new Dec proper motion
Definition at line 143 of file starobject.h.
void StarObject::setVariable | ( | bool | v | ) | [inline] |
set the star's variability flag
- Parameters:
-
v true if star is variable
Definition at line 177 of file starobject.h.
virtual void StarObject::showPopupMenu | ( | KSPopupMenu * | pmenu, | |
QPoint | pos | |||
) | [inline, virtual] |
Show star object popup menu.
Overloaded from virtual SkyObject::showPopupMenu()
- Parameters:
-
pmenu pointer to the KSPopupMenu object pos QPojnt holding the x,y coordinates for the menu
Reimplemented from SkyObject.
Definition at line 211 of file starobject.h.
QString StarObject::sptype | ( | void | ) | const |
Returns entire spectral type string.
- Returns:
- Spectral Type string
Definition at line 85 of file starobject.cpp.
void StarObject::updateCoords | ( | KSNumbers * | num, | |
bool | includePlanets = true , |
|||
const dms * | lat = 0 , |
|||
const dms * | LST = 0 | |||
) | [virtual] |
Determine the current coordinates (RA, Dec) from the catalog coordinates (RA0, Dec0), accounting for both precession and nutation.
- Parameters:
-
num pointer to KSNumbers object containing current values of time-dependent variables. includePlanets does nothing in this implementation (see KSPlanetBase::updateCoords()). lat does nothing in this implementation (see KSPlanetBase::updateCoords()). LST does nothing in this implementation (see KSPlanetBase::updateCoords()).
Reimplemented from SkyPoint.
Definition at line 74 of file starobject.cpp.
The documentation for this class was generated from the following files: