SolarSystem.cpp   SolarSystem.cpp 
skipping to change at line 72 skipping to change at line 72
SolarSystem::SolarSystem() SolarSystem::SolarSystem()
: shadowPlanetCount(0) : shadowPlanetCount(0)
, flagMoonScale(false) , flagMoonScale(false)
, moonScale(1.) , moonScale(1.)
, labelsAmount(false) , labelsAmount(false)
, flagOrbits(false) , flagOrbits(false)
, flagLightTravelTime(true) , flagLightTravelTime(true)
, flagShow(false) , flagShow(false)
, flagPointer(false) , flagPointer(false)
, flagNativeNames(false) , flagNativePlanetNames(false)
, flagTranslatedNames(false) , flagTranslatedNames(false)
, flagIsolatedTrails(true) , flagIsolatedTrails(true)
, flagIsolatedOrbits(true) , flagIsolatedOrbits(true)
, ephemerisMarkersDisplayed(true) , ephemerisMarkersDisplayed(true)
, ephemerisDatesDisplayed(false) , ephemerisDatesDisplayed(false)
, allTrails(NULL) , allTrails(NULL)
, conf(StelApp::getInstance().getSettings()) , conf(StelApp::getInstance().getSettings())
{ {
planetNameFont.setPixelSize(StelApp::getInstance().getBaseFontSize() ); planetNameFont.setPixelSize(StelApp::getInstance().getBaseFontSize() );
setObjectName("SolarSystem"); setObjectName("SolarSystem");
skipping to change at line 161 skipping to change at line 161
setFlagPlanets(conf->value("astro/flag_planets").toBool()); setFlagPlanets(conf->value("astro/flag_planets").toBool());
setFlagHints(conf->value("astro/flag_planets_hints").toBool()); setFlagHints(conf->value("astro/flag_planets_hints").toBool());
setFlagLabels(conf->value("astro/flag_planets_labels", true).toBool( )); setFlagLabels(conf->value("astro/flag_planets_labels", true).toBool( ));
setLabelsAmount(conf->value("astro/labels_amount", 3.).toFloat()); setLabelsAmount(conf->value("astro/labels_amount", 3.).toFloat());
setFlagOrbits(conf->value("astro/flag_planets_orbits").toBool()); setFlagOrbits(conf->value("astro/flag_planets_orbits").toBool());
setFlagLightTravelTime(conf->value("astro/flag_light_travel_time", t rue).toBool()); setFlagLightTravelTime(conf->value("astro/flag_light_travel_time", t rue).toBool());
setFlagPointer(conf->value("astro/flag_planets_pointers", true).toBo ol()); setFlagPointer(conf->value("astro/flag_planets_pointers", true).toBo ol());
// Set the algorithm from Astronomical Almanac for computation of ap parent magnitudes for // Set the algorithm from Astronomical Almanac for computation of ap parent magnitudes for
// planets in case observer on the Earth by default // planets in case observer on the Earth by default
setApparentMagnitudeAlgorithmOnEarth(conf->value("astro/apparent_mag nitude_algorithm", "Harris").toString()); setApparentMagnitudeAlgorithmOnEarth(conf->value("astro/apparent_mag nitude_algorithm", "Harris").toString());
setFlagNativeNames(conf->value("viewing/flag_planets_native_names", true).toBool()); setFlagNativePlanetNames(conf->value("viewing/flag_planets_native_na mes", true).toBool());
// Is enabled the showing of isolated trails for selected objects on ly? // Is enabled the showing of isolated trails for selected objects on ly?
setFlagIsolatedTrails(conf->value("viewing/flag_isolated_trails", tr ue).toBool()); setFlagIsolatedTrails(conf->value("viewing/flag_isolated_trails", tr ue).toBool());
setFlagIsolatedOrbits(conf->value("viewing/flag_isolated_orbits", tr ue).toBool()); setFlagIsolatedOrbits(conf->value("viewing/flag_isolated_orbits", tr ue).toBool());
setFlagPermanentOrbits(conf->value("astro/flag_permanent_orbits", fa lse).toBool()); setFlagPermanentOrbits(conf->value("astro/flag_permanent_orbits", fa lse).toBool());
setOrbitColorStyle(conf->value("astro/planets_orbits_color_style", " one_color").toString()); setOrbitColorStyle(conf->value("astro/planets_orbits_color_style", " one_color").toString());
setFlagEphemerisMarkers(conf->value("astro/flag_ephemeris_markers", true).toBool()); setFlagEphemerisMarkers(conf->value("astro/flag_ephemeris_markers", true).toBool());
setFlagEphemerisDates(conf->value("astro/flag_ephemeris_dates", fals e).toBool()); setFlagEphemerisDates(conf->value("astro/flag_ephemeris_dates", fals e).toBool());
// Settings for calculation of position of Great Red Spot on Jupiter // Settings for calculation of position of Great Red Spot on Jupiter
skipping to change at line 190 skipping to change at line 190
setOrbitsColor(StelUtils::strToVec3f(conf->value("color/sso_orbits_c olor", defaultColor).toString())); setOrbitsColor(StelUtils::strToVec3f(conf->value("color/sso_orbits_c olor", defaultColor).toString()));
setMajorPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/ major_planet_orbits_color", "0.7,0.2,0.2").toString())); setMajorPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/ major_planet_orbits_color", "0.7,0.2,0.2").toString()));
setMoonsOrbitsColor(StelUtils::strToVec3f(conf->value("color/moon_or bits_color", "0.7,0.2,0.2").toString())); setMoonsOrbitsColor(StelUtils::strToVec3f(conf->value("color/moon_or bits_color", "0.7,0.2,0.2").toString()));
setMinorPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/ minor_planet_orbits_color", "0.7,0.5,0.5").toString())); setMinorPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/ minor_planet_orbits_color", "0.7,0.5,0.5").toString()));
setDwarfPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/ dwarf_planet_orbits_color", "0.7,0.5,0.5").toString())); setDwarfPlanetsOrbitsColor(StelUtils::strToVec3f(conf->value("color/ dwarf_planet_orbits_color", "0.7,0.5,0.5").toString()));
setCubewanosOrbitsColor(StelUtils::strToVec3f(conf->value("color/cub ewano_orbits_color", "0.7,0.5,0.5").toString())); setCubewanosOrbitsColor(StelUtils::strToVec3f(conf->value("color/cub ewano_orbits_color", "0.7,0.5,0.5").toString()));
setPlutinosOrbitsColor(StelUtils::strToVec3f(conf->value("color/plut ino_orbits_color", "0.7,0.5,0.5").toString())); setPlutinosOrbitsColor(StelUtils::strToVec3f(conf->value("color/plut ino_orbits_color", "0.7,0.5,0.5").toString()));
setScatteredDiskObjectsOrbitsColor(StelUtils::strToVec3f(conf->value ("color/sdo_orbits_color", "0.7,0.5,0.5").toString())); setScatteredDiskObjectsOrbitsColor(StelUtils::strToVec3f(conf->value ("color/sdo_orbits_color", "0.7,0.5,0.5").toString()));
setOortCloudObjectsOrbitsColor(StelUtils::strToVec3f(conf->value("co lor/oco_orbits_color", "0.7,0.5,0.5").toString())); setOortCloudObjectsOrbitsColor(StelUtils::strToVec3f(conf->value("co lor/oco_orbits_color", "0.7,0.5,0.5").toString()));
setCometsOrbitsColor(StelUtils::strToVec3f(conf->value("color/comet_ orbits_color", "0.7,0.8,0.8").toString())); setCometsOrbitsColor(StelUtils::strToVec3f(conf->value("color/comet_ orbits_color", "0.7,0.8,0.8").toString()));
setSednoidsOrbitsColor(StelUtils::strToVec3f(conf->value("color/sedn oid_orbits_color", "0.7,0.5,0.5").toString()));
setMercuryOrbitColor(StelUtils::strToVec3f(conf->value("color/mercur y_orbit_color", "0.5,0.5,0.5").toString())); setMercuryOrbitColor(StelUtils::strToVec3f(conf->value("color/mercur y_orbit_color", "0.5,0.5,0.5").toString()));
setVenusOrbitColor(StelUtils::strToVec3f(conf->value("color/venus_or bit_color", "0.9,0.9,0.7").toString())); setVenusOrbitColor(StelUtils::strToVec3f(conf->value("color/venus_or bit_color", "0.9,0.9,0.7").toString()));
setEarthOrbitColor(StelUtils::strToVec3f(conf->value("color/earth_or bit_color", "0.0,0.0,1.0").toString())); setEarthOrbitColor(StelUtils::strToVec3f(conf->value("color/earth_or bit_color", "0.0,0.0,1.0").toString()));
setMarsOrbitColor(StelUtils::strToVec3f(conf->value("color/mars_orbi t_color", "0.8,0.4,0.1").toString())); setMarsOrbitColor(StelUtils::strToVec3f(conf->value("color/mars_orbi t_color", "0.8,0.4,0.1").toString()));
setJupiterOrbitColor(StelUtils::strToVec3f(conf->value("color/jupite r_orbit_color", "1.0,0.6,0.0").toString())); setJupiterOrbitColor(StelUtils::strToVec3f(conf->value("color/jupite r_orbit_color", "1.0,0.6,0.0").toString()));
setSaturnOrbitColor(StelUtils::strToVec3f(conf->value("color/saturn_ orbit_color", "1.0,0.8,0.0").toString())); setSaturnOrbitColor(StelUtils::strToVec3f(conf->value("color/saturn_ orbit_color", "1.0,0.8,0.0").toString()));
setUranusOrbitColor(StelUtils::strToVec3f(conf->value("color/uranus_ orbit_color", "0.0,0.7,1.0").toString())); setUranusOrbitColor(StelUtils::strToVec3f(conf->value("color/uranus_ orbit_color", "0.0,0.7,1.0").toString()));
setNeptuneOrbitColor(StelUtils::strToVec3f(conf->value("color/neptun e_orbit_color", "0.0,0.3,1.0").toString())); setNeptuneOrbitColor(StelUtils::strToVec3f(conf->value("color/neptun e_orbit_color", "0.0,0.3,1.0").toString()));
setTrailsColor(StelUtils::strToVec3f(conf->value("color/object_trail s_color", defaultColor).toString())); setTrailsColor(StelUtils::strToVec3f(conf->value("color/object_trail s_color", defaultColor).toString()));
setPointerColor(StelUtils::strToVec3f(conf->value("color/planet_poin ters_color", "1.0,0.3,0.3").toString())); setPointerColor(StelUtils::strToVec3f(conf->value("color/planet_poin ters_color", "1.0,0.3,0.3").toString()));
skipping to change at line 226 skipping to change at line 227
connect(&app->getSkyCultureMgr(), SIGNAL(currentSkyCultureChanged(QS tring)), this, SLOT(updateSkyCulture(QString))); connect(&app->getSkyCultureMgr(), SIGNAL(currentSkyCultureChanged(QS tring)), this, SLOT(updateSkyCulture(QString)));
QString displayGroup = N_("Display Options"); QString displayGroup = N_("Display Options");
addAction("actionShow_Planets", displayGroup, N_("Planets"), "planet sDisplayed", "P"); addAction("actionShow_Planets", displayGroup, N_("Planets"), "planet sDisplayed", "P");
addAction("actionShow_Planets_Labels", displayGroup, N_("Planet labe ls"), "labelsDisplayed", "Alt+P"); addAction("actionShow_Planets_Labels", displayGroup, N_("Planet labe ls"), "labelsDisplayed", "Alt+P");
addAction("actionShow_Planets_Orbits", displayGroup, N_("Planet orbi ts"), "flagOrbits", "O"); addAction("actionShow_Planets_Orbits", displayGroup, N_("Planet orbi ts"), "flagOrbits", "O");
addAction("actionShow_Planets_Trails", displayGroup, N_("Planet trai ls"), "trailsDisplayed", "Shift+T"); addAction("actionShow_Planets_Trails", displayGroup, N_("Planet trai ls"), "trailsDisplayed", "Shift+T");
//there is a small discrepancy in the GUI: "Show planet markers" act ually means show planet hints //there is a small discrepancy in the GUI: "Show planet markers" act ually means show planet hints
addAction("actionShow_Planets_Hints", displayGroup, N_("Planet marke rs"), "flagHints", "Ctrl+P"); addAction("actionShow_Planets_Hints", displayGroup, N_("Planet marke rs"), "flagHints", "Ctrl+P");
addAction("actionShow_Planets_Pointers", displayGroup, N_("Planet se lection marker"), "flagPointer", "Ctrl+Shift+P"); addAction("actionShow_Planets_Pointers", displayGroup, N_("Planet se lection marker"), "flagPointer", "Ctrl+Shift+P");
addAction("actionShow_Skyculture_Nativenames", displayGroup, N_("Nat ive planet names (from starlore)"), "flagNativeNames", "Ctrl+Shift+N"); addAction("actionShow_Skyculture_NativePlanetNames", displayGroup, N _("Native planet names (from starlore)"), "flagNativePlanetNames", "Ctrl+Sh ift+N");
} }
void SolarSystem::deinit() void SolarSystem::deinit()
{ {
if(Planet::planetShaderProgram) if(Planet::planetShaderProgram)
Planet::deinitShader(); Planet::deinitShader();
} }
void SolarSystem::recreateTrails() void SolarSystem::recreateTrails()
{ {
skipping to change at line 356 skipping to change at line 357
Vec3f color = getPointerColor(); Vec3f color = getPointerColor();
sPainter.setColor(color[0],color[1],color[2]); sPainter.setColor(color[0],color[1],color[2]);
float size = obj->getAngularSize(core)*M_PI/180.*prj->getPix elPerRadAtCenter()*2.; float size = obj->getAngularSize(core)*M_PI/180.*prj->getPix elPerRadAtCenter()*2.;
const float scale = prj->getDevicePixelsPerPixel()*StelApp:: getInstance().getGlobalScalingRatio(); const float scale = prj->getDevicePixelsPerPixel()*StelApp:: getInstance().getGlobalScalingRatio();
size+= scale * (45.f + 10.f*std::sin(2.f * StelApp::getInsta nce().getAnimationTime())); size+= scale * (45.f + 10.f*std::sin(2.f * StelApp::getInsta nce().getAnimationTime()));
texPointer->bind(); texPointer->bind();
sPainter.enableTexture2d(true); sPainter.setBlending(true);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); // Normal
transparency mode
size*=0.5; size*=0.5;
const float angleBase = StelApp::getInstance().getAnimationT ime() * 10; const float angleBase = StelApp::getInstance().getAnimationT ime() * 10;
// We draw 4 instances of the sprite at the corners of the p ointer // We draw 4 instances of the sprite at the corners of the p ointer
for (int i = 0; i < 4; ++i) for (int i = 0; i < 4; ++i)
{ {
const float angle = angleBase + i * 90; const float angle = angleBase + i * 90;
const double x = screenpos[0] + size * cos(angle / 1 80 * M_PI); const double x = screenpos[0] + size * cos(angle / 1 80 * M_PI);
const double y = screenpos[1] + size * sin(angle / 1 80 * M_PI); const double y = screenpos[1] + size * sin(angle / 1 80 * M_PI);
sPainter.drawSprite2dMode(x, y, 10, angle); sPainter.drawSprite2dMode(x, y, 10, angle);
skipping to change at line 994 skipping to change at line 993
pd.value(secname+"/tex_map"). toString(), pd.value(secname+"/tex_map"). toString(),
pd.value(secname+"/normals_ma p", normalMapName).toString(), pd.value(secname+"/normals_ma p", normalMapName).toString(),
posfunc, posfunc,
userDataPtr, userDataPtr,
osculatingFunc, osculatingFunc,
closeOrbit, closeOrbit,
pd.value(secname+"/hidden", 0 ).toBool(), pd.value(secname+"/hidden", 0 ).toBool(),
pd.value(secname+"/atmosphere ", false).toBool(), pd.value(secname+"/atmosphere ", false).toBool(),
pd.value(secname+"/halo", 0). toBool(), pd.value(secname+"/halo", 0). toBool(),
type)); type));
p->absoluteMagnitude = pd.value(secname+"/absolute_m agnitude", -99.).toDouble();
} }
if (!parent.isNull()) if (!parent.isNull())
{ {
parent->satellites.append(p); parent->satellites.append(p);
p->parent = parent; p->parent = parent;
} }
if (secname=="earth") earth = p; if (secname=="earth") earth = p;
if (secname=="sun") sun = p; if (secname=="sun") sun = p;
if (secname=="moon") moon = p; if (secname=="moon") moon = p;
skipping to change at line 1193 skipping to change at line 1193
{ {
sPainter.setColor(1.0f, 0.7f, 0.0f, 1.0f); sPainter.setColor(1.0f, 0.7f, 0.0f, 1.0f);
size = 6.f; size = 6.f;
} }
else else
{ {
sPainter.setColor(1.0f, 1.0f, 0.0f, 1.0f); sPainter.setColor(1.0f, 1.0f, 0.0f, 1.0f);
size = 4.f; size = 4.f;
} }
glEnable(GL_BLEND); sPainter.setBlending(true, GL_ONE, GL_ONE);
sPainter.enableTexture2d(true);
glBlendFunc(GL_ONE, GL_ONE);
texCircle->bind(); texCircle->bind();
sPainter.drawSprite2dMode(AstroCalcDialog::Ephemeris ListJ2000[i], size); sPainter.drawSprite2dMode(AstroCalcDialog::Ephemeris ListJ2000[i], size);
if (getFlagEphemerisDates()) if (getFlagEphemerisDates())
{ {
shift = 3.f + size/1.6f; shift = 3.f + size/1.6f;
sPainter.drawText(AstroCalcDialog::Ephemeris ListJ2000[i], AstroCalcDialog::EphemerisListDates[i], 0, shift, shift, fals e); sPainter.drawText(AstroCalcDialog::Ephemeris ListJ2000[i], AstroCalcDialog::EphemerisListDates[i], 0, shift, shift, fals e);
} }
} }
skipping to change at line 1340 skipping to change at line 1338
else return StelObjectP(); else return StelObjectP();
} }
// Return a stl vector containing the planets located inside the limFov cir cle around position v // Return a stl vector containing the planets located inside the limFov cir cle around position v
QList<StelObjectP> SolarSystem::searchAround(const Vec3d& vv, double limitF ov, const StelCore* core) const QList<StelObjectP> SolarSystem::searchAround(const Vec3d& vv, double limitF ov, const StelCore* core) const
{ {
QList<StelObjectP> result; QList<StelObjectP> result;
if (!getFlagPlanets()) if (!getFlagPlanets())
return result; return result;
Vec3d v = core->j2000ToEquinoxEqu(vv); Vec3d v = core->j2000ToEquinoxEqu(vv, StelCore::RefractionOff);
v.normalize(); v.normalize();
double cosLimFov = std::cos(limitFov * M_PI/180.); double cosLimFov = std::cos(limitFov * M_PI/180.);
Vec3d equPos; Vec3d equPos;
double cosAngularSize; double cosAngularSize;
foreach (const PlanetP& p, systemPlanets) foreach (const PlanetP& p, systemPlanets)
{ {
equPos = p->getEquinoxEquatorialPos(core); equPos = p->getEquinoxEquatorialPos(core);
equPos.normalize(); equPos.normalize();
skipping to change at line 1429 skipping to change at line 1427
foreach (const PlanetP& p, systemPlanets) foreach (const PlanetP& p, systemPlanets)
{ {
if (p->getFlagLabels()) if (p->getFlagLabels())
return true; return true;
} }
return false; return false;
} }
void SolarSystem::setFlagOrbits(bool b) void SolarSystem::setFlagOrbits(bool b)
{ {
bool old = flagOrbits;
flagOrbits = b; flagOrbits = b;
if (!b || !selected || selected==sun) if (!b || !selected || selected==sun)
{ {
foreach (PlanetP p, systemPlanets) foreach (PlanetP p, systemPlanets)
p->setFlagOrbits(b); p->setFlagOrbits(b);
} }
else if (getFlagIsolatedOrbits()) else if (getFlagIsolatedOrbits())
{ {
// If a Planet is selected and orbits are on, fade out non-s elected ones // If a Planet is selected and orbits are on, fade out non-s elected ones
foreach (PlanetP p, systemPlanets) foreach (PlanetP p, systemPlanets)
skipping to change at line 1457 skipping to change at line 1456
{ {
// A planet is selected and orbits are on - draw orbits for the planet and their moons // A planet is selected and orbits are on - draw orbits for the planet and their moons
foreach (PlanetP p, systemPlanets) foreach (PlanetP p, systemPlanets)
{ {
if (selected == p || selected == p->parent) if (selected == p || selected == p->parent)
p->setFlagOrbits(b); p->setFlagOrbits(b);
else else
p->setFlagOrbits(false); p->setFlagOrbits(false);
} }
} }
emit flagOrbitsChanged(b); if(old != flagOrbits)
emit flagOrbitsChanged(flagOrbits);
} }
void SolarSystem::setFlagLightTravelTime(bool b) void SolarSystem::setFlagLightTravelTime(bool b)
{ {
if(b!=flagLightTravelTime) if(b!=flagLightTravelTime)
{ {
flagLightTravelTime = b; flagLightTravelTime = b;
emit flagLightTravelTimeChanged(b); emit flagLightTravelTimeChanged(b);
} }
} }
skipping to change at line 1618 skipping to change at line 1618
conf->setValue("astro/flag_ephemeris_dates", b); // Immediat e saving of state conf->setValue("astro/flag_ephemeris_dates", b); // Immediat e saving of state
emit ephemerisDatesChanged(b); emit ephemerisDatesChanged(b);
} }
} }
bool SolarSystem::getFlagEphemerisDates() const bool SolarSystem::getFlagEphemerisDates() const
{ {
return ephemerisDatesDisplayed; return ephemerisDatesDisplayed;
} }
void SolarSystem::setFlagNativeNames(bool b) void SolarSystem::setFlagNativePlanetNames(bool b)
{ {
if (b!=flagNativeNames) if (b!=flagNativePlanetNames)
{ {
flagNativeNames=b; flagNativePlanetNames=b;
foreach (const PlanetP& p, systemPlanets) foreach (const PlanetP& p, systemPlanets)
{ {
if (p->getPlanetType()==Planet::isPlanet || p->getPl anetType()==Planet::isMoon || p->getPlanetType()==Planet::isStar) if (p->getPlanetType()==Planet::isPlanet || p->getPl anetType()==Planet::isMoon || p->getPlanetType()==Planet::isStar)
p->setFlagNativeName(flagNativeNames); p->setFlagNativeName(flagNativePlanetNames);
} }
updateI18n(); updateI18n();
emit flagNativeNamesChanged(b); emit flagNativePlanetNamesChanged(b);
} }
} }
bool SolarSystem::getFlagNativeNames() const bool SolarSystem::getFlagNativePlanetNames() const
{ {
return flagNativeNames; return flagNativePlanetNames;
} }
void SolarSystem::setFlagTranslatedNames(bool b) void SolarSystem::setFlagTranslatedNames(bool b)
{ {
if (b!=flagTranslatedNames) if (b!=flagTranslatedNames)
{ {
flagTranslatedNames=b; flagTranslatedNames=b;
foreach (const PlanetP& p, systemPlanets) foreach (const PlanetP& p, systemPlanets)
{ {
if (p->getPlanetType()==Planet::isPlanet || p->getPl anetType()==Planet::isMoon || p->getPlanetType()==Planet::isStar) if (p->getPlanetType()==Planet::isPlanet || p->getPl anetType()==Planet::isMoon || p->getPlanetType()==Planet::isStar)
skipping to change at line 1798 skipping to change at line 1798
void SolarSystem::setCometsOrbitsColor(const Vec3f& c) void SolarSystem::setCometsOrbitsColor(const Vec3f& c)
{ {
Planet::setCometOrbitColor(c); Planet::setCometOrbitColor(c);
} }
Vec3f SolarSystem::getCometsOrbitsColor(void) const Vec3f SolarSystem::getCometsOrbitsColor(void) const
{ {
return Planet::getCometOrbitColor(); return Planet::getCometOrbitColor();
} }
void SolarSystem::setSednoidsOrbitsColor(const Vec3f& c)
{
Planet::setSednoidOrbitColor(c);
}
Vec3f SolarSystem::getSednoidsOrbitsColor(void) const
{
return Planet::getSednoidOrbitColor();
}
void SolarSystem::setMercuryOrbitColor(const Vec3f &c) void SolarSystem::setMercuryOrbitColor(const Vec3f &c)
{ {
Planet::setMercuryOrbitColor(c); Planet::setMercuryOrbitColor(c);
} }
Vec3f SolarSystem::getMercuryOrbitColor(void) const Vec3f SolarSystem::getMercuryOrbitColor(void) const
{ {
return Planet::getMercuryOrbitColor(); return Planet::getMercuryOrbitColor();
} }
skipping to change at line 1934 skipping to change at line 1944
void SolarSystem::reloadPlanets() void SolarSystem::reloadPlanets()
{ {
// Save flag states // Save flag states
bool flagScaleMoon = getFlagMoonScale(); bool flagScaleMoon = getFlagMoonScale();
float moonScale = getMoonScale(); float moonScale = getMoonScale();
bool flagPlanets = getFlagPlanets(); bool flagPlanets = getFlagPlanets();
bool flagHints = getFlagHints(); bool flagHints = getFlagHints();
bool flagLabels = getFlagLabels(); bool flagLabels = getFlagLabels();
bool flagOrbits = getFlagOrbits(); bool flagOrbits = getFlagOrbits();
bool flagNative = getFlagNativeNames(); bool flagNative = getFlagNativePlanetNames();
bool flagTrans = getFlagTranslatedNames(); bool flagTrans = getFlagTranslatedNames();
bool hasSelection = false; bool hasSelection = false;
// Save observer location (fix for LP bug # 969211) // Save observer location (fix for LP bug # 969211)
// TODO: This can probably be done better with a better understandin g of StelObserver --BM // TODO: This can probably be done better with a better understandin g of StelObserver --BM
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
StelLocation loc = core->getCurrentLocation(); StelLocation loc = core->getCurrentLocation();
StelObjectMgr* objMgr = GETSTELMODULE(StelObjectMgr); StelObjectMgr* objMgr = GETSTELMODULE(StelObjectMgr);
// Whether any planet are selected? Save the current selection... // Whether any planet are selected? Save the current selection...
skipping to change at line 1997 skipping to change at line 2007
// Restore observer location // Restore observer location
core->moveObserverTo(loc, 0., 0.); core->moveObserverTo(loc, 0., 0.);
// Restore flag states // Restore flag states
setFlagMoonScale(flagScaleMoon); setFlagMoonScale(flagScaleMoon);
setMoonScale(moonScale); setMoonScale(moonScale);
setFlagPlanets(flagPlanets); setFlagPlanets(flagPlanets);
setFlagHints(flagHints); setFlagHints(flagHints);
setFlagLabels(flagLabels); setFlagLabels(flagLabels);
setFlagOrbits(flagOrbits); setFlagOrbits(flagOrbits);
setFlagNativeNames(flagNative); setFlagNativePlanetNames(flagNative);
setFlagTranslatedNames(flagTrans); setFlagTranslatedNames(flagTrans);
if (hasSelection) if (hasSelection)
{ {
// Restore selection... // Restore selection...
objMgr->setSelectedObject(selectedObject); objMgr->setSelectedObject(selectedObject);
} }
// Restore translations // Restore translations
updateI18n(); updateI18n();
emit solarSystemDataReloaded();
} }
// Set the algorithm for computation of apparent magnitudes for planets in case observer on the Earth // Set the algorithm for computation of apparent magnitudes for planets in case observer on the Earth
void SolarSystem::setApparentMagnitudeAlgorithmOnEarth(QString algorithm) void SolarSystem::setApparentMagnitudeAlgorithmOnEarth(QString algorithm)
{ {
getEarth()->setApparentMagnitudeAlgorithm(algorithm); getEarth()->setApparentMagnitudeAlgorithm(algorithm);
} }
// Get the algorithm used for computation of apparent magnitudes for planet s in case observer on the Earth // Get the algorithm used for computation of apparent magnitudes for planet s in case observer on the Earth
QString SolarSystem::getApparentMagnitudeAlgorithmOnEarth() const QString SolarSystem::getApparentMagnitudeAlgorithmOnEarth() const
 End of changes. 21 change blocks. 
21 lines changed or deleted 32 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/