[Kstars-devel] KDE/kdeedu/kstars/kstars
Akarsh Simha
akarshsimha at gmail.com
Sun Mar 22 21:34:43 CET 2009
SVN commit 942890 by asimha:
Merging Vipul Kumar Singh's contribution of adding Saturn's moons into
KStars
Thanks for the great contribution Vipul!
CCMAIL: kstars-devel at kde.org
M +2 -0 CMakeLists.txt
M +7 -0 skycomponents/skylabeler.cpp
M +1 -0 skycomponents/skylabeler.h
M +1 -0 skycomponents/skymapcomposite.cpp
M +1 -1 skycomponents/skymapcomposite.h
M +7 -2 skycomponents/solarsystemcomposite.cpp
M +2 -0 skycomponents/solarsystemcomposite.h
--- trunk/KDE/kdeedu/kstars/kstars/CMakeLists.txt #942889:942890
@@ -188,6 +188,7 @@
skycomponents/asteroidscomponent.cpp
skycomponents/cometscomponent.cpp
skycomponents/jupitermoonscomponent.cpp
+ skycomponents/saturnmoonscomponent.cpp
skycomponents/solarsystemcomposite.cpp
skycomponents/satellitecomposite.cpp
skycomponents/satellitecomponent.cpp
@@ -251,6 +252,7 @@
set(kstars_skyobjects_SRCS
skyobjects/deepskyobject.cpp
skyobjects/jupitermoons.cpp
+ skyobjects/saturnmoons.cpp
skyobjects/ksasteroid.cpp
skyobjects/kscomet.cpp
skyobjects/ksmoon.cpp
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skylabeler.cpp #942889:942890
@@ -428,6 +428,12 @@
psky.setPen( QColor( data->colorScheme()->colorNamed( "PNameColor" ) ) );
drawQueuedLabelsType( psky, PLANET_LABEL );
+ if ( labelList[ SATURN_MOON_LABEL ].size() > 0 ) {
+ shrinkFont( psky, 2 );
+ drawQueuedLabelsType( psky, SATURN_MOON_LABEL );
+ resetFont( psky );
+ }
+
if ( labelList[ JUPITER_MOON_LABEL ].size() > 0 ) {
shrinkFont( psky, 2 );
drawQueuedLabelsType( psky, JUPITER_MOON_LABEL );
@@ -480,6 +486,7 @@
labelName[ COMET_LABEL ] = "Comet";
labelName[ PLANET_LABEL ] = "Planet";
labelName[ JUPITER_MOON_LABEL ] = "Jupiter Moon";
+ labelName[ SATURN_MOON_LABEL ] = "Saturn Moon";
labelName[ DEEP_SKY_LABEL ] = "Deep Sky Object";
labelName[ CONSTEL_NAME_LABEL ] = "Constellation Name";
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skylabeler.h #942889:942890
@@ -121,6 +121,7 @@
COMET_LABEL,
PLANET_LABEL,
JUPITER_MOON_LABEL,
+ SATURN_MOON_LABEL,
DEEP_SKY_LABEL,
CONSTEL_NAME_LABEL,
NUM_LABEL_TYPES
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymapcomposite.cpp #942889:942890
@@ -39,6 +39,7 @@
#include "ecliptic.h"
#include "horizoncomponent.h"
#include "jupitermoonscomponent.h"
+#include "saturnmoonscomponent.h"
#include "milkyway.h"
#include "magellanicclouds.h"
#include "solarsystemcomposite.h"
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/skymapcomposite.h #942889:942890
@@ -84,7 +84,7 @@
*Planet positions change over time, so they need to be recomputed
*periodically, but not on every call to update(). This function
*will recompute the positions of all solar system bodies except the
- *Earth's Moon and Jupiter's Moons (because these objects' positions
+ *Earth's Moon, Jupiter's Moons AND Saturn Moons (because these objects' positions
*change on a much more rapid timescale).
*@p data Pointer to the KStarsData object
*@p num Pointer to the KSNumbers object
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/solarsystemcomposite.cpp #942889:942890
@@ -34,8 +34,8 @@
#include "skyobjects/ksmoon.h"
#include "skyobjects/kspluto.h"
#include "jupitermoonscomponent.h"
+#include "saturnmoonscomponent.h"
-
SolarSystemComposite::SolarSystemComposite(SkyComponent *parent, KStarsData *data )
: SkyComposite(parent)
{
@@ -53,7 +53,10 @@
addComponent( jup );
m_JupiterMoons = new JupiterMoonsComponent( this, jup, &Options::showJupiter);
addComponent( m_JupiterMoons );
- addComponent( new SolarSystemSingleComponent( this, new KSPlanet( data, KSPlanetBase::SATURN ), Options::showSaturn, 4 ) );
+ SolarSystemSingleComponent *sat = new SolarSystemSingleComponent( this, new KSPlanet( data, KSPlanetBase::SATURN ), Options::showSaturn, 4 );
+ addComponent( sat );
+ m_SaturnMoons = new SaturnMoonsComponent( this, sat, &Options::showSaturn);
+ addComponent( m_SaturnMoons );
addComponent( new SolarSystemSingleComponent( this, new KSPlanet( data, KSPlanetBase::URANUS ), Options::showUranus, 4 ) );
addComponent( new SolarSystemSingleComponent( this, new KSPlanet( data, KSPlanetBase::NEPTUNE ), Options::showNeptune, 4 ) );
addComponent( new SolarSystemSingleComponent( this, new KSPluto(data), Options::showPluto, 4 ) );
@@ -93,6 +96,7 @@
m_Sun->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
m_Moon->EquatorialToHorizontal( data->lst(), data->geo()->lat() );
m_JupiterMoons->update( data, num );
+ m_SaturnMoons->update( data, num );
foreach ( SkyComponent *comp, components() ) {
comp->update( data, num );
@@ -117,6 +121,7 @@
m_Moon->findPosition( num, data->geo()->lat(), data->lst() );
m_Moon->findPhase();
m_JupiterMoons->updateMoons( data, num );
+ m_SaturnMoons->updateMoons( data, num );
}
void SolarSystemComposite::draw( QPainter& psky )
--- trunk/KDE/kdeedu/kstars/kstars/skycomponents/solarsystemcomposite.h #942889:942890
@@ -24,6 +24,7 @@
class KSSun;
class KSMoon;
class JupiterMoonsComponent;
+class SaturnMoonsComponent;
class AsteroidsComponent;
class CometsComponent;
class SkyLabeler;
@@ -70,6 +71,7 @@
KSSun *m_Sun;
KSMoon *m_Moon;
JupiterMoonsComponent *m_JupiterMoons;
+ SaturnMoonsComponent *m_SaturnMoons;
AsteroidsComponent *m_AsteroidsComponent;
CometsComponent *m_CometsComponent;
SkyLabeler* m_skyLabeler;
More information about the Kstars-devel
mailing list