• 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
skymapdrawabstract.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  skymapdrawabstract.cpp - K Desktop Planetarium
3  -------------------
4  begin : Sun Mar 2 2003
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 // This file implements the class SkyMapDrawAbstract, and is almost
19 // identical to the older skymapdraw.cpp file, written by Jason
20 // Harris. Essentially, skymapdraw.cpp was renamed and modified.
21 // -- asimha (2011)
22 
23 #include <iostream>
24 
25 #include <QPainter>
26 #include <QPixmap>
27 
28 #include "skymapdrawabstract.h"
29 #include "skymap.h"
30 #include "Options.h"
31 #include "fov.h"
32 #include "kstars.h"
33 #include "kstarsdata.h"
34 #include "ksnumbers.h"
35 #include "ksutils.h"
36 #include "skyobjects/skyobject.h"
37 #include "skyobjects/deepskyobject.h"
38 #include "skyobjects/starobject.h"
39 #include "skyobjects/ksplanetbase.h"
40 #include "simclock.h"
41 #include "observinglist.h"
42 #include "skycomponents/constellationboundarylines.h"
43 #include "skycomponents/skylabeler.h"
44 #include "skycomponents/skymapcomposite.h"
45 #include "skyqpainter.h"
46 #include "projections/projector.h"
47 #include "projections/lambertprojector.h"
48 
49 #include <config-kstars.h>
50 
51 #ifdef HAVE_INDI_H
52 #include <baseclient.h>
53 #include <basedevice.h>
54 #include "indi/indilistener.h"
55 #include "indi/driverinfo.h"
56 #include "indi/indistd.h"
57 #endif
58 
59 bool SkyMapDrawAbstract::m_DrawLock = false;
60 
61 SkyMapDrawAbstract::SkyMapDrawAbstract( SkyMap *sm ) :
62  m_KStarsData( KStarsData::Instance() ), m_SkyMap( sm ) {
63  m_fpstime.start();
64  m_framecount = 0;
65 }
66 
67 void SkyMapDrawAbstract::drawOverlays( QPainter& p, bool drawFov ) {
68  if( !KStars::Instance() )
69  return;
70 
71  //draw labels
72  SkyLabeler::Instance()->draw(p);
73 
74  if( drawFov ) {
75  //draw FOV symbol
76  foreach( FOV* fov, m_KStarsData->getVisibleFOVs() ) {
77  fov->draw(p, Options::zoomFactor());
78  }
79  }
80 
81  drawTelescopeSymbols( p );
82 
83  drawZoomBox( p );
84 
85  // FIXME: Maybe we should take care of this differently. Maybe
86  // drawOverlays should remain in SkyMap, since it just calls
87  // certain drawing functions which are implemented in
88  // SkyMapDrawAbstract. Really, it doesn't draw anything on its
89  // own.
90  if ( m_SkyMap->rulerMode ) {
91  m_SkyMap->updateAngleRuler();
92  drawAngleRuler( p );
93  }
94 }
95 
96 void SkyMapDrawAbstract::drawAngleRuler( QPainter &p ) {
97  //FIXME use sky painter.
98  p.setPen( QPen( m_KStarsData->colorScheme()->colorNamed( "AngularRuler" ), 3.0, Qt::DotLine ) );
99  p.drawLine(
100  m_SkyMap->m_proj->toScreen( m_SkyMap->AngularRuler.point(0) ), // FIXME: More ugliness. m_proj should probably be a single-instance class, or we should have our own instance etc.
101  m_SkyMap->m_proj->toScreen( m_SkyMap->AngularRuler.point(1) ) ); // FIXME: Again, AngularRuler should be something better -- maybe a class in itself. After all it's used for more than one thing after we integrate the StarHop feature.
102 }
103 
104 void SkyMapDrawAbstract::drawZoomBox( QPainter &p ) {
105  //draw the manual zoom-box, if it exists
106  if ( m_SkyMap->ZoomRect.isValid() ) {
107  p.setPen( QPen( Qt::white, 1.0, Qt::DotLine ) );
108  p.drawRect( m_SkyMap->ZoomRect.x(), m_SkyMap->ZoomRect.y(), m_SkyMap->ZoomRect.width(), m_SkyMap->ZoomRect.height() );
109  }
110 }
111 
112 void SkyMapDrawAbstract::drawObjectLabels( QList<SkyObject*>& labelObjects ) {
113  bool checkSlewing = ( m_SkyMap->slewing || ( m_SkyMap->clockSlewing && m_KStarsData->clock()->isActive() ) ) && Options::hideOnSlew();
114  if ( checkSlewing && Options::hideLabels() ) return;
115 
116  SkyLabeler* skyLabeler = SkyLabeler::Instance();
117  skyLabeler->resetFont(); // use the zoom dependent font
118 
119  skyLabeler->setPen( m_KStarsData->colorScheme()->colorNamed( "UserLabelColor" ) );
120 
121  bool drawPlanets = Options::showSolarSystem() && !(checkSlewing && Options::hidePlanets());
122  bool drawComets = drawPlanets && Options::showComets();
123  bool drawAsteroids = drawPlanets && Options::showAsteroids();
124  bool drawMessier = Options::showDeepSky() && ( Options::showMessier() || Options::showMessierImages() ) && !(checkSlewing && Options::hideMessier() );
125  bool drawNGC = Options::showDeepSky() && Options::showNGC() && !(checkSlewing && Options::hideNGC() );
126  bool drawIC = Options::showDeepSky() && Options::showIC() && !(checkSlewing && Options::hideIC() );
127  bool drawOther = Options::showDeepSky() && Options::showOther() && !(checkSlewing && Options::hideOther() );
128  bool drawStars = Options::showStars();
129  bool hideFaintStars = checkSlewing && Options::hideStars();
130 
131  //Attach a label to the centered object
132  if ( m_SkyMap->focusObject() != NULL && Options::useAutoLabel() ) {
133  QPointF o = m_SkyMap->m_proj->toScreen( m_SkyMap->focusObject() ); // FIXME: Same thing. m_proj should be accessible here.
134  skyLabeler->drawNameLabel( m_SkyMap->focusObject(), o );
135  }
136 
137  foreach ( SkyObject *obj, labelObjects ) {
138  //Only draw an attached label if the object is being drawn to the map
139  //reproducing logic from other draw funcs here...not an optimal solution
140  if ( obj->type() == SkyObject::STAR || obj->type() == SkyObject::CATALOG_STAR || obj->type() == SkyObject::MULT_STAR ) {
141  if ( ! drawStars ) continue;
142  // if ( obj->mag() > Options::magLimitDrawStar() ) continue;
143  if ( hideFaintStars && obj->mag() > Options::magLimitHideStar() ) continue;
144  }
145  if ( obj->type() == SkyObject::PLANET ) {
146  if ( ! drawPlanets ) continue;
147  if ( obj->name() == "Sun" && ! Options::showSun() ) continue;
148  if ( obj->name() == i18n( "Mercury" ) && ! Options::showMercury() ) continue;
149  if ( obj->name() == i18n( "Venus" ) && ! Options::showVenus() ) continue;
150  if ( obj->name() == "Moon" && ! Options::showMoon() ) continue;
151  if ( obj->name() == i18n( "Mars" ) && ! Options::showMars() ) continue;
152  if ( obj->name() == i18n( "Jupiter" ) && ! Options::showJupiter() ) continue;
153  if ( obj->name() == i18n( "Saturn" ) && ! Options::showSaturn() ) continue;
154  if ( obj->name() == i18n( "Uranus" ) && ! Options::showUranus() ) continue;
155  if ( obj->name() == i18n( "Neptune" ) && ! Options::showNeptune() ) continue;
156  if ( obj->name() == i18n( "Pluto" ) && ! Options::showPluto() ) continue;
157  }
158  if ( (obj->type() >= SkyObject::OPEN_CLUSTER && obj->type() <= SkyObject::GALAXY) ||
159  (obj->type() >= SkyObject::ASTERISM) ||
160  (obj->type() <= SkyObject::QUASAR) ||
161  (obj->type() <= SkyObject::RADIO_SOURCE))
162  {
163  if ( ((DeepSkyObject*)obj)->isCatalogM() && ! drawMessier ) continue;
164  if ( ((DeepSkyObject*)obj)->isCatalogNGC() && ! drawNGC ) continue;
165  if ( ((DeepSkyObject*)obj)->isCatalogIC() && ! drawIC ) continue;
166  if ( ((DeepSkyObject*)obj)->isCatalogNone() && ! drawOther ) continue;
167  }
168  if ( obj->type() == SkyObject::COMET && ! drawComets ) continue;
169  if ( obj->type() == SkyObject::ASTEROID && ! drawAsteroids ) continue;
170 
171  if ( ! m_SkyMap->m_proj->checkVisibility( obj ) ) continue; // FIXME: m_proj should be a member of this class.
172  QPointF o = m_SkyMap->m_proj->toScreen( obj );
173  if ( ! m_SkyMap->m_proj->onScreen(o) ) continue;
174 
175  skyLabeler->drawNameLabel( obj, o );
176  }
177 
178  skyLabeler->useStdFont(); // use the StdFont for the guides.
179 }
180 
181 void SkyMapDrawAbstract::drawTelescopeSymbols(QPainter &psky)
182 {
183  Q_UNUSED(psky);
184 
185 #ifdef HAVE_INDI_H
186  if (!Options::showTargetCrosshair())
187  return;
188 
189  if (INDIListener::Instance()->size() == 0)
190  return;
191  SkyPoint indi_sp;
192 
193  psky.setPen( QPen( QColor( m_KStarsData->colorScheme()->colorNamed("TargetColor" ) ) ) );
194  psky.setBrush( Qt::NoBrush );
195  float pxperdegree = Options::zoomFactor()/57.3;
196 
197  foreach(ISD::GDInterface *gd, INDIListener::Instance()->getDevices())
198  {
199  if (gd->getType() != KSTARS_TELESCOPE)
200  continue;
201 
202 
203 
204  INDI::BaseDevice *bd = gd->getBaseDevice();
205 
206  if (bd == NULL)
207  continue;
208 
209  if (bd->isConnected() == false)
210  continue;
211 
212  INumberVectorProperty *coordNP = bd->getNumber("EQUATORIAL_EOD_COORD");
213 
214  if (coordNP == NULL)
215  {
216  coordNP = bd->getNumber("HORIZONTAL_COORD");
217  if (coordNP == NULL)
218  continue;
219  else
220  {
221  INumber *np = IUFindNumber(coordNP, "AZ");
222  if (np == NULL)
223  continue;
224  indi_sp.setAz(np->value);
225 
226  np = IUFindNumber(coordNP, "ALT");
227  if (np == NULL)
228  continue;
229  indi_sp.setAlt(np->value);
230  }
231  }
232  else
233  {
234  INumber *np = IUFindNumber(coordNP, "RA");
235  if (np == NULL)
236  continue;
237  indi_sp.setRA(np->value);
238 
239  np = IUFindNumber(coordNP, "DEC");
240  if (np == NULL)
241  continue;
242  indi_sp.setDec(np->value);
243  }
244 
245  if ( Options::useAltAz() )
246  indi_sp.EquatorialToHorizontal( m_KStarsData->lst(), m_KStarsData->geo()->lat() );
247 
248 
249  QPointF P = m_SkyMap->m_proj->toScreen( &indi_sp );
250  if ( Options::useAntialias() )
251  {
252  float s1 = 0.5*pxperdegree;
253  float s2 = pxperdegree;
254  float s3 = 2.0*pxperdegree;
255 
256  float x0 = P.x(); float y0 = P.y();
257  float x1 = x0 - 0.5*s1; float y1 = y0 - 0.5*s1;
258  float x2 = x0 - 0.5*s2; float y2 = y0 - 0.5*s2;
259  float x3 = x0 - 0.5*s3; float y3 = y0 - 0.5*s3;
260 
261  //Draw radial lines
262  psky.drawLine( QPointF(x1, y0), QPointF(x3, y0) );
263  psky.drawLine( QPointF(x0+s2, y0), QPointF(x0+0.5*s1, y0) );
264  psky.drawLine( QPointF(x0, y1), QPointF(x0, y3) );
265  psky.drawLine( QPointF(x0, y0+0.5*s1), QPointF(x0, y0+s2) );
266  //Draw circles at 0.5 & 1 degrees
267  psky.drawEllipse( QRectF(x1, y1, s1, s1) );
268  psky.drawEllipse( QRectF(x2, y2, s2, s2) );
269 
270  psky.drawText( QPointF(x0+s2+2., y0), bd->getDeviceName() );
271  }
272  else
273  {
274  int s1 = int( 0.5*pxperdegree );
275  int s2 = int( pxperdegree );
276  int s3 = int( 2.0*pxperdegree );
277 
278  int x0 = int(P.x()); int y0 = int(P.y());
279  int x1 = x0 - s1/2; int y1 = y0 - s1/2;
280  int x2 = x0 - s2/2; int y2 = y0 - s2/2;
281  int x3 = x0 - s3/2; int y3 = y0 - s3/2;
282 
283  //Draw radial lines
284  psky.drawLine( QPoint(x1, y0), QPoint(x3, y0) );
285  psky.drawLine( QPoint(x0+s2, y0), QPoint(x0+s1/2, y0) );
286  psky.drawLine( QPoint(x0, y1), QPoint(x0, y3) );
287  psky.drawLine( QPoint(x0, y0+s1/2), QPoint(x0, y0+s2) );
288  //Draw circles at 0.5 & 1 degrees
289  psky.drawEllipse( QRect(x1, y1, s1, s1) );
290  psky.drawEllipse( QRect(x2, y2, s2, s2) );
291 
292  psky.drawText( QPoint(x0+s2+2, y0), bd->getDeviceName() );
293 
294  }
295 
296  }
297 #endif
298 }
299 
300 
301 
302 void SkyMapDrawAbstract::exportSkyImage( QPaintDevice *pd, bool scale ) {
303  SkyQPainter p( m_SkyMap, pd );
304  p.begin();
305  p.setRenderHint(QPainter::SmoothPixmapTransform, true);
306 
307  exportSkyImage(&p, scale);
308 
309  p.end();
310 }
311 
312 void SkyMapDrawAbstract::exportSkyImage(SkyQPainter *painter, bool scale)
313 {
314  bool vectorStarState;
315  vectorStarState = painter->getVectorStars();
316  painter->setVectorStars( true ); // Since we are exporting an image, we may use vector stars without worrying about time
317  painter->setRenderHint(QPainter::Antialiasing, Options::useAntialias());
318 
319  if(scale) {
320  //scale sky image to fit paint device
321  kDebug() << "Scaling true while exporting Sky Image";
322  double xscale = double(painter->device()->width()) / double(m_SkyMap->width());
323  double yscale = double(painter->device()->height()) / double(m_SkyMap->height());
324  double scale = qMin(xscale, yscale);
325  kDebug() << "xscale: " << xscale << "yscale: " << yscale << "chosen scale: " << scale;
326  painter->scale(scale, scale);
327  }
328 
329  painter->drawSkyBackground();
330  m_KStarsData->skyComposite()->draw(painter);
331  drawOverlays(*painter);
332  painter->setVectorStars( vectorStarState ); // Restore the state of the painter
333 }
334 
335 void SkyMapDrawAbstract::calculateFPS()
336 {
337  if(m_framecount == 25) {
338  //float sec = m_fpstime.elapsed()/1000.;
339  // kDebug() << "FPS " << m_framecount/sec;
340  m_framecount = 0;
341  m_fpstime.restart();
342  }
343  ++m_framecount;
344 }
345 
346 void SkyMapDrawAbstract::setDrawLock( bool state ) {
347  m_DrawLock = state;
348 }
Options::showMercury
static bool showMercury()
Get Draw Mercury in the sky map?
Definition: Options.h:2025
SkyMapDrawAbstract::SkyMapDrawAbstract
SkyMapDrawAbstract(SkyMap *sm)
Constructor that sets data and m_SkyMap, and initializes the FPS counters.
Definition: skymapdrawabstract.cpp:61
SkyQPainter::drawSkyBackground
virtual void drawSkyBackground()
Draw the sky background.
Definition: skyqpainter.cpp:124
ksplanetbase.h
Projector::onScreen
bool onScreen(const QPointF &p) const
Check whether the projected point is on-screen.
Definition: projector.cpp:98
Options::showNeptune
static bool showNeptune()
Get Draw Neptune in the sky map?
Definition: Options.h:2139
indilistener.h
KStarsData::clock
SimClock * clock()
Definition: kstarsdata.h:158
KStarsData
KStarsData is the backbone of KStars.
Definition: kstarsdata.h:66
FOV
class encapulating a Field-of-View symbol
Definition: fov.h:32
Options::hideNGC
static bool hideNGC()
Get Hide NGC objects while moving?
Definition: Options.h:1265
SkyMapDrawAbstract::setDrawLock
static void setDrawLock(bool state)
Acquire / release a draw lock.
Definition: skymapdrawabstract.cpp:346
INDIListener::Instance
static INDIListener * Instance()
Definition: indilistener.cpp:46
KStarsData::colorScheme
ColorScheme * colorScheme()
Definition: kstarsdata.h:149
skyobject.h
Options::hideStars
static bool hideStars()
Get Hide faint stars while moving?
Definition: Options.h:1322
Options::showComets
static bool showComets()
Get Draw comets in the sky map?
Definition: Options.h:1398
deepskyobject.h
SkyObject::PLANET
Definition: skyobject.h:108
ISD::GDInterface::getBaseDevice
virtual INDI::BaseDevice * getBaseDevice()=0
SkyMapDrawAbstract::m_KStarsData
KStarsData * m_KStarsData
Definition: skymapdrawabstract.h:149
SkyPoint::setAz
void setAz(dms az)
Sets Az, the Azimuth.
Definition: skypoint.h:152
KStarsData::lst
dms * lst()
Definition: kstarsdata.h:161
SkyMapDrawAbstract::drawOverlays
void drawOverlays(QPainter &p, bool drawFov=true)
Draw the overlays on top of the sky map.
Definition: skymapdrawabstract.cpp:67
SkyMapComposite::draw
virtual void draw(SkyPainter *skyp)
Delegate draw requests to all sub components psky Reference to the QPainter on which to paint...
Definition: skymapcomposite.cpp:170
Options::showTargetCrosshair
static bool showTargetCrosshair()
Get Draw crosshairs at telescope position in the sky map?
Definition: Options.h:524
KStars::Instance
static KStars * Instance()
Definition: kstars.h:125
SkyObject::GALAXY
Definition: skyobject.h:109
ColorScheme::colorNamed
QColor colorNamed(const QString &name) const
Retrieve a color by name.
Definition: colorscheme.cpp:97
KStarsData::geo
GeoLocation * geo()
Definition: kstarsdata.h:164
SkyQPainter::begin
virtual void begin()
Begin painting.
Definition: skyqpainter.cpp:110
SkyObject::ASTERISM
Definition: skyobject.h:110
Options::hideOnSlew
static bool hideOnSlew()
Get Hide objects while moving?
Definition: Options.h:1094
SkyMapDrawAbstract::drawObjectLabels
void drawObjectLabels(QList< SkyObject * > &labelObjects)
Draw "user labels".
Definition: skymapdrawabstract.cpp:112
SkyObject::COMET
Definition: skyobject.h:110
Options::hideLabels
static bool hideLabels()
Get Hide object name labels while moving?
Definition: Options.h:1341
SimClock::isActive
bool isActive()
Whether the clock is active or not is a bit complicated by the introduction of "manual mode"...
Definition: simclock.cpp:97
Projector::checkVisibility
bool checkVisibility(SkyPoint *p) const
Determine if the skypoint p is likely to be visible in the display window.
Definition: projector.cpp:181
fov.h
SkyQPainter
The QPainter-based painting backend.
Definition: skyqpainter.h:32
SkyMapDrawAbstract::exportSkyImage
void exportSkyImage(QPaintDevice *pd, bool scale=false)
Draw the current Sky map to a pixmap which is to be printed or exported to a file.
Definition: skymapdrawabstract.cpp:302
SkyObject::RADIO_SOURCE
Definition: skyobject.h:111
driverinfo.h
SkyLabeler::Instance
static SkyLabeler * Instance()
Definition: skylabeler.cpp:49
Options::useAutoLabel
static bool useAutoLabel()
Get Automatically label focused object?
Definition: Options.h:2405
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
SkyMapDrawAbstract::drawAngleRuler
void drawAngleRuler(QPainter &psky)
Draw a dashed line from the Angular-Ruler start point to the current mouse cursor, when in Angular-Ruler mode.
Definition: skymapdrawabstract.cpp:96
Projector::toScreen
QPointF toScreen(const SkyPoint *o, bool oRefract=true, bool *onVisibleHemisphere=0) const
This is exactly the same as toScreenVec but it returns a QPointF.
Definition: projector.cpp:93
skymapcomposite.h
SkyMapDrawAbstract::drawTelescopeSymbols
void drawTelescopeSymbols(QPainter &psky)
Draw symbols at the position of each Telescope currently being controlled by KStars.
Definition: skymapdrawabstract.cpp:181
SkyMapDrawAbstract::drawZoomBox
void drawZoomBox(QPainter &psky)
Draw a dotted-line rectangle which traces the potential new field-of-view in ZoomBox mode...
Definition: skymapdrawabstract.cpp:104
SkyMapDrawAbstract::m_SkyMap
SkyMap * m_SkyMap
Definition: skymapdrawabstract.h:150
SkyLabeler::useStdFont
void useStdFont()
sets the font in SkyLabeler and in psky to the font psky had originally when reset() was called...
Definition: skylabeler.cpp:185
Options::showSolarSystem
static bool showSolarSystem()
Get Meta-option for all planets in the sky map.
Definition: Options.h:1930
Options::showSaturn
static bool showSaturn()
Get Draw Saturn in the sky map?
Definition: Options.h:2101
SkyMapDrawAbstract::m_DrawLock
static bool m_DrawLock
Definition: skymapdrawabstract.h:151
lambertprojector.h
skymap.h
Options::showJupiter
static bool showJupiter()
Get Draw Jupiter in the sky map?
Definition: Options.h:2082
Options::showMoon
static bool showMoon()
Get Draw Moon in the sky map?
Definition: Options.h:2006
Options::hideIC
static bool hideIC()
Get Hide IC objects while moving?
Definition: Options.h:1227
Options::showMars
static bool showMars()
Get Draw Mars in the sky map?
Definition: Options.h:2063
ksnumbers.h
Options::showDeepSky
static bool showDeepSky()
Get Draw "deep sky" objects in the sky map?
Definition: Options.h:1626
skymapdrawabstract.h
FOV::draw
void draw(QPainter &p, float zoomFactor)
draw the FOV symbol on a QPainter
Definition: fov.cpp:57
Options::showUranus
static bool showUranus()
Get Draw Uranus in the sky map?
Definition: Options.h:2120
KStarsData::skyComposite
SkyMapComposite * skyComposite()
Definition: kstarsdata.h:146
SkyQPainter::setVectorStars
void setVectorStars(bool vectorStars)
Definition: skyqpainter.h:64
simclock.h
SkyLine::point
SkyPoint * point(int i) const
Definition: skyline.h:54
SkyPoint::EquatorialToHorizontal
void EquatorialToHorizontal(const dms *LST, const dms *lat)
Determine the (Altitude, Azimuth) coordinates of the SkyPoint from its (RA, Dec) coordinates, given the local sidereal time and the observer's latitude.
Definition: skypoint.cpp:55
constellationboundarylines.h
SkyMapDrawAbstract::calculateFPS
void calculateFPS()
Calculate FPS and dump result to stderr using kDebug.
Definition: skymapdrawabstract.cpp:335
Options.h
SkyMap::updateAngleRuler
void updateAngleRuler()
update the geometry of the angle ruler.
Definition: skymap.cpp:1127
SkyObject::mag
float mag(void) const
Definition: skyobject.h:182
KStarsData::getVisibleFOVs
const QList< FOV * > getVisibleFOVs() const
Definition: kstarsdata.h:211
DeepSkyObject
Provides all necessary information about a deep-sky object: data inherited from SkyObject (coordinate...
Definition: deepskyobject.h:43
ISD::GDInterface::getType
virtual DeviceFamily getType()=0
Options::showMessierImages
static bool showMessierImages()
Get Draw Messier object images in the sky map?
Definition: Options.h:1854
GeoLocation::lat
const dms * lat() const
Definition: geolocation.h:79
SkyObject::type
int type(void) const
Definition: skyobject.h:164
Options::showAsteroids
static bool showAsteroids()
Get Draw asteroids in the sky map?
Definition: Options.h:1360
Options::magLimitHideStar
static double magLimitHideStar()
Get Faint limit for stars when slewing.
Definition: Options.h:2645
Options::zoomFactor
static double zoomFactor()
Get Zoom Factor, in pixels per radian.
Definition: Options.h:2531
skyqpainter.h
Options::showNGC
static bool showNGC()
Get Draw NGC objects in the sky map?
Definition: Options.h:1816
starobject.h
SkyMap
This is the canvas on which the sky is painted.
Definition: skymap.h:72
projector.h
SkyObject::MULT_STAR
Definition: skyobject.h:111
Options::useAltAz
static bool useAltAz()
Get Use horizontal coordinate system?
Definition: Options.h:2386
indistd.h
SkyLabeler::setPen
void setPen(const QPen &pen)
sets the pen used for drawing labels on the sky.
Definition: skylabeler.cpp:173
SkyObject::ASTEROID
Definition: skyobject.h:110
SkyLabeler::drawNameLabel
bool drawNameLabel(SkyObject *obj, const QPointF &_p)
Tries to draw a label for an object.
Definition: skylabeler.cpp:151
Options::showVenus
static bool showVenus()
Get Draw Venus in the sky map?
Definition: Options.h:2044
Options::hideOther
static bool hideOther()
Get Hide extra objects while moving?
Definition: Options.h:1284
SkyLabeler::resetFont
void resetFont()
sets the font in SkyLabeler and in psky back to the zoom dependent value that was set in reset()...
Definition: skylabeler.cpp:190
SkyPoint::setAlt
void setAlt(dms alt)
Sets Alt, the Altitude.
Definition: skypoint.h:141
SkyPoint::setRA
void setRA(dms r)
Sets RA, the current Right Ascension.
Definition: skypoint.h:119
SkyPoint::setDec
void setDec(dms d)
Sets Dec, the current Declination.
Definition: skypoint.h:130
Options::showStars
static bool showStars()
Get Draw stars in the sky map?
Definition: Options.h:2177
kstarsdata.h
skylabeler.h
SkyLabeler
The purpose of this class is to prevent labels from overlapping.
Definition: skylabeler.h:112
SkyLabeler::draw
void draw(QPainter &p)
Draws labels using the given painter.
Definition: skylabeler.cpp:274
SkyObject::name
virtual QString name(void) const
Definition: skyobject.h:124
KSTARS_TELESCOPE
Definition: indicommon.h:66
SkyObject::QUASAR
Definition: skyobject.h:111
SkyMap::focusObject
SkyObject * focusObject() const
Retrieve the object which is centered in the sky map.
Definition: skymap.h:229
Options::hidePlanets
static bool hidePlanets()
Get Hide solar system objects while moving?
Definition: Options.h:1303
ksutils.h
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
Options::showPluto
static bool showPluto()
Get Draw Pluto in the sky map?
Definition: Options.h:2158
SkyObject::CATALOG_STAR
Definition: skyobject.h:108
SkyObject::OPEN_CLUSTER
Definition: skyobject.h:108
Options::showSun
static bool showSun()
Get Draw Sun in the sky map?
Definition: Options.h:1987
kstars.h
Options::useAntialias
static bool useAntialias()
Get Use antialiasing when drawing the screen?
Definition: Options.h:2500
ISD::GDInterface
Definition: indistd.h:48
Options::showIC
static bool showIC()
Get Draw IC objects in the sky map?
Definition: Options.h:1797
SkyQPainter::getVectorStars
bool getVectorStars() const
Definition: skyqpainter.h:65
SkyQPainter::end
virtual void end()
End and finalize painting.
Definition: skyqpainter.cpp:119
observinglist.h
QList
Options::showOther
static bool showOther()
Get Draw extra deep-sky objects in the sky map?
Definition: Options.h:1873
Options::hideMessier
static bool hideMessier()
Get Hide Messier objects while moving?
Definition: Options.h:1246
Options::showMessier
static bool showMessier()
Get Draw Messier objects in the sky map?
Definition: Options.h:1835
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:21 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