Stellarium 0.14.3
Main Page
Modules
Classes
Core API
File List
plugins
Supernovae
src
Supernova.hpp
1
/*
2
* Copyright (C) 2011 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 _SUPERNOVA_HPP_
20
#define _SUPERNOVA_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 "
StelTextureTypes.hpp
"
31
#include "StelFader.hpp"
32
33
class
StelPainter
;
34
40
41
class
Supernova
:
public
StelObject
42
{
43
friend
class
Supernovae
;
44
public
:
46
Supernova
(
const
QVariantMap& map);
47
~
Supernova
();
48
51
QVariantMap
getMap
(
void
);
52
53
virtual
QString getType(
void
)
const
54
{
55
return
"Supernova"
;
56
}
57
61
virtual
QString
getInfoString
(
const
StelCore
* core,
const
InfoStringGroup& flags)
const
;
62
virtual
Vec3f getInfoColor(
void
)
const
;
63
virtual
Vec3d getJ2000EquatorialPos(
const
StelCore
*)
const
64
{
65
return
XYZ;
66
}
67
virtual
float
getVMagnitude(
const
StelCore
* core)
const
;
68
virtual
double
getAngularSize(
const
StelCore
* core)
const
;
69
virtual
QString getNameI18n(
void
)
const
;
70
virtual
QString getEnglishName(
void
)
const
;
71
72
void
update(
double
deltaTime);
73
74
private
:
75
bool
initialized;
76
77
Vec3d XYZ;
// holds J2000 position
78
79
static
StelTextureSP
hintTexture;
80
81
void
draw(
StelCore
* core,
StelPainter
& painter);
82
83
// Supernova
84
QString designation;
85
QString sntype;
86
float
maxMagnitude;
87
double
peakJD;
88
double
snra;
89
double
snde;
90
QString note;
91
double
distance;
92
93
LinearFader
labelsFader;
94
95
QString getMaxBrightnessDate(
const
double
JD)
const
;
96
};
97
98
#endif // _SUPERNOVA_HPP_
LinearFader
Supernova::getInfoString
virtual QString getInfoString(const StelCore *core, const InfoStringGroup &flags) const
Get an HTML string to describe the object.
StelObject
StelTextureTypes.hpp
StelCore
Supernova::Supernova
Supernova(const QVariantMap &map)
Supernova::getMap
QVariantMap getMap(void)
Get a QVariantMap which describes the supernova.
Supernova
A Supernova object represents one supernova on the sky.
Definition:
Supernova.hpp:41
StelPainter
Supernovae
Main class of the Historical Supernovae plugin.
Definition:
Supernovae.hpp:68
StelTextureSP
QSharedPointer< StelTexture > StelTextureSP
Generated on Sun Mar 20 2016 15:06:44 for Stellarium by
1.8.8