Nova.cpp   Nova.cpp 
skipping to change at line 39 skipping to change at line 39
#include "StelPainter.hpp" #include "StelPainter.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>
Nova::Nova(const QVariantMap& map) Nova::Nova(const QVariantMap& map)
: initialized(false), : initialized(false)
designation(""), , designation("")
novaName(""), , novaName("")
novaType(""), , novaType("")
maxMagnitude(21.), , maxMagnitude(21.)
minMagnitude(21.), , minMagnitude(21.)
peakJD(0.), , peakJD(0.)
m2(-1), , m2(-1)
m3(-1), , m3(-1)
m6(-1), , m6(-1)
m9(-1), , m9(-1)
RA(0.), , RA(0.)
Dec(0.), , Dec(0.)
distance(0.) , distance(0.)
{ {
// return initialized if the mandatory fields are not present if (!map.contains("designation") || !map.contains("RA") || !map.cont
if (!map.contains("designation")) ains("Dec"))
{
qWarning() << "Nova: INVALID nova!" << map.value("designatio
n").toString();
qWarning() << "Nova: Please, check your 'novae.json' catalog
!";
return; return;
}
designation = map.value("designation").toString(); designation = map.value("designation").toString();
novaName = map.value("name").toString(); novaName = map.value("name").toString();
novaType = map.value("type").toString(); novaType = map.value("type").toString();
maxMagnitude = map.value("maxMagnitude").toFloat(); maxMagnitude = map.value("maxMagnitude").toFloat();
minMagnitude = map.value("minMagnitude", 21).toFloat(); minMagnitude = map.value("minMagnitude", 21).toFloat();
peakJD = map.value("peakJD").toDouble(); peakJD = map.value("peakJD").toDouble();
m2 = map.value("m2", -1).toInt(); m2 = map.value("m2", -1).toInt();
m3 = map.value("m3", -1).toInt(); m3 = map.value("m3", -1).toInt();
m6 = map.value("m6", -1).toInt(); m6 = map.value("m6", -1).toInt();
skipping to change at line 311 skipping to change at line 314
StelUtils::spheToRect(RA, Dec, XYZ); StelUtils::spheToRect(RA, Dec, 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]), rc Mag, color, false); sd->drawPointSource(painter, Vec3f(XYZ[0],XYZ[1],XYZ[2]), rc Mag, 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())
{ {
QString name = novaName.isEmpty() ? designation : no vaName; QString name = novaName.isEmpty() ? designation : no vaName;
painter->drawText(XYZ, name, 0, shift, shift, false) ; painter->drawText(XYZ, name, 0, shift, shift, false) ;
} }
} }
sd->postDrawPointSource(painter); sd->postDrawPointSource(painter);
 End of changes. 4 change blocks. 
17 lines changed or deleted 23 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/