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

Akarsh Simha akarshsimha at gmail.com
Wed Dec 23 00:31:08 CET 2009


SVN commit 1065300 by asimha:

Remove Saturn moons feature as it contained code that amounted to
copyright infringement.

Many apologies to the rightful owner of copyright for carelessly
having commited this.

Will backport to 4.3

CCMAIL: kstars-devel at kde.org



 M  +0 -1      CMakeLists.txt  
 M  +9 -5      skycomponents/planetmoonscomponent.cpp  
 M  +0 -4      skycomponents/solarsystemcomposite.cpp  
 M  +0 -2      skycomponents/solarsystemcomposite.h  
 D             skyobjects/saturnmoons.cpp  
 D             skyobjects/saturnmoons.h  


--- trunk/KDE/kdeedu/kstars/kstars/CMakeLists.txt #1065299:1065300
@@ -249,7 +249,6 @@
 set(kstars_skyobjects_SRCS
   skyobjects/deepskyobject.cpp
   skyobjects/jupitermoons.cpp
-  skyobjects/saturnmoons.cpp
   skyobjects/planetmoons.cpp
   skyobjects/ksasteroid.cpp
   skyobjects/kscomet.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/planetmoonscomponent.cpp #1065299:1065300
@@ -21,7 +21,6 @@
 #include <QPoint>
 #include <QPainter>
 
-#include "skyobjects/saturnmoons.h"
 #include "skyobjects/jupitermoons.h"
 #include "skyobjects/ksplanetbase.h"
 #include "kstarsdata.h"
@@ -50,11 +49,15 @@
 
 void PlanetMoonsComponent::init()
 {
+    /*
     if (planet == KSPlanetBase::JUPITER)
         pmoons = new JupiterMoons();
     else
         pmoons = new SaturnMoons();
-
+    */
+    Q_ASSERT( planet == KSPlanetBase::JUPITER );
+    delete pmoons;
+    pmoons = new JupiterMoons();
     int nmoons = pmoons->nMoons();
     for ( int i=0; i<nmoons; ++i ) 
         objectNames(SkyObject::MOON).append( pmoons->name(i) );
@@ -153,7 +156,7 @@
 
 void PlanetMoonsComponent::draw( QPainter& psky )
 {
-    if ( !( (planet == KSPlanetBase::SATURN && Options::showSaturn() ) || (planet == KSPlanetBase::JUPITER && Options::showJupiter() ) ) ) return;
+    if ( !(planet == KSPlanetBase::JUPITER && Options::showJupiter() ) ) return;
 
     SkyMap *map = SkyMap::Instance();
 
@@ -198,11 +201,12 @@
         QPointF o = map->toScreen( pmoons->moon(i) );
 
         if ( ! map->onScreen( o ) ) continue;
-
+        /*
         if (planet ==KSPlanetBase::SATURN)
 	  SkyLabeler::AddLabel( o, pmoons->moon(i), SkyLabeler::SATURN_MOON_LABEL );
 	else
-	  SkyLabeler::AddLabel( o, pmoons->moon(i), SkyLabeler::JUPITER_MOON_LABEL );
+        */
+        SkyLabeler::AddLabel( o, pmoons->moon(i), SkyLabeler::JUPITER_MOON_LABEL );
     }
 }
 
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/solarsystemcomposite.cpp #1065299:1065300
@@ -55,8 +55,6 @@
     addComponent( m_JupiterMoons );
     SolarSystemSingleComponent *sat = new SolarSystemSingleComponent( this, new KSPlanet( KSPlanetBase::SATURN ), Options::showSaturn, 4 );
     addComponent( sat );
-    m_SaturnMoons = new PlanetMoonsComponent( this, sat, KSPlanetBase::SATURN, &Options::showSaturn);
-    addComponent( m_SaturnMoons );
     addComponent( new SolarSystemSingleComponent( this, new KSPlanet( KSPlanetBase::URANUS ), Options::showUranus, 4 ) );
     addComponent( new SolarSystemSingleComponent( this, new KSPlanet( KSPlanetBase::NEPTUNE ), Options::showNeptune, 4 ) );
     addComponent( new SolarSystemSingleComponent( this, new KSPluto(), Options::showPluto, 4 ) );
@@ -97,7 +95,6 @@
     m_Sun->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
     m_Moon->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
     m_JupiterMoons->update( num );
-    m_SaturnMoons->update( num );
 
     foreach ( SkyComponent *comp, components() ) {
         comp->update( num );
@@ -120,7 +117,6 @@
     m_Moon->findPosition( num, data->geo()->lat(), data->lst() );
     m_Moon->findPhase();
     m_JupiterMoons->updateMoons( num );
-    m_SaturnMoons->updateMoons( num );
 }
 
 void SolarSystemComposite::draw( QPainter& psky )
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/solarsystemcomposite.h #1065299:1065300
@@ -25,7 +25,6 @@
 class KSSun;
 class KSMoon;
 class JupiterMoonsComponent;
-class SaturnMoonsComponent;
 class AsteroidsComponent;
 class CometsComponent;
 class SkyLabeler;
@@ -72,7 +71,6 @@
     KSSun *m_Sun;
     KSMoon *m_Moon;
     PlanetMoonsComponent *m_JupiterMoons;
-    PlanetMoonsComponent *m_SaturnMoons;
     AsteroidsComponent *m_AsteroidsComponent;
     CometsComponent *m_CometsComponent;
     SkyLabeler* m_skyLabeler;


More information about the Kstars-devel mailing list