[kde-doc-english] [kstars] kstars: Add an option to show Eyepiece View from the Sky map popup menu

Akarsh Simha akarsh at kde.org
Tue Jan 12 11:00:48 UTC 2016


Git commit 2bf12da1e949ba4001905b023ad55dedd353fa5d by Akarsh Simha.
Committed on 12/01/2016 at 10:40.
Pushed by asimha into branch 'master'.

Add an option to show Eyepiece View from the Sky map popup menu

The user can now right-click anywhere on the sky map and request that
the eyepiece view be rendered. The option is titled "Simulate eyepiece
view".

GUI: Adding an option to show eyepiece view from the KStars popup menu

M  +2    -0    kstars/kspopupmenu.cpp
M  +3    -0    kstars/skymap.cpp
M  +3    -0    kstars/skymap.h

http://commits.kde.org/kstars/2bf12da1e949ba4001905b023ad55dedd353fa5d

diff --git a/kstars/kspopupmenu.cpp b/kstars/kspopupmenu.cpp
index 4a4cbb4..be17323 100644
--- a/kstars/kspopupmenu.cpp
+++ b/kstars/kspopupmenu.cpp
@@ -337,6 +337,8 @@ void KSPopupMenu::initPopupMenu( SkyObject *obj, QString name, QString type, QSt
             addAction( i18n( "Add Trail" ), map, SLOT( slotAddPlanetTrail() ) );
     }
 
+    addAction( i18n("Simulate eyepiece view"), map, SLOT( slotEyepieceView() ) );
+
     addSeparator();
 #ifdef HAVE_XPLANET
     if ( obj->isSolarSystem() && obj->type() != SkyObject::COMET ) { // FIXME: We now have asteroids -- so should this not be isMajorPlanet() || Pluto?
diff --git a/kstars/skymap.cpp b/kstars/skymap.cpp
index 9f45b9c..740fad0 100644
--- a/kstars/skymap.cpp
+++ b/kstars/skymap.cpp
@@ -500,6 +500,9 @@ void SkyMap::slotSDSS() {
     }
 }
 
+void SkyMap::slotEyepieceView() {
+    KStars::Instance()->slotEyepieceView( ( clickedObject() ? clickedObject() : clickedPoint() ) );
+}
 void SkyMap::slotBeginAngularDistance() {
     beginRulerMode( false );
 }
diff --git a/kstars/skymap.h b/kstars/skymap.h
index 72297c9..13a5144 100644
--- a/kstars/skymap.h
+++ b/kstars/skymap.h
@@ -444,6 +444,9 @@ public slots:
     void slotXplanetToFile();
 #endif
 
+    /** Render eyepiece view */
+    void slotEyepieceView();
+
     /** Zoom in one step. */
     void slotZoomIn();
 



More information about the kde-doc-english mailing list