• 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
  • skycomponents
deepstarcomponent.h
Go to the documentation of this file.
1 /***************************************************************************
2  deepstarcomponent.h - K Desktop Planetarium
3  -------------------
4  begin : Fri 1st Aug 2008
5  copyright : (C) 2008 Akarsh Simha, Thomas Kabelmann
6  email : akarshsimha@gmail.com, thomas.kabelmann@gmx.de
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 DEEPSTARCOMPONENT_H
19 #define DEEPSTARCOMPONENT_H
20 
30 #include "listcomponent.h"
31 #include "kstarsdatetime.h"
32 #include "ksnumbers.h"
33 #include "starblock.h"
34 #include "typedef.h"
35 #include "highpmstarlist.h"
36 #include "skyobjects/starobject.h"
37 #include "binfilehelper.h"
38 #include "starblockfactory.h"
39 #include "skyobjects/deepstardata.h"
40 #include "starblocklist.h"
41 
42 class SkyMesh;
43 class StarObject;
44 class SkyLabeler;
45 class BinFileHelper;
46 class StarBlockFactory;
47 class StarBlockList;
48 
49 class DeepStarComponent: public ListComponent
50 {
51 public:
52 
53  DeepStarComponent( SkyComposite *parent, QString fileName, float trigMag, bool staticstars=false );
54 
55  virtual ~DeepStarComponent();
56 
57  //This function is empty; we need that so that the JiT update
58  //is the only one beiong used.
59  void update( KSNumbers *num );
60 
61  bool selected();
62 
63  void draw( SkyPainter *skyp );
64 
65  bool loadStaticStars();
66 
67  bool openDataFile();
68 
72  inline bool hasStaticStars() { return staticStars; }
73 
77  float faintMagnitude() const { return m_FaintMagnitude; }
78 
83  SkyObject* findByHDIndex( int HDnum );
84 
88  SkyObject* objectNearest(SkyPoint *p, double &maxrad );
89 
90  inline bool fileOpen() { return fileOpened; }
91 
92  inline BinFileHelper *getStarReader() { return &starReader; }
93 
94  bool verifySBLIntegrity();
95 
111  bool starsInAperture( QList<StarObject*> &list, const SkyPoint &center, float radius, float maglim=-29 );
112 
113 
114  // TODO: Find the right place for this method
115  static void byteSwap( deepStarData *stardata );
116  static void byteSwap( starData *stardata );
117 
118  static StarBlockFactory m_StarBlockFactory;
119 
120 private:
121  SkyMesh* m_skyMesh;
122  KSNumbers m_reindexNum;
123  int meshLevel;
124 
125  float m_zoomMagLimit;
126  float triggerMag; // Magnitude at which this catalog triggers
127 
128  float m_FaintMagnitude; // Limiting magnitude of the catalog currently loaded
129  bool fileOpened; // Indicates whether the file is opened or not
130  float magLim; // Current limiting magnitude for visible stars
131  unsigned long visibleStarCount;
132  quint16 MSpT; // Maximum number of stars in any given trixel
133 
134  // Time keeping variables
135  long unsigned t_dynamicLoad;
136  long unsigned t_drawUnnamed;
137  long unsigned t_updateCache;
138 
139  QVector< StarBlockList *> m_starBlockList;
140  QHash<int, StarObject *> m_CatalogNumber;
141 
142  bool staticStars;
143 
144  // Stuff required for reading data
145  deepStarData deepstardata;
146  starData stardata;
147  BinFileHelper starReader;
148  QString dataFileName;
149 
150 };
151 
152 #endif
deepStarData
Structure that holds star data for really faint stars.
Definition: deepstardata.h:28
DeepStarComponent::findByHDIndex
SkyObject * findByHDIndex(int HDnum)
Definition: deepstarcomponent.cpp:358
DeepStarComponent::draw
void draw(SkyPainter *skyp)
Draw the object on the SkyMap skyp a pointer to the SkyPainter to use.
Definition: deepstarcomponent.cpp:174
starData
Structure that holds star data.
Definition: stardata.h:28
SkyComponent::parent
SkyComposite * parent()
Definition: skycomponent.h:82
DeepStarComponent
Stores and manages unnamed stars, most of which are dynamically loaded into memory.
Definition: deepstarcomponent.h:49
highpmstarlist.h
DeepStarComponent::starsInAperture
bool starsInAperture(QList< StarObject * > &list, const SkyPoint &center, float radius, float maglim=-29)
Add to the given list, the stars from this component, that lie within the specified circular aperture...
Definition: deepstarcomponent.cpp:410
DeepStarComponent::DeepStarComponent
DeepStarComponent(SkyComposite *parent, QString fileName, float trigMag, bool staticstars=false)
Definition: deepstarcomponent.cpp:44
typedef.h
deepstardata.h
DeepStarComponent::openDataFile
bool openDataFile()
Definition: deepstarcomponent.cpp:308
ListComponent
An abstract parent class, to be inherited by SkyComponents that store a QList of SkyObjects.
Definition: listcomponent.h:36
starblock.h
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
BinFileHelper
This class provides utility functions to handle binary data files in the format prescribed by KStars...
Definition: binfilehelper.h:52
StarBlockFactory
A factory that creates StarBlocks and recycles them in an LRU Cache.
Definition: starblockfactory.h:32
listcomponent.h
DeepStarComponent::update
void update(KSNumbers *num)
Update the sky positions of this component.
Definition: deepstarcomponent.cpp:170
DeepStarComponent::verifySBLIntegrity
bool verifySBLIntegrity()
Definition: deepstarcomponent.cpp:473
starblockfactory.h
ksnumbers.h
DeepStarComponent::fileOpen
bool fileOpen()
Definition: deepstarcomponent.h:90
DeepStarComponent::~DeepStarComponent
virtual ~DeepStarComponent()
Definition: deepstarcomponent.cpp:149
SkyComposite
SkyComposite is a kind of container class for SkyComponent objects.
Definition: skycomposite.h:43
DeepStarComponent::m_StarBlockFactory
static StarBlockFactory m_StarBlockFactory
Definition: deepstarcomponent.h:118
binfilehelper.h
KSNumbers
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
SkyMesh
Definition: skymesh.h:93
starobject.h
DeepStarComponent::faintMagnitude
float faintMagnitude() const
Definition: deepstarcomponent.h:77
DeepStarComponent::loadStaticStars
bool loadStaticStars()
Definition: deepstarcomponent.cpp:59
StarBlockList
Maintains a list of StarBlocks that contain the stars lying in a single trixel.
Definition: starblocklist.h:36
DeepStarComponent::hasStaticStars
bool hasStaticStars()
Definition: deepstarcomponent.h:72
DeepStarComponent::objectNearest
SkyObject * objectNearest(SkyPoint *p, double &maxrad)
Definition: deepstarcomponent.cpp:370
kstarsdatetime.h
starblocklist.h
SkyLabeler
The purpose of this class is to prevent labels from overlapping.
Definition: skylabeler.h:112
DeepStarComponent::selected
bool selected()
Definition: deepstarcomponent.cpp:155
StarObject
This is a subclass of SkyObject.
Definition: starobject.h:41
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
SkyPainter
Draws things on the sky, without regard to backend.
Definition: skypainter.h:47
DeepStarComponent::byteSwap
static void byteSwap(deepStarData *stardata)
Definition: deepstarcomponent.cpp:453
QList
DeepStarComponent::getStarReader
BinFileHelper * getStarReader()
Definition: deepstarcomponent.h:92
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