• 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
horizoncomponent.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  horizoncomponent.cpp - K Desktop Planetarium
3  -------------------
4  begin : 2005/07/08
5  copyright : (C) 2005 by Thomas Kabelmann
6  email : 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 #include "horizoncomponent.h"
19 
20 #include <QList>
21 #include <QPointF>
22 
23 #include "Options.h"
24 #include "kstarsdata.h"
25 #include "ksnumbers.h"
26 #include "skymap.h"
27 #include "skyobjects/skypoint.h"
28 #include "dms.h"
29 #include "skylabeler.h"
30 #include "skypainter.h"
31 
32 #include "projections/projector.h"
33 
34 #define NCIRCLE 360 //number of points used to define equator, ecliptic and horizon
35 
36 HorizonComponent::HorizonComponent(SkyComposite *parent )
37  : PointListComponent( parent )
38 {
39  KStarsData *data = KStarsData::Instance();
40  emitProgressText( i18n("Creating horizon" ) );
41 
42  //Define Horizon
43  for ( unsigned int i=0; i<NCIRCLE; ++i ) {
44  SkyPoint *o = new SkyPoint();
45  o->setAz( i*360./NCIRCLE );
46  o->setAlt( 0.0 );
47 
48  o->HorizontalToEquatorial( data->lst(), data->geo()->lat() );
49  pointList().append( o );
50  }
51 }
52 
53 HorizonComponent::~HorizonComponent()
54 {}
55 
56 bool HorizonComponent::selected()
57 {
58  return Options::showHorizon() || Options::showGround();
59 }
60 
61 void HorizonComponent::update( KSNumbers * )
62 {
63  if ( ! selected() )
64  return;
65  KStarsData *data = KStarsData::Instance();
66  foreach ( SkyPoint *p, pointList() ) {
67  p->HorizontalToEquatorial( data->lst(), data->geo()->lat() );
68  }
69 }
70 
71 //Only half of the Horizon circle is ever valid, the invalid half is "behind" the observer.
72 //To select the valid half, we start with the azimuth of the central focus point.
73 //The valid horizon points have azimuth between this az +- 90
74 //This is true for Equatorial or Horizontal coordinates
75 void HorizonComponent::draw( SkyPainter *skyp )
76 {
77  if( !selected() )
78  return;
79 
80  KStarsData *data = KStarsData::Instance();
81 
82  // If we are in GL mode, we need to flush buffers now since we don't do it before
83  // drawing ground, otherwise, objects remaining in buffers will be drawn after
84  // the ground and will appears over it.
85  if ( Options::useGL() )
86  skyp->end();
87 
88  skyp->setPen( QPen( QColor( data->colorScheme()->colorNamed( "HorzColor" ) ), 2, Qt::SolidLine ) );
89 
90  if ( Options::showGround() )
91  skyp->setBrush( QColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) );
92  else
93  skyp->setBrush( Qt::NoBrush );
94 
95  SkyPoint labelPoint;
96  bool drawLabel;
97  skyp->drawHorizon( Options::showGround(), &labelPoint, &drawLabel );
98 
99  if( drawLabel ) {
100  SkyPoint labelPoint2;
101  labelPoint2.setAlt(0.0);
102  labelPoint2.setAz( labelPoint.az().Degrees() + 1.0 );
103  labelPoint2.HorizontalToEquatorial( data->lst(), data->geo()->lat() );
104  }
105  #ifdef __GNUC__
106  #warning Still have to port HorizonComponent::draw()
107  #endif
108  #if 0
109  if ( ! selected() ) return;
110 
111  SkyMap *map = SkyMap::Instance();
112  KStarsData *data = KStarsData::Instance();
113 
114  float Width = map->scale() * map->width();
115  float Height = map->scale() * map->height();
116  QPolygonF groundPoly;
117  SkyPoint *pAnchor(0), *pAnchor2(0);
118 
119  static const QString horizonLabel = i18n("Horizon");
120  float marginLeft, marginRight, marginTop, marginBot;
121  SkyLabeler::Instance()->getMargins( horizonLabel, &marginLeft, &marginRight,
122  &marginTop, &marginBot );
123 
124  psky.setPen( QPen( QColor( data->colorScheme()->colorNamed( "HorzColor" ) ), 2, Qt::SolidLine ) );
125 
126  if ( Options::useAltAz() && Options::showGround() ) {
127  psky.setBrush( QColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) );
128  }
129  else {
130  psky.setBrush( Qt::NoBrush );
131  }
132 
133  double daz = 90.;
134  if ( Options::useAltAz() ) {
135  daz = 0.5*Width*57.3/Options::zoomFactor(); //center to edge, in degrees
136  if ( Options::projection() == SkyMap::Orthographic ) {
137  daz = daz * 1.4;
138  }
139  }
140  if ( daz > 90.0 ) daz = 90.0;
141 
142  double az1 = map->focus()->az().Degrees() - daz;
143  double az2 = map->focus()->az().Degrees() + daz;
144 
145  QPointF o;
146  bool allGround(true);
147  bool allSky(true);
148 
149  //Special case for equirectangular mode and Alt/Az coordinates
150  if ( Options::projection() == SkyMap::Equirectangular && Options::useAltAz() == true ) {
151  SkyPoint belowFocus;
152  belowFocus.setAz( map->focus()->az().Degrees() );
153  belowFocus.setAlt( 0.0 );
154 
155  QPointF obf = map->toScreen( &belowFocus, false );
156 
157  //If the horizon is off the bottom edge of the screen,
158  //we can return immediately
159  if ( obf.y() > Height ) return;
160 
161  //We can also return if the horizon is off the top edge,
162  //as long as the ground poly is not being drawn
163  if ( obf.y() < 0. ) {
164  if ( Options::showGround() == false ) return;
165  obf.setY( -10. );
166  }
167 
168  //Construct the ground polygon, which is a simple rectangle in this case
169  groundPoly << QPointF( -10., obf.y() ) << QPointF( Width + 10., obf.y() )
170  << QPointF( Width + 10., Height + 10. )
171  << QPointF( -10., Height + 10. );
172 
173  psky.drawPolygon( groundPoly );
174 
175  //Draw the Horizon Label
176  if ( Options::showGround() && Options::useAltAz() )
177  psky.setPen( QColor ( data->colorScheme()->colorNamed( "CompassColor" ) ) );
178  else
179  psky.setPen( QColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) );
180 
181  QPointF pLabel( Width-30., obf.y() );
182  SkyLabeler::Instance()->drawGuideLabel( pLabel, horizonLabel, 0.0 );
183 
184  drawCompassLabels( psky );
185  return;
186  }
187 
188  //Add points on the left that may be slightly West of North
189  if ( az1 < 0. ) {
190  az1 += 360.;
191  foreach ( SkyPoint *p, pointList() ) {
192  if ( p->az().Degrees() > az1 ) {
193  o = map->toScreen( p, false );
194  if ( ! map->isPointNull( o ) ) {
195  groundPoly << o;
196 
197  //Set the anchor point if this point is onscreen
198  if ( o.x() < marginRight && o.y() > marginTop && o.y() < marginBot )
199  pAnchor = p;
200 
201  if ( o.y() > 0. ) allGround = false;
202  if ( o.y() < Height ) allSky = false;
203  }
204  }
205  }
206  az1 = 0.0;
207  }
208 
209  //Add points in normal range, 0 to 360
210  foreach ( SkyPoint *p, pointList() ) {
211  if ( p->az().Degrees() > az1 && p->az().Degrees() < az2 ) {
212  o = map->toScreen( p, false );
213  if ( ! map->isPointNull( o ) ) {
214  groundPoly << o;
215 
216  //Set the anchor point if this point is onscreen
217  if ( o.x() < marginRight && o.y() > marginTop && o.y() < marginBot )
218  pAnchor = p;
219 
220  if ( o.y() > 0. ) allGround = false;
221  if ( o.y() < Height ) allSky = false;
222  }
223  } else if ( p->az().Degrees() > az2 )
224  break;
225  }
226 
227  //Add points on the right that may be slightly East of North
228  if ( az2 > 360. ) {
229  az2 -= 360.;
230  foreach ( SkyPoint *p, pointList() ) {
231  if ( p->az().Degrees() < az2 ) {
232  o = map->toScreen( p, false );
233  if ( ! map->isPointNull( o ) ) {
234  groundPoly << o;
235 
236  //Set the anchor point if this point is onscreen
237  if ( o.x() < marginRight && o.y() > marginTop && o.y() < marginBot )
238  pAnchor = p;
239 
240  if ( o.y() > 0. ) allGround = false;
241  if ( o.y() < Height ) allSky = false;
242  }
243  } else {
244  break;
245  }
246  }
247  }
248 
249  if ( allSky ) return; //no horizon onscreen
250 
251  if ( allGround ) {
252  //Ground fills the screen. Reset groundPoly to surround screen perimeter
253  //Just draw the poly (if ground is filled)
254  //No need for compass labels or "Horizon" label
255  if ( Options::useAltAz() && Options::showGround() ) {
256  groundPoly.clear();
257  groundPoly << QPointF( -10., -10. )
258  << QPointF( Width + 10., -10. )
259  << QPointF( Width + 10., Height + 10. )
260  << QPointF( -10., Height + 10. );
261  psky.drawPolygon( groundPoly );
262  }
263  return;
264  }
265 
266  //groundPoly now contains QPointF's of the screen coordinates of points
267  //along the "front half" of the Horizon, in order from left to right.
268  //If we are using Equatorial coords, then all we need to do is connect
269  //these points.
270  //Do not connect points if they are widely separated at low zoom (this
271  //avoids connected horizon lines to invalid offscreen points)
272  if ( ! Options::useAltAz() ) {
273  for ( int i=1; i < groundPoly.size(); ++i ) {
274  if ( Options::zoomFactor() > 5000 )
275  psky.drawLine( groundPoly.at(i-1), groundPoly.at(i) );
276  else {
277  float dx = (groundPoly.at(i-1).x() - groundPoly.at(i).x());
278  float dy = (groundPoly.at(i-1).y() - groundPoly.at(i).y());
279  float r2 = dx*dx + dy*dy;
280  if ( r2 < 40000. ) //separated by less than 200 pixels?
281  psky.drawLine( groundPoly.at(i-1), groundPoly.at(i) );
282  }
283  }
284 
285  //If we are using Horizontal coordinates, there is more work to do.
286  //We need to complete the ground polygon by going right to left.
287  //If the zoomLevel is high (as indicated by (daz<75.0)), then we
288  //complete the polygon by simply adding points along thebottom edge
289  //of the screen. If the zoomLevel is high (daz>75.0), then we add points
290  //along the bottom edge of the sky circle. The sky circle has
291  //a radius determined by the projection scheme, and the endpoints of the current
292  //groundPoly points lie 180 degrees apart along its circumference.
293  //We determine the polar angles t1, t2 corresponding to these end points,
294  //and then step along the circumference, adding points between them.
295  //(In Horizontal coordinates, t1 and t2 are always 360 and 180, respectively).
296  } else { //Horizontal coords
297 
298  //In Gnomonic projection, or if sufficiently zoomed in, we can complete
299  //the ground polygon by simply adding offscreen points
300  if ( daz < 25.0 || Options::projection() == SkyMap::Gnomonic ) {
301  groundPoly << QPointF( Width + 10., groundPoly.last().y() )
302  << QPointF( Width + 10., Height + 10. )
303  << QPointF( -10., Height + 10. )
304  << QPointF( -10., groundPoly.first().y() );
305 
306  //For other projections at low zoom, we complete the ground polygon by tracing
307  //along the bottom of sky's horizon circle (i.e., the locus of points that are
308  //90 degrees from the focus point)
309  } else {
310  //r0, the radius of the sky circle is determined by the projection scheme:
311  double r0 = map->scale()*Options::zoomFactor();
312  switch ( Options::projection() ) {
313  case SkyMap::Lambert:
314  //r0 * 2 * sin(PI/4) = 1.41421356
315  r0 = r0*1.41421356;
316  break;
317  case SkyMap::AzimuthalEquidistant:
318  //r0*PI/2 = 1.57079633
319  r0 = r0*1.57079633;
320  break;
321  case SkyMap::Orthographic:
322  //r0*sin(PI/2) = 1.0
323  break;
324  case SkyMap::Stereographic:
325  //r0*2*tan(PI/4) = 2.0
326  r0 = 2.0*r0;
327  break;
328  default:
329  kWarning() << i18n("Unrecognized coordinate projection: ") << Options::projection() ;
330  //default to Orthographic
331  break;
332  }
333 
334  double t1 = 360.;
335  double t2 = 180.;
336 
337  //NOTE: Uncomment if we ever want opaque ground while using Equatorial coords
338  //NOTE: We would have to add consideration for useAntialias to this commented code
339  // if ( ! Options::useAltAz() ) { //compute t1,t2
340  // //groundPoly.last() is the point on the Horizon that intersects
341  // //the visible sky circle on the right
342  // t1 = -1.0*acos( (groundPoly.last().x() - 0.5*Width)/r0/Options::zoomFactor() )/dms::DegToRad; //angle in degrees
343  // //Resolve quadrant ambiguity
344  // if ( groundPoly.last().y() < 0. ) t1 = 360. - t1;
345  //
346  // t2 = t1 - 180.;
347  // }
348 
349  for ( double t=t1; t >= t2; t-=2. ) { //step along circumference
350  dms a( t );
351  double sa(0.), ca(0.);
352  a.SinCos( sa, ca );
353  float xx = 0.5*Width + r0*ca;
354  float yy = 0.5*Height - r0*sa;
355 
356  groundPoly << QPoint( int(xx), int(yy) );
357  }
358  }
359 
360  //Finally, draw the ground Polygon.
361  psky.drawPolygon( groundPoly );
362  }
363 
364  //Set color for compass labels and "Horizon" label.
365  if ( Options::showGround() && Options::useAltAz() )
366  psky.setPen( QColor ( data->colorScheme()->colorNamed( "CompassColor" ) ) );
367  else
368  psky.setPen( QColor ( data->colorScheme()->colorNamed( "HorzColor" ) ) );
369 
370 
371  //Draw Horizon name label
372  //pAnchor contains the last point of the Horizon before it went offcreen
373  //on the right/top/bottom edge. oAnchor2 is the next point after oAnchor.
374  if ( ! pAnchor ) {
375  drawCompassLabels( psky );
376  return;
377  }
378 
379  int iAnchor = pointList().indexOf( pAnchor );
380  if ( iAnchor == pointList().size()-1 ) iAnchor = 0;
381  else iAnchor++;
382  pAnchor2 = pointList().at( iAnchor );
383 
384  QPointF o1 = map->toScreen( pAnchor, false );
385  QPointF o2 = map->toScreen( pAnchor2, false );
386 
387  float x1, x2;
388  //there are 3 possibilities: (o2.x() > width()); (o2.y() < 0); (o2.y() > height())
389  if ( o2.x() > Width ) {
390  x1 = (Width - o1.x())/(o2.x() - o1.x());
391  x2 = (o2.x() - Width)/(o2.x() - o1.x());
392  } else if ( o2.y() < 0 ) {
393  x1 = o1.y()/(o1.y() - o2.y());
394  x2 = -1.0*o2.y()/(o1.y() - o2.y());
395  } else if ( o2.y() > Height ) {
396  x1 = (Height - o1.y())/(o2.y() - o1.y());
397  x2 = (o2.y() - Height)/(o2.y() - o1.y());
398  } else { //should never get here
399  x1 = 0.0;
400  x2 = 1.0;
401  }
402 
403  //ra0 is the exact RA at which the Horizon intersects a screen edge
404  double ra0 = x1*pAnchor2->ra().Hours() + x2*pAnchor->ra().Hours();
405  //dec0 is the exact Dec at which the Horizon intersects a screen edge
406  double dec0 = x1*pAnchor2->dec().Degrees() + x2*pAnchor->dec().Degrees();
407 
408  //LabelPoint is offset from the anchor point by -2.0 degrees in azimuth
409  //and -0.4 degree altitude, scaled by 2000./zoomFactor so that they are
410  //independent of zoom.
411  SkyPoint LabelPoint(ra0, dec0);
412  LabelPoint.EquatorialToHorizontal( data->lst(), data->geo()->lat() );
413  LabelPoint.setAlt( LabelPoint.alt().Degrees() - 800./Options::zoomFactor() );
414  LabelPoint.setAz( LabelPoint.az().Degrees() - 4000./Options::zoomFactor() );
415  LabelPoint.HorizontalToEquatorial( data->lst(), data->geo()->lat() );
416 
417  o = map->toScreen( &LabelPoint, false );
418 
419  if ( o.x() > Width || o.x() < 0 ) {
420  //the LabelPoint is offscreen. Either we are in the Southern hemisphere,
421  //or the sky is rotated upside-down. Use an azimuth offset of +2.0 degrees
422  LabelPoint.setAlt( LabelPoint.alt().Degrees() + 1600./Options::zoomFactor() );
423  LabelPoint.setAz( LabelPoint.az().Degrees() + 8000./Options::zoomFactor() );
424  LabelPoint.HorizontalToEquatorial( data->lst(), data->geo()->lat() );
425  }
426 
427  //p2 is a skypoint offset from LabelPoint by +/-1 degree azimuth (scaled by
428  //2000./zoomFactor). We use p2 to determine the rotation angle for the
429  //Horizon label, which we want to be parallel to the line between LabelPoint and p2.
430  SkyPoint p2 = LabelPoint;
431  p2.EquatorialToHorizontal( data->lst(), data->geo()->lat() );
432  p2.setAz( p2.az().Degrees() + 2000./Options::zoomFactor() );
433  p2.HorizontalToEquatorial( data->lst(), data->geo()->lat() );
434 
435  o2 = map->toScreen( &p2, false );
436 
437  float sx = o.x() - o2.x();
438  float sy = o.y() - o2.y();
439  float angle = atan2( sy, sx )*180.0/dms::PI;
440  if ( angle < -90.0 ) angle += 180.0;
441  if ( angle > 90.0 ) angle -= 180.0;
442 
443  SkyLabeler::Instance()->drawGuideLabel( o1, horizonLabel, angle );
444 #endif
445  drawCompassLabels();
446 }
447 
448 void HorizonComponent::drawCompassLabels() {
449  SkyPoint c;
450  QPointF cpoint;
451  bool visible;
452 
453  const Projector *proj = SkyMap::Instance()->projector();
454  KStarsData *data = KStarsData::Instance();
455 
456  SkyLabeler* skyLabeler = SkyLabeler::Instance();
457  // Set proper color for labels
458  QColor color( data->colorScheme()->colorNamed( "CompassColor" ) );
459  skyLabeler->setPen( QPen( QBrush(color), 1, Qt::SolidLine) );
460 
461  double az = -0.01;
462  static QString name[8];
463  name[0] = i18nc( "Northeast", "NE" );
464  name[1] = i18nc( "East", "E" );
465  name[2] = i18nc( "Southeast", "SE" );
466  name[3] = i18nc( "South", "S" );
467  name[4] = i18nc( "Southwest", "SW" );
468  name[5] = i18nc( "West", "W" );
469  name[6] = i18nc( "Northwest", "NW" );
470  name[7] = i18nc( "North", "N" );
471 
472  for ( int i = 0; i < 8; i++ ) {
473  az += 45.0;
474  c.setAz( az );
475  c.setAlt( 0.0 );
476  if ( !Options::useAltAz() ) {
477  c.HorizontalToEquatorial( data->lst(), data->geo()->lat() );
478  }
479 
480  cpoint = proj->toScreen( &c, false, &visible );
481  if ( visible && proj->onScreen(cpoint) ) {
482  skyLabeler->drawGuideLabel( cpoint, name[i], 0.0 );
483  }
484  }
485 }
HorizonComponent::draw
virtual void draw(SkyPainter *skyp)
Draw the Horizon on the Sky map map Pointer to the SkyMap object psky Reference to the QPainter on wh...
Definition: horizoncomponent.cpp:75
HorizonComponent::~HorizonComponent
virtual ~HorizonComponent()
Destructor.
Definition: horizoncomponent.cpp:53
SkyPoint::ra
const dms & ra() const
Definition: skypoint.h:171
Projector::onScreen
bool onScreen(const QPointF &p) const
Check whether the projected point is on-screen.
Definition: projector.cpp:98
SkyMap::AzimuthalEquidistant
Definition: skymap.h:97
HorizonComponent::update
virtual void update(KSNumbers *)
Update the sky positions of this component.
Definition: horizoncomponent.cpp:61
SkyPainter::setBrush
virtual void setBrush(const QBrush &brush)=0
Set the brush of the painter.
KStarsData
KStarsData is the backbone of KStars.
Definition: kstarsdata.h:66
SkyPoint::az
const dms & az() const
Definition: skypoint.h:177
HorizonComponent::selected
bool selected()
Definition: horizoncomponent.cpp:56
KStarsData::colorScheme
ColorScheme * colorScheme()
Definition: kstarsdata.h:149
SkyMap::Gnomonic
Definition: skymap.h:101
SkyPoint::setAz
void setAz(dms az)
Sets Az, the Azimuth.
Definition: skypoint.h:152
KStarsData::lst
dms * lst()
Definition: kstarsdata.h:161
KStarsData::Instance
static KStarsData * Instance()
Definition: kstarsdata.h:92
dms::Degrees
const double & Degrees() const
Definition: dms.h:98
ColorScheme::colorNamed
QColor colorNamed(const QString &name) const
Retrieve a color by name.
Definition: colorscheme.cpp:97
skypainter.h
NCIRCLE
#define NCIRCLE
Definition: horizoncomponent.cpp:34
KStarsData::geo
GeoLocation * geo()
Definition: kstarsdata.h:164
Options::useGL
static bool useGL()
Get Switch to OpenGL backend.
Definition: Options.h:2740
SkyMap::Lambert
Definition: skymap.h:96
horizoncomponent.h
SkyLabeler::getMargins
void getMargins(const QString &text, float *left, float *right, float *top, float *bot)
sets four margins for help in keeping labels entirely on the screen.
Definition: skylabeler.cpp:195
Options::showGround
static bool showGround()
Get Draw opaque ground in the sky map?
Definition: Options.h:1740
dms.h
SkyLabeler::Instance
static SkyLabeler * Instance()
Definition: skylabeler.cpp:49
Options::projection
static uint projection()
Get Mapping projection algorithm.
Definition: Options.h:2310
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
Projector
This class serves as an interface to handle projections.
Definition: projector.h:49
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
SkyMap::focus
SkyPoint * focus()
Retrieve the Focus point; the position on the sky at the center of the skymap.
Definition: skymap.h:120
SkyPainter::end
virtual void end()=0
End and finalize painting.
skymap.h
i18nc
i18nc("string from libindi, used in the config dialog","100x")
SkyPainter::drawHorizon
virtual void drawHorizon(bool filled, SkyPoint *labelPoint=0, bool *drawLabel=0)=0
SkyPoint::HorizontalToEquatorial
void HorizontalToEquatorial(const dms *LST, const dms *lat)
Determine the (RA, Dec) coordinates of the SkyPoint from its (Altitude, Azimuth) coordinates, given the local sidereal time and the observer's latitude.
Definition: skypoint.cpp:102
ksnumbers.h
HorizonComponent::HorizonComponent
HorizonComponent(SkyComposite *parent)
Constructor parent Pointer to the parent SkyComposite object.
Definition: horizoncomponent.cpp:36
dms
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:42
SkyComposite
SkyComposite is a kind of container class for SkyComponent objects.
Definition: skycomposite.h:43
SkyPoint::dec
const dms & dec() const
Definition: skypoint.h:174
dms::Hours
double Hours() const
Definition: dms.h:125
skypoint.h
SkyLabeler::drawGuideLabel
bool drawGuideLabel(QPointF &o, const QString &text, double angle)
Tries to draw the text at the position and angle specified.
Definition: skylabeler.cpp:104
PointListComponent::pointList
QList< SkyPoint * > & pointList()
Definition: pointlistcomponent.h:58
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
SkyPainter::setPen
virtual void setPen(const QPen &pen)=0
Set the pen of the painter.
SkyMap::Equirectangular
Definition: skymap.h:99
Options.h
KSNumbers
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
PointListComponent
An abstract parent class, to be inherited by SkyComponents that store a QList of SkyPoints.
Definition: pointlistcomponent.h:37
GeoLocation::lat
const dms * lat() const
Definition: geolocation.h:79
PI
#define PI
Definition: satellite.cpp:43
Options::zoomFactor
static double zoomFactor()
Get Zoom Factor, in pixels per radian.
Definition: Options.h:2531
SkyMap
This is the canvas on which the sky is painted.
Definition: skymap.h:72
projector.h
SkyMap::Instance
static SkyMap * Instance()
Definition: skymap.cpp:141
Options::useAltAz
static bool useAltAz()
Get Use horizontal coordinate system?
Definition: Options.h:2386
SkyLabeler::setPen
void setPen(const QPen &pen)
sets the pen used for drawing labels on the sky.
Definition: skylabeler.cpp:173
SkyPoint::setAlt
void setAlt(dms alt)
Sets Alt, the Altitude.
Definition: skypoint.h:141
SkyComponent::emitProgressText
virtual void emitProgressText(const QString &message)
Emit signal about progress.
Definition: skycomponent.cpp:35
SkyMap::Stereographic
Definition: skymap.h:100
kstarsdata.h
skylabeler.h
SkyPoint::alt
const dms & alt() const
Definition: skypoint.h:180
Options::showHorizon
static bool showHorizon()
Get Draw horizon line in the sky map?
Definition: Options.h:1759
SkyLabeler
The purpose of this class is to prevent labels from overlapping.
Definition: skylabeler.h:112
SkyMap::Orthographic
Definition: skymap.h:98
SkyMap::projector
const Projector * projector() const
Get the current projector.
Definition: skymap.h:264
SkyPainter
Draws things on the sky, without regard to backend.
Definition: skypainter.h:47
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