[Kstars-devel] branches/kstars/summer/kstars/kstars/tools
Prakash Mohan
prak902000 at gmail.com
Mon Jun 15 22:28:23 CEST 2009
SVN commit 982419 by prakash:
Arranging the Categories list in a more meaningful order for the Magnitude filter. Asteroids are seldom observed and Comets magnitude is not available for most of the comets, so pushing them down the list.
CCMAIL: kstars-devel at kde.org
M +22 -22 wutdialog.cpp
--- branches/kstars/summer/kstars/kstars/tools/wutdialog.cpp #982418:982419
@@ -78,7 +78,7 @@
sGeo += ", " + geo->translatedCountry();
WUT->LocationLabel->setText( i18n( "at %1", sGeo ) );
WUT->DateLabel->setText( i18n( "The night of %1", KGlobal::locale()->formatDate( Evening.date(), KLocale::LongDate ) ) );
- m_Mag = 6.0;
+ m_Mag = 10.0;
WUT->MagnitudeEdit->setValue( m_Mag );
initCategories();
@@ -105,10 +105,10 @@
}
void WUTDialog::initCategories() {
- m_Categories << i18n( "Planets" ) << i18n( "Comets" )
- << i18n( "Asteroids" ) << i18n( "Stars" )
- << i18n( "Constellations" ) << i18n( "Star Clusters" )
- << i18n( "Nebulae" ) << i18n( "Galaxies" );
+ m_Categories << i18n( "Planets" ) << i18n( "Stars" )
+ << i18n( "Nebulae" ) << i18n( "Galaxies" )
+ << i18n( "Star Clusters" ) << i18n( "Constellations" )
+ << i18n( "Asteroids" ) << i18n( "Comets" );
foreach ( const QString &c, m_Categories )
WUT->CategoryListWidget->addItem( c );
@@ -238,32 +238,32 @@
m_CategoryInitialized[ c ] = true;
}
- else if ( c == m_Categories[1] ) { //Comets
- foreach ( SkyObject *o, kstars->data()->skyComposite()->comets() )
- if ( checkVisibility(o) )
+ else if ( c == m_Categories[1] ) { //Stars
+ foreach ( SkyObject *o, kstars->data()->skyComposite()->stars() )
+ if ( o->name() != i18n("star") && checkVisibility(o) && o->mag() <= m_Mag )
visibleObjects(c).append(o);
m_CategoryInitialized[ c ] = true;
}
- else if ( c == m_Categories[2] ) { //Asteroids
- foreach ( SkyObject *o, kstars->data()->skyComposite()->asteroids() )
- if ( checkVisibility(o) && o->name() != i18n("Pluto") && o->mag() <= m_Mag )
+ else if ( c == m_Categories[5] ) { //Constellations
+ foreach ( SkyObject *o, kstars->data()->skyComposite()->constellationNames() )
+ if ( checkVisibility(o) )
visibleObjects(c).append(o);
m_CategoryInitialized[ c ] = true;
}
- else if ( c == m_Categories[3] ) { //Stars
- foreach ( SkyObject *o, kstars->data()->skyComposite()->stars() )
- if ( o->name() != i18n("star") && checkVisibility(o) && o->mag() <= m_Mag )
+ else if ( c == m_Categories[6] ) { //Asteroids
+ foreach ( SkyObject *o, kstars->data()->skyComposite()->asteroids() )
+ if ( checkVisibility(o) && o->name() != i18n("Pluto") && o->mag() <= m_Mag )
visibleObjects(c).append(o);
m_CategoryInitialized[ c ] = true;
}
- else if ( c == m_Categories[4] ) { //Constellations
- foreach ( SkyObject *o, kstars->data()->skyComposite()->constellationNames() )
+ else if ( c == m_Categories[7] ) { //Comets
+ foreach ( SkyObject *o, kstars->data()->skyComposite()->comets() )
if ( checkVisibility(o) )
visibleObjects(c).append(o);
@@ -277,23 +277,23 @@
switch( o->type() ) {
case SkyObject::OPEN_CLUSTER: //fall through
case SkyObject::GLOBULAR_CLUSTER:
- visibleObjects(m_Categories[5]).append(o); //star clusters
+ visibleObjects(m_Categories[4]).append(o); //star clusters
break;
case SkyObject::GASEOUS_NEBULA: //fall through
case SkyObject::PLANETARY_NEBULA: //fall through
case SkyObject::SUPERNOVA_REMNANT:
- visibleObjects(m_Categories[6]).append(o); //nebulae
+ visibleObjects(m_Categories[2]).append(o); //nebulae
break;
case SkyObject::GALAXY:
- visibleObjects(m_Categories[7]).append(o); //galaxies
+ visibleObjects(m_Categories[3]).append(o); //galaxies
break;
}
}
}
- m_CategoryInitialized[ m_Categories[5] ] = true;
- m_CategoryInitialized[ m_Categories[6] ] = true;
- m_CategoryInitialized[ m_Categories[7] ] = true;
+ m_CategoryInitialized[ m_Categories[2] ] = true;
+ m_CategoryInitialized[ m_Categories[3] ] = true;
+ m_CategoryInitialized[ m_Categories[4] ] = true;
}
}
More information about the Kstars-devel
mailing list