Git commit 90d5ce206412964f68b2996cb8c4feb8ed08483e by Akarsh Simha. Committed on 12/06/2011 at 22:22. Pushed by asimha into branch 'master'. Add a B - V color index label in the details dialog, that displays B - V color index whenever we have the data to do so. However, some polishing needs to still be done. Besides, it's very weird right now, because we have B and V data for faint stars, but not for bright ones! So you can see B - V color index for 15th mag stars, but not for 3rd or 11th mag stars. FEATURE CCMAIL: kstars-devel@kde.org M +12 -1 kstars/dialogs/detaildialog.cpp M +14 -0 kstars/dialogs/details_data.ui http://commits.kde.org/kstars/90d5ce206412964f68b2996cb8c4feb8ed08483e diff --git a/kstars/dialogs/detaildialog.cpp b/kstars/dialogs/detaildialog.cpp index 49db961..3d669ef 100644 --- a/kstars/dialogs/detaildialog.cpp +++ b/kstars/dialogs/detaildialog.cpp @@ -110,7 +110,12 @@ void DetailDialog::createGeneralTab() #endif connect( Data->Image, SIGNAL( clicked() ), this, SLOT( updateThumbnail() ) ); - Data->IllumLabel->setVisible( false ); + // Stuff that should be visible only for specific types of objects + Data->IllumLabel->setVisible( false ); // Only shown for the moon + Data->Illumination->setVisible( false ); + + Data->BVIndex->setVisible( false ); // Only shown for stars + Data->BVLabel->setVisible( false ); //Show object thumbnail image showThumbnail(); @@ -138,6 +143,11 @@ void DetailDialog::createGeneralTab() Data->Magnitude->setText( i18nc( "number in magnitudes", "%1 mag" , KGlobal::locale()->formatNumber( s->mag(), 1 ) ) ); //show to tenths place + Data->BVLabel->setVisible( true ); + Data->BVIndex->setVisible( true ); + if( s->getBVIndex() < 30.0 ) + Data->BVIndex->setText( QString::number( s->getBVIndex() , 'g', 2 ) ); + //The thumbnail image is empty, and isn't clickable for stars //Also, don't show the border around the Image QFrame. Data->Image->setFrameStyle( QFrame::NoFrame ); @@ -190,6 +200,7 @@ void DetailDialog::createGeneralTab() //Magnitude: The moon displays illumination fraction instead if ( selectedObject->name() == "Moon" ) { Data->IllumLabel->setVisible( true ); + Data->Illumination->setVisible( true ); Data->Illumination->setText( QString("%1 %").arg( KGlobal::locale()->formatNumber( ((KSMoon *)selectedObject)->illum()*100., 0 ) ) ); } diff --git a/kstars/dialogs/details_data.ui b/kstars/dialogs/details_data.ui index 8d7d444..844d53c 100644 --- a/kstars/dialogs/details_data.ui +++ b/kstars/dialogs/details_data.ui @@ -287,6 +287,20 @@ + + + + B - V index: + + + + + + + -- + + + _______________________________________________ Kstars-devel mailing list Kstars-devel@kde.org https://mail.kde.org/mailman/listinfo/kstars-devel