Stellarium 0.11.4 | |||
Home · All Namespaces · All Classes · Functions · Coding Style · Scripting · Plugins · File Structure |
00001 /* 00002 * Stellarium 00003 * Copyright (C) 2007 Fabien Chereau 00004 * 00005 * This program is free software; you can redistribute it and/or 00006 * modify it under the terms of the GNU General Public License 00007 * as published by the Free Software Foundation; either version 2 00008 * of the License, or (at your option) any later version. 00009 * 00010 * This program is distributed in the hope that it will be useful, 00011 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00012 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00013 * GNU General Public License for more details. 00014 * 00015 * You should have received a copy of the GNU General Public License 00016 * along with this program; if not, write to the Free Software 00017 * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. 00018 */ 00019 00020 #ifndef _GRIDLINESMGR_HPP_ 00021 #define _GRIDLINESMGR_HPP_ 00022 00023 #include "VecMath.hpp" 00024 #include "StelModule.hpp" 00025 00026 class SkyGrid; 00027 class SkyLine; 00028 00032 class GridLinesMgr : public StelModule 00033 { 00034 Q_OBJECT 00035 Q_PROPERTY(bool azimuthalGridDisplayed 00036 READ getFlagAzimuthalGrid 00037 WRITE setFlagAzimuthalGrid 00038 NOTIFY azimuthalGridDisplayedChanged) 00039 Q_PROPERTY(Vec3f azimuthalGridColor 00040 READ getColorAzimuthalGrid 00041 WRITE setColorAzimuthalGrid 00042 NOTIFY azimuthalGridColorChanged) 00043 Q_PROPERTY(bool equatorGridDisplayed 00044 READ getFlagEquatorGrid 00045 WRITE setFlagEquatorGrid 00046 NOTIFY equatorGridDisplayedChanged) 00047 Q_PROPERTY(Vec3f equatorGridColor 00048 READ getColorEquatorGrid 00049 WRITE setColorEquatorGrid 00050 NOTIFY equatorGridColorChanged) 00051 Q_PROPERTY(bool equatorJ2000GridDisplayed 00052 READ getFlagEquatorJ2000Grid 00053 WRITE setFlagEquatorJ2000Grid 00054 NOTIFY equatorJ2000GridDisplayedChanged) 00055 Q_PROPERTY(bool eclipticJ2000GridDisplayed 00056 READ getFlagEclipticJ2000Grid 00057 WRITE setFlagEclipticJ2000Grid 00058 NOTIFY eclipticJ2000GridDisplayedChanged) 00059 Q_PROPERTY(Vec3f equatorJ2000GridColor 00060 READ getColorEquatorJ2000Grid 00061 WRITE setColorEquatorJ2000Grid 00062 NOTIFY equatorJ2000GridColorChanged) 00063 Q_PROPERTY(bool galacticGridDisplayed 00064 READ getFlagGalacticGrid 00065 WRITE setFlagGalacticGrid 00066 NOTIFY galacticGridDisplayedChanged) 00067 Q_PROPERTY(Vec3f galacticGridColor 00068 READ getColorGalacticGrid 00069 WRITE setColorGalacticGrid 00070 NOTIFY galacticGridColorChanged) 00071 Q_PROPERTY(bool equatorLineDisplayed 00072 READ getFlagEquatorLine 00073 WRITE setFlagEquatorLine 00074 NOTIFY equatorLineDisplayedChanged) 00075 Q_PROPERTY(Vec3f equatorLineColor 00076 READ getColorEquatorLine 00077 WRITE setColorEquatorLine 00078 NOTIFY equatorLineColorChanged) 00079 Q_PROPERTY(bool eclipticLineDisplayed 00080 READ getFlagEclipticLine 00081 WRITE setFlagEclipticLine 00082 NOTIFY eclipticLineDisplayedChanged) 00083 Q_PROPERTY(Vec3f eclipticLineColor 00084 READ getColorEclipticLine 00085 WRITE setColorEclipticLine 00086 NOTIFY eclipticLineColorChanged) 00087 Q_PROPERTY(bool meridianLineDisplayed 00088 READ getFlagMeridianLine 00089 WRITE setFlagMeridianLine 00090 NOTIFY meridianLineDisplayedChanged) 00091 Q_PROPERTY(Vec3f meridianLineColor 00092 READ getColorMeridianLine 00093 WRITE setColorMeridianLine 00094 NOTIFY meridianLineColorChanged) 00095 Q_PROPERTY(bool horizonLineDisplayed 00096 READ getFlagHorizonLine 00097 WRITE setFlagHorizonLine 00098 NOTIFY horizonLineDisplayedChanged) 00099 Q_PROPERTY(Vec3f horizonLineColor 00100 READ getColorHorizonLine 00101 WRITE setColorHorizonLine 00102 NOTIFY horizonLineColorChanged) 00103 Q_PROPERTY(bool galacticPlaneLineDisplayed 00104 READ getFlagGalacticPlaneLine 00105 WRITE setFlagGalacticPlaneLine 00106 NOTIFY galacticPlaneLineDisplayedChanged) 00107 Q_PROPERTY(Vec3f galacticPlaneLineColor 00108 READ getColorGalacticPlaneLine 00109 WRITE setColorGalacticPlaneLine 00110 NOTIFY galacticPlaneLineColorChanged) 00111 00112 public: 00113 GridLinesMgr(); 00114 virtual ~GridLinesMgr(); 00115 00117 // Methods defined in the StelModule class 00122 virtual void init(); 00123 00125 virtual QString getModuleID() const {return "GridLinesMgr";} 00126 00131 virtual void draw(StelCore* core); 00132 00135 virtual void update(double deltaTime); 00136 00138 virtual double getCallOrder(StelModuleActionName actionName) const; 00139 00141 // Setter and getters 00142 public slots: 00144 void setFlagAzimuthalGrid(const bool displayed); 00146 bool getFlagAzimuthalGrid(void) const; 00148 Vec3f getColorAzimuthalGrid(void) const; 00150 void setColorAzimuthalGrid(const Vec3f& newColor); 00151 00153 void setFlagEquatorGrid(const bool displayed); 00155 bool getFlagEquatorGrid(void) const; 00157 Vec3f getColorEquatorGrid(void) const; 00159 void setColorEquatorGrid(const Vec3f& newColor); 00160 00162 void setFlagEquatorJ2000Grid(const bool displayed); 00164 bool getFlagEquatorJ2000Grid(void) const; 00166 Vec3f getColorEquatorJ2000Grid(void) const; 00168 void setColorEquatorJ2000Grid(const Vec3f& newColor); 00169 00171 void setFlagEclipticJ2000Grid(const bool displayed); 00173 bool getFlagEclipticJ2000Grid(void) const; 00175 Vec3f getColorEclipticJ2000Grid(void) const; 00177 void setColorEclipticJ2000Grid(const Vec3f& newColor); 00178 00180 void setFlagGalacticGrid(const bool displayed); 00182 bool getFlagGalacticGrid(void) const; 00184 Vec3f getColorGalacticGrid(void) const; 00186 void setColorGalacticGrid(const Vec3f& newColor); 00187 00189 void setFlagEquatorLine(const bool displayed); 00191 bool getFlagEquatorLine(void) const; 00193 Vec3f getColorEquatorLine(void) const; 00195 void setColorEquatorLine(const Vec3f& newColor); 00196 00198 void setFlagEclipticLine(const bool displayed); 00200 bool getFlagEclipticLine(void) const; 00202 Vec3f getColorEclipticLine(void) const; 00204 void setColorEclipticLine(const Vec3f& newColor); 00205 00207 void setFlagMeridianLine(const bool displayed); 00209 bool getFlagMeridianLine(void) const; 00211 Vec3f getColorMeridianLine(void) const; 00213 void setColorMeridianLine(const Vec3f& newColor); 00214 00216 void setFlagHorizonLine(const bool displayed); 00218 bool getFlagHorizonLine(void) const; 00220 Vec3f getColorHorizonLine(void) const; 00222 void setColorHorizonLine(const Vec3f& newColor); 00223 00225 void setFlagGalacticPlaneLine(const bool displayed); 00227 bool getFlagGalacticPlaneLine(void) const; 00229 Vec3f getColorGalacticPlaneLine(void) const; 00231 void setColorGalacticPlaneLine(const Vec3f& newColor); 00232 signals: 00233 void azimuthalGridDisplayedChanged(const bool) const; 00234 void azimuthalGridColorChanged(const Vec3f & newColor) const; 00235 void equatorGridDisplayedChanged(const bool displayed) const; 00236 void equatorGridColorChanged(const Vec3f & newColor) const; 00237 void equatorJ2000GridDisplayedChanged(const bool displayed) const; 00238 void equatorJ2000GridColorChanged(const Vec3f & newColor) const; 00239 void eclipticJ2000GridDisplayedChanged(const bool displayed) const; 00240 void eclipticJ2000GridColorChanged(const Vec3f & newColor) const; 00241 void galacticGridDisplayedChanged(const bool displayed) const; 00242 void galacticGridColorChanged(const Vec3f & newColor) const; 00243 void equatorLineDisplayedChanged(const bool displayed) const; 00244 void equatorLineColorChanged(const Vec3f & newColor) const; 00245 void eclipticLineDisplayedChanged(const bool displayed) const; 00246 void eclipticLineColorChanged(const Vec3f & newColor) const; 00247 void meridianLineDisplayedChanged(const bool displayed) const; 00248 void meridianLineColorChanged(const Vec3f & newColor) const; 00249 void horizonLineDisplayedChanged(const bool displayed) const; 00250 void horizonLineColorChanged(const Vec3f & newColor) const; 00251 void galacticPlaneLineDisplayedChanged(const bool displayed) const; 00252 void galacticPlaneLineColorChanged(const Vec3f & newColor) const; 00253 00254 00255 private slots: 00258 void setStelStyle(const QString& section); 00261 void updateLineLabels(); 00262 00263 private: 00264 SkyGrid * equGrid; // Equatorial grid 00265 SkyGrid * equJ2000Grid; // Equatorial J2000 grid 00266 SkyGrid * galacticGrid; // Galactic grid 00267 SkyGrid * eclJ2000Grid; // Ecliptic J2000 grid 00268 SkyGrid * aziGrid; // Azimuthal grid 00269 SkyLine * equatorLine; // Celestial Equator line 00270 SkyLine * eclipticLine; // Ecliptic line 00271 SkyLine * meridianLine; // Meridian line 00272 SkyLine * horizonLine; // Horizon line 00273 SkyLine * galacticPlaneLine; // line depciting the Galacitc plane as defined by the IAU definition of Galactic coordinates 00274 }; 00275 00276 #endif // _GRIDLINESMGR_HPP_