• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Stellarium / stellarium / 6093339559

06 Sep 2023 06:04AM UTC coverage: 11.86% (-0.004%) from 11.864%
6093339559

push

github

alex-w
A new plugin is translatable now

14815 of 124919 relevant lines covered (11.86%)

21886.49 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/plugins/MissingStars/src/MissingStar.hpp
1
/*
2
 * Copyright (C) 2023 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 MISSINGSTAR_HPP
20
#define MISSINGSTAR_HPP
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
#include "StelTranslator.hpp"
33

34
class StelPainter;
35

36
//! @class MissingStar
37
//! A Missing Star object represents one missing star on the sky.
38
//! Details about the missing stars are passed using a QVariant which contains
39
//! a map of data from the json file.
40
//! @ingroup missingStars
41

42
class MissingStar : public StelObject
43
{
44
        friend class MissingStars;
45
public:
46
        static const QString MISSINGSTAR_TYPE;
47

48
        //! @param id The official designation for a missing star
49
        MissingStar(const QVariantMap& map);
50
        ~MissingStar() Q_DECL_OVERRIDE;
51

52
        //! Get a QVariantMap which describes the missing star. Could be used to create a duplicate.
53
        //! - designation
54
        //! - RA (J2000.0)
55
        //! - DEC (J2000.0)
56
        //! - pmRA [mas/yr]
57
        //! - pmDEC [mas/yr]
58
        //! - bMag
59
        //! - vMag
60
        //! - parallax [mas]
61
        //! - parallaxErr [mas]
62
        //! - SpType
63
        QVariantMap getMap(void) const;
64

65
        virtual QString getType(void) const Q_DECL_OVERRIDE
×
66
        {
67
                return MISSINGSTAR_TYPE;
×
68
        }
69

70
        virtual QString getObjectType(void) const Q_DECL_OVERRIDE
×
71
        {
72
                return N_("star");
×
73
        }
74
        virtual QString getObjectTypeI18n(void) const Q_DECL_OVERRIDE
×
75
        {
76
                return q_(getObjectType());
×
77
        }
78

79
        virtual QString getID(void) const Q_DECL_OVERRIDE
×
80
        {
81
                return designation;
×
82
        }
83

84
        //! Get an HTML string to describe the object
85
        //! @param core A pointer to the core
86
        //! @flags a set of flags with information types to include.
87
        virtual QString getInfoString(const StelCore* core, const InfoStringGroup& flags) const Q_DECL_OVERRIDE;
88
        //! Return a map like StelObject::getInfoMap(), but with a few extra tags also available in getMap().
89
        //virtual QVariantMap getInfoMap(const StelCore *core) const Q_DECL_OVERRIDE;
90
        virtual Vec3f getInfoColor(void) const Q_DECL_OVERRIDE;
91
        virtual Vec3d getJ2000EquatorialPos(const StelCore *core) const Q_DECL_OVERRIDE;
92
        virtual float getVMagnitude(const StelCore* core) const Q_DECL_OVERRIDE;
93
        virtual QString getNameI18n(void) const Q_DECL_OVERRIDE;
94
        virtual QString getEnglishName(void) const Q_DECL_OVERRIDE;
95

96
        void update(double deltaTime);
97

98
private:
99
        bool initialized;
100

101
        static StelTextureSP hintTexture;
102

103
        void draw(StelCore* core, StelPainter& painter);
104

105
        // Missing Star
106
        QString designation; //! The ID of the missing star
107
        double RA;             //! R.A. (J2000.0) for the missing star
108
        double DEC;             //! Dec. (J2000.0) for the missing star
109
        float pmRA;             //! proper motion in R.A. for the missing star [mas/yr]
110
        float pmDEC;             //! proper motion in Dec. for the missing star [mas/yr]
111
        float bMag;             //! B magnitude for the missing star
112
        float vMag;             //! V magnitude for the missing star
113
        float parallax;      //! parallax for the missing star [mas]
114
        float parallaxErr;   //! parallax error for the missing star [mas]
115
        QString spType;      //! spectral type for the missing star
116
        int colorIndex;
117

118
        LinearFader labelsFader;
119
};
120

121
#endif // MISSINGSTAR_HPP
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc