• 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
  • tools
wutdialog.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  wutdialog.cpp - K Desktop Planetarium
3  -------------------
4  begin : Die Feb 25 2003
5  copyright : (C) 2003 by Thomas Kabelmann
6  email : tk78@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 "wutdialog.h"
19 
20 #include <QTimer>
21 #include <QCursor>
22 #include <QListWidgetItem>
23 
24 #include <kcombobox.h>
25 #include <klocale.h>
26 #include <kpushbutton.h>
27 
28 #include "ui_wutdialog.h"
29 
30 #include "kstars.h"
31 #include "kstarsdata.h"
32 #include "skymap.h"
33 #include "ksnumbers.h"
34 #include "simclock.h"
35 #include "dialogs/detaildialog.h"
36 #include "dialogs/locationdialog.h"
37 #include "dialogs/timedialog.h"
38 #include "skyobjects/kssun.h"
39 #include "skyobjects/ksmoon.h"
40 #include "skycomponents/skymapcomposite.h"
41 
42 WUTDialogUI::WUTDialogUI( QWidget *p ) : QFrame( p ) {
43  setupUi( this );
44 }
45 
46 WUTDialog::WUTDialog( QWidget *parent, bool _session, GeoLocation *_geo, KStarsDateTime _lt ) :
47  KDialog( parent ),
48  session(_session),
49  T0(_lt),
50  geo(_geo),
51  EveningFlag(0),
52  timer(NULL)
53 {
54  WUT = new WUTDialogUI( this );
55  setMainWidget( WUT );
56  setCaption( i18n("What's up Tonight") );
57  setButtons( KDialog::Close );
58  setModal( false );
59 
60  //If the Time is earlier than 6:00 am, assume the user wants the night of the previous date
61  if ( T0.time().hour() < 6 )
62  T0 = T0.addDays( -1 );
63 
64  //Now, set time T0 to midnight (of the following day)
65  T0.setTime( QTime( 0, 0, 0 ) );
66  T0 = T0.addDays( 1 );
67  UT0 = geo->LTtoUT( T0 );
68 
69  //Set the Tomorrow date/time to Noon the following day
70  Tomorrow = T0.addSecs( 12*3600 );
71  TomorrowUT = geo->LTtoUT( Tomorrow );
72 
73  //Set the Evening date/time to 6:00 pm
74  Evening = T0.addSecs( -6*3600 );
75  EveningUT = geo->LTtoUT( Evening );
76 
77  QString sGeo = geo->translatedName();
78  if ( ! geo->translatedProvince().isEmpty() ) sGeo += ", " + geo->translatedProvince();
79  sGeo += ", " + geo->translatedCountry();
80  WUT->LocationLabel->setText( i18n( "at %1", sGeo ) );
81  WUT->DateLabel->setText( i18n( "The night of %1", KGlobal::locale()->formatDate( Evening.date(), KLocale::LongDate ) ) );
82  m_Mag = 10.0;
83  WUT->MagnitudeEdit->setValue( m_Mag );
84  WUT->MagnitudeEdit->setSliderEnabled( true );
85  WUT->MagnitudeEdit->setSingleStep(0.100);
86  initCategories();
87 
88  makeConnections();
89 
90  QTimer::singleShot(0, this, SLOT(init()));
91 }
92 
93 WUTDialog::~WUTDialog(){
94 }
95 
96 void WUTDialog::makeConnections() {
97  connect( WUT->DateButton, SIGNAL( clicked() ), SLOT( slotChangeDate() ) );
98  connect( WUT->LocationButton, SIGNAL( clicked() ), SLOT( slotChangeLocation() ) );
99  connect( WUT->CenterButton, SIGNAL( clicked() ), SLOT( slotCenter() ) );
100  connect( WUT->DetailButton, SIGNAL( clicked() ), SLOT( slotDetails() ) );
101  connect( WUT->ObslistButton, SIGNAL( clicked() ), SLOT( slotObslist() ) );
102  connect( WUT->CategoryListWidget, SIGNAL( currentTextChanged(const QString &) ),
103  SLOT( slotLoadList(const QString &) ) );
104  connect( WUT->ObjectListWidget, SIGNAL( currentTextChanged(const QString &) ),
105  SLOT( slotDisplayObject(const QString &) ) );
106  connect( WUT->EveningMorningBox, SIGNAL( activated(int) ), SLOT( slotEveningMorning(int) ) );
107  connect( WUT->MagnitudeEdit, SIGNAL( valueChanged( double ) ), SLOT( slotChangeMagnitude() ) );
108 }
109 
110 void WUTDialog::initCategories() {
111  m_Categories << i18n( "Planets" ) << i18n( "Stars" )
112  << i18n( "Nebulae" ) << i18n( "Galaxies" )
113  << i18n( "Star Clusters" ) << i18n( "Constellations" )
114  << i18n( "Asteroids" ) << i18n( "Comets" );
115 
116  foreach ( const QString &c, m_Categories )
117  WUT->CategoryListWidget->addItem( c );
118 
119  WUT->CategoryListWidget->setCurrentRow( 0 );
120 }
121 
122 void WUTDialog::init() {
123  QString sRise, sSet, sDuration;
124  float Dur;
125  int hDur,mDur;
126  KStarsData* data = KStarsData::Instance();
127  // reset all lists
128  foreach ( const QString &c, m_Categories ) {
129  if ( m_VisibleList.contains( c ) )
130  visibleObjects( c ).clear();
131  else
132  m_VisibleList[ c ] = QList<SkyObject*>();
133 
134  m_CategoryInitialized[ c ] = false;
135  }
136 
137  // sun almanac information
138  KSSun *oSun = dynamic_cast<KSSun*>( data->objectNamed("Sun") );
139  sunRiseTomorrow = oSun->riseSetTime( TomorrowUT, geo, true );
140  sunSetToday = oSun->riseSetTime( EveningUT, geo, false );
141  sunRiseToday = oSun->riseSetTime( EveningUT, geo, true );
142 
143  //check to see if Sun is circumpolar
144  KSNumbers *num = new KSNumbers( UT0.djd() );
145  KSNumbers *oldNum = new KSNumbers( data->ut().djd() );
146  dms LST = geo->GSTtoLST( T0.gst() );
147 
148  oSun->updateCoords( num, true, geo->lat(), &LST );
149  if ( oSun->checkCircumpolar( geo->lat() ) ) {
150  if ( oSun->alt().Degrees() > 0.0 ) {
151  sRise = i18n( "circumpolar" );
152  sSet = i18n( "circumpolar" );
153  sDuration = "00:00";
154  Dur = hDur = mDur = 0;
155  } else {
156  sRise = i18n( "does not rise" );
157  sSet = i18n( "does not rise" );
158  sDuration = "24:00";
159  Dur = hDur = 24;
160  mDur = 0;
161  }
162  } else {
163  //Round times to the nearest minute by adding 30 seconds to the time
164  sRise = KGlobal::locale()->formatTime( sunRiseTomorrow );
165  sSet = KGlobal::locale()->formatTime( sunSetToday );
166 
167  Dur = 24.0 + (float)sunRiseTomorrow.hour()
168  + (float)sunRiseTomorrow.minute()/60.0
169  + (float)sunRiseTomorrow.second()/3600.0
170  - (float)sunSetToday.hour()
171  - (float)sunSetToday.minute()/60.0
172  - (float)sunSetToday.second()/3600.0;
173  hDur = int(Dur);
174  mDur = int(60.0*(Dur - (float)hDur));
175  QTime tDur( hDur, mDur );
176  sDuration = KGlobal::locale()->formatTime( tDur, false, true );
177  }
178 
179  WUT->SunSetLabel->setText( i18nc( "Sunset at time %1 on date %2", "Sunset: %1 on %2" , sSet, KGlobal::locale()->formatDate( Evening.date(), KLocale::LongDate) ) );
180  WUT->SunRiseLabel->setText( i18nc( "Sunrise at time %1 on date %2", "Sunrise: %1 on %2" , sRise, KGlobal::locale()->formatDate( Tomorrow.date(), KLocale::LongDate) ) );
181  if( Dur == 0 )
182  WUT->NightDurationLabel->setText( i18n("Night duration: %1", sDuration ) );
183  else if( Dur > 1 )
184  WUT->NightDurationLabel->setText( i18n("Night duration: %1 hours", sDuration ) );
185  else if( Dur == 1 )
186  WUT->NightDurationLabel->setText( i18n("Night duration: %1 hour", sDuration ) );
187  else if( mDur > 1 )
188  WUT->NightDurationLabel->setText( i18n("Night duration: %1 minutes", sDuration ) );
189  else if( mDur == 1 )
190  WUT->NightDurationLabel->setText( i18n("Night duration: %1 minute", sDuration ) );
191 
192  // moon almanac information
193  KSMoon *oMoon = dynamic_cast<KSMoon*>( data->objectNamed("Moon") );
194  moonRise = oMoon->riseSetTime( UT0, geo, true );
195  moonSet = oMoon->riseSetTime( UT0, geo, false );
196 
197  //check to see if Moon is circumpolar
198  oMoon->updateCoords( num, true, geo->lat(), &LST );
199  if ( oMoon->checkCircumpolar( geo->lat() ) ) {
200  if ( oMoon->alt().Degrees() > 0.0 ) {
201  sRise = i18n( "circumpolar" );
202  sSet = i18n( "circumpolar" );
203  } else {
204  sRise = i18n( "does not rise" );
205  sSet = i18n( "does not rise" );
206  }
207  } else {
208  //Round times to the nearest minute by adding 30 seconds to the time
209  sRise = KGlobal::locale()->formatTime( moonRise.addSecs(30) );
210  sSet = KGlobal::locale()->formatTime( moonSet.addSecs(30) );
211  }
212 
213  WUT->MoonRiseLabel->setText( i18n( "Moon rises at: %1 on %2", sRise, KGlobal::locale()->formatDate( Evening.date(), KLocale::LongDate) ) );
214 
215  // If the moon rises and sets on the same day, this will be valid [ Unless
216  // the moon sets on the next day after staying on for over 24 hours ]
217  if( moonSet > moonRise )
218  WUT->MoonSetLabel->setText( i18n( "Moon sets at: %1 on %2", sSet, KGlobal::locale()->formatDate( Evening.date(), KLocale::LongDate) ) );
219  else
220  WUT->MoonSetLabel->setText( i18n( "Moon sets at: %1 on %2", sSet, KGlobal::locale()->formatDate( Tomorrow.date(), KLocale::LongDate) ) );
221  oMoon->findPhase();
222  WUT->MoonIllumLabel->setText( oMoon->phaseName() + QString( " (%1%)" ).arg(
223  int(100.0*oMoon->illum() ) ) );
224 
225  //Restore Sun's and Moon's coordinates, and recompute Moon's original Phase
226  oMoon->updateCoords( oldNum, true, geo->lat(), data->lst() );
227  oSun->updateCoords( oldNum, true, geo->lat(), data->lst() );
228  oMoon->findPhase();
229 
230  if ( WUT->CategoryListWidget->currentItem() )
231  slotLoadList( WUT->CategoryListWidget->currentItem()->text() );
232 
233  delete num;
234  delete oldNum;
235 }
236 
237 QList<SkyObject*>& WUTDialog::visibleObjects( const QString &category ) {
238  return m_VisibleList[ category ];
239 }
240 
241 bool WUTDialog::isCategoryInitialized( const QString &category ) {
242  return m_CategoryInitialized[ category ];
243 }
244 
245 void WUTDialog::slotLoadList( const QString &c ) {
246  KStarsData* data = KStarsData::Instance();
247  if ( ! m_VisibleList.contains( c ) )
248  return;
249 
250  WUT->ObjectListWidget->clear();
251  setCursor(QCursor(Qt::WaitCursor));
252 
253  if ( ! isCategoryInitialized(c) ) {
254 
255  if ( c == m_Categories[0] ) { //Planets
256  foreach ( const QString &name, data->skyComposite()->objectNames( SkyObject::PLANET ) ) {
257  SkyObject *o = data->skyComposite()->findByName( name );
258 
259  if ( checkVisibility( o ) && o->mag() <= m_Mag )
260  visibleObjects(c).append(o);
261  }
262 
263  m_CategoryInitialized[ c ] = true;
264  }
265 
266  else if ( c == m_Categories[1] ) { //Stars
267  foreach ( SkyObject *o, data->skyComposite()->stars() )
268  if ( o->name() != i18n("star") && checkVisibility(o) && o->mag() <= m_Mag )
269  visibleObjects(c).append(o);
270 
271  m_CategoryInitialized[ c ] = true;
272  }
273 
274  else if ( c == m_Categories[5] ) { //Constellations
275  foreach ( SkyObject *o, data->skyComposite()->constellationNames() )
276  if ( checkVisibility(o) )
277  visibleObjects(c).append(o);
278 
279  m_CategoryInitialized[ c ] = true;
280  }
281 
282  else if ( c == m_Categories[6] ) { //Asteroids
283  foreach ( SkyObject *o, data->skyComposite()->asteroids() )
284  if ( checkVisibility(o) && o->name() != i18n("Pluto") && o->mag() <= m_Mag )
285  visibleObjects(c).append(o);
286 
287  m_CategoryInitialized[ c ] = true;
288  }
289 
290  else if ( c == m_Categories[7] ) { //Comets
291  foreach ( SkyObject *o, data->skyComposite()->comets() )
292  if ( checkVisibility(o) )
293  visibleObjects(c).append(o);
294 
295  m_CategoryInitialized[ c ] = true;
296  }
297 
298  else { //all deep-sky objects, need to split clusters, nebulae and galaxies
299  foreach ( DeepSkyObject *dso, data->skyComposite()->deepSkyObjects() ) {
300  SkyObject *o = (SkyObject*)dso;
301  if ( checkVisibility(o) && o->mag() <= m_Mag ) {
302  switch( o->type() ) {
303  case SkyObject::OPEN_CLUSTER: //fall through
304  case SkyObject::GLOBULAR_CLUSTER:
305  visibleObjects(m_Categories[4]).append(o); //star clusters
306  break;
307  case SkyObject::GASEOUS_NEBULA: //fall through
308  case SkyObject::PLANETARY_NEBULA: //fall through
309  case SkyObject::SUPERNOVA_REMNANT:
310  visibleObjects(m_Categories[2]).append(o); //nebulae
311  break;
312  case SkyObject::GALAXY:
313  visibleObjects(m_Categories[3]).append(o); //galaxies
314  break;
315  }
316  }
317  }
318 
319  m_CategoryInitialized[ m_Categories[2] ] = true;
320  m_CategoryInitialized[ m_Categories[3] ] = true;
321  m_CategoryInitialized[ m_Categories[4] ] = true;
322  }
323  }
324 
325  //Now the category has been initialized, we can populate the list widget
326  foreach ( SkyObject *o, visibleObjects(c) )
327  WUT->ObjectListWidget->addItem( o->name() );
328 
329  setCursor(QCursor(Qt::ArrowCursor));
330 
331  // highlight first item
332  if ( WUT->ObjectListWidget->count() ) {
333  WUT->ObjectListWidget->setCurrentRow( 0 );
334  WUT->ObjectListWidget->setFocus();
335  }
336 }
337 
338 bool WUTDialog::checkVisibility(SkyObject *o) {
339  bool visible( false );
340  double minAlt = 6.0; //An object is considered 'visible' if it is above horizon during civil twilight.
341 
342  // reject objects that never rise
343  if (o->checkCircumpolar(geo->lat()) == true && o->alt().Degrees() <= 0) return false;
344 
345  //Initial values for T1, T2 assume all night option of EveningMorningBox
346  KStarsDateTime T1 = Evening;
347  T1.setTime( sunSetToday );
348  KStarsDateTime T2 = Tomorrow;
349  T2.setTime( sunRiseTomorrow );
350 
351  //Check Evening/Morning only state:
352  if ( EveningFlag==0 ) { //Evening only
353  T2 = T0; //midnight
354  } else if ( EveningFlag==1 ) { //Morning only
355  T1 = T0; //midnight
356  }
357 
358  for ( KStarsDateTime test = T1; test < T2; test = test.addSecs(3600) ) {
359  //Need LST of the test time, expressed as a dms object.
360  KStarsDateTime ut = geo->LTtoUT( test );
361  dms LST = geo->GSTtoLST( ut.gst() );
362  SkyPoint sp = o->recomputeCoords( ut, geo );
363 
364  //check altitude of object at this time.
365  sp.EquatorialToHorizontal( &LST, geo->lat() );
366 
367  if ( sp.alt().Degrees() > minAlt ) {
368  visible = true;
369  break;
370  }
371  }
372 
373  return visible;
374 }
375 
376 void WUTDialog::slotDisplayObject( const QString &name ) {
377  QTime tRise, tSet, tTransit;
378  QString sRise, sTransit, sSet;
379 
380  sRise = "--:--";
381  sTransit = "--:--";
382  sSet = "--:--";
383  WUT->DetailButton->setEnabled( false );
384 
385  SkyObject *o = 0;
386  if ( name.isEmpty() )
387  { //no object selected
388  WUT->ObjectBox->setTitle( i18n( "No Object Selected" ) );
389  o = 0;
390  } else {
391  o = KStarsData::Instance()->objectNamed( name );
392 
393  if ( !o ) { //should never get here
394  WUT->ObjectBox->setTitle( i18n( "Object Not Found" ) );
395  }
396  }
397  if (o) {
398  WUT->ObjectBox->setTitle( o->name() );
399 
400  if ( o->checkCircumpolar( geo->lat() ) ) {
401  if ( o->alt().Degrees() > 0.0 ) {
402  sRise = i18n( "circumpolar" );
403  sSet = i18n( "circumpolar" );
404  } else {
405  sRise = i18n( "does not rise" );
406  sSet = i18n( "does not rise" );
407  }
408  } else {
409  tRise = o->riseSetTime( T0, geo, true );
410  tSet = o->riseSetTime( T0, geo, false );
411  // if ( tSet < tRise )
412  // tSet = o->riseSetTime( JDTomorrow, geo, false );
413 
414  sRise.clear();
415  sRise.sprintf( "%02d:%02d", tRise.hour(), tRise.minute() );
416  sSet.clear();
417  sSet.sprintf( "%02d:%02d", tSet.hour(), tSet.minute() );
418  }
419 
420  tTransit = o->transitTime( T0, geo );
421  // if ( tTransit < tRise )
422  // tTransit = o->transitTime( JDTomorrow, geo );
423 
424  sTransit.clear();
425  sTransit.sprintf( "%02d:%02d", tTransit.hour(), tTransit.minute() );
426 
427  WUT->DetailButton->setEnabled( true );
428  }
429 
430  WUT->ObjectRiseLabel->setText( i18n( "Rises at: %1", sRise ) );
431  WUT->ObjectTransitLabel->setText( i18n( "Transits at: %1", sTransit ) );
432  WUT->ObjectSetLabel->setText( i18n( "Sets at: %1", sSet ) );
433 }
434 
435 void WUTDialog::slotCenter() {
436  KStars* kstars = KStars::Instance();
437  SkyObject *o = 0;
438  // get selected item
439  if (WUT->ObjectListWidget->currentItem() != 0) {
440  o = kstars->data()->objectNamed( WUT->ObjectListWidget->currentItem()->text() );
441  }
442  if (o != 0) {
443  kstars->map()->setFocusPoint( o );
444  kstars->map()->setFocusObject( o );
445  kstars->map()->setDestination( *kstars->map()->focusPoint() );
446  }
447 }
448 
449 void WUTDialog::slotDetails() {
450  KStars* kstars = KStars::Instance();
451  SkyObject *o = 0;
452  // get selected item
453  if (WUT->ObjectListWidget->currentItem() != 0) {
454  o = kstars->data()->objectNamed( WUT->ObjectListWidget->currentItem()->text() );
455  }
456  if (o != 0) {
457  QPointer<DetailDialog> detail = new DetailDialog(o, kstars->data()->lt(), geo, kstars);
458  detail->exec();
459  delete detail;
460  }
461 }
462 void WUTDialog::slotObslist() {
463  KStars* kstars = KStars::Instance();
464  SkyObject *o = 0;
465  // get selected item
466  if (WUT->ObjectListWidget->currentItem() != 0) {
467  o = kstars->data()->objectNamed( WUT->ObjectListWidget->currentItem()->text() );
468  }
469  if(o != 0) {
470  kstars->observingList()->slotAddObject( o, session ) ;
471  }
472 }
473 
474 void WUTDialog::slotChangeDate() {
475 
476  // Set the time T0 to the evening of today. This will make life easier for the user, who most probably
477  // wants to see what's up on the night of some date, rather than the night of the previous day
478  T0.setTime( QTime( 18, 0, 0 ) ); // 6 PM
479 
480  QPointer<TimeDialog> td = new TimeDialog( T0, KStarsData::Instance()->geo(), this );
481  if ( td->exec() == QDialog::Accepted ) {
482  T0 = td->selectedDateTime();
483 
484  // If the time is set to 12 midnight, set it to 00:00:01, so that we don't have date interpretation problems
485  if ( T0.time() == QTime( 0, 0, 0 ) )
486  T0.setTime( QTime( 0, 0, 1 ) );
487 
488  //If the Time is earlier than 6:00 am, assume the user wants the night of the previous date
489  if ( T0.time().hour() < 6 )
490  T0 = T0.addDays( -1 );
491 
492  //Now, set time T0 to midnight (of the following day)
493  T0.setTime( QTime( 0, 0, 0 ) );
494  T0 = T0.addDays( 1 );
495  UT0 = geo->LTtoUT( T0 );
496 
497  //Set the Tomorrow date/time to Noon the following day
498  Tomorrow = T0.addSecs( 12*3600 );
499  TomorrowUT = geo->LTtoUT( Tomorrow );
500 
501  //Set the Evening date/time to 6:00 pm
502  Evening = T0.addSecs( -6*3600 );
503  EveningUT = geo->LTtoUT( Evening );
504 
505  WUT->DateLabel->setText( i18n( "The night of %1", KGlobal::locale()->formatDate( Evening.date(), KLocale::LongDate ) ) );
506 
507  init();
508  slotLoadList( WUT->CategoryListWidget->currentItem()->text() );
509  }
510  delete td;
511 }
512 
513 void WUTDialog::slotChangeLocation() {
514  QPointer<LocationDialog> ld = new LocationDialog( this );
515  if ( ld->exec() == QDialog::Accepted ) {
516  GeoLocation *newGeo = ld->selectedCity();
517  if ( newGeo ) {
518  geo = newGeo;
519  UT0 = geo->LTtoUT( T0 );
520  TomorrowUT = geo->LTtoUT( Tomorrow );
521  EveningUT = geo->LTtoUT( Evening );
522 
523  WUT->LocationLabel->setText( i18n( "at %1", geo->fullName() ) );
524 
525  init();
526  slotLoadList( WUT->CategoryListWidget->currentItem()->text() );
527  }
528  }
529  delete ld;
530 }
531 
532 void WUTDialog::slotEveningMorning( int index ) {
533  if ( EveningFlag != index ) {
534  EveningFlag = index;
535  init();
536  slotLoadList( WUT->CategoryListWidget->currentItem()->text() );
537  }
538 }
539 
540 void WUTDialog::updateMag() {
541  m_Mag = WUT->MagnitudeEdit->value();
542  init();
543  slotLoadList( WUT->CategoryListWidget->currentItem()->text() );
544 }
545 
546 void WUTDialog::slotChangeMagnitude() {
547  if( timer ) {
548  timer->stop();
549  } else {
550  timer = new QTimer( this );
551  timer->setSingleShot( true );
552  connect( timer, SIGNAL( timeout() ), this, SLOT( updateMag() ) );
553  }
554  timer->start( 500 );
555 }
556 #include "wutdialog.moc"
KSMoon::illum
double illum() const
Definition: ksmoon.h:58
LocationDialog
Dialog for changing the geographic location of the observer.
Definition: locationdialog.h:57
DetailDialog
window showing detailed information for a selected object.
Definition: detaildialog.h:88
KStarsData::objectNamed
SkyObject * objectNamed(const QString &name)
Find object by name.
Definition: kstarsdata.cpp:345
KStarsData
KStarsData is the backbone of KStars.
Definition: kstarsdata.h:66
GeoLocation::translatedName
QString translatedName() const
Definition: geolocation.cpp:78
KStars::map
SkyMap * map() const
Definition: kstars.h:134
KSSun
Child class of KSPlanetBase; encapsulates information about the Sun.
Definition: kssun.h:31
WUTDialog::init
void init()
Determine which objects are visible, and store them in an array of lists, classified by object type...
Definition: wutdialog.cpp:122
SkyMap::setFocusObject
void setFocusObject(SkyObject *o)
Set the FocusObject pointer to the argument.
Definition: skymap.cpp:365
SkyMapComposite::asteroids
const QList< SkyObject * > & asteroids() const
Definition: skymapcomposite.cpp:568
detaildialog.h
timedialog.h
KStarsDateTime::addDays
KStarsDateTime addDays(int nd) const
Modify the Date/Time by adding a number of days.
Definition: kstarsdatetime.h:117
SkyMap::setDestination
void setDestination(const SkyPoint &f)
sets the destination point of the sky map.
Definition: skymap.cpp:812
SkyObject::PLANET
Definition: skyobject.h:108
QWidget
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
SkyMapComposite::deepSkyObjects
const QList< DeepSkyObject * > & deepSkyObjects() const
Definition: skymapcomposite.cpp:554
SkyObject::riseSetTime
QTime riseSetTime(const KStarsDateTime &dt, const GeoLocation *geo, bool rst, bool exact=true)
Determine the time at which the point will rise or set.
Definition: skyobject.cpp:105
SkyMapComposite::constellationNames
const QList< SkyObject * > & constellationNames() const
Definition: skymapcomposite.cpp:558
GeoLocation::LTtoUT
KStarsDateTime LTtoUT(const KStarsDateTime &lt) const
Definition: geolocation.h:234
KStars::Instance
static KStars * Instance()
Definition: kstars.h:125
SkyObject::SUPERNOVA_REMNANT
Definition: skyobject.h:109
SkyMap::focusPoint
SkyPoint * focusPoint()
retrieve the FocusPoint position.
Definition: skymap.h:140
SkyObject::GALAXY
Definition: skyobject.h:109
KDialog
SkyObject::transitTime
QTime transitTime(const KStarsDateTime &dt, const GeoLocation *geo)
The same iteration technique described in riseSetTime() is used here.
Definition: skyobject.cpp:241
KStars
This is the main window for KStars.
Definition: kstars.h:94
KStarsDateTime::setTime
void setTime(const QTime &t)
Assign the Time according to a QTime object.
Definition: kstarsdatetime.cpp:133
KSMoon::findPhase
virtual void findPhase(const KSSun *Sun=0)
Determine the phase angle of the moon, and assign the appropriate moon image.
Definition: ksmoon.cpp:243
WUTDialogUI::WUTDialogUI
WUTDialogUI(QWidget *p=0)
Definition: wutdialog.cpp:42
TimeDialog
A class for adjusting the Time and Date.
Definition: timedialog.h:47
GeoLocation::translatedProvince
QString translatedProvince() const
Definition: geolocation.cpp:88
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
SkyPoint::checkCircumpolar
bool checkCircumpolar(const dms *gLat)
Check if this point is circumpolar at the given geographic latitude.
Definition: skypoint.cpp:750
WUTDialog::checkVisibility
bool checkVisibility(SkyObject *o)
Check visibility of object o the object to check.
Definition: wutdialog.cpp:338
skymapcomposite.h
KStarsData::lt
const KStarsDateTime & lt() const
Definition: kstarsdata.h:137
KStars::observingList
ObservingList * observingList() const
Definition: kstars.h:136
locationdialog.h
GeoLocation
Contains all relevant information for specifying a location on Earth: City Name, State/Province name...
Definition: geolocation.h:39
SkyMapComposite::comets
const QList< SkyObject * > & comets() const
Definition: skymapcomposite.cpp:572
KStarsDateTime::djd
long double djd() const
Definition: kstarsdatetime.h:145
KStarsDateTime::addSecs
KStarsDateTime addSecs(double s) const
Definition: kstarsdatetime.cpp:127
skymap.h
i18nc
i18nc("string from libindi, used in the config dialog","100x")
SkyMapComposite::stars
const QList< SkyObject * > & stars() const
Definition: skymapcomposite.cpp:563
WUTDialog::~WUTDialog
~WUTDialog()
Destructor.
Definition: wutdialog.cpp:93
KStarsDateTime
Extension of KDateTime for KStars KStarsDateTime can represent the date/time as a Julian Day...
Definition: kstarsdatetime.h:45
ksnumbers.h
KStarsData::skyComposite
SkyMapComposite * skyComposite()
Definition: kstarsdata.h:146
dms
An angle, stored as degrees, but expressible in many ways.
Definition: dms.h:42
simclock.h
KSPlanetBase::updateCoords
virtual void updateCoords(KSNumbers *num, bool includePlanets=true, const dms *lat=0, const dms *LST=0, bool forceRecompute=false)
Update position of the planet (reimplemented from SkyPoint)
Definition: ksplanetbase.cpp:105
WUTDialog::WUTDialog
WUTDialog(QWidget *ks, bool session=false, GeoLocation *geo=KStarsData::Instance() ->geo(), KStarsDateTime lt=KStarsData::Instance() ->lt())
Constructor.
Definition: wutdialog.cpp:46
KSMoon::phaseName
QString phaseName() const
Definition: ksmoon.cpp:256
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
SkyObject::mag
float mag(void) const
Definition: skyobject.h:182
DeepSkyObject
Provides all necessary information about a deep-sky object: data inherited from SkyObject (coordinate...
Definition: deepskyobject.h:43
KSNumbers
There are several time-dependent values used in position calculations, that are not specific to an ob...
Definition: ksnumbers.h:43
WUTDialogUI
Definition: wutdialog.h:32
kssun.h
KSMoon
A subclass of SkyObject that provides information needed for the Moon.
Definition: ksmoon.h:36
SkyObject::recomputeCoords
SkyPoint recomputeCoords(const KStarsDateTime &dt, const GeoLocation *geo=0)
The coordinates for the object on date dt are computed and returned, but the object's internal coordi...
Definition: skyobject.cpp:296
SkyObject::type
int type(void) const
Definition: skyobject.h:164
NaN::ld
const long double ld
Definition: nan.h:37
ksmoon.h
SkyObject::PLANETARY_NEBULA
Definition: skyobject.h:109
SkyMapComposite::findByName
virtual SkyObject * findByName(const QString &name)
Search the children of this SkyMapComposite for a SkyObject whose name matches the argument...
Definition: skymapcomposite.cpp:426
KStars::data
KStarsData * data() const
Definition: kstars.h:131
kstarsdata.h
KStarsData::ut
const KStarsDateTime & ut() const
Definition: kstarsdata.h:140
SkyObject::GASEOUS_NEBULA
Definition: skyobject.h:109
SkyPoint::alt
const dms & alt() const
Definition: skypoint.h:180
SkyObject::name
virtual QString name(void) const
Definition: skyobject.h:124
SkyObject::GLOBULAR_CLUSTER
Definition: skyobject.h:108
SkyMap::setFocusPoint
void setFocusPoint(SkyPoint *f)
set the FocusPoint; the position that is to be the next Destination.
Definition: skymap.h:191
SkyComponent::objectNames
QHash< int, QStringList > & objectNames()
Definition: skycomponent.h:127
KStarsDateTime::gst
dms gst() const
Definition: kstarsdatetime.cpp:138
GeoLocation::translatedCountry
QString translatedCountry() const
Definition: geolocation.cpp:92
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
QFrame
SkyObject::OPEN_CLUSTER
Definition: skyobject.h:108
kstars.h
wutdialog.h
QList
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