• 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
obslistpopupmenu.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  obslistpopupmenu.h - K Desktop Planetarium
3  -------------------
4  begin : Sun July 5 2009
5  copyright : (C) 2008 by Prakash Mohan
6  email : prakash.mohan@kdemail.net
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 "obslistpopupmenu.h"
19 
20 #include <KGlobal>
21 #include <KLocale>
22 
23 #include "kstars.h"
24 #include "kstarsdata.h"
25 #include "skyobjects/skyobject.h"
26 
27 #include <config-kstars.h>
28 
29 ObsListPopupMenu::ObsListPopupMenu()
30  : KMenu( 0 )
31 {}
32 
33 ObsListPopupMenu::~ObsListPopupMenu() { }
34 
35 void ObsListPopupMenu::initPopupMenu( bool showAddToSession,
36  bool showCenter,
37  bool showDetails,
38  bool showScope,
39  bool showRemove,
40  bool showLinks,
41  bool sessionView )
42 {
43  KStars* ks = KStars::Instance();
44 
45  clear();
46  //Insert item for adding the object to the session view
47  if( showAddToSession )
48  addAction( i18n( "Add to session plan" ), ks->observingList(), SLOT( slotAddToSession() ) );
49  if( !sessionView )
50  addAction( i18n( "Add objects visible tonight to session plan" ), ks->observingList(), SLOT( slotAddVisibleObj() ) );
51  addSeparator();
52  //Insert item for centering on object
53  if( showCenter )
54  addAction( i18n( "Center" ), ks->observingList(), SLOT( slotCenterObject() ) );
55  //Insert item for Slewing to the object
56  if( showScope )
57  addAction( i18nc( "Show the selected object in the telescope", "Scope" ), ks->observingList(), SLOT( slotSlewToObject() ) );
58  addSeparator();
59  //Insert item for Showing details dialog
60  if( showDetails )
61  addAction( i18nc( "Show Detailed Information Dialog", "Details" ), ks->observingList(), SLOT( slotDetails() ) );
62  //Insert item for opening the Altitude vs time dialog
63  addAction( i18n( "Altitude vs. Time" ), ks->observingList(), SLOT( slotAVT() ) );
64  addSeparator();
65  //Insert item for dowloading different images
66  if( showLinks ) {
67  if( ! ks->observingList()->currentObject()->isSolarSystem() ) {
68  addAction( i18n( "Show SDSS image" ), ks->observingList(), SLOT( slotGetImage() ) );
69  addAction( i18n( "Show DSS image" ), ks->observingList(), SLOT( slotDSS() ) );
70  }
71  addAction( i18n( "Show images from web " ), ks->observingList(), SLOT( slotGoogleImage() ) );
72  addSeparator();
73  }
74  //Insert item for Removing the object(s)
75  if( showRemove ) {
76  if( ! sessionView )
77  addAction( i18n("Remove from WishList"), ks->observingList(), SLOT( slotRemoveSelectedObjects() ) );
78  else
79  addAction( i18n("Remove from Session Plan"), ks->observingList(), SLOT( slotRemoveSelectedObjects() ) );
80  }
81 }
82 
83 #include "obslistpopupmenu.moc"
skyobject.h
KMenu
KStars::Instance
static KStars * Instance()
Definition: kstars.h:125
obslistpopupmenu.h
KStars
This is the main window for KStars.
Definition: kstars.h:94
ObsListPopupMenu::initPopupMenu
void initPopupMenu(bool showAddToSession=false, bool showCenter=false, bool showDetails=false, bool showScope=false, bool showRemove=false, bool showLinks=false, bool sessionView=false)
Initialize the popup menus.
Definition: obslistpopupmenu.cpp:35
KStars::observingList
ObservingList * observingList() const
Definition: kstars.h:136
i18nc
i18nc("string from libindi, used in the config dialog","100x")
ObsListPopupMenu::~ObsListPopupMenu
virtual ~ObsListPopupMenu()
Destructor (empty)
Definition: obslistpopupmenu.cpp:33
ObsListPopupMenu::ObsListPopupMenu
ObsListPopupMenu()
Default constructor.
Definition: obslistpopupmenu.cpp:29
kstarsdata.h
kstars.h
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