Stellarium 0.14.3
Main Page
Modules
Classes
Core API
File List
plugins
NavStars
src
NavStars.hpp
1
/*
2
* Navigational Stars plug-in
3
* Copyright (C) 2014 Alexander Wolf
4
*
5
* This program is free software; you can redistribute it and/or
6
* modify it under the terms of the GNU General Public License
7
* as published by the Free Software Foundation; either version 2
8
* of the License, or (at your option) any later version.
9
*
10
* This program is distributed in the hope that it will be useful,
11
* but WITHOUT ANY WARRANTY; without even the implied warranty of
12
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13
* GNU General Public License for more details.
14
*
15
* You should have received a copy of the GNU General Public License
16
* along with this program; if not, write to the Free Software
17
* Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
18
*/
19
20
#ifndef _NAVSTARS_HPP_
21
#define _NAVSTARS_HPP_
22
23
#include "StelFader.hpp"
24
#include "StelModule.hpp"
25
#include "StelObject.hpp"
// For StelObjectP
26
#include "StelTexture.hpp"
27
28
#include <QSettings>
29
30
class
StelButton
;
31
class
StelPainter
;
32
class
StarMgr
;
33
53
class
NavStars
:
public
StelModule
58
{
59
Q_OBJECT
60
Q_PROPERTY(
bool
navStarsVisible
61
READ
getNavStarsMarks
62
WRITE
setNavStarsMarks
63
NOTIFY
navStarsMarksChanged
)
64
public
:
65
NavStars
();
66
virtual
~
NavStars
();
67
69
// Methods defined in the StelModule class
70
virtual
void
init();
71
virtual
void
deinit();
72
virtual
void
update(
double
deltaTime);
73
virtual
void
draw(
StelCore
* core);
74
virtual
double
getCallOrder(StelModuleActionName actionName)
const
;
75
76
77
public
slots:
80
void
setNavStarsMarks
(
const
bool
b);
82
bool
getNavStarsMarks
(
void
)
const
;
83
84
signals:
86
void
navStarsMarksChanged
(
bool
b);
87
88
private
slots:
90
void
starNamesChanged(
const
bool
b);
91
92
private
:
93
StarMgr
* smgr;
94
QSettings* conf;
95
97
QList<int> starNumbers;
99
QVector<StelObjectP> stars;
100
101
StelTextureSP
markerTexture;
103
Vec3f markerColor;
104
LinearFader
markerFader;
105
107
bool
starNamesState;
108
110
StelButton
* toolbarButton;
111
};
112
113
114
115
#include <QObject>
116
#include "StelPluginInterface.hpp"
117
119
class
NavStarsStelPluginInterface
:
public
QObject,
public
StelPluginInterface
120
{
121
Q_OBJECT
122
Q_PLUGIN_METADATA(IID StelPluginInterface_iid)
123
Q_INTERFACES(
StelPluginInterface
)
124
public
:
125
virtual
StelModule
*
getStelModule
()
const
;
126
virtual
StelPluginInfo
getPluginInfo
()
const
;
127
};
128
129
#endif // _NAVSTARS_HPP_
StelPluginInterface
LinearFader
StelCore
StelPluginInterface::getPluginInfo
virtual StelPluginInfo getPluginInfo() const =0
StelPainter
NavStars::navStarsMarksChanged
void navStarsMarksChanged(bool b)
Emitted when display of markers have been changed.
StelButton
StelPluginInterface::getStelModule
virtual class StelModule * getStelModule() const =0
StarMgr
NavStarsStelPluginInterface
This class is used by Qt to manage a plug-in interface.
Definition:
NavStars.hpp:119
NavStars::setNavStarsMarks
void setNavStarsMarks(const bool b)
Set flag of displaying markers of the navigational stars Emits navStarsMarksChanged() if the value ch...
NavStars
Main class of the Navigational Stars plugin.
Definition:
NavStars.hpp:57
StelTextureSP
QSharedPointer< StelTexture > StelTextureSP
NavStars::getNavStarsMarks
bool getNavStarsMarks(void) const
Get flag of displaying markers of the navigational stars.
StelModule
StelPluginInfo
Generated on Sun Mar 20 2016 15:06:43 for Stellarium by
1.8.8