StarWrapper.cpp   StarWrapper.cpp 
skipping to change at line 53 skipping to change at line 53
QString StarWrapperBase::getInfoString(const StelCore *core, const InfoStri ngGroup& flags) const QString StarWrapperBase::getInfoString(const StelCore *core, const InfoStri ngGroup& flags) const
{ {
QString str; QString str;
QTextStream oss(&str); QTextStream oss(&str);
double az_app, alt_app; double az_app, alt_app;
StelUtils::rectToSphe(&az_app,&alt_app,getAltAzPosApparent(core)); StelUtils::rectToSphe(&az_app,&alt_app,getAltAzPosApparent(core));
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 << QString("%1: <b>%2</b>").arg(q_("Type"), q_("star")) << "<br />";
} }
if (flags&Magnitude) if (flags&Magnitude)
{ {
QString emag = "";
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> (after extinction: < emag = QString(" (%1: <b>%2</b>)").arg(q_("extincted
b>%2</b>)") to"), QString::number(getVMagnitudeWithExtinction(core), 'f', 2));
.arg(QString::number(getVMagnitude(core), 'f'
, 2)) oss << QString("%1: <b>%2</b>%3").arg(q_("Magnitude"), QStri
.arg(QString::number(getVMagnitudeWithExtinct ng::number(getVMagnitude(core), 'f', 2), emag) << "<br />";
ion(core), 'f', 2)) << "<br>";
else
oss << q_("Magnitude: <b>%1</b>").arg(QString::numbe
r(getVMagnitude(core), 'f', 2)) << "<br>";
} }
if (flags&Extra) if (flags&Extra)
{ oss << QString("%1: <b>%2</b>").arg(q_("Color Index (B-V)"),
oss << q_("Color Index (B-V): <b>%1</b>").arg(QString::numbe QString::number(getBV(), 'f', 2)) << "<br />";
r(getBV(), 'f', 2)) << "<br>";
}
oss << getPositionInfoString(core, flags); oss << getCommonInfoString(core, flags);
StelObject::postProcessInfoString(str, flags); StelObject::postProcessInfoString(str, flags);
return str; return str;
} }
QString StarWrapper1::getEnglishName(void) const QString StarWrapper1::getEnglishName(void) const
{ {
if (s->getHip()) if (s->getHip())
return QString("HIP %1").arg(s->getHip()); return QString("HIP %1").arg(s->getHip());
skipping to change at line 113 skipping to change at line 110
{ {
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 additionalNameI18 = StarMgr::getAdditionalName s(s->getHip()); const QString additionalNameI18 = StarMgr::getAdditionalName s(s->getHip());
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 wdsSciName = StarMgr::getWdsName(s->getHip()); const QString wdsSciName = StarMgr::getWdsName(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, hipq;
if (s->hasComponentID()) 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()));
hipq = QString("%1%2").arg(s->getHip()).arg(StarMgr:
:convertToComponentIds(s->getComponentIds()));
}
else else
{
hip = QString("HIP %1").arg(s->getHip()); hip = QString("HIP %1").arg(s->getHip());
hipq = QString("%1").arg(s->getHip());
}
designations.append(hip); designations.append(hip);
const QString crossIndexData = StarMgr::getCrossIdentificati onDesignations(hipq);
if (!crossIndexData.isEmpty()) if (!crossIndexData.isEmpty())
designations.append(crossIndexData); designations.append(crossIndexData);
if (!wdsSciName.isEmpty() && wdsSciName!=addSciName && wdsSc iName!=sciName) if (!wdsSciName.isEmpty() && wdsSciName!=addSciName && wdsSc iName!=sciName)
designations.append(wdsSciName); designations.append(wdsSciName);
const QString designationsList = designations.join(" - "); const QString designationsList = designations.join(" - ");
if (flags&Name) if (flags&Name)
{ {
skipping to change at line 188 skipping to change at line 191
varstartype = q_("variable star"); varstartype = q_("variable star");
} }
if (s->getComponentIds() || wdsObs>0) 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())
{ {
QString vtt = varstartype;
if (s->getComponentIds() || wdsObs>0) if (s->getComponentIds() || wdsObs>0)
oss << q_("Type: <b>%1, %2</b>").arg(varstar vtt = QString("%1, %2").arg(varstartype, sta
type).arg(startype); rtype);
else oss << QString("%1: <b>%2</b> (%3)").arg(q_("Type"),
oss << q_("Type: <b>%1</b>").arg(varstartype vtt, varType) << "<br />";
); }
oss << " (" << varType << ")<br />"; else
} else oss << QString("%1: <b>%2</b>").arg(q_("Type"), star
oss << q_("Type: <b>%1</b>").arg(startype) << "<br / type) << "<br />";
>";
} }
if (flags&Magnitude) if (flags&Magnitude)
{ {
QString emag = "";
if (core->getSkyDrawer()->getFlagHasAtmosphere()) if (core->getSkyDrawer()->getFlagHasAtmosphere())
oss << q_("Magnitude: <b>%1</b> (after extinction: < emag = QString(" (%1: <b>%2</b>)").arg(q_("extincted
b>%2</b>)").arg(QString::number(getVMagnitude(core), 'f', 2)).arg(QString:: to"), QString::number(getVMagnitudeWithExtinction(core), 'f', 2));
number(getVMagnitudeWithExtinction(core), 'f', 2)) << "<br />";
else oss << QString("%1: <b>%2</b>%3").arg(q_("Magnitude"), QStri
oss << q_("Magnitude: <b>%1</b>").arg(QString::numbe ng::number(getVMagnitude(core), 'f', 2), emag) << "<br />";
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 << QString("%1: %2").arg(q_("Absolute Magnitude")).arg(g etVMagnitude(core)+5.*(1.+std::log10(0.00001*s->getPlx())), 0, 'f', 2) << " <br />";
if (flags&Extra) if (flags&Extra)
{ {
oss << q_("Color Index (B-V): <b>%1</b>").arg(QString::numbe r(s->getBV(), 'f', 2)) << "<br />"; oss << QString("%1: <b>%2</b>").arg(q_("Color Index (B-V)"), QString::number(s->getBV(), 'f', 2)) << "<br />";
if (!varType.isEmpty()) if (!varType.isEmpty())
{ {
float minimumM1 = minVMag; float minimumM1 = minVMag;
float minimumM2 = min2VMag; float minimumM2 = min2VMag;
if (magFlag==1) // Amplitude if (magFlag==1) // Amplitude
{ {
minimumM1 += maxVMag; minimumM1 += maxVMag;
minimumM2 += maxVMag; minimumM2 += maxVMag;
} }
if (maxVMag!=99.f) // seems it is not eruptive varia ble star if (maxVMag!=99.f) // seems it is not eruptive varia ble star
{ {
if (min2VMag==99.f) QString minStr = QString::number(minimumM1,
oss << q_("Magnitude range: <b>%1</b 'f', 2);
>%2<b>%3</b> (Photometric system: %4)").arg(QString::number(maxVMag, 'f', 2 if (min2VMag<99.f)
)).arg(QChar(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(photoVSys minStr = QString("%1/%2").arg(QStrin
) << "<br />"; g::number(minimumM1, 'f', 2)).arg(QString::number(minimumM2, 'f', 2));
else
oss << q_("Magnitude range: <b>%1</b oss << QString("%1: <b>%2</b>%3<b>%4</b> (%5
>%2<b>%3/%4</b> (Photometric system: %5)").arg(QString::number(maxVMag, 'f' : %6)").arg(q_("Magnitude range"), QString::number(maxVMag, 'f', 2), QChar(
, 2)).arg(QChar(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(QStrin 0x00F7), minStr, q_("Photometric system"), photoVSys) << "<br />";
g::number(minimumM2, 'f', 2)).arg(photoVSys) << "<br />";
} }
} }
} }
oss << getPositionInfoString(core, flags); oss << getCommonInfoString(core, flags);
if ((flags&Distance) && s->getPlx ()&& !isNan(s->getPlx()) && !isInf (s->getPlx())) if ((flags&Distance) && s->getPlx ()&& !isNan(s->getPlx()) && !isInf (s->getPlx()))
{ {
//TRANSLATORS: Unit of measure for distance - Light Years //TRANSLATORS: Unit of measure for distance - Light Years
oss << q_("Distance: %1 ly").arg((AU/(SPEED_OF_LIGHT*86400*3 QString ly = qc_("ly", "distance");
65.25)) / (s->getPlx()*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br />" oss << QString("%1: %2 %3").arg(q_("Distance"), QString::num
; ber((AU/(SPEED_OF_LIGHT*86400*365.25))/(s->getPlx()*((0.00001/3600)*(M_PI/1
80))), 'f', 2), ly) << "<br />";
} }
if (flags&Extra) if (flags&Extra)
{ {
if (s->getSpInt()) if (s->getSpInt())
oss << q_("Spectral Type: %1").arg(StarMgr::convertT oSpectralType(s->getSpInt())) << "<br />"; oss << QString("%1: %2").arg(q_("Spectral Type"), St arMgr::convertToSpectralType(s->getSpInt())) << "<br />";
if (s->getPlx()) if (s->getPlx())
oss << q_("Parallax: %1\"").arg(0.00001*s->getPlx(), 0, 'f', 5) << "<br />"; oss << QString("%1: %2\"").arg(q_("Parallax"), QStri ng::number(0.00001*s->getPlx(), 'f', 5)) << "<br />";
if (vPeriod>0) if (vPeriod>0)
oss << q_("Period: %1 days").arg(vPeriod) << "<br /> "; oss << QString("%1: %2 %3").arg(q_("Period")).arg(vP eriod).arg(qc_("days", "duration")) << "<br />";
if (vEpoch>0 && vPeriod>0) if (vEpoch>0 && vPeriod>0)
{ {
// Calculate next minimum or maximum light // Calculate next minimum or maximum light
double vsEpoch = 2400000+vEpoch; double vsEpoch = 2400000+vEpoch;
double npDate = vsEpoch + vPeriod * ::floor(1.0 + (c ore->getJDE() - vsEpoch)/vPeriod); double npDate = vsEpoch + vPeriod * ::floor(1.0 + (c ore->getJDE() - vsEpoch)/vPeriod);
QString nextDate = StelUtils::julianDayToISO8601Stri ng(npDate).replace("T", " "); QString nextDate = StelUtils::julianDayToISO8601Stri ng(npDate).replace("T", " ");
QString dateStr = q_("Next maximum light");
if (ebsFlag) if (ebsFlag)
oss << q_("Next minimum light: %1 UTC").arg( dateStr = q_("Next minimum light");
nextDate) << "<br />";
else
oss << q_("Next maximum light: %1 UTC").arg(
nextDate) << "<br />";
oss << QString("%1: %2 UTC").arg(dateStr, nextDate) << "<br />";
} }
if (vMm>0) if (vMm>0)
{ {
QString mmStr = q_("Rising time");
if (ebsFlag) if (ebsFlag)
oss << q_("Duration of eclipse: %1%").arg(vM mmStr = q_("Duration of eclipse");
m) << "<br />";
else oss << QString("%1: %2%").arg(mmStr).arg(vMm) << "<b
oss << q_("Rising time: %1%").arg(vMm) << "< r />";
br />";
} }
if (wdsObs>0) if (wdsObs>0)
{ {
oss << QString("%1 (%4): %2%3").arg(q_("Position ang le")).arg(QString::number(wdsPA, 'f', 2)).arg(QChar(0x00B0)).arg(wdsObs) << "<br />"; oss << QString("%1 (%4): %2%3").arg(q_("Position ang le")).arg(QString::number(wdsPA, 'f', 2)).arg(QChar(0x00B0)).arg(wdsObs) << "<br />";
if (wdsSep>0.f) // A spectroscopic binary or not? if (wdsSep>0.f) // A spectroscopic binary or not?
{ {
if (wdsSep>60.f) // A wide binary star? if (wdsSep>60.f) // A wide binary star?
oss << QString("%1 (%4): %2\" (%3)") .arg(q_("Separation")).arg(QString::number(wdsSep, 'f', 3)).arg(StelUtils:: decDegToDmsStr(wdsSep/3600.f)).arg(wdsObs) << "<br />"; oss << QString("%1 (%4): %2\" (%3)") .arg(q_("Separation")).arg(QString::number(wdsSep, 'f', 3)).arg(StelUtils:: decDegToDmsStr(wdsSep/3600.f)).arg(wdsObs) << "<br />";
else else
 End of changes. 29 change blocks. 
61 lines changed or deleted 62 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/