StarWrapper.cpp   StarWrapper.cpp 
skipping to change at line 77 skipping to change at line 77
oss << getPositionInfoString(core, flags); oss << getPositionInfoString(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->hip) if (s->getHip())
return QString("HIP %1").arg(s->hip); 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->hip); const QString varType = StarMgr::getGcvsVariabilityType(s->getHip())
const float maxVMag = StarMgr::getGcvsMaxMagnitude(s->hip); ;
const float magFlag = StarMgr::getGcvsMagnitudeFlag(s->hip); const float maxVMag = StarMgr::getGcvsMaxMagnitude(s->getHip());
const float minVMag = StarMgr::getGcvsMinMagnitude(s->hip); const float magFlag = StarMgr::getGcvsMagnitudeFlag(s->getHip());
const float min2VMag = StarMgr::getGcvsMinMagnitude(s->hip, false); const float minVMag = StarMgr::getGcvsMinMagnitude(s->getHip());
const QString photoVSys = StarMgr::getGcvsPhotometricSystem(s->hip); const float min2VMag = StarMgr::getGcvsMinMagnitude(s->getHip(), fal
const double vEpoch = StarMgr::getGcvsEpoch(s->hip); se);
const double vPeriod = StarMgr::getGcvsPeriod(s->hip); const QString photoVSys = StarMgr::getGcvsPhotometricSystem(s->getHi
const int vMm = StarMgr::getGcvsMM(s->hip); p());
if (s->hip) const double vEpoch = StarMgr::getGcvsEpoch(s->getHip());
const double vPeriod = StarMgr::getGcvsPeriod(s->getHip());
const int vMm = StarMgr::getGcvsMM(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->hip) const QString commonNameI18 = StarMgr::getCommonName(s->getH
; ip());
const QString sciName = StarMgr::getSciName(s->hip); const QString sciName = StarMgr::getSciName(s->getHip());
const QString addSciName = StarMgr::getSciAdditionalName(s-> const QString addSciName = StarMgr::getSciAdditionalName(s->
hip); getHip());
const QString varSciName = StarMgr::getGcvsName(s->hip); const QString varSciName = StarMgr::getGcvsName(s->getHip())
;
bool nameWasEmpty=true; bool nameWasEmpty=true;
if (flags&Name) if (flags&Name)
{ {
if (commonNameI18!="" || sciName!="" || addSciName!= "" || varSciName!="") if (commonNameI18!="" || sciName!="" || addSciName!= "" || varSciName!="")
{ {
oss << commonNameI18 << (commonNameI18 == "" ? "" : " "); oss << commonNameI18 << (commonNameI18 == "" ? "" : " ");
if (commonNameI18!="" && (sciName!="" || var SciName!="")) if (commonNameI18!="" && (sciName!="" || var SciName!=""))
oss << "("; oss << "(";
oss << (sciName=="" ? "" : sciName); oss << (sciName=="" ? "" : sciName);
skipping to change at line 127 skipping to change at line 127
oss << (sciName=="" ? "" : " - ") << varSciName; oss << (sciName=="" ? "" : " - ") << varSciName;
if (commonNameI18!="" && (sciName!="" || var SciName!="")) if (commonNameI18!="" && (sciName!="" || var SciName!=""))
oss << ")"; oss << ")";
nameWasEmpty=false; nameWasEmpty=false;
} }
} }
if ((flags&CatalogNumber) && (flags&Name) && !nameWasEmpty) if ((flags&CatalogNumber) && (flags&Name) && !nameWasEmpty)
oss << " - "; oss << " - ";
if (flags&CatalogNumber || (nameWasEmpty && (flags&Name))) if (flags&CatalogNumber || (nameWasEmpty && (flags&Name)))
oss << "HIP " << s->hip; oss << "HIP " << s->getHip();
if (s->componentIds) if (s->getComponentIds())
oss << " " << StarMgr::convertToComponentIds(s->comp oss << " " << StarMgr::convertToComponentIds(s->getC
onentIds); omponentIds());
if ((flags&Name) || (flags&CatalogNumber)) if ((flags&Name) || (flags&CatalogNumber))
oss << "</h2>"; oss << "</h2>";
} }
bool ebsFlag = false; bool ebsFlag = false;
if (flags&ObjectType) if (flags&ObjectType)
{ {
QString varstartype = ""; QString varstartype = "";
QString startype = ""; QString startype = "";
skipping to change at line 159 skipping to change at line 159
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->componentIds) if (s->getComponentIds())
startype = q_("double star"); startype = q_("double star");
else else
startype = q_("star"); startype = q_("star");
if (!varType.isEmpty()) if (!varType.isEmpty())
{ {
if (s->componentIds) if (s->getComponentIds())
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> (extincted to: <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->plx && !isNan(s->plx) && !isInf( if ((flags&AbsoluteMagnitude) && s->getPlx ()&& !isNan(s->getPlx())
s->plx)) && !isInf(s->getPlx()))
oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core)+ oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core)+
5.*(1.+std::log10(0.00001*s->plx)), 0, 'f', 2) << "<br>"; 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 << q_("Color Index (B-V): <b>%1</b>").arg(QString::numbe r(s->getBV(), 'f', 2)) << "<br>";
} }
if (flags&Extra) if (flags&Extra)
{ {
if (!varType.isEmpty()) if (!varType.isEmpty())
{ {
skipping to change at line 214 skipping to change at line 214
if (min2VMag==99.f) if (min2VMag==99.f)
oss << q_("Magnitude range: <b>%1</b>%2<b>%3 </b> (Photometric system: %4)").arg(QString::number(maxVMag, 'f', 2)).arg(Q Char(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(photoVSys) << "<b r />"; oss << q_("Magnitude range: <b>%1</b>%2<b>%3 </b> (Photometric system: %4)").arg(QString::number(maxVMag, 'f', 2)).arg(Q Char(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(photoVSys) << "<b r />";
else else
oss << q_("Magnitude range: <b>%1</b>%2<b>%3 /%4</b> (Photometric system: %5)").arg(QString::number(maxVMag, 'f', 2)).ar g(QChar(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(QString::numbe r(minimumM2, 'f', 2)).arg(photoVSys) << "<br />"; oss << q_("Magnitude range: <b>%1</b>%2<b>%3 /%4</b> (Photometric system: %5)").arg(QString::number(maxVMag, 'f', 2)).ar g(QChar(0x00F7)).arg(QString::number(minimumM1, 'f', 2)).arg(QString::numbe r(minimumM2, 'f', 2)).arg(photoVSys) << "<br />";
} }
} }
oss << getPositionInfoString(core, flags); oss << getPositionInfoString(core, flags);
if ((flags&Distance) && s->plx && !isNan(s->plx) && !isInf(s->plx)) if ((flags&Distance) && s->getPlx ()&& !isNan(s->getPlx()) && !isInf
oss << q_("Distance: %1 Light Years").arg((AU/(SPEED_OF_LIGH (s->getPlx()))
T*86400*365.25)) / (s->plx*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br {
>"; //TRANSLATORS: Unit of measure for distance - Light Years
oss << q_("Distance: %1 ly").arg((AU/(SPEED_OF_LIGHT*86400*3
65.25)) / (s->getPlx()*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br>";
}
if (flags&Extra) if (flags&Extra)
{ {
if (s->spInt) if (s->getSpInt())
oss << q_("Spectral Type: %1").arg(StarMgr::convertT oss << q_("Spectral Type: %1").arg(StarMgr::convertT
oSpectralType(s->spInt)) << "<br />"; oSpectralType(s->getSpInt())) << "<br />";
if (s->plx) if (s->getPlx())
oss << q_("Parallax: %1\"").arg(0.00001*s->plx, 0, ' oss << q_("Parallax: %1\"").arg(0.00001*s->getPlx(),
f', 5) << "<br />"; 0, 'f', 5) << "<br />";
if (vEpoch>0) if (vEpoch>0)
{ {
double vsEpoch = 2400000+vEpoch; double vsEpoch = 2400000+vEpoch;
if (ebsFlag) if (ebsFlag)
oss << q_("Epoch for minimum light: %1 JD"). arg(QString::number(vsEpoch, 'f', 5)) << "<br />"; oss << q_("Epoch for minimum light: %1 JD"). arg(QString::number(vsEpoch, 'f', 5)) << "<br />";
else else
oss << q_("Epoch for maximum light: %1 JD"). arg(QString::number(vsEpoch, 'f', 5)) << "<br />"; oss << q_("Epoch for maximum light: %1 JD"). arg(QString::number(vsEpoch, 'f', 5)) << "<br />";
} }
 End of changes. 10 change blocks. 
38 lines changed or deleted 45 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/