Supernova.cpp   Supernova.cpp 
skipping to change at line 40 skipping to change at line 40
#include "StarMgr.hpp" #include "StarMgr.hpp"
#include <QTextStream> #include <QTextStream>
#include <QDebug> #include <QDebug>
#include <QVariant> #include <QVariant>
#include <QVariantMap> #include <QVariantMap>
#include <QVariant> #include <QVariant>
#include <QList> #include <QList>
Supernova::Supernova(const QVariantMap& map) Supernova::Supernova(const QVariantMap& map)
: initialized(false), : initialized(false)
designation(""), , designation("")
sntype(""), , sntype("")
maxMagnitude(21.), , maxMagnitude(21.)
peakJD(0.), , peakJD(0.)
snra(0.), , snra(0.)
snde(0.), , snde(0.)
note(""), , note("")
distance(0.) , distance(0.)
{ {
// return initialized if the mandatory fields are not present if (!map.contains("designation") || !map.contains("alpha") || !map.c
if (!map.contains("designation")) ontains("delta"))
{
qWarning() << "Supernova: INVALID quasar!" << map.value("des
ignation").toString();
qWarning() << "Supernova: Please, check your 'supernovae.jso
n' catalog!";
return; return;
}
designation = map.value("designation").toString(); designation = map.value("designation").toString();
sntype = map.value("type").toString(); sntype = map.value("type").toString();
maxMagnitude = map.value("maxMagnitude").toFloat(); maxMagnitude = map.value("maxMagnitude").toFloat();
peakJD = map.value("peakJD").toDouble(); peakJD = map.value("peakJD").toDouble();
snra = StelUtils::getDecAngle(map.value("alpha").toString()); snra = StelUtils::getDecAngle(map.value("alpha").toString());
snde = StelUtils::getDecAngle(map.value("delta").toString()); snde = StelUtils::getDecAngle(map.value("delta").toString());
note = map.value("note").toString(); note = map.value("note").toString();
distance = map.value("distance").toDouble(); distance = map.value("distance").toDouble();
skipping to change at line 247 skipping to change at line 250
StelUtils::spheToRect(snra, snde, XYZ); StelUtils::spheToRect(snra, snde, XYZ);
mag = getVMagnitudeWithExtinction(core); mag = getVMagnitudeWithExtinction(core);
sd->preDrawPointSource(&painter); sd->preDrawPointSource(&painter);
float mlimit = sd->getLimitMagnitude(); float mlimit = sd->getLimitMagnitude();
if (mag <= mlimit) if (mag <= mlimit)
{ {
sd->computeRCMag(mag, &rcMag); sd->computeRCMag(mag, &rcMag);
sd->drawPointSource(&painter, Vec3f(XYZ[0],XYZ[1],XYZ[2]), r cMag, color, false); sd->drawPointSource(&painter, Vec3f(XYZ[0],XYZ[1],XYZ[2]), r cMag, color, false);
painter.setColor(color[0], color[1], color[2], 1); painter.setColor(color[0], color[1], color[2], 1.f);
size = getAngularSize(NULL)*M_PI/180.*painter.getProjector() ->getPixelPerRadAtCenter(); size = getAngularSize(NULL)*M_PI/180.*painter.getProjector() ->getPixelPerRadAtCenter();
shift = 6.f + size/1.8f; shift = 6.f + size/1.8f;
if (labelsFader.getInterstate()<=0.f && (mag+5.f)<mlimit && smgr->getFlagLabels()) if (labelsFader.getInterstate()<=0.f && (mag+5.f)<mlimit && smgr->getFlagLabels())
{ {
painter.drawText(XYZ, designation, 0, shift, shift, false); painter.drawText(XYZ, designation, 0, shift, shift, false);
} }
} }
sd->postDrawPointSource(&painter); sd->postDrawPointSource(&painter);
} }
 End of changes. 4 change blocks. 
12 lines changed or deleted 18 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/