Exoplanet.cpp   Exoplanet.cpp 
skipping to change at line 53 skipping to change at line 53
if (!map.contains("designation")) if (!map.contains("designation"))
return; return;
designation = map.value("designation").toString(); designation = map.value("designation").toString();
RA = StelUtils::getDecAngle(map.value("RA").toString()); RA = StelUtils::getDecAngle(map.value("RA").toString());
DE = StelUtils::getDecAngle(map.value("DE").toString()); DE = StelUtils::getDecAngle(map.value("DE").toString());
distance = map.value("distance").toFloat(); distance = map.value("distance").toFloat();
stype = map.value("stype").toString(); stype = map.value("stype").toString();
smass = map.value("smass").toFloat(); smass = map.value("smass").toFloat();
smetal = map.value("smetal").toFloat(); smetal = map.value("smetal").toFloat();
if (map.contains("Vmag")) Vmag = map.value("Vmag", 99.f).toFloat();
{
Vmag = map.value("Vmag").toFloat();
}
else
{
Vmag = 99;
}
sradius = map.value("sradius").toFloat(); sradius = map.value("sradius").toFloat();
effectiveTemp = map.value("effectiveTemp").toInt(); effectiveTemp = map.value("effectiveTemp").toInt();
hasHabitableExoplanets = map.value("hasHP", false).toBool();
if (map.contains("exoplanets")) if (map.contains("exoplanets"))
{ {
foreach(const QVariant &expl, map.value("exoplanets").toList ()) foreach(const QVariant &expl, map.value("exoplanets").toList ())
{ {
QVariantMap exoplanetMap = expl.toMap(); QVariantMap exoplanetMap = expl.toMap();
exoplanetData p; exoplanetData p;
if (exoplanetMap.contains("planetName")) p.planetNam e = exoplanetMap.value("planetName").toString(); if (exoplanetMap.contains("planetName")) p.planetNam e = exoplanetMap.value("planetName").toString();
if (exoplanetMap.contains("period")) p.period = exoplanetMap.value("period", -1.f).toFloa
p.period = exoplanetMap.value("period").toFl t();
oat(); p.mass = exoplanetMap.value("mass", -1.f).toFloat();
else p.radius = exoplanetMap.value("radius", -1.f).toFloa
p.period = -1.f; t();
if (exoplanetMap.contains("mass")) p.semiAxis = exoplanetMap.value("semiAxis", -1.f).to
p.mass = exoplanetMap.value("mass").toFloat( Float();
); p.eccentricity = exoplanetMap.value("eccentricity",
else -1.f).toFloat();
p.mass = -1.f; p.inclination = exoplanetMap.value("inclination", -1
if (exoplanetMap.contains("radius")) .f).toFloat();
p.radius = exoplanetMap.value("radius").toFl p.angleDistance = exoplanetMap.value("angleDistance"
oat(); , -1.f).toFloat();
else p.discovered = exoplanetMap.value("discovered", 0).t
p.radius = -1.f; oInt();
if (exoplanetMap.contains("semiAxis"))
p.semiAxis = exoplanetMap.value("semiAxis").
toFloat();
else
p.semiAxis = -1.f;
if (exoplanetMap.contains("eccentricity"))
p.eccentricity = exoplanetMap.value("eccentr
icity").toFloat();
else
p.eccentricity = -1.f;
if (exoplanetMap.contains("inclination"))
p.inclination = exoplanetMap.value("inclinat
ion").toFloat();
else
p.inclination = -1.f;
if (exoplanetMap.contains("angleDistance"))
p.angleDistance = exoplanetMap.value("angleD
istance").toFloat();
else
p.angleDistance = -1.f;
if (exoplanetMap.contains("discovered"))
p.discovered = exoplanetMap.value("discovere
d").toInt();
else
p.discovered = 0;
exoplanets.append(p); exoplanets.append(p);
} }
} }
initialized = true; initialized = true;
} }
Exoplanet::~Exoplanet() Exoplanet::~Exoplanet()
{ {
// //
skipping to change at line 129 skipping to change at line 98
map["designation"] = designation; map["designation"] = designation;
map["RA"] = RA; map["RA"] = RA;
map["DE"] = DE; map["DE"] = DE;
map["distance"] = distance; map["distance"] = distance;
map["stype"] = stype; map["stype"] = stype;
map["smass"] = smass; map["smass"] = smass;
map["smetal"] = smetal; map["smetal"] = smetal;
map["Vmag"] = Vmag; map["Vmag"] = Vmag;
map["sradius"] = sradius; map["sradius"] = sradius;
map["effectiveTemp"] = effectiveTemp; map["effectiveTemp"] = effectiveTemp;
map["hasHP"] = hasHabitableExoplanets;
QVariantList exoplanetList; QVariantList exoplanetList;
foreach(const exoplanetData &p, exoplanets) foreach(const exoplanetData &p, exoplanets)
{ {
QVariantMap explMap; QVariantMap explMap;
explMap["planetName"] = p.planetName; explMap["planetName"] = p.planetName;
if (p.mass > -1.f) explMap["mass"] = p.mass; if (p.mass > -1.f) explMap["mass"] = p.mass;
if (p.period > -1.f) explMap["period"] = p.period; if (p.period > -1.f) explMap["period"] = p.period;
if (p.radius > -1.f) explMap["radius"] = p.radius; if (p.radius > -1.f) explMap["radius"] = p.radius;
if (p.semiAxis > -1.f) explMap["semiAxis"] = p.semiAxis; if (p.semiAxis > -1.f) explMap["semiAxis"] = p.semiAxis;
if (p.inclination > -1.f) explMap["inclination"] = p.inclina tion; if (p.inclination > -1.f) explMap["inclination"] = p.inclina tion;
 End of changes. 4 change blocks. 
49 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/