StarWrapper.cpp   StarWrapper.cpp 
skipping to change at line 59 skipping to change at line 59
Q_UNUSED(az_app); Q_UNUSED(az_app);
if (flags&ObjectType) if (flags&ObjectType)
{ {
oss << q_("Type: <b>%1</b>").arg(q_("star")) << "<br />"; oss << q_("Type: <b>%1</b>").arg(q_("star")) << "<br />";
} }
if (flags&Magnitude) if (flags&Magnitude)
{ {
if (core->getSkyDrawer()->getFlagHasAtmosphere() && (alt_app >-3.0*M_PI/180.0)) // Don't show extincted magnitude much below horizon whe re model is meaningless. if (core->getSkyDrawer()->getFlagHasAtmosphere() && (alt_app >-3.0*M_PI/180.0)) // Don't show extincted magnitude much below horizon whe re model is meaningless.
oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2 </b>)") oss << q_("Magnitude: <b>%1</b> (after extinction: < b>%2</b>)")
.arg(QString::number(getVMagnitude(core), 'f' , 2)) .arg(QString::number(getVMagnitude(core), 'f' , 2))
.arg(QString::number(getVMagnitudeWithExtinct ion(core), 'f', 2)) << "<br>"; .arg(QString::number(getVMagnitudeWithExtinct ion(core), 'f', 2)) << "<br>";
else else
oss << q_("Magnitude: <b>%1</b>").arg(QString::numbe r(getVMagnitude(core), 'f', 2)) << "<br>"; oss << q_("Magnitude: <b>%1</b>").arg(QString::numbe r(getVMagnitude(core), 'f', 2)) << "<br>";
} }
if (flags&Extra) if (flags&Extra)
{ {
oss << q_("Color Index (B-V): <b>%1</b>").arg(QString::numbe r(getBV(), 'f', 2)) << "<br>"; oss << q_("Color Index (B-V): <b>%1</b>").arg(QString::numbe r(getBV(), 'f', 2)) << "<br>";
} }
skipping to change at line 91 skipping to change at line 91
return QString("HIP %1").arg(s->getHip()); return QString("HIP %1").arg(s->getHip());
return StarWrapperBase::getEnglishName(); return StarWrapperBase::getEnglishName();
} }
QString StarWrapper1::getInfoString(const StelCore *core, const InfoStringG roup& flags) const QString StarWrapper1::getInfoString(const StelCore *core, const InfoStringG roup& flags) const
{ {
QString str; QString str;
QTextStream oss(&str); QTextStream oss(&str);
const QString varType = StarMgr::getGcvsVariabilityType(s->getHip()) ; const QString varType = StarMgr::getGcvsVariabilityType(s->getHip()) ;
const int wdsObs = StarMgr::getWdsLastObservation(s->getHip());
const float wdsPA = StarMgr::getWdsLastPositionAngle(s->getHip());
const float wdsSep = StarMgr::getWdsLastSeparation(s->getHip());
const float maxVMag = StarMgr::getGcvsMaxMagnitude(s->getHip()); const float maxVMag = StarMgr::getGcvsMaxMagnitude(s->getHip());
const float magFlag = StarMgr::getGcvsMagnitudeFlag(s->getHip()); const float magFlag = StarMgr::getGcvsMagnitudeFlag(s->getHip());
const float minVMag = StarMgr::getGcvsMinMagnitude(s->getHip()); const float minVMag = StarMgr::getGcvsMinMagnitude(s->getHip());
const float min2VMag = StarMgr::getGcvsMinMagnitude(s->getHip(), fal se); const float min2VMag = StarMgr::getGcvsMinMagnitude(s->getHip(), fal se);
const QString photoVSys = StarMgr::getGcvsPhotometricSystem(s->getHi p()); const QString photoVSys = StarMgr::getGcvsPhotometricSystem(s->getHi p());
const double vEpoch = StarMgr::getGcvsEpoch(s->getHip()); const double vEpoch = StarMgr::getGcvsEpoch(s->getHip());
const double vPeriod = StarMgr::getGcvsPeriod(s->getHip()); const double vPeriod = StarMgr::getGcvsPeriod(s->getHip());
const int vMm = StarMgr::getGcvsMM(s->getHip()); const int vMm = StarMgr::getGcvsMM(s->getHip());
if (s->getHip()) if (s->getHip())
{ {
if ((flags&Name) || (flags&CatalogNumber)) if ((flags&Name) || (flags&CatalogNumber))
oss << "<h2>"; oss << "<h2>";
const QString commonNameI18 = StarMgr::getCommonName(s->getH ip()); const QString commonNameI18 = StarMgr::getCommonName(s->getH ip());
const QString sciName = StarMgr::getSciName(s->getHip()); const QString sciName = StarMgr::getSciName(s->getHip());
const QString addSciName = StarMgr::getSciAdditionalName(s-> getHip()); const QString addSciName = StarMgr::getSciAdditionalName(s-> getHip());
const QString varSciName = StarMgr::getGcvsName(s->getHip()) ; const QString varSciName = StarMgr::getGcvsName(s->getHip()) ;
const QString crossIndexData = StarMgr::getCrossIndexDesigna const QString wdsSciName = StarMgr::getWdsName(s->getHip());
tions(s->getHip()); const QString crossIndexData = StarMgr::getCrossIdentificati
onDesignations(s->getHip());
QStringList designations; QStringList designations;
if (!sciName.isEmpty()) if (!sciName.isEmpty())
designations.append(sciName); designations.append(sciName);
if (!addSciName.isEmpty()) if (!addSciName.isEmpty())
designations.append(addSciName); designations.append(addSciName);
if (!varSciName.isEmpty() && varSciName!=addSciName && varSc iName!=sciName) if (!varSciName.isEmpty() && varSciName!=addSciName && varSc iName!=sciName)
designations.append(varSciName); designations.append(varSciName);
QString hip; QString hip;
if (s->getComponentIds()) if (s->hasComponentID())
hip = QString("HIP %1 %2").arg(s->getHip()).arg(Star Mgr::convertToComponentIds(s->getComponentIds())); hip = QString("HIP %1 %2").arg(s->getHip()).arg(Star Mgr::convertToComponentIds(s->getComponentIds()));
else else
hip = QString("HIP %1").arg(s->getHip()); hip = QString("HIP %1").arg(s->getHip());
designations.append(hip); designations.append(hip);
if (!crossIndexData.isEmpty()) if (!crossIndexData.isEmpty())
designations.append(crossIndexData); designations.append(crossIndexData);
if (!wdsSciName.isEmpty() && wdsSciName!=addSciName && wdsSc
iName!=sciName)
designations.append(wdsSciName);
const QString designationsList = designations.join(" - "); const QString designationsList = designations.join(" - ");
if (flags&Name) if (flags&Name)
{ {
if (!commonNameI18.isEmpty()) if (!commonNameI18.isEmpty())
oss << commonNameI18; oss << commonNameI18;
if (!commonNameI18.isEmpty() && !designationsList.is Empty() && flags&CatalogNumber) if (!commonNameI18.isEmpty() && !designationsList.is Empty() && flags&CatalogNumber)
oss << "<br>"; oss << "<br>";
} }
skipping to change at line 170 skipping to change at line 177
varstartype = q_("cataclysmic variable star" ); varstartype = q_("cataclysmic variable star" );
else if (QString("E EA EB EW GS PN RS WD WR AR D DM DS DW K KE KW SD E: E:/WR E/D E+LPB: EA/D EA/D+BY EA/RS EA/SD EA/SD: EA/GS EA/GS+SRC EA/DM EA/WR EA+LPB EA+LPB: EA+DSCT EA+BCEP: EA+ZAND EA+ACYG EA+SR D EB/GS EB/DM EB/KE EB/KE: EW/KE EA/AR/RS EA/GS/D EA/D/WR").contains(varTyp e)) else if (QString("E EA EB EW GS PN RS WD WR AR D DM DS DW K KE KW SD E: E:/WR E/D E+LPB: EA/D EA/D+BY EA/RS EA/SD EA/SD: EA/GS EA/GS+SRC EA/DM EA/WR EA+LPB EA+LPB: EA+DSCT EA+BCEP: EA+ZAND EA+ACYG EA+SR D EB/GS EB/DM EB/KE EB/KE: EW/KE EA/AR/RS EA/GS/D EA/D/WR").contains(varTyp e))
{ {
varstartype = q_("eclipsing binary system"); varstartype = q_("eclipsing binary system");
ebsFlag = true; ebsFlag = true;
} }
else else
varstartype = q_("variable star"); varstartype = q_("variable star");
} }
if (s->getComponentIds()) if (s->getComponentIds() || wdsObs>0)
startype = q_("double star"); startype = q_("double star");
else else
startype = q_("star"); startype = q_("star");
if (!varType.isEmpty()) if (!varType.isEmpty())
{ {
if (s->getComponentIds()) if (s->getComponentIds() || wdsObs>0)
oss << q_("Type: <b>%1, %2</b>").arg(varstar type).arg(startype); oss << q_("Type: <b>%1, %2</b>").arg(varstar type).arg(startype);
else else
oss << q_("Type: <b>%1</b>").arg(varstartype ); oss << q_("Type: <b>%1</b>").arg(varstartype );
oss << " (" << varType << ")<br />"; oss << " (" << varType << ")<br />";
} else } else
oss << q_("Type: <b>%1</b>").arg(startype) << "<br / >"; oss << q_("Type: <b>%1</b>").arg(startype) << "<br / >";
} }
if (flags&Magnitude) if (flags&Magnitude)
{ {
if (core->getSkyDrawer()->getFlagHasAtmosphere()) if (core->getSkyDrawer()->getFlagHasAtmosphere())
oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2 </b>)").arg(QString::number(getVMagnitude(core), 'f', 2)) oss << q_("Magnitude: <b>%1</b> (after extinction: < b>%2</b>)").arg(QString::number(getVMagnitude(core), 'f', 2))
.arg(QString::number(getVMagnitudeWithExt inction(core), 'f', 2)) << "<br>"; .arg(QString::number(getVMagnitudeWithExt inction(core), 'f', 2)) << "<br>";
else else
oss << q_("Magnitude: <b>%1</b>").arg(QString::numbe r(getVMagnitude(core), 'f', 2)) << "<br>"; oss << q_("Magnitude: <b>%1</b>").arg(QString::numbe r(getVMagnitude(core), 'f', 2)) << "<br>";
} }
if ((flags&AbsoluteMagnitude) && s->getPlx ()&& !isNan(s->getPlx()) && !isInf(s->getPlx())) if ((flags&AbsoluteMagnitude) && s->getPlx ()&& !isNan(s->getPlx()) && !isInf(s->getPlx()))
oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core)+ 5.*(1.+std::log10(0.00001*s->getPlx())), 0, 'f', 2) << "<br>"; oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core)+ 5.*(1.+std::log10(0.00001*s->getPlx())), 0, 'f', 2) << "<br>";
if (flags&Extra) if (flags&Extra)
{ {
skipping to change at line 265 skipping to change at line 272
} }
if (vMm>0) if (vMm>0)
{ {
if (ebsFlag) if (ebsFlag)
oss << q_("Duration of eclipse: %1%").arg(vM m) << "<br />"; oss << q_("Duration of eclipse: %1%").arg(vM m) << "<br />";
else else
oss << q_("Rising time: %1%").arg(vMm) << "< br />"; oss << q_("Rising time: %1%").arg(vMm) << "< br />";
} }
if (wdsObs>0)
{
oss << QString("%1: %2").arg(q_("Year of last satisf
actory observation")).arg(wdsObs) << "<br />";
oss << QString("%1: %2%3").arg(q_("Position angle"))
.arg(QString::number(wdsPA, 'f', 2)).arg(QChar(0x00B0)) << "<br />";
if (wdsSep>0.f) // A spectroscopic binary or not?
{
if (wdsSep>60.f) // A wide binary star?
oss << QString("%1: %2\" (%3)").arg(
q_("Separation")).arg(QString::number(wdsSep, 'f', 3)).arg(StelUtils::decDe
gToDmsStr(wdsSep/3600.f)) << "<br />";
else
oss << QString("%1: %2\"").arg(q_("S
eparation")).arg(QString::number(wdsSep, 'f', 3)) << "<br />";
}
}
} }
StelObject::postProcessInfoString(str, flags); StelObject::postProcessInfoString(str, flags);
return str; return str;
} }
StelObjectP Star1::createStelObject(const SpecialZoneArray<Star1> *a, StelObjectP Star1::createStelObject(const SpecialZoneArray<Star1> *a,
cons t SpecialZoneData<Star1> *z) const { cons t SpecialZoneData<Star1> *z) const {
return StelObjectP(new StarWrapper1(a,z,this), true); return StelObjectP(new StarWrapper1(a,z,this), true);
 End of changes. 9 change blocks. 
7 lines changed or deleted 33 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/