Kstars

supernova.cpp
1 /*
2  SPDX-FileCopyrightText: 2016 Jasem Mutlaq <[email protected]>
3 
4  Based on Samikshan Bairagya GSoC work.
5 
6  SPDX-License-Identifier: GPL-2.0-or-later
7 */
8 
9 #include "supernova.h"
10 
11 #include <typeinfo>
12 #ifndef KSTARS_LITE
13 #include "kspopupmenu.h"
14 #endif
15 
16 Supernova::Supernova(const QString &sName, dms ra, dms dec, const QString &type, const QString &hostGalaxy,
17  const QString &date, float sRedShift, float sMag)
18  : SkyObject(SkyObject::SUPERNOVA, ra, dec, sMag, sName), type(type), hostGalaxy(hostGalaxy), date(date),
19  redShift(sRedShift)
20 {
21 }
22 
24 {
25  Q_ASSERT(typeid(this) == typeid(static_cast<const Supernova *>(this))); // Ensure we are not slicing a derived class
26  return new Supernova(*this);
27 }
28 
30 {
31 #ifdef KSTARS_LITE
32  Q_UNUSED(pmenu)
33 #else
34  pmenu->createSupernovaMenu(this);
35 #endif
36 }
void createSupernovaMenu(Supernova *supernova)
Create a popup menu for a supernova.
Type type(const QSqlDatabase &db)
QTextStream & dec(QTextStream &stream)
void initPopupMenu(KSPopupMenu *) override
Initialize the popup menut.
Definition: supernova.cpp:29
Supernova * clone() const override
Definition: supernova.cpp:23
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:37
Information about an object in the sky.
Definition: skyobject.h:41
This file is part of the KDE documentation.
Documentation copyright © 1996-2022 The KDE developers.
Generated on Mon Aug 15 2022 04:04:06 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.