• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

deepskyobject.h

Go to the documentation of this file.
00001 /***************************************************************************
00002                           deepskyobject.h  -  K Desktop Planetarium
00003                              -------------------
00004     begin                : Sun Feb 11 2001
00005     copyright            : (C) 2001 by Jason Harris
00006     email                : jharris@30doradus.org
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 DEEPSKYOBJECT_H
00019 #define DEEPSKYOBJECT_H
00020 
00021 #include <qpoint.h>
00022 
00023 #include "skyobject.h"
00024 #include "dms.h"
00025 
00037 class QPainter;
00038 class QImage;
00039 class QString;
00040 class KSPopupMenu;
00041 
00042 class DeepSkyObject : public SkyObject {
00043 public:
00059     DeepSkyObject( int t=SkyObject::STAR, dms r=dms(0.0), dms d=dms(0.0), 
00060             float m=0.0, QString n="unnamed", QString n2="", 
00061             QString lname="", QString cat="", 
00062             float a=0.0, float b=0.0, double pa=0.0, 
00063             int pgc=0, int ugc=0 );
00064 
00081     DeepSkyObject( int t, double r, double d, float m=0.0,
00082             QString n="unnamed", QString n2="", QString lname="", 
00083             QString cat="", float a=0.0, float b=0.0,
00084             double pa=0.0, int pgc=0, int ugc=0 );
00085 
00089     DeepSkyObject( DeepSkyObject &o );
00090 
00094     ~DeepSkyObject() { if ( Image ) { deleteImage(); } }
00095 
00099     enum CATALOG { CAT_MESSIER=0, CAT_NGC=1, CAT_IC=2, CAT_UNKNOWN };
00100 
00108     QString catalog( void ) const;
00109 
00116     void setCatalog( const QString &s );
00117 
00120     float a( void ) const { return MajorAxis; }
00121 
00124     float b( void ) const { return MinorAxis; }
00125 
00129     float e( void ) const;
00130 
00133     virtual double pa() const { return PositionAngle; }
00134 
00137     int ugc( void ) const { return UGC; }
00138 
00141     int pgc( void ) const { return PGC; }
00142 
00146     QImage *readImage();
00147 
00151     QImage *image() const { return Image; }
00152 
00155     void deleteImage();
00156 
00159     bool isCatalogM() const { return (Catalog == CAT_MESSIER); }
00160 
00163     bool isCatalogNGC() const { return (Catalog == CAT_NGC); }
00164 
00167     bool isCatalogIC() const { return (Catalog == CAT_IC); }
00168 
00171     bool isCatalogNone() const { return (Catalog == CAT_UNKNOWN); }
00172 
00175     void drawSymbol( QPainter &psky, int x, int y, double PositionAngle, double zoom, double scale=1.0 );
00176 
00179     void drawImage( QPainter &psky, int x, int y, double PositionAngle, double zoom, double scale=1.0 );
00180 
00186     virtual void showPopupMenu( KSPopupMenu *pmenu, QPoint pos ) { pmenu->createDeepSkyObjectMenu( this ); pmenu->popup( pos ); }
00187 
00188 private:
00189     unsigned char Catalog; 
00190         double PositionAngle;
00191     int UGC, PGC;
00192     float MajorAxis, MinorAxis;
00193     QImage *Image;
00194 };
00195 
00196 #endif

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal