• Skip to content
  • Skip to link menu
KDE 3.5 API Reference
  • KDE API Reference
  • API Reference
  • Sitemap
  • Contact Us
 

kstars

KSPopupMenu Class Reference

The KStars Popup Menu. More...

#include <kspopupmenu.h>

Inheritance diagram for KSPopupMenu:

Inheritance graph
[legend]

List of all members.


Public Member Functions

bool addINDI (void)
void addLinksToMenu (SkyObject *obj, bool showDSS=true, bool allowCustom=true)
void createCustomObjectMenu (SkyObject *obj)
void createDeepSkyObjectMenu (SkyObject *obj)
void createEmptyMenu (SkyObject *nullObj=0)
void createPlanetMenu (SkyObject *p)
void createStarMenu (StarObject *star)
void initPopupMenu (SkyObject *obj, QString name1, QString name2, QString type, bool showRiseSet=true, bool showCenterTrack=true, bool showDetails=true, bool showTrail=false, bool addTrail=false, bool showAngularDistance=true, bool showObsList=true)
 KSPopupMenu (QWidget *parent=0, const char *name=0)
void setRiseSetLabels (SkyObject *obj)
 ~KSPopupMenu ()

Detailed Description

The KStars Popup Menu.

The menu is sensitive to the object type of the object which was clicked to invoke the menu. Items in the menu include name and type data; rise/transit/set times; actions such as Center, Details, Telescope actions, and Label; and Image and Information URL links.

Author:
Jason Harris
Version:
1.0

Definition at line 39 of file kspopupmenu.h.


Constructor & Destructor Documentation

KSPopupMenu::KSPopupMenu ( QWidget *  parent = 0,
const char *  name = 0 
)

Default constructor.

Definition at line 35 of file kspopupmenu.cpp.

KSPopupMenu::~KSPopupMenu (  ) 

Destructor (empty).

Definition at line 41 of file kspopupmenu.cpp.


Member Function Documentation

bool KSPopupMenu::addINDI ( void   ) 

Add a submenu for INDI controls (Slew, Track, Sync, etc).

Returns:
true if a valid INDI menu was added.

Definition at line 136 of file kspopupmenu.cpp.

void KSPopupMenu::addLinksToMenu ( SkyObject *  obj,
bool  showDSS = true,
bool  allowCustom = true 
)

Add an item to the popup menu for each of the URL links associated with this object.

URL links appear in two categories: images and information pages. For some objects, a link to Digitized Sky Survey images will automatically be added in addition to the object's normal image links. Also, for some objects, an "Add link..." item will be included, which allows the user to add their own cutsom URLs for this object.

Parameters:
obj pointer to the skyobject which the menu describes
showDSS if TRUE, include DSS Image links
allowCustom if TRUE, include the "Add Link..." item

Definition at line 95 of file kspopupmenu.cpp.

void KSPopupMenu::createCustomObjectMenu ( SkyObject *  obj  ) 

Create a popup menu for a custom-catalog object.

For now, this behaves essentially like the createDeepSkyObjectMenu() function, except that adding custom links is (temporarily?) disabled.

Parameters:
obj pointer to the custom catalog object which the menu describes

Definition at line 75 of file kspopupmenu.cpp.

void KSPopupMenu::createDeepSkyObjectMenu ( SkyObject *  obj  ) 

Create a popup menu for a deep-sky object.

DSOs get the following labels: a common name and/or a catalog name, an object type, and rise/transit/set times. DSOs get a "Center & Track" item, an Angular Distance item, an "Attach Label" item, and a "Detailed Info" item. They may have image/info links, and also get the DSS Image links and the "Add Link..." item. They do not get an "Add Trail" item.

Parameters:
obj pointer to the object which the menu describes

Definition at line 66 of file kspopupmenu.cpp.

void KSPopupMenu::createEmptyMenu ( SkyObject *  nullObj = 0  ) 

Create a popup menu for empty sky.

The popup menu when right-clicking on nothing is still useful. Instead of a name label, it shows "Empty Sky". The rise/set/transit times of the clicked point on the sky are also shown. You also get the Center & Track and Angular Distance items, and the DSS image links.

Parameters:
nullObj pointer to dummy SkyObject, just to hold the clicked coordinates for passing to initPopupMenu().

Definition at line 45 of file kspopupmenu.cpp.

void KSPopupMenu::createPlanetMenu ( SkyObject *  p  ) 

Create a popup menu for a solar system body.

Solar System bodies get a name label, a type label ("solar system"), and rise/set/transit time labels. They also get Center&Track, Angular Distance, Detailed Info, Attach Label, and Add Trail items. They can have image/info links, and also get the "Add Link..." item.

Note:
despite the name "createPlanetMenu", this function is used for comets and asteroids as well.
Parameters:
p the solar system object which the menu describes.

Definition at line 85 of file kspopupmenu.cpp.

void KSPopupMenu::createStarMenu ( StarObject *  star  ) 

Create a popup menu for a star.

Stars get the following labels: a primary name and/or a genetive name, a spectral type, an object type ("star"), and rise/transit/set times. Stars get a "Center & Track" item, an Angular Distance item, and a "Detailed Info" item. Named stars get an "Attach Label" item and an "Add Link..." item, and may have image/info links; all stars get DSS image links. Stars do not get an "Add Trail" item.

Parameters:
star pointer to the star which the menu describes

Definition at line 52 of file kspopupmenu.cpp.

void KSPopupMenu::initPopupMenu ( SkyObject *  obj,
QString  name1,
QString  name2,
QString  type,
bool  showRiseSet = true,
bool  showCenterTrack = true,
bool  showDetails = true,
bool  showTrail = false,
bool  addTrail = false,
bool  showAngularDistance = true,
bool  showObsList = true 
)

Initialize the popup menus.

Adds name and type labels, and possibly Rise/Set/Transit labels, Center/Track item, and Show Details item. initialize the right-click popup menu

Parameters:
obj pointer to the skyobject which the menu describes
name1 The primary object name
name2 The (optional) secondary object name
type a string identifying the object type
showRiseSet if true, the Rise/Set/Transit labels are added
showCenterTrack if true, the Center/Track item is added
showDetails if true, the Show-Details item is added
showTrail if true, the add/remove planet trail item is added
addTrail if true, the add/remove planet trail item reads "Add Trail" if false, it reads "Remove Trail".
showAngularDistance if true, the Angular Distance item is added.
showObsList if true, the Add to List/Remove from List item is added.

Definition at line 229 of file kspopupmenu.cpp.

void KSPopupMenu::setRiseSetLabels ( SkyObject *  obj  ) 

Set the rise/transit/set time labels for the object.

Compute these times for the object for the current date and location. If the object is circumpolar or never rises, the rise and set labels will indicate this (but the transit time should always be valid).

Parameters:
obj the skyobject whose r/t/s times are to be displayed.

Definition at line 343 of file kspopupmenu.cpp.


The documentation for this class was generated from the following files:
  • kspopupmenu.h
  • kspopupmenu.cpp

kstars

Skip menu "kstars"
  • Main Page
  • Modules
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Class Members
  • Related Pages

API Reference

Skip menu "API Reference"
  • keduca
  • kstars
Generated for API Reference by doxygen 1.5.9
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal