[Kstars-devel] kdeedu/kstars/kstars
Jason Harris
kstars at 30doradus.org
Tue Mar 9 19:08:55 CET 2004
CVS commit by harris:
The Detail Dialog for stars now shows "multiple" if the star
is a multiple, and "variable" if it is variable. This text
appears in the NameBox, where Angular Size appears for other
objects.
CCMAIL: kstars-devel at kde.org
M +10 -4 detaildialog.cpp 1.31
M +1 -1 detaildialog.h 1.9
--- kdeedu/kstars/kstars/detaildialog.h #1.8:1.9
@@ -81,5 +81,5 @@ private:
/**Constructor for stars */
NameBox( QString pname, QString oname, QString typelabel, QString type,
- QString mag, QString distStr, QString size, QWidget *parent, const char *name=0 );
+ QString mag, QString distStr, QString size, QWidget *parent, const char *name=0, bool useSize=true );
~NameBox() {}
private:
--- kdeedu/kstars/kstars/detaildialog.cpp #1.30:1.31
@@ -206,4 +206,6 @@ void DetailDialog::createGeneralTab(QDat
QString pname, oname, distStr;
+ QString sflags( "" );
+
//arguments to NameBox depend on type of object
switch ( selectedObject->type() ) {
@@ -230,7 +232,11 @@ void DetailDialog::createGeneralTab(QDat
distStr = QString(i18n("larger than 2000 parsecs", "> 2000 pc") );
+ if ( s->isMultiple() ) sflags += i18n( "the star is a multiple star", "multiple" );
+ if ( s->isMultiple() && s->isVariable() ) sflags += ", ";
+ if ( s->isVariable() ) sflags += i18n( "the star is a variable star", "variable" );
+
Names = new NameBox( pname, s->gname(),
i18n( "Spectral type:" ), s->sptype(),
- QString("%1").arg( s->mag() ), distStr, QString( "--" ), generalTab );
+ QString("%1").arg( s->mag() ), distStr, sflags, generalTab, 0, false );
// ProperMotion = new ProperMotionBox( s );
break;
@@ -288,5 +294,5 @@ void DetailDialog::createGeneralTab(QDat
DetailDialog::NameBox::NameBox( QString pname, QString oname,
QString typelabel, QString type, QString mag,
- QString distStr, QString size, QWidget *parent, const char *name )
+ QString distStr, QString size, QWidget *parent, const char *name, bool useSize )
: QGroupBox( i18n( "General" ), parent, name ) {
@@ -315,5 +321,5 @@ DetailDialog::NameBox::NameBox( QString
Dist->setFont( boldFont );
- SizeLabel = new QLabel( i18n( "Angular Size:" ), this );
+ if ( useSize ) { SizeLabel = new QLabel( i18n( "Angular Size:" ), this ); }
AngSize = new QLabel( size, this );
AngSize->setAlignment( AlignRight );
@@ -334,5 +340,5 @@ DetailDialog::NameBox::NameBox( QString
hlayDist->addWidget( DistLabel);
hlayDist->addWidget( Dist);
- hlaySize->addWidget( SizeLabel );
+ if ( useSize ) hlaySize->addWidget( SizeLabel );
hlaySize->addWidget( AngSize );
More information about the Kstars-devel
mailing list