StarWrapper.cpp   StarWrapper.cpp 
skipping to change at line 47 skipping to change at line 47
template<typename T> inline bool isInf(T value) template<typename T> inline bool isInf(T value)
{ {
return std::numeric_limits<T>::has_infinity && value == std::numeric _limits<T>::infinity(); return std::numeric_limits<T>::has_infinity && value == std::numeric _limits<T>::infinity();
} }
namespace BigStarCatalogExtension { namespace BigStarCatalogExtension {
QString StarWrapperBase::getInfoString(const StelCore *core, const InfoStri ngGroup& flags) const QString StarWrapperBase::getInfoString(const StelCore *core, const InfoStri ngGroup& flags) const
{ {
const StelNavigator* nav = core->getNavigator();
QString str; QString str;
QTextStream oss(&str); QTextStream oss(&str);
if (flags&Magnitude) if (flags&Magnitude)
oss << q_("Magnitude: <b>%1</b> (B-V: %2)").arg(QString::num ber(getVMagnitude(nav), 'f', 2), QString::number(getBV(), 'f', 2)) << "<br> "; oss << q_("Magnitude: <b>%1</b> (B-V: %2)").arg(QString::num ber(getVMagnitude(core), 'f', 2), QString::number(getBV(), 'f', 2)) << "<br >";
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->hip)
return QString("HIP %1").arg(s->hip); return QString("HIP %1").arg(s->hip);
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;
const StelNavigator* nav = core->getNavigator();
QTextStream oss(&str); QTextStream oss(&str);
if (s->hip) if (s->hip)
{ {
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->hip) ;
const QString sciName = StarMgr::getSciName(s->hip); const QString sciName = StarMgr::getSciName(s->hip);
skipping to change at line 109 skipping to change at line 107
if (flags&CatalogNumber || (nameWasEmpty && (flags&Name))) if (flags&CatalogNumber || (nameWasEmpty && (flags&Name)))
oss << "HIP " << s->hip; oss << "HIP " << s->hip;
if (s->componentIds) if (s->componentIds)
oss << " " << StarMgr::convertToComponentIds(s->comp onentIds); oss << " " << StarMgr::convertToComponentIds(s->comp onentIds);
if ((flags&Name) || (flags&CatalogNumber)) if ((flags&Name) || (flags&CatalogNumber))
oss << "</h2>"; oss << "</h2>";
} }
if (flags&Magnitude) if (flags&Magnitude)
oss << q_("Magnitude: <b>%1</b> (B-V: %2)").arg(QString::num ber(getVMagnitude(nav), 'f', 2), oss << q_("Magnitude: <b>%1</b> (B-V: %2)").arg(QString::num ber(getVMagnitude(core), 'f', 2),
QString::number(s->getBV(), 'f', 2)) << "<br>"; QString::number(s->getBV(), 'f', 2)) << "<br>";
if ((flags&AbsoluteMagnitude) && s->plx && !isNan(s->plx) && !isInf( s->plx)) if ((flags&AbsoluteMagnitude) && s->plx && !isNan(s->plx) && !isInf( s->plx))
oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(nav)+5 .*(1.+std::log10(0.00001*s->plx)), 0, 'f', 2) << "<br>"; oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core)+ 5.*(1.+std::log10(0.00001*s->plx)), 0, 'f', 2) << "<br>";
oss << getPositionInfoString(core, flags); oss << getPositionInfoString(core, flags);
if (s->spInt && flags&Extra1) if (s->spInt && flags&Extra1)
{ {
oss << q_("Spectral Type: %1").arg(StarMgr::convertToSpectra lType(s->spInt)) << "<br>"; oss << q_("Spectral Type: %1").arg(StarMgr::convertToSpectra lType(s->spInt)) << "<br>";
} }
if ((flags&Distance) && s->plx && !isNan(s->plx) && !isInf(s->plx)) if ((flags&Distance) && s->plx && !isNan(s->plx) && !isInf(s->plx))
oss << q_("Distance: %1 Light Years").arg((AU/(SPEED_OF_LIGH T*86400*365.25)) / (s->plx*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br >"; oss << q_("Distance: %1 Light Years").arg((AU/(SPEED_OF_LIGH T*86400*365.25)) / (s->plx*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br >";
 End of changes. 5 change blocks. 
5 lines changed or deleted 3 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/