Документ взят из кэша поисковой машины. Адрес оригинального документа : http://astro.uni-altai.ru/~aw/stellarium/api/GridLinesMgr_8hpp_source.html
Дата изменения: Unknown
Дата индексирования: Fri Feb 28 07:43:29 2014
Кодировка:

Поисковые слова: п п п п п п п п п п п п п п п п п п п п п п п п п п
Stellarium: core/modules/GridLinesMgr.hpp Source File
Stellarium 0.12.3
GridLinesMgr.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2007 Fabien Chereau
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 _GRIDLINESMGR_HPP_
21 #define _GRIDLINESMGR_HPP_
22 
23 #include "VecMath.hpp"
24 #include "StelModule.hpp"
25 
26 class SkyGrid;
27 class SkyLine;
28 
32 class GridLinesMgr : public StelModule
33 {
34  Q_OBJECT
35  Q_PROPERTY(bool azimuthalGridDisplayed
38  NOTIFY azimuthalGridDisplayedChanged)
39  Q_PROPERTY(Vec3f azimuthalGridColor
42  NOTIFY azimuthalGridColorChanged)
43  Q_PROPERTY(bool equatorGridDisplayed
45  WRITE setFlagEquatorGrid
46  NOTIFY equatorGridDisplayedChanged)
47  Q_PROPERTY(Vec3f equatorGridColor
50  NOTIFY equatorGridColorChanged)
51  Q_PROPERTY(bool equatorJ2000GridDisplayed
54  NOTIFY equatorJ2000GridDisplayedChanged)
55  Q_PROPERTY(bool eclipticJ2000GridDisplayed
58  NOTIFY eclipticJ2000GridDisplayedChanged)
59  Q_PROPERTY(Vec3f equatorJ2000GridColor
62  NOTIFY equatorJ2000GridColorChanged)
63  Q_PROPERTY(bool galacticGridDisplayed
66  NOTIFY galacticGridDisplayedChanged)
67  Q_PROPERTY(Vec3f galacticGridColor
70  NOTIFY galacticGridColorChanged)
71  Q_PROPERTY(bool equatorLineDisplayed
73  WRITE setFlagEquatorLine
74  NOTIFY equatorLineDisplayedChanged)
75  Q_PROPERTY(Vec3f equatorLineColor
78  NOTIFY equatorLineColorChanged)
79  Q_PROPERTY(bool eclipticLineDisplayed
82  NOTIFY eclipticLineDisplayedChanged)
83  Q_PROPERTY(Vec3f eclipticLineColor
86  NOTIFY eclipticLineColorChanged)
87  Q_PROPERTY(bool meridianLineDisplayed
90  NOTIFY meridianLineDisplayedChanged)
91  Q_PROPERTY(Vec3f meridianLineColor
94  NOTIFY meridianLineColorChanged)
95  Q_PROPERTY(bool horizonLineDisplayed
97  WRITE setFlagHorizonLine
98  NOTIFY horizonLineDisplayedChanged)
99  Q_PROPERTY(Vec3f horizonLineColor
101  WRITE setColorHorizonLine
102  NOTIFY horizonLineColorChanged)
103  Q_PROPERTY(bool galacticPlaneLineDisplayed
106  NOTIFY galacticPlaneLineDisplayedChanged)
107  Q_PROPERTY(Vec3f galacticPlaneLineColor
110  NOTIFY galacticPlaneLineColorChanged)
111 
112 public:
113  GridLinesMgr();
114  virtual ~GridLinesMgr();
115 
117  // Methods defined in the StelModule class
122  virtual void init();
123 
125  virtual QString getModuleID() const {return "GridLinesMgr";}
126 
131  virtual void draw(StelCore* core, class StelRenderer* renderer);
132 
135  virtual void update(double deltaTime);
136 
138  virtual double getCallOrder(StelModuleActionName actionName) const;
139 
141  // Setter and getters
142 public slots:
144  void setFlagAzimuthalGrid(const bool displayed);
146  bool getFlagAzimuthalGrid(void) const;
148  Vec3f getColorAzimuthalGrid(void) const;
150  void setColorAzimuthalGrid(const Vec3f& newColor);
151 
153  void setFlagEquatorGrid(const bool displayed);
155  bool getFlagEquatorGrid(void) const;
157  Vec3f getColorEquatorGrid(void) const;
159  void setColorEquatorGrid(const Vec3f& newColor);
160 
162  void setFlagEquatorJ2000Grid(const bool displayed);
164  bool getFlagEquatorJ2000Grid(void) const;
166  Vec3f getColorEquatorJ2000Grid(void) const;
168  void setColorEquatorJ2000Grid(const Vec3f& newColor);
169 
171  void setFlagEclipticJ2000Grid(const bool displayed);
173  bool getFlagEclipticJ2000Grid(void) const;
175  Vec3f getColorEclipticJ2000Grid(void) const;
177  void setColorEclipticJ2000Grid(const Vec3f& newColor);
178 
180  void setFlagGalacticGrid(const bool displayed);
182  bool getFlagGalacticGrid(void) const;
184  Vec3f getColorGalacticGrid(void) const;
186  void setColorGalacticGrid(const Vec3f& newColor);
187 
189  void setFlagEquatorLine(const bool displayed);
191  bool getFlagEquatorLine(void) const;
193  Vec3f getColorEquatorLine(void) const;
195  void setColorEquatorLine(const Vec3f& newColor);
196 
198  void setFlagEclipticLine(const bool displayed);
200  bool getFlagEclipticLine(void) const;
202  Vec3f getColorEclipticLine(void) const;
204  void setColorEclipticLine(const Vec3f& newColor);
205 
207  void setFlagMeridianLine(const bool displayed);
209  bool getFlagMeridianLine(void) const;
211  Vec3f getColorMeridianLine(void) const;
213  void setColorMeridianLine(const Vec3f& newColor);
214 
216  void setFlagHorizonLine(const bool displayed);
218  bool getFlagHorizonLine(void) const;
220  Vec3f getColorHorizonLine(void) const;
222  void setColorHorizonLine(const Vec3f& newColor);
223 
225  void setFlagGalacticPlaneLine(const bool displayed);
227  bool getFlagGalacticPlaneLine(void) const;
229  Vec3f getColorGalacticPlaneLine(void) const;
231  void setColorGalacticPlaneLine(const Vec3f& newColor);
232 signals:
233  void azimuthalGridDisplayedChanged(const bool) const;
234  void azimuthalGridColorChanged(const Vec3f & newColor) const;
235  void equatorGridDisplayedChanged(const bool displayed) const;
236  void equatorGridColorChanged(const Vec3f & newColor) const;
237  void equatorJ2000GridDisplayedChanged(const bool displayed) const;
238  void equatorJ2000GridColorChanged(const Vec3f & newColor) const;
239  void eclipticJ2000GridDisplayedChanged(const bool displayed) const;
240  void eclipticJ2000GridColorChanged(const Vec3f & newColor) const;
241  void galacticGridDisplayedChanged(const bool displayed) const;
242  void galacticGridColorChanged(const Vec3f & newColor) const;
243  void equatorLineDisplayedChanged(const bool displayed) const;
244  void equatorLineColorChanged(const Vec3f & newColor) const;
245  void eclipticLineDisplayedChanged(const bool displayed) const;
246  void eclipticLineColorChanged(const Vec3f & newColor) const;
247  void meridianLineDisplayedChanged(const bool displayed) const;
248  void meridianLineColorChanged(const Vec3f & newColor) const;
249  void horizonLineDisplayedChanged(const bool displayed) const;
250  void horizonLineColorChanged(const Vec3f & newColor) const;
251  void galacticPlaneLineDisplayedChanged(const bool displayed) const;
252  void galacticPlaneLineColorChanged(const Vec3f & newColor) const;
253 
254 
255 private slots:
258  void setStelStyle(const QString& section);
261  void updateLineLabels();
262 
263 private:
264  SkyGrid * equGrid; // Equatorial grid
265  SkyGrid * equJ2000Grid; // Equatorial J2000 grid
266  SkyGrid * galacticGrid; // Galactic grid
267  SkyGrid * eclJ2000Grid; // Ecliptic J2000 grid
268  SkyGrid * aziGrid; // Azimuthal grid
269  SkyLine * equatorLine; // Celestial Equator line
270  SkyLine * eclipticLine; // Ecliptic line
271  SkyLine * meridianLine; // Meridian line
272  SkyLine * horizonLine; // Horizon line
273  SkyLine * galacticPlaneLine; // line depciting the Galacitc plane as defined by the IAU definition of Galactic coordinates
274 };
275 
276 #endif // _GRIDLINESMGR_HPP_