2
* Copyright (C) 2011 Alexander Wolf
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.
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.
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., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
19
#ifndef _SUPERNOVA_HPP_
20
#define _SUPERNOVA_HPP_ 1
24
#include <QStringList>
29
#include "StelObject.hpp"
30
#include "StelTextureTypes.hpp"
31
#include "StelPainter.hpp"
36
//! A Supernova object represents one supernova on the sky.
37
//! Details about the supernovas are passed using a QVariant which contains
38
//! a map of data from the json file.
40
class Supernova : public StelObject
42
friend class Supernovas;
44
//! @param id The official designation for a supernova, e.g. "SN 1054A"
45
Supernova(const QVariantMap& map);
48
//! Get a QVariantMap which describes the supernova. Could be used to
49
//! create a duplicate.
50
QVariantMap getMap(void);
52
virtual QString getType(void) const
56
virtual float getSelectPriority(const StelCore* core) const;
58
//! Get an HTML string to describe the object
59
//! @param core A pointer to the core
60
//! @flags a set of flags with information types to include.
61
virtual QString getInfoString(const StelCore* core, const InfoStringGroup& flags) const;
62
virtual Vec3f getInfoColor(void) const;
63
virtual Vec3d getJ2000EquatorialPos(const StelCore*) const
67
virtual float getVMagnitude(const StelCore* core) const;
68
virtual double getAngularSize(const StelCore* core) const;
69
virtual QString getNameI18n(void) const
73
virtual QString getEnglishName(void) const
78
void update(double deltaTime);
83
Vec3d XYZ; // holds J2000 position
85
static StelTextureSP hintTexture;
87
void draw(StelCore* core, StelPainter& painter);
90
QString designation; //! The ID of the supernova
91
QString sntype; //! Type of the supernova
92
float maxMagnitude; //! Maximal visual magnitude
93
double peakJD; //! Julian Day of max. vis. mag.
94
double snra; //! R.A. for the supernova
95
double snde; //! Dec. for the supernova
96
QString note; //! Notes for the supernova
97
double distance; //! Distance to supernova (10^3 ly)
100
#endif // _SUPERNOVA_HPP_