• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

kstars

  • sources
  • kde-4.12
  • kdeedu
  • kstars
  • kstars
  • skyobjects
deepskyobject.h
Go to the documentation of this file.
1 /***************************************************************************
2  deepskyobject.h - K Desktop Planetarium
3  -------------------
4  begin : Sun Feb 11 2001
5  copyright : (C) 2001 by Jason Harris
6  email : jharris@30doradus.org
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef DEEPSKYOBJECT_H_
19 #define DEEPSKYOBJECT_H_
20 
21 #include <qimage.h>
22 #include <qpoint.h>
23 
24 #include "kstars/skyobjects/skyobject.h"
25 #include "kstars/dms.h"
26 
27 class QImage;
28 class QString;
29 class KSPopupMenu;
30 class CatalogComponent;
31 
43 class DeepSkyObject : public SkyObject {
44 public:
61  explicit DeepSkyObject( int t=SkyObject::STAR,
62  dms r=dms(0.0), dms d=dms(0.0), float m=0.0,
63  const QString &n="unnamed", const QString &n2=QString(),
64  const QString &lname=QString(), const QString &cat=QString(),
65  float a=0.0, float b=0.0, double pa=0.0,
66  int pgc=0, int ugc=0 );
67 
71  DeepSkyObject(const DeepSkyObject &o );
72 
73  QString labelString() const;
74 
75  virtual DeepSkyObject* clone() const;
76  virtual SkyObject::UID getUID() const;
77 
79  virtual ~DeepSkyObject() { }
80 
85  enum CATALOG { CAT_MESSIER=0, CAT_NGC=1, CAT_IC=2, CAT_UNKNOWN };
86 
96  QString catalog( void ) const;
97 
106  void setCatalog( const QString &s );
107 
112  inline void setCustomCatalog(CatalogComponent *s) { customCat = s; }
113 
117  inline CatalogComponent * customCatalog() { return customCat; }
118 
122  inline void setFlux(const float &f) { Flux = f; }
123 
127  inline float flux() const { return Flux; }
128 
132  inline float a() const { return MajorAxis; }
133 
137  inline float b() const { return MinorAxis; }
138 
143  float e() const;
144 
148  inline virtual double pa() const { return PositionAngle; }
149 
153  inline int ugc() const { return UGC; }
154 
158  inline int pgc() const { return PGC; }
159 
161  const QImage& image() const { return m_image; }
162 
164  void loadImage();
165 
169  inline bool isCatalogM() const { return (Catalog == CAT_MESSIER); }
170 
174  inline bool isCatalogNGC() const { return (Catalog == CAT_NGC); }
175 
179  inline bool isCatalogIC() const { return (Catalog == CAT_IC); }
180 
184  inline bool isCatalogNone() const { return (Catalog == CAT_UNKNOWN); }
185 
189  virtual double labelOffset() const;
190 
191  quint64 updateID;
192  quint64 updateNumID;
193 
194 private:
195  virtual void initPopupMenu( KSPopupMenu *pmenu );
196 
197  unsigned char Catalog;
198  double PositionAngle;
199  int UGC, PGC;
200  float MajorAxis, MinorAxis, Flux;
201  QImage m_image;
202  QList<const SkyObject *> m_Parents; // Q: Should we use KStars UUIDs, DB UUIDs, or SkyObject * pointers? Q: Should we extend this to stars? -- asimha
203  QList<const SkyObject *> m_Children; // Q: Should we use KStars UUIDs, DB UUIDs, or SkyObject * pointers? Q: Should we extend this to stars? -- asimha
204  QStringList m_AlternateDesignations; // Alternate names. FIXME: These should be superseded by designation UIDs in the database
205  double RedshiftZ; // Redsfhit 'z' value
206  QString Description; // Dreyer or other description
207  QString Classification; // Object class. eg: SBb for galaxies
208  double pmRA, pmDec; // Proper motions in mas/yr
209 
210  CatalogComponent *customCat;
211 };
212 
213 #endif
DeepSkyObject::b
float b() const
Definition: deepskyobject.h:137
DeepSkyObject::CAT_MESSIER
Definition: deepskyobject.h:85
DeepSkyObject::isCatalogIC
bool isCatalogIC() const
Definition: deepskyobject.h:179
DeepSkyObject::catalog
QString catalog(void) const
Definition: deepskyobject.cpp:87
KSPopupMenu
The KStars Popup Menu.
Definition: kspopupmenu.h:43
DeepSkyObject::customCatalog
CatalogComponent * customCatalog()
Definition: deepskyobject.h:117
skyobject.h
DeepSkyObject::flux
float flux() const
Definition: deepskyobject.h:127
DeepSkyObject::getUID
virtual SkyObject::UID getUID() const
Return UID for object.
Definition: deepskyobject.cpp:138
DeepSkyObject::CAT_UNKNOWN
Definition: deepskyobject.h:85
DeepSkyObject::setCustomCatalog
void setCustomCatalog(CatalogComponent *s)
Set the reference to the custom catalog component, if any.
Definition: deepskyobject.h:112
DeepSkyObject::CAT_NGC
Definition: deepskyobject.h:85
DeepSkyObject::pgc
int pgc() const
Definition: deepskyobject.h:158
DeepSkyObject::loadImage
void loadImage()
Try to load the object's image.
Definition: deepskyobject.cpp:101
dms.h
NaN::f
const float f
Definition: nan.h:36
DeepSkyObject::isCatalogNGC
bool isCatalogNGC() const
Definition: deepskyobject.h:174
DeepSkyObject::a
float a() const
Definition: deepskyobject.h:132
CatalogComponent
Represents a custom user-defined catalog.
Definition: catalogcomponent.h:39
DeepSkyObject::clone
virtual DeepSkyObject * clone() const
Create copy of object.
Definition: deepskyobject.cpp:72
SkyObject::UID
qint64 UID
Type for Unique object IDenticator.
Definition: skyobject.h:53
DeepSkyObject::pa
virtual double pa() const
Definition: deepskyobject.h:148
dms
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:42
DeepSkyObject::DeepSkyObject
DeepSkyObject(int t=SkyObject::STAR, dms r=dms(0.0), dms d=dms(0.0), float m=0.0, const QString &n="unnamed", const QString &n2=QString(), const QString &lname=QString(), const QString &cat=QString(), float a=0.0, float b=0.0, double pa=0.0, int pgc=0, int ugc=0)
Constructor.
Definition: deepskyobject.cpp:54
DeepSkyObject::updateNumID
quint64 updateNumID
Definition: deepskyobject.h:192
DeepSkyObject::image
const QImage & image() const
Definition: deepskyobject.h:161
DeepSkyObject
Provides all necessary information about a deep-sky object: data inherited from SkyObject (coordinate...
Definition: deepskyobject.h:43
DeepSkyObject::isCatalogM
bool isCatalogM() const
Definition: deepskyobject.h:169
DeepSkyObject::labelString
QString labelString() const
Definition: deepskyobject.cpp:119
DeepSkyObject::~DeepSkyObject
virtual ~DeepSkyObject()
*Destructor
Definition: deepskyobject.h:79
DeepSkyObject::isCatalogNone
bool isCatalogNone() const
Definition: deepskyobject.h:184
NaN::d
const double d
Definition: nan.h:35
DeepSkyObject::setCatalog
void setCatalog(const QString &s)
Set the internal Catalog value according to the QString argument: "M" : CAT_MESSIER "NGC" : CAT_NGC "...
Definition: deepskyobject.cpp:94
DeepSkyObject::setFlux
void setFlux(const float &f)
Set the integrated flux value of the object.
Definition: deepskyobject.h:122
DeepSkyObject::updateID
quint64 updateID
Definition: deepskyobject.h:191
DeepSkyObject::e
float e() const
Definition: deepskyobject.cpp:81
DeepSkyObject::ugc
int ugc() const
Definition: deepskyobject.h:153
SkyObject::STAR
Definition: skyobject.h:108
SkyObject
Provides all necessary information about an object in the sky: its coordinates, name(s), type, magnitude, and QStringLists of URLs for images and webpages regarding the object.
Definition: skyobject.h:46
DeepSkyObject::CAT_IC
Definition: deepskyobject.h:85
DeepSkyObject::labelOffset
virtual double labelOffset() const
Definition: deepskyobject.cpp:107
QList
DeepSkyObject::CATALOG
CATALOG
The catalog ID of the DeepSkyObject.
Definition: deepskyobject.h:85
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:19 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

kstars

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

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal