Stellarium 0.15.2
Nova.hpp
1 /*
2  * Copyright (C) 2013 Alexander Wolf
3  *
4  * This program is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU General Public License
6  * as published by the Free Software Foundation; either version 2
7  * of the License, or (at your option) any later version.
8  *
9  * This program is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12  * GNU General Public License for more details.
13  *
14  * You should have received a copy of the GNU General Public License
15  * along with this program; if not, write to the Free Software
16  * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
17  */
18 
19 #ifndef _NOVA_HPP_
20 #define _NOVA_HPP_ 1
21 
22 #include <QVariant>
23 #include <QString>
24 #include <QStringList>
25 #include <QFont>
26 #include <QList>
27 #include <QDateTime>
28 
29 #include "StelObject.hpp"
30 #include "StelFader.hpp"
31 #include "StelProjectorType.hpp"
32 
33 class StelPainter;
34 
40 
41 class Nova : public StelObject
42 {
43  friend class Novae;
44 public:
46  Nova(const QVariantMap& map);
47  ~Nova();
48 
50  QVariantMap getMap(void) const;
51 
52  virtual QString getType(void) const {return "Nova";}
53 
57  virtual QString getInfoString(const StelCore* core, const InfoStringGroup& flags) const;
59  // TODO: Describe the entries!
71  virtual QVariantMap getInfoMap(const StelCore *core) const;
72  virtual Vec3f getInfoColor(void) const;
73  virtual Vec3d getJ2000EquatorialPos(const StelCore*) const
74  {
75  return XYZ;
76  }
77  virtual float getVMagnitude(const StelCore* core) const;
78  virtual double getAngularSize(const StelCore* core) const;
79  virtual QString getNameI18n(void) const;
80  virtual QString getEnglishName(void) const;
81  QString getDesignation(void) const;
82 
83  void update(double deltaTime);
84 
85 private:
86  bool initialized;
87 
88  Vec3d XYZ; // holds J2000 position
89 
90  void draw(StelCore* core, StelPainter* painter);
91 
92  // Nova
93  QString designation;
94  QString novaName;
95  QString novaType;
96  float maxMagnitude;
97  float minMagnitude;
98  double peakJD;
99  int m2;
100  int m3;
101  int m6;
102  int m9;
103  double RA;
104  double Dec;
105  double distance;
106 
107  LinearFader labelsFader;
108 
109  QString getMaxBrightnessDate(const double JD) const;
110 };
111 
112 #endif // _NOVA_HPP_
virtual void draw(StelCore *core)
Execute all the drawing functions for this module.
Implementation of StelFader which implements a linear transition.
Definition: StelFader.hpp:77
The base abstract class for sky objects used in Stellarium like Stars, Planets, Constellations etc...
Definition: StelObject.hpp:36
virtual QString getType(void) const
Return object&#39;s type. It should be the name of the class.
Definition: Nova.hpp:52
virtual double getAngularSize(const StelCore *core) const
Return the angular radius of a circle containing the object as seen from the observer with the circle...
Main class of the Bright Novae plugin.
Definition: Novae.hpp:67
QVariantMap getMap(void) const
Get a QVariantMap which describes the nova. Could be used to create a duplicate.
virtual Vec3d getJ2000EquatorialPos(const StelCore *) const
Get observer-centered equatorial coordinates at equinox J2000.
Definition: Nova.hpp:73
Main class for Stellarium core processing.
Definition: StelCore.hpp:48
virtual QString getEnglishName(void) const
Return object&#39;s name in english.
virtual QString getInfoString(const StelCore *core, const InfoStringGroup &flags) const
Get an HTML string to describe the object.
virtual QString getNameI18n(void) const
Return translated object&#39;s name.
virtual float getVMagnitude(const StelCore *core) const
Return object&#39;s apparent V magnitude as seen from observer, without including extinction.
Provides functions for performing openGL drawing operations.
Definition: StelPainter.hpp:40
virtual void update(double)
Update the module with respect to the time.
Definition: Novae.hpp:87
Nova(const QVariantMap &map)
virtual QVariantMap getInfoMap(const StelCore *core) const
Return a map like StelObject::getInfoMap(), but with a few extra tags also available in getMap()...
A Nova object represents one nova on the sky.
Definition: Nova.hpp:41
Define the StelProjectorP type.
virtual Vec3f getInfoColor(void) const
Get a color used to display info about the object.