Supernova.cpp   Supernova.cpp 
skipping to change at line 89 skipping to change at line 89
map["snde"] = snde; map["snde"] = snde;
map["note"] = note; map["note"] = note;
map["distance"] = distance; map["distance"] = distance;
return map; return map;
} }
QString Supernova::getNameI18n(void) const QString Supernova::getNameI18n(void) const
{ {
QString name = designation; QString name = designation;
const StelTranslator& trans = StelApp::getInstance().getLocaleMgr(). getSkyTranslator();
if (note.size()!=0) if (note.size()!=0)
name = QString("%1 (%2)").arg(name).arg(q_(note)); name = QString("%1 (%2)").arg(name).arg(trans.qtranslate(not e));
return name; return name;
} }
QString Supernova::getEnglishName(void) const QString Supernova::getEnglishName(void) const
{ {
QString name = designation; QString name = designation;
if (note.size()!=0) if (note.size()!=0)
name = QString("%1 (%2)").arg(name).arg(note); name = QString("%1 (%2)").arg(name).arg(note);
skipping to change at line 122 skipping to change at line 123
QString str, mag = "--", mage = "--"; QString str, mag = "--", mage = "--";
QTextStream oss(&str); QTextStream oss(&str);
if (getVMagnitude(core) <= maglimit) if (getVMagnitude(core) <= maglimit)
{ {
mag = QString::number(getVMagnitude(core), 'f', 2); mag = QString::number(getVMagnitude(core), 'f', 2);
mage = QString::number(getVMagnitudeWithExtinction(core), 'f ', 2); mage = QString::number(getVMagnitudeWithExtinction(core), 'f ', 2);
} }
if (flags&Name) if (flags&Name)
{ {
oss << "<h2>" << designation; oss << "<h2>" << getNameI18n() << "</h2>";
if (note.size()!=0)
oss << " (" << q_(note) << ")";
oss << "</h2>";
} }
if (flags&ObjectType) if (flags&ObjectType)
oss << q_("Type: <b>%1</b>").arg(q_("supernova")) << "<br /> "; oss << q_("Type: <b>%1</b>").arg(q_("supernova")) << "<br /> ";
if (flags&Magnitude) if (flags&Magnitude)
{ {
if (core->getSkyDrawer()->getFlagHasAtmosphere() && getVMagnitud e(core) <= maglimit) if (core->getSkyDrawer()->getFlagHasAtmosphere() && getVMagnitud e(core) <= maglimit)
oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2</b>)"). arg(mag, mage) << "<br>"; oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2</b>)"). arg(mag, mage) << "<br>";
else else
skipping to change at line 167 skipping to change at line 164
Vec3f Supernova::getInfoColor(void) const Vec3f Supernova::getInfoColor(void) const
{ {
return Vec3f(1.0, 1.0, 1.0); return Vec3f(1.0, 1.0, 1.0);
} }
float Supernova::getVMagnitude(const StelCore* core) const float Supernova::getVMagnitude(const StelCore* core) const
{ {
double vmag = 20; double vmag = 20;
double currentJD = core->getJDay(); double currentJD = core->getJDay();
double deltaJD = std::abs(peakJD-currentJD); double deltaJD = qAbs(peakJD-currentJD);
// Use supernova light curve model from here - http://www.astronet.r u/db/msg/1188703 // Use supernova light curve model from here - http://www.astronet.r u/db/msg/1188703
if (sntype.contains("II", Qt::CaseSensitive)) if (sntype.contains("II", Qt::CaseSensitive))
{ {
// Type II // Type II
if (peakJD<=currentJD) if (peakJD<=currentJD)
{ {
vmag = maxMagnitude; vmag = maxMagnitude;
if (deltaJD>0 && deltaJD<=30) if (deltaJD>0 && deltaJD<=30)
 End of changes. 4 change blocks. 
7 lines changed or deleted 4 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/