GridLinesMgr.cpp   GridLinesMgr.cpp 
skipping to change at line 78 skipping to change at line 78
{ {
EQUATOR_J2000, EQUATOR_J2000,
EQUATOR_OF_DATE, EQUATOR_OF_DATE,
ECLIPTIC_J2000, ECLIPTIC_J2000,
ECLIPTIC_OF_DATE, ECLIPTIC_OF_DATE,
PRECESSIONCIRCLE_N, PRECESSIONCIRCLE_N,
PRECESSIONCIRCLE_S, PRECESSIONCIRCLE_S,
MERIDIAN, MERIDIAN,
HORIZON, HORIZON,
GALACTICEQUATOR, GALACTICEQUATOR,
LONGITUDE LONGITUDE,
PRIME_VERTICAL,
COLURE_1,
COLURE_2,
CIRCUMPOLARCIRCLE_N,
CIRCUMPOLARCIRCLE_S
}; };
// Create and precompute positions of a SkyGrid // Create and precompute positions of a SkyGrid
SkyLine(SKY_LINE_TYPE _line_type = EQUATOR_J2000); SkyLine(SKY_LINE_TYPE _line_type = EQUATOR_J2000);
virtual ~SkyLine(); virtual ~SkyLine();
void draw(StelCore* core) const; void draw(StelCore* core) const;
void setColor(const Vec3f& c) {color = c;} void setColor(const Vec3f& c) {color = c;}
const Vec3f& getColor() {return color;} const Vec3f& getColor() {return color;}
void update(double deltaTime) {fader.update((int)(deltaTime*1000));} void update(double deltaTime) {fader.update((int)(deltaTime*1000));}
void setFadeDuration(float duration) {fader.setDuration((int)(durati on*1000.f));} void setFadeDuration(float duration) {fader.setDuration((int)(durati on*1000.f));}
void setDisplayed(const bool displayed){fader = displayed;} void setDisplayed(const bool displayed){fader = displayed;}
skipping to change at line 626 skipping to change at line 631
break; break;
case HORIZON: case HORIZON:
frameType = StelCore::FrameAltAz; frameType = StelCore::FrameAltAz;
label = q_("Horizon"); label = q_("Horizon");
break; break;
case GALACTICEQUATOR: case GALACTICEQUATOR:
frameType = StelCore::FrameGalactic; frameType = StelCore::FrameGalactic;
label = q_("Galactic Equator"); label = q_("Galactic Equator");
break; break;
case LONGITUDE: case LONGITUDE:
frameType = StelCore::FrameObservercentricEclipticJ2 000; // TODO: Switch to FrameObservercentriEclipticOfDate frameType = StelCore::FrameObservercentricEclipticJ2 000;
// TRANSLATORS: Full term is "opposition/conjunction longitude" // TRANSLATORS: Full term is "opposition/conjunction longitude"
label = q_("O./C. longitude"); label = q_("O./C. longitude");
break; break;
case PRIME_VERTICAL:
frameType=StelCore::FrameAltAz;
label = q_("Prime Vertical");
break;
case COLURE_1:
frameType=StelCore::FrameEquinoxEqu;
label = q_("Equinoctial Colure");
break;
case COLURE_2:
frameType=StelCore::FrameEquinoxEqu;
label = q_("Solstitial Colure");
break;
case CIRCUMPOLARCIRCLE_N:
case CIRCUMPOLARCIRCLE_S:
frameType = StelCore::FrameEquinoxEqu;
label = q_("Circumpolar Circle");
break;
default: default:
Q_ASSERT(0); Q_ASSERT(0);
} }
} }
void SkyLine::draw(StelCore *core) const void SkyLine::draw(StelCore *core) const
{ {
if (!fader.getInterstate()) if (!fader.getInterstate())
return; return;
skipping to change at line 664 skipping to change at line 686
Vec4f textColor(color[0], color[1], color[2], 0); Vec4f textColor(color[0], color[1], color[2], 0);
textColor[3]=fader.getInterstate(); textColor[3]=fader.getInterstate();
ViewportEdgeIntersectCallbackData userData(&sPainter); ViewportEdgeIntersectCallbackData userData(&sPainter);
sPainter.setFont(font); sPainter.setFont(font);
userData.textColor = textColor; userData.textColor = textColor;
userData.text = label; userData.text = label;
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Draw the line // Draw the line
// Precession circles are Small Circles, all others are Great Circle // Precession and Circumpolar circles are Small Circles, all others
s. are Great Circles.
if (line_type==PRECESSIONCIRCLE_N || line_type==PRECESSIONCIRCLE_S) if (line_type==PRECESSIONCIRCLE_N || line_type==PRECESSIONCIRCLE_S |
| line_type==CIRCUMPOLARCIRCLE_N || line_type==CIRCUMPOLARCIRCLE_S)
{ {
const double lat=(line_type==PRECESSIONCIRCLE_S ? -1.0 : 1.0 double lat;
) * (M_PI/2.0-getPrecessionAngleVondrakCurrentEpsilonA()); if (line_type==PRECESSIONCIRCLE_N || line_type==PRECESSIONCI
RCLE_S)
{
lat=(line_type==PRECESSIONCIRCLE_S ? -1.0 : 1.0) * (
M_PI/2.0-getPrecessionAngleVondrakCurrentEpsilonA());
}
else // circumpolar:
{
const double obsLatRad=core->getCurrentLocation().la
titude * (M_PI/180.);
if (obsLatRad == 0.)
return;
if (line_type==CIRCUMPOLARCIRCLE_N)
lat=(obsLatRad>0 ? -1.0 : +1.0) * obsLatRad
+ (M_PI/2.0);
else // southern circle
lat=(obsLatRad>0 ? +1.0 : -1.0) * obsLatRad
- (M_PI/2.0);
}
SphericalCap declinationCap(Vec3d(0,0,1), std::sin(lat)); SphericalCap declinationCap(Vec3d(0,0,1), std::sin(lat));
const Vec3d rotCenter(0,0,declinationCap.d); const Vec3d rotCenter(0,0,declinationCap.d);
Vec3d p1, p2; Vec3d p1, p2;
if (!SphericalCap::intersectionPoints(viewPortSphericalCap, declinationCap, p1, p2)) if (!SphericalCap::intersectionPoints(viewPortSphericalCap, declinationCap, p1, p2))
{ {
if ((viewPortSphericalCap.d<declinationCap.d && view PortSphericalCap.contains(declinationCap.n)) if ((viewPortSphericalCap.d<declinationCap.d && view PortSphericalCap.contains(declinationCap.n))
|| (viewPortSphericalCap.d<-declinationCap.d && viewPortSphericalCap.contains(-declinationCap.n))) || (viewPortSphericalCap.d<-declinationCap.d && viewPortSphericalCap.contains(-declinationCap.n)))
{ {
// The line is fully included in the viewpor t, draw it in 3 sub-arcs to avoid length > 180. // The line is fully included in the viewpor t, draw it in 3 sub-arcs to avoid length > 180.
skipping to change at line 737 skipping to change at line 775
#endif #endif
glDisable(GL_BLEND); glDisable(GL_BLEND);
return; return;
} }
// All the other "lines" are Great Circles // All the other "lines" are Great Circles
SphericalCap meridianSphericalCap(Vec3d(0,0,1), 0); SphericalCap meridianSphericalCap(Vec3d(0,0,1), 0);
Vec3d fpt(1,0,0); Vec3d fpt(1,0,0);
if (line_type==MERIDIAN) if ((line_type==MERIDIAN) || (line_type==COLURE_1))
{ {
meridianSphericalCap.n.set(0,1,0); meridianSphericalCap.n.set(0,1,0);
} }
if ((line_type==PRIME_VERTICAL) || (line_type==COLURE_2))
{
meridianSphericalCap.n.set(1,0,0);
fpt.set(0,0,1);
}
if (line_type==LONGITUDE) if (line_type==LONGITUDE)
{ {
Vec3d coord; Vec3d coord;
double lambda, beta; double lambda, beta;
StelUtils::rectToSphe(&lambda, &beta, core->getCurrentPlanet ()->getHeliocentricEclipticPos()); StelUtils::rectToSphe(&lambda, &beta, core->getCurrentPlanet ()->getHeliocentricEclipticPos());
StelUtils::spheToRect(lambda + M_PI/2., 0., coord); StelUtils::spheToRect(lambda + M_PI/2., 0., coord);
meridianSphericalCap.n.set(coord[0],coord[1],coord[2]); meridianSphericalCap.n.set(coord[0],coord[1],coord[2]);
fpt.set(0,0,1); fpt.set(0,0,1);
} }
skipping to change at line 808 skipping to change at line 850
setObjectName("GridLinesMgr"); setObjectName("GridLinesMgr");
equGrid = new SkyGrid(StelCore::FrameEquinoxEqu); equGrid = new SkyGrid(StelCore::FrameEquinoxEqu);
equJ2000Grid = new SkyGrid(StelCore::FrameJ2000); equJ2000Grid = new SkyGrid(StelCore::FrameJ2000);
eclJ2000Grid = new SkyGrid(StelCore::FrameObservercentricEclipticJ20 00); eclJ2000Grid = new SkyGrid(StelCore::FrameObservercentricEclipticJ20 00);
eclGrid = new SkyGrid(StelCore::FrameObservercentricEclipticOfDate); eclGrid = new SkyGrid(StelCore::FrameObservercentricEclipticOfDate);
galacticGrid = new SkyGrid(StelCore::FrameGalactic); galacticGrid = new SkyGrid(StelCore::FrameGalactic);
aziGrid = new SkyGrid(StelCore::FrameAltAz); aziGrid = new SkyGrid(StelCore::FrameAltAz);
equatorLine = new SkyLine(SkyLine::EQUATOR_OF_DATE); equatorLine = new SkyLine(SkyLine::EQUATOR_OF_DATE);
equatorJ2000Line = new SkyLine(SkyLine::EQUATOR_J2000); equatorJ2000Line = new SkyLine(SkyLine::EQUATOR_J2000);
eclipticJ2000Line = new SkyLine(SkyLine::ECLIPTIC_J2000); // previou s eclipticLine eclipticJ2000Line = new SkyLine(SkyLine::ECLIPTIC_J2000); // previou s eclipticLine
eclipticLine = new SkyLine(SkyLine::ECLIPTIC_OF_DATE); // GZ NEW eclipticLine = new SkyLine(SkyLine::ECLIPTIC_OF_DATE); // NEW in 0.1 4
precessionCircleN = new SkyLine(SkyLine::PRECESSIONCIRCLE_N); precessionCircleN = new SkyLine(SkyLine::PRECESSIONCIRCLE_N);
precessionCircleS = new SkyLine(SkyLine::PRECESSIONCIRCLE_S); precessionCircleS = new SkyLine(SkyLine::PRECESSIONCIRCLE_S);
meridianLine = new SkyLine(SkyLine::MERIDIAN); meridianLine = new SkyLine(SkyLine::MERIDIAN);
horizonLine = new SkyLine(SkyLine::HORIZON); horizonLine = new SkyLine(SkyLine::HORIZON);
galacticEquatorLine = new SkyLine(SkyLine::GALACTICEQUATOR); galacticEquatorLine = new SkyLine(SkyLine::GALACTICEQUATOR);
longitudeLine = new SkyLine(SkyLine::LONGITUDE); longitudeLine = new SkyLine(SkyLine::LONGITUDE);
primeVerticalLine = new SkyLine(SkyLine::PRIME_VERTICAL);
colureLine_1 = new SkyLine(SkyLine::COLURE_1);
colureLine_2 = new SkyLine(SkyLine::COLURE_2);
circumpolarCircleN = new SkyLine(SkyLine::CIRCUMPOLARCIRCLE_N);
circumpolarCircleS = new SkyLine(SkyLine::CIRCUMPOLARCIRCLE_S);
} }
GridLinesMgr::~GridLinesMgr() GridLinesMgr::~GridLinesMgr()
{ {
delete equGrid; delete equGrid;
delete equJ2000Grid; delete equJ2000Grid;
delete eclJ2000Grid; delete eclJ2000Grid;
delete eclGrid; delete eclGrid;
delete galacticGrid; delete galacticGrid;
delete aziGrid; delete aziGrid;
delete equatorLine; delete equatorLine;
delete equatorJ2000Line; delete equatorJ2000Line;
delete eclipticLine; delete eclipticLine;
delete eclipticJ2000Line; delete eclipticJ2000Line;
delete precessionCircleN; delete precessionCircleN;
delete precessionCircleS; delete precessionCircleS;
delete meridianLine; delete meridianLine;
delete horizonLine; delete horizonLine;
delete galacticEquatorLine; delete galacticEquatorLine;
delete longitudeLine; delete longitudeLine;
delete primeVerticalLine;
delete colureLine_1;
delete colureLine_2;
delete circumpolarCircleN;
delete circumpolarCircleS;
} }
/************************************************************************* /*************************************************************************
Reimplementation of the getCallOrder method Reimplementation of the getCallOrder method
*************************************************************************/ *************************************************************************/
double GridLinesMgr::getCallOrder(StelModuleActionName actionName) const double GridLinesMgr::getCallOrder(StelModuleActionName actionName) const
{ {
if (actionName==StelModule::ActionDraw) if (actionName==StelModule::ActionDraw)
return StelApp::getInstance().getModuleMgr().getModule("Nebu laMgr")->getCallOrder(actionName)+10; return StelApp::getInstance().getModuleMgr().getModule("Nebu laMgr")->getCallOrder(actionName)+10;
return 0; return 0;
skipping to change at line 867 skipping to change at line 919
setFlagGalacticGrid(conf->value("viewing/flag_galactic_grid").toBool ()); setFlagGalacticGrid(conf->value("viewing/flag_galactic_grid").toBool ());
setFlagEquatorLine(conf->value("viewing/flag_equator_line").toBool() ); setFlagEquatorLine(conf->value("viewing/flag_equator_line").toBool() );
setFlagEquatorJ2000Line(conf->value("viewing/flag_equator_J2000_line ").toBool()); setFlagEquatorJ2000Line(conf->value("viewing/flag_equator_J2000_line ").toBool());
setFlagEclipticLine(conf->value("viewing/flag_ecliptic_line").toBool ()); setFlagEclipticLine(conf->value("viewing/flag_ecliptic_line").toBool ());
setFlagEclipticJ2000Line(conf->value("viewing/flag_ecliptic_J2000_li ne").toBool()); setFlagEclipticJ2000Line(conf->value("viewing/flag_ecliptic_J2000_li ne").toBool());
setFlagPrecessionCircles(conf->value("viewing/flag_precession_circle s").toBool()); setFlagPrecessionCircles(conf->value("viewing/flag_precession_circle s").toBool());
setFlagMeridianLine(conf->value("viewing/flag_meridian_line").toBool ()); setFlagMeridianLine(conf->value("viewing/flag_meridian_line").toBool ());
setFlagHorizonLine(conf->value("viewing/flag_horizon_line").toBool() ); setFlagHorizonLine(conf->value("viewing/flag_horizon_line").toBool() );
setFlagGalacticEquatorLine(conf->value("viewing/flag_galactic_equato r_line").toBool()); setFlagGalacticEquatorLine(conf->value("viewing/flag_galactic_equato r_line").toBool());
setFlagLongitudeLine(conf->value("viewing/flag_longitude_line").toBo ol()); setFlagLongitudeLine(conf->value("viewing/flag_longitude_line").toBo ol());
setFlagPrimeVerticalLine(conf->value("viewing/flag_prime_vertical_li
ne").toBool());
setFlagColureLines(conf->value("viewing/flag_colure_lines").toBool()
);
setFlagCircumpolarCircles(conf->value("viewing/flag_circumpolar_circ
les").toBool());
// Load colors from config file
QString defaultColor = conf->value("color/default_color").toString()
;
setColorEquatorGrid(StelUtils::strToVec3f(conf->value("color/equator
ial_color", defaultColor).toString()));
setColorEquatorJ2000Grid(StelUtils::strToVec3f(conf->value("color/eq
uatorial_J2000_color", defaultColor).toString()));
setColorEclipticJ2000Grid(StelUtils::strToVec3f(conf->value("color/e
cliptical_J2000_color", defaultColor).toString()));
setColorEclipticGrid(StelUtils::strToVec3f(conf->value("color/eclipt
ical_color", defaultColor).toString()));
setColorGalacticGrid(StelUtils::strToVec3f(conf->value("color/galact
ic_color", defaultColor).toString()));
setColorAzimuthalGrid(StelUtils::strToVec3f(conf->value("color/azimu
thal_color", defaultColor).toString()));
setColorEquatorLine(StelUtils::strToVec3f(conf->value("color/equator
_color", defaultColor).toString()));
setColorEclipticLine(StelUtils::strToVec3f(conf->value("color/eclipt
ic_color", defaultColor).toString()));
setColorEclipticJ2000Line(StelUtils::strToVec3f(conf->value("color/e
cliptic_J2000_color", defaultColor).toString()));
setColorPrecessionCircles(StelUtils::strToVec3f(conf->value("color/p
recession_circles_color", defaultColor).toString()));
setColorMeridianLine(StelUtils::strToVec3f(conf->value("color/meridi
an_color", defaultColor).toString()));
setColorHorizonLine(StelUtils::strToVec3f(conf->value("color/horizon
_color", defaultColor).toString()));
setColorGalacticEquatorLine(StelUtils::strToVec3f(conf->value("color
/galactic_equator_color", defaultColor).toString()));
setColorLongitudeLine(StelUtils::strToVec3f(conf->value("color/longi
tude_color", defaultColor).toString()));
setColorPrimeVerticalLine(StelUtils::strToVec3f(conf->value("color/p
rime_vertical_color", defaultColor).toString()));
setColorColureLines(StelUtils::strToVec3f(conf->value("color/colures
_color", defaultColor).toString()));
setColorCircumpolarCircles(StelUtils::strToVec3f(conf->value("color/
circumpolar_circles_color", defaultColor).toString()));
StelApp& app = StelApp::getInstance(); StelApp& app = StelApp::getInstance();
connect(&app, SIGNAL(colorSchemeChanged(const QString&)), this, SLOT (setStelStyle(const QString&)));
connect(&app, SIGNAL(languageChanged()), this, SLOT(updateLineLabels ())); connect(&app, SIGNAL(languageChanged()), this, SLOT(updateLineLabels ()));
QString displayGroup = N_("Display Options"); QString displayGroup = N_("Display Options");
addAction("actionShow_Equatorial_Grid", displayGroup, N_("Equatorial grid"), "equatorGridDisplayed", "E"); addAction("actionShow_Equatorial_Grid", displayGroup, N_("Equatorial grid"), "equatorGridDisplayed", "E");
addAction("actionShow_Azimuthal_Grid", displayGroup, N_("Azimuthal g rid"), "azimuthalGridDisplayed", "Z"); addAction("actionShow_Azimuthal_Grid", displayGroup, N_("Azimuthal g rid"), "azimuthalGridDisplayed", "Z");
addAction("actionShow_Ecliptic_Line", displayGroup, N_("Ecliptic lin e"), "eclipticLineDisplayed", ","); addAction("actionShow_Ecliptic_Line", displayGroup, N_("Ecliptic lin e"), "eclipticLineDisplayed", ",");
addAction("actionShow_Ecliptic_J2000_Line", displayGroup, N_("Eclipt ic J2000 line"), "eclipticJ2000LineDisplayed"); addAction("actionShow_Ecliptic_J2000_Line", displayGroup, N_("Eclipt ic J2000 line"), "eclipticJ2000LineDisplayed");
addAction("actionShow_Equator_Line", displayGroup, N_("Equator line" ), "equatorLineDisplayed", "."); addAction("actionShow_Equator_Line", displayGroup, N_("Equator line" ), "equatorLineDisplayed", ".");
addAction("actionShow_Equator_J2000_Line", displayGroup, N_("Equator J2000 line"), "equatorJ2000LineDisplayed"); // or with Hotkey?? addAction("actionShow_Equator_J2000_Line", displayGroup, N_("Equator J2000 line"), "equatorJ2000LineDisplayed"); // or with Hotkey??
addAction("actionShow_Meridian_Line", displayGroup, N_("Meridian lin e"), "meridianLineDisplayed", ";"); addAction("actionShow_Meridian_Line", displayGroup, N_("Meridian lin e"), "meridianLineDisplayed", ";");
addAction("actionShow_Horizon_Line", displayGroup, N_("Horizon line" ), "horizonLineDisplayed", "H"); addAction("actionShow_Horizon_Line", displayGroup, N_("Horizon line" ), "horizonLineDisplayed", "H");
addAction("actionShow_Equatorial_J2000_Grid", displayGroup, N_("Equa torial J2000 grid"), "equatorJ2000GridDisplayed"); addAction("actionShow_Equatorial_J2000_Grid", displayGroup, N_("Equa torial J2000 grid"), "equatorJ2000GridDisplayed");
addAction("actionShow_Ecliptic_J2000_Grid", displayGroup, N_("Eclipt ic J2000 grid"), "eclipticJ2000GridDisplayed"); addAction("actionShow_Ecliptic_J2000_Grid", displayGroup, N_("Eclipt ic J2000 grid"), "eclipticJ2000GridDisplayed");
addAction("actionShow_Ecliptic_Grid", displayGroup, N_("Ecliptic gri d"), "eclipticGridDisplayed"); addAction("actionShow_Ecliptic_Grid", displayGroup, N_("Ecliptic gri d"), "eclipticGridDisplayed");
addAction("actionShow_Galactic_Grid", displayGroup, N_("Galactic gri d"), "galacticGridDisplayed"); addAction("actionShow_Galactic_Grid", displayGroup, N_("Galactic gri d"), "galacticGridDisplayed");
addAction("actionShow_Galactic_Equator_Line", displayGroup, N_("Gala ctic equator"), "galacticEquatorLineDisplayed"); addAction("actionShow_Galactic_Equator_Line", displayGroup, N_("Gala ctic equator"), "galacticEquatorLineDisplayed");
addAction("actionShow_Longitude_Line", displayGroup, N_("Opposition/ conjunction longitude line"), "longitudeLineDisplayed"); addAction("actionShow_Longitude_Line", displayGroup, N_("Opposition/ conjunction longitude line"), "longitudeLineDisplayed");
addAction("actionShow_Precession_Circles", displayGroup, N_("Precess ion Circles"), "precessionCirclesDisplayed"); addAction("actionShow_Precession_Circles", displayGroup, N_("Precess ion Circles"), "precessionCirclesDisplayed");
addAction("actionShow_Prime_Vertical_Line", displayGroup, N_("Prime
Vertical"), "primeVerticalLineDisplayed");
addAction("actionShow_Colure_Lines", displayGroup, N_("Colure Lines"
), "colureLinesDisplayed");
addAction("actionShow_Circumpolar_Circles", displayGroup, N_("Circum
polar Circles"), "circumpolarCirclesDisplayed");
} }
void GridLinesMgr::update(double deltaTime) void GridLinesMgr::update(double deltaTime)
{ {
// Update faders // Update faders
equGrid->update(deltaTime); equGrid->update(deltaTime);
equJ2000Grid->update(deltaTime); equJ2000Grid->update(deltaTime);
eclJ2000Grid->update(deltaTime); eclJ2000Grid->update(deltaTime);
eclGrid->update(deltaTime); eclGrid->update(deltaTime);
galacticGrid->update(deltaTime); galacticGrid->update(deltaTime);
skipping to change at line 909 skipping to change at line 986
equatorLine->update(deltaTime); equatorLine->update(deltaTime);
equatorJ2000Line->update(deltaTime); equatorJ2000Line->update(deltaTime);
eclipticLine->update(deltaTime); eclipticLine->update(deltaTime);
eclipticJ2000Line->update(deltaTime); eclipticJ2000Line->update(deltaTime);
precessionCircleN->update(deltaTime); precessionCircleN->update(deltaTime);
precessionCircleS->update(deltaTime); precessionCircleS->update(deltaTime);
meridianLine->update(deltaTime); meridianLine->update(deltaTime);
horizonLine->update(deltaTime); horizonLine->update(deltaTime);
galacticEquatorLine->update(deltaTime); galacticEquatorLine->update(deltaTime);
longitudeLine->update(deltaTime); longitudeLine->update(deltaTime);
primeVerticalLine->update(deltaTime);
colureLine_1->update(deltaTime);
colureLine_2->update(deltaTime);
circumpolarCircleN->update(deltaTime);
circumpolarCircleS->update(deltaTime);
} }
void GridLinesMgr::draw(StelCore* core) void GridLinesMgr::draw(StelCore* core)
{ {
galacticGrid->draw(core); galacticGrid->draw(core);
eclJ2000Grid->draw(core); eclJ2000Grid->draw(core);
// While ecliptic of J2000 may be helpful to get a feeling of the Z= 0 plane of VSOP87, // While ecliptic of J2000 may be helpful to get a feeling of the Z= 0 plane of VSOP87,
// ecliptic of date is related to Earth and does not make much sense for the other planets. // ecliptic of date is related to Earth and does not make much sense for the other planets.
// Of course, orbital plane of respective planet would be better, bu t is not implemented. // Of course, orbital plane of respective planet would be better, bu t is not implemented.
if (core->getCurrentPlanet()->getEnglishName()=="Earth") if (core->getCurrentPlanet()->getEnglishName()=="Earth")
skipping to change at line 931 skipping to change at line 1013
equGrid->draw(core); equGrid->draw(core);
aziGrid->draw(core); aziGrid->draw(core);
// Lines after grids, to be able to e.g. draw equators in different color! // Lines after grids, to be able to e.g. draw equators in different color!
galacticEquatorLine->draw(core); galacticEquatorLine->draw(core);
eclipticJ2000Line->draw(core); eclipticJ2000Line->draw(core);
if (core->getCurrentPlanet()->getEnglishName()=="Earth") if (core->getCurrentPlanet()->getEnglishName()=="Earth")
{ {
eclipticLine->draw(core); eclipticLine->draw(core);
precessionCircleN->draw(core); precessionCircleN->draw(core);
precessionCircleS->draw(core); precessionCircleS->draw(core);
colureLine_1->draw(core);
colureLine_2->draw(core);
} }
longitudeLine->draw(core); longitudeLine->draw(core);
equatorJ2000Line->draw(core); equatorJ2000Line->draw(core);
equatorLine->draw(core); equatorLine->draw(core);
meridianLine->draw(core); meridianLine->draw(core);
horizonLine->draw(core); horizonLine->draw(core);
} primeVerticalLine->draw(core);
circumpolarCircleN->draw(core);
void GridLinesMgr::setStelStyle(const QString& section) circumpolarCircleS->draw(core);
{
QSettings* conf = StelApp::getInstance().getSettings();
// Load colors from config file
QString defaultColor = conf->value(section+"/default_color").toStrin
g();
setColorEquatorGrid(StelUtils::strToVec3f(conf->value(section+"/equa
torial_color", defaultColor).toString()));
setColorEquatorJ2000Grid(StelUtils::strToVec3f(conf->value(section+"
/equatorial_J2000_color", defaultColor).toString()));
setColorEclipticJ2000Grid(StelUtils::strToVec3f(conf->value(section+
"/ecliptical_J2000_color", defaultColor).toString()));
setColorEclipticGrid(StelUtils::strToVec3f(conf->value(section+"/ecl
iptical_color", defaultColor).toString()));
setColorGalacticGrid(StelUtils::strToVec3f(conf->value(section+"/gal
actic_color", defaultColor).toString()));
setColorAzimuthalGrid(StelUtils::strToVec3f(conf->value(section+"/az
imuthal_color", defaultColor).toString()));
setColorEquatorLine(StelUtils::strToVec3f(conf->value(section+"/equa
tor_color", defaultColor).toString()));
setColorEclipticLine(StelUtils::strToVec3f(conf->value(section+"/ecl
iptic_color", defaultColor).toString()));
setColorEclipticJ2000Line(StelUtils::strToVec3f(conf->value(section+
"/ecliptic_J2000_color", defaultColor).toString()));
setColorPrecessionCircles(StelUtils::strToVec3f(conf->value(section+
"/precession_circles_color", defaultColor).toString()));
setColorMeridianLine(StelUtils::strToVec3f(conf->value(section+"/mer
idian_color", defaultColor).toString()));
setColorHorizonLine(StelUtils::strToVec3f(conf->value(section+"/hori
zon_color", defaultColor).toString()));
setColorGalacticEquatorLine(StelUtils::strToVec3f(conf->value(sectio
n+"/galactic_equator_color", defaultColor).toString()));
setColorLongitudeLine(StelUtils::strToVec3f(conf->value(section+"/lo
ngitude_color", defaultColor).toString()));
} }
void GridLinesMgr::updateLineLabels() void GridLinesMgr::updateLineLabels()
{ {
equatorJ2000Line->updateLabel(); equatorJ2000Line->updateLabel();
equatorLine->updateLabel(); equatorLine->updateLabel();
eclipticLine->updateLabel(); eclipticLine->updateLabel();
eclipticJ2000Line->updateLabel(); eclipticJ2000Line->updateLabel();
precessionCircleN->updateLabel(); precessionCircleN->updateLabel();
precessionCircleS->updateLabel(); precessionCircleS->updateLabel();
meridianLine->updateLabel(); meridianLine->updateLabel();
horizonLine->updateLabel(); horizonLine->updateLabel();
galacticEquatorLine->updateLabel(); galacticEquatorLine->updateLabel();
longitudeLine->updateLabel(); longitudeLine->updateLabel();
primeVerticalLine->updateLabel();
colureLine_1->updateLabel();
colureLine_2->updateLabel();
circumpolarCircleN->updateLabel();
circumpolarCircleS->updateLabel();
} }
//! Set flag for displaying Azimuthal Grid //! Set flag for displaying Azimuthal Grid
void GridLinesMgr::setFlagAzimuthalGrid(const bool displayed) void GridLinesMgr::setFlagAzimuthalGrid(const bool displayed)
{ {
if(displayed != aziGrid->isDisplayed()) { if(displayed != aziGrid->isDisplayed()) {
aziGrid->setDisplayed(displayed); aziGrid->setDisplayed(displayed);
emit azimuthalGridDisplayedChanged(displayed); emit azimuthalGridDisplayedChanged(displayed);
} }
} }
skipping to change at line 1352 skipping to change at line 1422
{ {
return galacticEquatorLine->getColor(); return galacticEquatorLine->getColor();
} }
void GridLinesMgr::setColorGalacticEquatorLine(const Vec3f& newColor) void GridLinesMgr::setColorGalacticEquatorLine(const Vec3f& newColor)
{ {
if(newColor != galacticEquatorLine->getColor()) { if(newColor != galacticEquatorLine->getColor()) {
galacticEquatorLine->setColor(newColor); galacticEquatorLine->setColor(newColor);
emit galacticEquatorLineColorChanged(newColor); emit galacticEquatorLineColorChanged(newColor);
} }
} }
//! Set flag for displaying Prime Vertical Line
void GridLinesMgr::setFlagPrimeVerticalLine(const bool displayed)
{
if(displayed != primeVerticalLine->isDisplayed()) {
primeVerticalLine->setDisplayed(displayed);
emit primeVerticalLineDisplayedChanged(displayed);
}
}
//! Get flag for displaying Prime Vertical Line
bool GridLinesMgr::getFlagPrimeVerticalLine(void) const
{
return primeVerticalLine->isDisplayed();
}
Vec3f GridLinesMgr::getColorPrimeVerticalLine(void) const
{
return primeVerticalLine->getColor();
}
void GridLinesMgr::setColorPrimeVerticalLine(const Vec3f& newColor)
{
if(newColor != primeVerticalLine->getColor()) {
primeVerticalLine->setColor(newColor);
emit primeVerticalLineColorChanged(newColor);
}
}
//! Set flag for displaying Colure Lines
void GridLinesMgr::setFlagColureLines(const bool displayed)
{
if(displayed != colureLine_1->isDisplayed()) {
colureLine_1->setDisplayed(displayed);
colureLine_2->setDisplayed(displayed);
emit colureLinesDisplayedChanged(displayed);
}
}
//! Get flag for displaying Colure Lines
bool GridLinesMgr::getFlagColureLines(void) const
{
return colureLine_1->isDisplayed();
}
Vec3f GridLinesMgr::getColorColureLines(void) const
{
return colureLine_1->getColor();
}
void GridLinesMgr::setColorColureLines(const Vec3f& newColor)
{
if(newColor != colureLine_1->getColor()) {
colureLine_1->setColor(newColor);
colureLine_2->setColor(newColor);
emit colureLinesColorChanged(newColor);
}
}
//! Set flag for displaying Circumpolar Circles
void GridLinesMgr::setFlagCircumpolarCircles(const bool displayed)
{
if(displayed != circumpolarCircleN->isDisplayed()) {
circumpolarCircleN->setDisplayed(displayed);
circumpolarCircleS->setDisplayed(displayed);
emit circumpolarCirclesDisplayedChanged(displayed);
}
}
//! Get flag for displaying Circumpolar Circles
bool GridLinesMgr::getFlagCircumpolarCircles(void) const
{
// circumpolarCircleS is always synchronous, no separate queries.
return circumpolarCircleN->isDisplayed();
}
Vec3f GridLinesMgr::getColorCircumpolarCircles(void) const
{
return circumpolarCircleN->getColor();
}
void GridLinesMgr::setColorCircumpolarCircles(const Vec3f& newColor)
{
if(newColor != circumpolarCircleN->getColor()) {
circumpolarCircleN->setColor(newColor);
circumpolarCircleS->setColor(newColor);
emit circumpolarCirclesColorChanged(newColor);
}
}
 End of changes. 18 change blocks. 
48 lines changed or deleted 132 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/