• 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
kspopupmenu.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  kspopupmenu.cpp - K Desktop Planetarium
3  -------------------
4  begin : Sat Feb 27 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 #include "kspopupmenu.h"
19 
20 #include <QSignalMapper>
21 
22 #include <KGlobal>
23 #include <KLocale>
24 
25 #include "kstars.h"
26 #include "kstarsdata.h"
27 #include "skyobjects/skyobject.h"
28 #include "skyobjects/starobject.h"
29 #include "skyobjects/trailobject.h"
30 #include "skyobjects/deepskyobject.h"
31 #include "skyobjects/ksmoon.h"
32 #include "skyobjects/satellite.h"
33 #include "skyobjects/supernova.h"
34 #include "skycomponents/skymapcomposite.h"
35 #include "skycomponents/flagcomponent.h"
36 #include "skymap.h"
37 
38 #include <config-kstars.h>
39 
40 #ifdef HAVE_INDI_H
41 #include "indi/indilistener.h"
42 #include "indi/guimanager.h"
43 #include "indi/driverinfo.h"
44 #include "indi/indistd.h"
45 #include "indi/indidevice.h"
46 #include "indi/indigroup.h"
47 #include "indi/indiproperty.h"
48 #include "indi/indielement.h"
49 #include <basedevice.h>
50 #endif
51 
52 #include "skycomponents/constellationboundarylines.h"
53 
54 
55 namespace {
56  // Convert magnitude to string representation for QLabel
57  QString magToStr(double m) {
58  return QString("%1<sup>m</sup>").arg(m, 0, 'f', 2);
59  }
60 
61  // Return object name
62  QString getObjectName(SkyObject *obj) {
63  // FIXME: make logic less convoluted.
64  if( obj->longname() != obj->name() ) { // Object has proper name
65  return obj->translatedLongName() + ", " + obj->translatedName();
66  } else {
67  if( !obj->translatedName2().isEmpty() )
68  return obj->translatedName() + ", " + obj->translatedName2();
69  else
70  return obj->translatedName();
71  }
72  }
73 
74  // String representation for rise/set time of object. If object
75  // doesn't rise/set returns descriptive string.
76  //
77  // Second parameter choose between raise and set. 'true' for
78  // raise, 'false' for set.
79  QString riseSetTimeLabel(SkyObject* o, bool isRaise) {
80  KStarsData* data = KStarsData::Instance();
81  QTime t = o->riseSetTime( data->ut(), data->geo(), isRaise );
82  if ( t.isValid() ) {
83  //We can round to the nearest minute by simply adding 30 seconds to the time.
84  QString time = KGlobal::locale()->formatTime( t.addSecs(30) );
85  return isRaise ?
86  i18n ("Rise time: %1", time) :
87  i18nc("the time at which an object falls below the horizon", "Set time: %1" , time);
88  }
89  if( o->alt().Degrees() > 0 )
90  return isRaise ? i18n( "No rise time: Circumpolar" ) : i18n( "No set time: Circumpolar" );
91  else
92  return isRaise ? i18n( "No rise time: Never rises" ) : i18n( "No set time: Never rises" );
93  }
94 
95  // String representation for transit time for object
96  QString transitTimeLabel(SkyObject* o) {
97  KStarsData* data = KStarsData::Instance();
98  QTime t = o->transitTime( data->ut(), data->geo() );
99  if ( t.isValid() )
100  //We can round to the nearest minute by simply adding 30 seconds to the time.
101  return i18n( "Transit time: %1", KGlobal::locale()->formatTime( t.addSecs(30) ) );
102  else
103  return "--:--";
104  }
105 
106 }
107 
108 
109 KSPopupMenu::KSPopupMenu()
110  : KMenu( KStars::Instance() ), m_CurrentFlagIdx(-1), m_EditActionMapping(0), m_DeleteActionMapping(0)
111 {}
112 
113 KSPopupMenu::~KSPopupMenu()
114 {
115  if(m_EditActionMapping) {
116  delete m_EditActionMapping;
117  }
118 
119  if(m_DeleteActionMapping) {
120  delete m_DeleteActionMapping;
121  }
122 }
123 
124 void KSPopupMenu::createEmptyMenu( SkyPoint *nullObj ) {
125  KStars* ks = KStars::Instance();
126  SkyObject o( SkyObject::TYPE_UNKNOWN, nullObj->ra(), nullObj->dec() );
127  o.setAlt( nullObj->alt() );
128  o.setAz( nullObj->az() );
129  initPopupMenu( &o, i18n( "Empty sky" ), QString(), QString(), false, false );
130  addAction( i18nc( "Sloan Digital Sky Survey", "Show SDSS Image" ), ks->map(), SLOT( slotSDSS() ) );
131  addAction( i18nc( "Digitized Sky Survey", "Show DSS Image" ), ks->map(), SLOT( slotDSS() ) );
132 }
133 
134 void KSPopupMenu::slotEditFlag() {
135  if ( m_CurrentFlagIdx != -1 ) {
136  KStars::Instance()->map()->slotEditFlag( m_CurrentFlagIdx );
137  }
138 }
139 
140 void KSPopupMenu::slotDeleteFlag() {
141  if ( m_CurrentFlagIdx != -1 ) {
142  KStars::Instance()->map()->slotDeleteFlag( m_CurrentFlagIdx );
143  }
144 }
145 
146 void KSPopupMenu::slotEditFlag( QAction *action ) {
147  int idx = m_EditActionMapping->value( action, -1 );
148 
149  if ( idx == -1 ) {
150  return;
151  }
152 
153  else {
154  KStars::Instance()->map()->slotEditFlag( idx );
155  }
156 }
157 
158 void KSPopupMenu::slotDeleteFlag( QAction *action ) {
159  int idx = m_DeleteActionMapping->value( action, -1 );
160 
161  if ( idx == -1 ) {
162  return;
163  }
164 
165  else {
166  KStars::Instance()->map()->slotDeleteFlag( idx );
167  }
168 }
169 
170 void KSPopupMenu::createStarMenu( StarObject *star ) {
171  KStars* ks = KStars::Instance();
172  //Add name, rise/set time, center/track, and detail-window items
173  QString name;
174  if( star->name() != "star" ) {
175  name = star->translatedLongName();
176  } else {
177  if( star->getHDIndex() ) {
178  name = QString( "HD%1" ).arg( QString::number( star->getHDIndex() ) );
179  } else {
180  // FIXME: this should be some catalog name too
181  name = "Star";
182  }
183  }
184  initPopupMenu( star, name, i18n( "star" ), i18n("%1<sup>m</sup>, %2", star->mag(), star->sptype()) );
185  //If the star is named, add custom items to popup menu based on object's ImageList and InfoList
186  if ( star->name() != "star" ) {
187  addLinksToMenu( star );
188  } else {
189  addAction( i18nc( "Sloan Digital Sky Survey", "Show SDSS Image" ), ks->map(), SLOT( slotSDSS() ) );
190  addAction( i18nc( "Digitized Sky Survey", "Show DSS Image" ), ks->map(), SLOT( slotDSS() ) );
191  }
192 }
193 
194 void KSPopupMenu::createDeepSkyObjectMenu( DeepSkyObject *obj ) {
195  QString name = getObjectName(obj);
196  QString typeName = obj->typeName();
197  // FIXME: information about angular sizes should be added.
198  QString info = magToStr( obj->mag() );
199  initPopupMenu( obj, name, typeName, info );
200  addLinksToMenu( obj );
201 }
202 
203 void KSPopupMenu::createPlanetMenu( SkyObject *p ) {
204  QString info = magToStr( p->mag() );
205  QString type = i18n("Solar system object");;
206  initPopupMenu( p, p->translatedName(), type, info);
207  addLinksToMenu( p, false ); //don't offer DSS images for planets
208 }
209 
210 void KSPopupMenu::createMoonMenu( KSMoon *moon ) {
211  QString info = QString("%1, %2").arg( magToStr(moon->mag()), moon->phaseName() );
212  initPopupMenu( moon, moon->translatedName(), QString(), info);
213  addLinksToMenu( moon, false ); //don't offer DSS images for planets
214 }
215 
216 void KSPopupMenu::createSatelliteMenu( Satellite *satellite ) {
217  KStars* ks = KStars::Instance();
218  QString velocity, altitude, range;
219  velocity.setNum( satellite->velocity() );
220  altitude.setNum( satellite->altitude() );
221  range.setNum( satellite->range() );
222 
223  clear();
224 
225  addFancyLabel( satellite->name() );
226  addFancyLabel( satellite->id() );
227  addFancyLabel( i18n( "satellite" ) );
228  addFancyLabel( KStarsData::Instance()->skyComposite()->getConstellationBoundary()->constellationName( satellite ) );
229 
230  addSeparator();
231 
232  addFancyLabel( i18n( "Velocity : %1 km/s", velocity ), -2 );
233  addFancyLabel( i18n( "Altitude : %1 km", altitude ), -2 );
234  addFancyLabel( i18n( "Range : %1 km", range ), -2 );
235 
236  addSeparator();
237 
238  //Insert item for centering on object
239  addAction( i18n( "Center && Track" ), ks->map(), SLOT( slotCenter() ) );
240  //Insert item for measuring distances
241  //FIXME: add key shortcut to menu items properly!
242  addAction( i18n( "Angular Distance To... [" ), ks->map(),
243  SLOT(slotBeginAngularDistance()) );
244  addAction( i18n( "Starhop from here to... " ), ks->map(),
245  SLOT(slotBeginStarHop()) );
246 
247  //Insert "Add/Remove Label" item
248  if ( ks->map()->isObjectLabeled( satellite ) )
249  addAction( i18n( "Remove Label" ), ks->map(), SLOT( slotRemoveObjectLabel() ) );
250  else
251  addAction( i18n( "Attach Label" ), ks->map(), SLOT( slotAddObjectLabel() ) );
252 }
253 
254 void KSPopupMenu::createSupernovaMenu(Supernova* supernova)
255 {
256  QString name=supernova->name();
257  float mag = supernova->mag();
258  QString type = supernova->getType();
259  initPopupMenu( supernova, name, i18n( "supernova" ), i18n("%1<sup>m</sup>, %2", mag, type) );
260 }
261 
262 void KSPopupMenu::initPopupMenu( SkyObject *obj, QString name, QString type, QString info,
263  bool showDetails, bool showObsList, bool showFlags )
264 {
265  KStars* ks = KStars::Instance();
266 
267  clear();
268  bool showLabel = name != i18n("star") && !name.isEmpty();
269  if( name.isEmpty() )
270  name = i18n( "Empty sky" );
271 
272  addFancyLabel( name );
273  addFancyLabel( type );
274  addFancyLabel( info );
275  addFancyLabel( KStarsData::Instance()->skyComposite()->getConstellationBoundary()->constellationName( obj ) );
276 
277  //Insert Rise/Set/Transit labels
278  SkyObject* o = obj->clone();
279  addSeparator();
280  addFancyLabel( riseSetTimeLabel(o, true), -2 );
281  addFancyLabel( riseSetTimeLabel(o, false), -2 );
282  addFancyLabel( transitTimeLabel(o), -2 );
283  addSeparator();
284  delete o;
285 
286  // Show 'Select this object' item when in object pointing mode and when obj is not empty sky
287  if(KStars::Instance()->map()->isInObjectPointingMode() && obj->type() != 21) {
288  addAction( i18n( "Select this object"), KStars::Instance()->map(), SLOT(slotObjectSelected()));
289  }
290 
291  //Insert item for centering on object
292  addAction( i18n( "Center && Track" ), ks->map(), SLOT( slotCenter() ) );
293 
294  if ( showFlags ) {
295  //Insert actions for flag operations
296  initFlagActions( obj );
297  }
298 
299  //Insert item for measuring distances
300  //FIXME: add key shortcut to menu items properly!
301  addAction( i18n( "Angular Distance To... [" ), ks->map(),
302  SLOT(slotBeginAngularDistance()) );
303  addAction( i18n( "Starhop from here to... " ), ks->map(),
304  SLOT(slotBeginStarHop()) );
305 
306  //Insert item for Showing details dialog
307  if ( showDetails )
308  addAction( i18nc( "Show Detailed Information Dialog", "Details" ), ks->map(), SLOT( slotDetail() ) );
309  //Insert "Add/Remove Label" item
310  if ( showLabel ) {
311  if ( ks->map()->isObjectLabeled( obj ) ) {
312  addAction( i18n( "Remove Label" ), ks->map(), SLOT( slotRemoveObjectLabel() ) );
313  } else {
314  addAction( i18n( "Attach Label" ), ks->map(), SLOT( slotAddObjectLabel() ) );
315  }
316  }
317  // Should show observing list
318  if( showObsList ) {
319  if ( ks->observingList()->contains( obj ) )
320  addAction( i18n("Remove From Observing WishList"), ks->observingList(), SLOT( slotRemoveObject() ) );
321  else
322  addAction( i18n("Add to Observing WishList"), ks->observingList(), SLOT( slotAddObject() ) );
323  }
324  // Should we show trail actions
325  TrailObject* t = dynamic_cast<TrailObject*>( obj );
326  if( t ) {
327  if( t->hasTrail() )
328  addAction( i18n( "Remove Trail" ), ks->map(), SLOT( slotRemovePlanetTrail() ) );
329  else
330  addAction( i18n( "Add Trail" ), ks->map(), SLOT( slotAddPlanetTrail() ) );
331  }
332 
333  addSeparator();
334 #ifdef HAVE_XPLANET
335  if ( obj->isSolarSystem() && obj->type() != SkyObject::COMET ) { // FIXME: We now have asteroids -- so should this not be isMajorPlanet() || Pluto?
336  QMenu *xplanetSubmenu = new QMenu();
337  xplanetSubmenu->setTitle( i18n( "Print Xplanet view" ) );
338  xplanetSubmenu->addAction( i18n( "To screen" ), ks->map(), SLOT( slotXplanetToScreen() ) );
339  xplanetSubmenu->addAction( i18n( "To file..." ), ks->map(), SLOT( slotXplanetToFile() ) );
340  addMenu( xplanetSubmenu );
341  }
342 #endif
343  addSeparator();
344  addINDI();
345 }
346 
347 void KSPopupMenu::initFlagActions( SkyObject *obj ) {
348  KStars *ks = KStars::Instance();
349 
350  QList<int> flags = ks->data()->skyComposite()->flags()->getFlagsNearPix( obj, 5 );
351 
352  if ( flags.size() == 0 ) {
353  // There is no flag around clicked SkyObject
354  addAction( i18n( "Add flag..."), ks->map(), SLOT( slotAddFlag() ) );
355  }
356 
357  else if( flags.size() == 1) {
358  // There is only one flag around clicked SkyObject
359  addAction ( i18n ("Edit flag"), this, SLOT( slotEditFlag() ) );
360  addAction ( i18n ("Delete flag"), this, SLOT( slotDeleteFlag() ) );
361 
362  m_CurrentFlagIdx = flags.first();
363  }
364 
365  else {
366  // There are more than one flags around clicked SkyObject - we need to create submenus
367  QMenu *editMenu = new QMenu ( i18n ( "Edit flag..."), KStars::Instance() );
368  QMenu *deleteMenu = new QMenu ( i18n ( "Delete flag..."), KStars::Instance() );
369 
370  connect( editMenu, SIGNAL( triggered(QAction*) ), this, SLOT( slotEditFlag(QAction*) ) );
371  connect( deleteMenu, SIGNAL( triggered(QAction*) ), this, SLOT( slotDeleteFlag(QAction*) ) );
372 
373  if ( m_EditActionMapping ) {
374  delete m_EditActionMapping;
375  }
376 
377  if ( m_DeleteActionMapping ) {
378  delete m_DeleteActionMapping;
379  }
380 
381  m_EditActionMapping = new QHash<QAction*, int>;
382  m_DeleteActionMapping = new QHash<QAction*, int>;
383 
384  foreach ( int idx, flags ) {
385  QIcon flagIcon( QPixmap::fromImage( ks->data()->skyComposite()->flags()->image( idx ) ) );
386 
387  QString flagLabel = ks->data()->skyComposite()->flags()->label( idx );
388  if ( flagLabel.size() > 35 ) {
389  flagLabel = flagLabel.left( 35 );
390  flagLabel.append( "..." );
391  }
392 
393  QAction *editAction = new QAction( flagIcon, flagLabel, ks );
394  editAction->setIconVisibleInMenu( true );
395  editMenu->addAction( editAction );
396  m_EditActionMapping->insert( editAction, idx );
397 
398  QAction *deleteAction = new QAction( flagIcon, flagLabel, ks );
399  deleteAction->setIconVisibleInMenu( true );
400  deleteMenu->addAction( deleteAction );
401  m_DeleteActionMapping->insert( deleteAction, idx);
402  }
403 
404  addMenu( editMenu );
405  addMenu( deleteMenu );
406  }
407 }
408 
409 void KSPopupMenu::addLinksToMenu( SkyObject *obj, bool showDSS ) {
410  KStars* ks = KStars::Instance();
411  QString sURL;
412  QStringList::ConstIterator itList, itTitle, itListEnd;
413 
414  itList = obj->ImageList().constBegin();
415  itTitle = obj->ImageTitle().constBegin();
416  itListEnd = obj->ImageList().constEnd();
417  if( ! obj->ImageList().isEmpty() ) {
418  QMenu *imageLinkSubMenu= new QMenu();
419  imageLinkSubMenu->setTitle( i18n( "Image Resources" ) );
420  for ( ; itList != itListEnd; ++itList ) {
421  QString t = QString(*itTitle);
422  sURL = QString(*itList);
423  imageLinkSubMenu->addAction( i18nc( "Image/info menu item (should be translated)", t.toLocal8Bit() ), ks->map(), SLOT( slotImage() ) );
424  ++itTitle;
425  }
426  addMenu( imageLinkSubMenu );
427  }
428 
429  if ( showDSS ) {
430  addAction( i18nc( "Sloan Digital Sky Survey", "Show SDSS Image" ), ks->map(), SLOT( slotSDSS() ) );
431  addAction( i18nc( "Digitized Sky Survey", "Show DSS Image" ), ks->map(), SLOT( slotDSS() ) );
432  }
433 
434  if( showDSS )
435  addSeparator();
436 
437  itList = obj->InfoList().constBegin();
438  itTitle = obj->InfoTitle().constBegin();
439  itListEnd = obj->InfoList().constEnd();
440 
441  if( ! obj->InfoList().isEmpty() ) {
442  QMenu *infoLinkSubMenu= new QMenu();
443  infoLinkSubMenu->setTitle( i18n( "Information Resources" ) );
444  for ( ; itList != itListEnd; ++itList ) {
445  QString t = QString(*itTitle);
446  sURL = QString(*itList);
447  infoLinkSubMenu->addAction( i18nc( "Image/info menu item (should be translated)", t.toLocal8Bit() ), ks->map(), SLOT( slotInfo() ) );
448  ++itTitle;
449  }
450  addMenu( infoLinkSubMenu );
451  }
452 }
453 
454 void KSPopupMenu::addINDI()
455 {
456 #ifdef HAVE_INDI_H
457 
458  if (INDIListener::Instance()->size() == 0)
459  return;
460 
461  foreach(ISD::GDInterface *gd, INDIListener::Instance()->getDevices())
462  {
463  INDI::BaseDevice *bd = gd->getBaseDevice();
464 
465  if (bd == NULL)
466  continue;
467 
468  //if (bd->isConnected() == false)
469  // continue;
470 
471  KMenu* menuDevice = NULL;
472  ISD::GDInterface *telescope = NULL;
473 
474  foreach(INDI::Property *pp, gd->getProperties())
475  {
476  if (pp->getType() != INDI_SWITCH || INDIListener::Instance()->isStandardProperty(pp->getName()) == false)
477  continue;
478 
479  QSignalMapper *sMapper = new QSignalMapper(this);
480 
481  ISwitchVectorProperty *svp = pp->getSwitch();
482 
483  for (int i=0; i < svp->nsp; i++)
484  {
485  if (menuDevice == NULL)
486  {
487  menuDevice = new KMenu(gd->getDeviceName());
488  addMenu(menuDevice);
489  }
490 
491  QAction *a = menuDevice->addAction(svp->sp[i].label);
492 
493  ISD::GDSetCommand *cmd = new ISD::GDSetCommand(INDI_SWITCH, pp->getName(), svp->sp[i].name, ISS_ON, this);
494 
495  sMapper->setMapping(a, cmd);
496 
497  connect(a, SIGNAL(triggered()), sMapper, SLOT(map()));
498 
499  if (!strcmp(svp->sp[i].name, "SLEW") || !strcmp(svp->sp[i].name, "SYNC") || !strcmp(svp->sp[i].name, "TRACK"))
500  {
501  telescope = INDIListener::Instance()->getDevice(gd->getDeviceName());
502 
503  if (telescope)
504  {
505 
506  QSignalMapper *scopeMapper = new QSignalMapper(this);
507  scopeMapper->setMapping(a, INDI_SEND_COORDS);
508 
509  connect(a, SIGNAL(triggered()), scopeMapper, SLOT(map()));
510 
511  connect(scopeMapper, SIGNAL(mapped(int)), telescope, SLOT(runCommand(int)));
512  }
513 
514  }
515 
516  }
517 
518  connect(sMapper, SIGNAL(mapped(QObject*)), gd, SLOT(setProperty(QObject*)));
519 
520  menuDevice->addSeparator();
521 
522  }
523 
524 
525  if (telescope && menuDevice)
526  {
527  menuDevice->addSeparator();
528 
529  QAction *a = menuDevice->addAction(i18n("Center Crosshair"));
530 
531  QSignalMapper *scopeMapper = new QSignalMapper(this);
532  scopeMapper->setMapping(a, INDI_ENGAGE_TRACKING);
533  connect(a, SIGNAL(triggered()), scopeMapper, SLOT(map()));
534  connect(scopeMapper, SIGNAL(mapped(int)), telescope, SLOT(runCommand(int)));
535  }
536  }
537 
538 #endif
539 }
540 
541 
542 void KSPopupMenu::addFancyLabel(QString name, int deltaFontSize) {
543  if( name.isEmpty() )
544  return;
545  QLabel* label = new QLabel( "<b>"+name+"</b>", this );
546  label->setAlignment( Qt::AlignHCenter | Qt::AlignVCenter );
547  if( deltaFontSize != 0 ) {
548  QFont font = label->font();
549  font.setPointSize( font.pointSize() + deltaFontSize );
550  label->setFont( font );
551  }
552  KAction* act = new KAction( this );
553  act->setDefaultWidget( label );
554  addAction( act );
555 }
556 #include "kspopupmenu.moc"
TrailObject::hasTrail
bool hasTrail() const
Definition: trailobject.h:46
SkyPoint::ra
const dms & ra() const
Definition: skypoint.h:171
indilistener.h
KStarsData
KStarsData is the backbone of KStars.
Definition: kstarsdata.h:66
supernova.h
INDI_ENGAGE_TRACKING
Definition: indicommon.h:72
SkyPoint::az
const dms & az() const
Definition: skypoint.h:177
KStars::map
SkyMap * map() const
Definition: kstars.h:134
SkyObject::translatedName
QString translatedName() const
Definition: skyobject.h:129
KSPopupMenu::createPlanetMenu
void createPlanetMenu(SkyObject *p)
Create a popup menu for a solar system body.
Definition: kspopupmenu.cpp:203
Satellite::altitude
double altitude()
Definition: satellite.cpp:1220
SkyObject::TYPE_UNKNOWN
Definition: skyobject.h:112
StarObject::sptype
QString sptype(void) const
Returns entire spectral type string.
Definition: starobject.cpp:340
INDIListener::Instance
static INDIListener * Instance()
Definition: indilistener.cpp:46
skyobject.h
Satellite::id
QString id()
Definition: satellite.cpp:1230
deepskyobject.h
ISD::GDInterface::getBaseDevice
virtual INDI::BaseDevice * getBaseDevice()=0
KMenu
SkyObject::longname
virtual QString longname(void) const
Definition: skyobject.h:140
KSPopupMenu::addLinksToMenu
void addLinksToMenu(SkyObject *obj, bool showDSS=true)
Add an item to the popup menu for each of the URL links associated with this object.
Definition: kspopupmenu.cpp:409
SkyPoint::setAz
void setAz(dms az)
Sets Az, the Azimuth.
Definition: skypoint.h:152
KStarsData::Instance
static KStarsData * Instance()
Definition: kstarsdata.h:92
dms::Degrees
const double & Degrees() const
Definition: dms.h:98
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
ISD::GDInterface::getDeviceName
virtual const char * getDeviceName()=0
KStars::Instance
static KStars * Instance()
Definition: kstars.h:125
ISD::GDSetCommand
Definition: indistd.h:34
indidevice.h
KStarsData::geo
GeoLocation * geo()
Definition: kstarsdata.h:164
KSPopupMenu::createEmptyMenu
void createEmptyMenu(SkyPoint *nullObj)
Create a popup menu for empty sky.
Definition: kspopupmenu.cpp:124
QObject
SkyObject::transitTime
QTime transitTime(const KStarsDateTime &dt, const GeoLocation *geo)
The same iteration technique described in riseSetTime() is used here.
Definition: skyobject.cpp:241
KSPopupMenu::createDeepSkyObjectMenu
void createDeepSkyObjectMenu(DeepSkyObject *obj)
Create a popup menu for a deep-sky object.
Definition: kspopupmenu.cpp:194
KStars
This is the main window for KStars.
Definition: kstars.h:94
SkyObject::COMET
Definition: skyobject.h:110
SkyObject::InfoList
QStringList & InfoList()
Definition: skyobject.h:309
guimanager.h
driverinfo.h
kspopupmenu.h
FlagComponent::image
QImage image(int index)
Get image.
Definition: flagcomponent.cpp:241
SkyPoint
The sky coordinates of a point in the sky.
Definition: skypoint.h:50
INDIListener::getDevice
ISD::GDInterface * getDevice(const QString &name)
Definition: indilistener.cpp:70
SkyMapComposite::flags
FlagComponent * flags()
Definition: skymapcomposite.cpp:605
SkyMap::slotDeleteFlag
void slotDeleteFlag(int flagIdx)
Delete selected flag.
Definition: skymap.cpp:631
KSPopupMenu::createMoonMenu
void createMoonMenu(KSMoon *moon)
Definition: kspopupmenu.cpp:210
skymapcomposite.h
KStars::observingList
ObservingList * observingList() const
Definition: kstars.h:136
Supernova::getType
QString getType()
Definition: supernova.h:78
SkyObject::ImageList
QStringList & ImageList()
Definition: skyobject.h:299
FlagComponent::label
QString label(int index)
Get label.
Definition: flagcomponent.cpp:225
Supernova
Represents the supernova object.
Definition: supernova.h:44
StarObject::getHDIndex
int getHDIndex() const
Definition: starobject.h:226
skymap.h
i18nc
i18nc("string from libindi, used in the config dialog","100x")
INDIListener::isStandardProperty
bool isStandardProperty(const QString &name)
Definition: indilistener.cpp:61
SkyObject::isSolarSystem
bool isSolarSystem() const
Definition: skyobject.h:197
SkyObject::translatedLongName
QString translatedLongName() const
Definition: skyobject.h:145
trailobject.h
KStarsData::skyComposite
SkyMapComposite * skyComposite()
Definition: kstarsdata.h:146
KSPopupMenu::createStarMenu
void createStarMenu(StarObject *star)
Create a popup menu for a star.
Definition: kspopupmenu.cpp:170
KSPopupMenu::KSPopupMenu
KSPopupMenu()
Default constructor.
Definition: kspopupmenu.cpp:109
SkyPoint::dec
const dms & dec() const
Definition: skypoint.h:174
KSMoon::phaseName
QString phaseName() const
Definition: ksmoon.cpp:256
constellationboundarylines.h
SkyMap::isObjectLabeled
bool isObjectLabeled(SkyObject *o)
Definition: skymap.cpp:701
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
SkyObject::InfoTitle
QStringList & InfoTitle()
Definition: skyobject.h:314
SkyObject::clone
virtual SkyObject * clone() const
Create copy of object.
Definition: skyobject.cpp:76
KSMoon
A subclass of SkyObject that provides information needed for the Moon.
Definition: ksmoon.h:36
SkyObject::type
int type(void) const
Definition: skyobject.h:164
QLabel
satellite.h
KSPopupMenu::createSupernovaMenu
void createSupernovaMenu(Supernova *supernova)
Create a popup menu for a supernova.
Definition: kspopupmenu.cpp:254
TrailObject
provides a SkyObject with an attachable Trail
Definition: trailobject.h:33
ksmoon.h
SkyMap::slotEditFlag
void slotEditFlag(int flagIdx)
Open Flag Manager window with selected flag focused and ready to edit.
Definition: skymap.cpp:623
starobject.h
KSPopupMenu::createSatelliteMenu
void createSatelliteMenu(Satellite *satellite)
Create a popup menu for a satellite.
Definition: kspopupmenu.cpp:216
indistd.h
KStars::data
KStarsData * data() const
Definition: kstars.h:131
SkyObject::translatedName2
QString translatedName2() const
Definition: skyobject.h:135
Satellite
Represents an artificial satellites.
Definition: satellite.h:35
Satellite::range
double range()
Definition: satellite.cpp:1225
SkyPoint::setAlt
void setAlt(dms alt)
Sets Alt, the Altitude.
Definition: skypoint.h:141
kstarsdata.h
KStarsData::ut
const KStarsDateTime & ut() const
Definition: kstarsdata.h:140
SkyPoint::alt
const dms & alt() const
Definition: skypoint.h:180
ISD::GDInterface::getProperties
virtual QList< INDI::Property * > getProperties()=0
indiproperty.h
SkyObject::name
virtual QString name(void) const
Definition: skyobject.h:124
StarObject::name
virtual QString name(void) const
If star is unnamed return "star" otherwise return the name.
Definition: starobject.h:131
INDI_SEND_COORDS
Definition: indicommon.h:72
StarObject
This is a subclass of SkyObject.
Definition: starobject.h:41
SkyObject::typeName
static QString typeName(const int t)
Definition: skyobject.cpp:319
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
SkyObject::ImageTitle
QStringList & ImageTitle()
Definition: skyobject.h:304
Supernova::name
virtual QString name(void) const
Definition: supernova.h:58
flagcomponent.h
indigroup.h
kstars.h
ISD::GDInterface
Definition: indistd.h:48
indielement.h
KSPopupMenu::~KSPopupMenu
~KSPopupMenu()
Destructor (empty)
Definition: kspopupmenu.cpp:113
QList
Satellite::velocity
double velocity()
Definition: satellite.cpp:1215
FlagComponent::getFlagsNearPix
QList< int > getFlagsNearPix(SkyPoint *point, int pixelRadius)
Get list of flag indexes near specified SkyPoint with radius specified in pixels. ...
Definition: flagcomponent.cpp:269
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:36:20 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