[Kstars-devel] KDE/kdeedu/kstars/kstars

Alexey Khudyakov alexey.skladnoy at gmail.com
Sun Aug 16 12:30:42 CEST 2009


SVN commit 1011910 by khudyakov:

Remove unused data memebers from SkyMap

I'm surpised to find that their name is legion

CCMAIL: kstars-devel at kde.org

 M  +1 -12     skymap.h  
 M  +8 -17     skymapdraw.cpp  


--- trunk/KDE/kdeedu/kstars/kstars/skymap.h #1011909:1011910
@@ -323,8 +323,6 @@
     	*The variables set by setMapGeometry are:
     	*@li isPoleVisible true if a coordinate Pole is on-screen
     	*@li XMax the horizontal center-to-edge angular distance
-    	*@li guideXMax a version of XMax used for guide lines (same as XMax at low zoom; 2x XMAX otherwise)
-    	*@li guideFOV similar to guideXMax, but for the vertical direction.
     	*@see SkyMap::checkVisibility()
     	*@see SkyMap::paintEvent()
     	*/
@@ -333,8 +331,6 @@
     /** Set zoom factor. */
     void setZoomFactor(double factor);
 
-    float guideMaxLength() const { return m_Guidemax; }
-
     /**@short Call keyPressEvent, as if the key given as an argument had been pressed. */
     void invokeKey( int key );
 
@@ -887,9 +883,7 @@
     bool slewing, clockSlewing;
     bool computeSkymap;  //if false only old pixmap will repainted with bitBlt(), this saves a lot of cpu usage
     bool angularDistanceMode;
-    int idSolInfo, idMessHST, idMoonInfo, idMoonImages, idMessInfo, idNGCHST;
     int scrollCount;
-    double Range;
     double RefractCorr1[184], RefractCorr2[184];
     double y0;
 
@@ -897,13 +891,8 @@
 
     //data for checkVisibility
     bool isPoleVisible;
-    float m_Guidemax;
-    float guideFOV;
-    double XRange, Ymax;
-    double guideXRange;
+    double XRange;
 
-    QString sURL;
-
     KStars *ks;
     KStarsData *data;
     KSPopupMenu *pmenu;
--- trunk/KDE/kdeedu/kstars/kstars/skymapdraw.cpp #1011909:1011910
@@ -17,8 +17,8 @@
 
 //This file contains drawing functions SkyMap class.
 
-#include <stdlib.h> // abs
-#include <math.h> //log10()
+#include <cstdlib> // abs
+#include <cmath>   // log10()
 #include <iostream>
 
 #include <QPainter>
@@ -33,10 +33,6 @@
 #include "skyobjects/deepskyobject.h"
 #include "skyobjects/starobject.h"
 #include "skyobjects/ksplanetbase.h"
-#include "skyobjects/ksasteroid.h"
-#include "skyobjects/kscomet.h"
-#include "skyobjects/ksmoon.h"
-#include "skyobjects/jupitermoons.h"
 #include "infoboxes.h"
 #include "simclock.h"
 #include "observinglist.h"
@@ -335,8 +331,10 @@
             if ( obj->name() == i18n( "Neptune" ) && ! Options::showNeptune() ) continue;
             if ( obj->name() == i18n( "Pluto" ) && ! Options::showPluto() ) continue;
         }
-        if ( obj->type() >= SkyObject::OPEN_CLUSTER && obj->type() <= SkyObject::GALAXY 
-             || obj->type() >= SkyObject::ASTERISM || obj->type() <= SkyObject::QUASAR ) {
+        if ( (obj->type() >= SkyObject::OPEN_CLUSTER && obj->type() <= SkyObject::GALAXY) ||
+             (obj->type() >= SkyObject::ASTERISM) ||
+             (obj->type() <= SkyObject::QUASAR) )
+        {
             if ( ((DeepSkyObject*)obj)->isCatalogM() && ! drawMessier ) continue;
             if ( ((DeepSkyObject*)obj)->isCatalogNGC() && ! drawNGC ) continue;
             if ( ((DeepSkyObject*)obj)->isCatalogIC() && ! drawIC ) continue;
@@ -611,9 +609,7 @@
 }
 
 void SkyMap::setMapGeometry() {
-    m_Guidemax = Options::zoomFactor()/10.0;
-
-    isPoleVisible = false;
+    double Ymax;
     if ( Options::useAltAz() ) {
         XRange = 1.2*fov()/cos( focus()->alt()->radians() );
         Ymax = fabs( focus()->alt()->Degrees() ) + fov();
@@ -621,10 +617,5 @@
         XRange = 1.2*fov()/cos( focus()->dec()->radians() );
         Ymax = fabs( focus()->dec()->Degrees() ) + fov();
     }
-    if ( Ymax >= 90. ) isPoleVisible = true;
-
-    //at high zoom, double FOV for guide lines so they don't disappear.
-    guideFOV = fov();
-    guideXRange = XRange;
-    if ( Options::zoomFactor() > 10.*MINZOOM ) { guideFOV *= 2.0; guideXRange *= 2.0; }
+    isPoleVisible = Ymax >= 90.0;
 }


More information about the Kstars-devel mailing list