kstars
planetcatalog.h
Go to the documentation of this file.00001 /*************************************************************************** 00002 planetcatalog.h - description 00003 ------------------- 00004 begin : Mon Feb 18 2002 00005 copyright : (C) 2002 by Mark Hollomon 00006 email : mhh@mindspring.com 00007 ***************************************************************************/ 00008 00009 /*************************************************************************** 00010 * * 00011 * This program is free software; you can redistribute it and/or modify * 00012 * it under the terms of the GNU General Public License as published by * 00013 * the Free Software Foundation; either version 2 of the License, or * 00014 * (at your option) any later version. * 00015 * * 00016 ***************************************************************************/ 00017 00018 #ifndef PLANETCATALOG_H 00019 #define PLANETCATALOG_H 00020 00034 #include <qglobal.h> 00035 #include <qobject.h> 00036 #include <qptrlist.h> 00037 00038 class QString; 00039 class KStarsData; 00040 class KSNumbers; 00041 class KSPlanetBase; 00042 class KSPlanet; 00043 class KSSun; 00044 class SkyPoint; 00045 class SkyObject; 00046 class ObjectNameList; 00047 class dms; 00048 00049 class PlanetCatalog : public QObject { 00050 Q_OBJECT 00051 00052 public: 00054 PlanetCatalog(KStarsData *dat); 00055 00057 ~PlanetCatalog(); 00058 00060 bool initialize(); 00061 00065 void addObject( ObjectNameList &ObjNames ) const; 00066 00072 void findPosition( const KSNumbers *num, const dms *lat, const dms *LST ); 00073 00075 const KSSun *planetSun() const { return Sun; } 00076 00078 KSPlanet *earth() { return Earth; } 00079 00084 void EquatorialToHorizontal( dms *LST, const dms *lat ); 00085 00089 bool isPlanet(SkyObject *so) const; 00090 00095 KSPlanetBase *findByName( const QString n) const; 00096 00102 SkyObject *findClosest(const SkyPoint *p, double &r) const; 00103 00104 private: 00105 QPtrList<KSPlanetBase> planets; 00106 KSPlanet *Earth; 00107 KSSun *Sun; 00108 KStarsData *kd; 00109 }; 00110 00111 #endif