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

Поисковые слова: m 43
Stellarium: core/modules/StarMgr.hpp Source File
Stellarium 0.12.3
StarMgr.hpp
1 /*
2  * Stellarium
3  * Copyright (C) 2002 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 _STARMGR_HPP_
21 #define _STARMGR_HPP_
22 
23 #include <QFont>
24 #include <QVariantMap>
25 #include "StelFader.hpp"
26 #include "StelObjectModule.hpp"
27 #include "StelProjectorType.hpp"
28 
29 class StelObject;
30 class StelToneReproducer;
31 class StelProjector;
32 class QSettings;
33 
34 namespace BigStarCatalogExtension {
35  class ZoneArray;
36  struct HipIndexStruct;
37 }
38 
39 static const int RCMAG_TABLE_SIZE = 4096;
40 
41 typedef struct
42 {
43  QString designation;
44  QString vtype;
45  float maxmag;
46  int mflag;
47  float min1mag;
48  float min2mag;
49  QString photosys;
50  double epoch;
51  double period;
52  int Mm;
53  QString stype;
54 } varstar;
55 
79 class StarMgr : public StelObjectModule
80 {
81  Q_OBJECT
82 
83 public:
84  StarMgr(void);
85  ~StarMgr(void);
86 
88  // Methods defined in the StelModule class
96  virtual void init();
97 
99  virtual void draw(StelCore* core, class StelRenderer* renderer);
100 
103  virtual void update(double deltaTime) {labelsFader.update((int)(deltaTime*1000)); starsFader.update((int)(deltaTime*1000));}
104 
106  virtual double getCallOrder(StelModuleActionName actionName) const;
107 
109  // Methods defined in StelObjectManager class
111  virtual QList<StelObjectP > searchAround(const Vec3d& v, double limitFov, const StelCore* core) const;
112 
116  virtual StelObjectP searchByNameI18n(const QString& nameI18n) const;
117 
120  virtual StelObjectP searchByName(const QString& name) const;
121 
126  virtual QStringList listMatchingObjectsI18n(const QString& objPrefix, int maxNbItem=5) const;
131  virtual QStringList listMatchingObjects(const QString& objPrefix, int maxNbItem=5) const;
132  // empty, as there's too much stars for displaying at once
133  virtual QStringList listAllObjects(bool inEnglish) const { Q_UNUSED(inEnglish) return QStringList(); }
134  virtual QString getName() const { return "Stars"; }
135 
136 public slots:
138  // Methods callable from script and GUI
140  void setLabelColor(const Vec3f& c) {labelColor = c;}
142  Vec3f getLabelColor(void) const {return labelColor;}
143 
145  void setFlagStars(bool b) {starsFader=b;}
147  bool getFlagStars(void) const {return starsFader==true;}
148 
150  void setFlagLabels(bool b) {labelsFader=b;}
152  bool getFlagLabels(void) const {return labelsFader==true;}
153 
157  void setLabelsAmount(float a) {labelsAmount=a;}
160  float getLabelsAmount(void) const {return labelsAmount;}
161 
163  void setFontSize(double newFontSize);
164 
166  static void setFlagSciNames(bool f) {flagSciNames = f;}
167  static bool getFlagSciNames(void) {return flagSciNames;}
168 
169 public:
171  // Other methods
176  StelObjectP searchHP(int hip) const;
177 
180  static QString getCommonName(int hip);
181 
184  static QString getSciName(int hip);
185 
188  static QString getSciAdditionalName(int hip);
189 
192  static QString getGcvsName(int hip);
193 
196  static QString getGcvsVariabilityType(int hip);
197 
200  static float getGcvsMaxMagnitude(int hip);
201 
204  static int getGcvsMagnitudeFlag(int hip);
205 
208  static float getGcvsMinMagnitude(int hip, bool firstMinimumFlag=true);
209 
212  static QString getGcvsPhotometricSystem(int hip);
213 
216  static double getGcvsEpoch(int hip);
217 
220  static double getGcvsPeriod(int hip);
221 
224  static int getGcvsMM(int hip);