GridLinesMgr.cpp   GridLinesMgr.cpp 
skipping to change at line 32 skipping to change at line 32
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelFader.hpp" #include "StelFader.hpp"
#include "Planet.hpp" #include "Planet.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelModuleMgr.hpp" #include "StelModuleMgr.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelPainter.hpp" #include "StelPainter.hpp"
#include "StelSkyDrawer.hpp" #include "StelSkyDrawer.hpp"
#include "StelGui.hpp"
#include <set> #include <set>
#include <QSettings> #include <QSettings>
#include <QDebug> #include <QDebug>
#include <QFontMetrics> #include <QFontMetrics>
//! @class SkyGrid //! @class SkyGrid
//! Class which manages a grid to display in the sky. //! Class which manages a grid to display in the sky.
class SkyGrid class SkyGrid
{ {
skipping to change at line 73 skipping to change at line 72
//! Class which manages a line to display around the sky like the ecliptic line. //! Class which manages a line to display around the sky like the ecliptic line.
class SkyLine class SkyLine
{ {
public: public:
enum SKY_LINE_TYPE enum SKY_LINE_TYPE
{ {
EQUATOR, EQUATOR,
ECLIPTIC, ECLIPTIC,
MERIDIAN, MERIDIAN,
HORIZON, HORIZON,
GALACTICEQUATOR GALACTICEQUATOR,
LONGITUDE
}; };
// Create and precompute positions of a SkyGrid // Create and precompute positions of a SkyGrid
SkyLine(SKY_LINE_TYPE _line_type = EQUATOR); SkyLine(SKY_LINE_TYPE _line_type = EQUATOR);
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 168 skipping to change at line 168
}; };
// Callback which draws the label of the grid // Callback which draws the label of the grid
void viewportEdgeIntersectCallback(const Vec3d& screenPos, const Vec3d& dir ection, void* userData) void viewportEdgeIntersectCallback(const Vec3d& screenPos, const Vec3d& dir ection, void* userData)
{ {
ViewportEdgeIntersectCallbackData* d = static_cast<ViewportEdgeInter sectCallbackData*>(userData); ViewportEdgeIntersectCallbackData* d = static_cast<ViewportEdgeInter sectCallbackData*>(userData);
Vec3d direc(direction); Vec3d direc(direction);
direc.normalize(); direc.normalize();
const Vec4f tmpColor = d->sPainter->getColor(); const Vec4f tmpColor = d->sPainter->getColor();
d->sPainter->setColor(d->textColor[0], d->textColor[1], d->textColor [2], d->textColor[3]); d->sPainter->setColor(d->textColor[0], d->textColor[1], d->textColor [2], d->textColor[3]);
bool withDecimalDegree = dynamic_cast<StelGui*>(StelApp::getInstance ().getGui())->getFlagShowDecimalDegrees(); bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDe grees();;
QString text; QString text;
if (d->text.isEmpty()) if (d->text.isEmpty())
{ {
// We are in the case of meridians, we need to determine whi ch of the 2 labels (3h or 15h to use) // We are in the case of meridians, we need to determine whi ch of the 2 labels (3h or 15h to use)
Vec3d tmpV; Vec3d tmpV;
d->sPainter->getProjector()->unProject(screenPos, tmpV); d->sPainter->getProjector()->unProject(screenPos, tmpV);
double lon, lat, textAngle; double lon, lat, textAngle;
StelUtils::rectToSphe(&lon, &lat, tmpV); StelUtils::rectToSphe(&lon, &lat, tmpV);
switch (d->frameType) switch (d->frameType)
skipping to change at line 308 skipping to change at line 308
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
} }
//! Draw the sky grid in the current frame //! Draw the sky grid in the current frame
void SkyGrid::draw(const StelCore* core) const void SkyGrid::draw(const StelCore* core) const
{ {
const StelProjectorP prj = core->getProjection(frameType, frameType! =StelCore::FrameAltAz ? StelCore::RefractionAuto : StelCore::RefractionOff) ; const StelProjectorP prj = core->getProjection(frameType, frameType! =StelCore::FrameAltAz ? StelCore::RefractionAuto : StelCore::RefractionOff) ;
if (!fader.getInterstate()) if (!fader.getInterstate())
return; return;
bool withDecimalDegree = dynamic_cast<StelGui*>(StelApp::getInstance ().getGui())->getFlagShowDecimalDegrees(); bool withDecimalDegree = StelApp::getInstance().getFlagShowDecimalDe grees();;
// Look for all meridians and parallels intersecting with the disk b ounding the viewport // Look for all meridians and parallels intersecting with the disk b ounding the viewport
// Check whether the pole are in the viewport // Check whether the pole are in the viewport
bool northPoleInViewport = false; bool northPoleInViewport = false;
bool southPoleInViewport = false; bool southPoleInViewport = false;
Vec3f win; Vec3f win;
if (prj->project(Vec3f(0,0,1), win) && prj->checkInViewport(win)) if (prj->project(Vec3f(0,0,1), win) && prj->checkInViewport(win))
northPoleInViewport = true; northPoleInViewport = true;
if (prj->project(Vec3f(0,0,-1), win) && prj->checkInViewport(win)) if (prj->project(Vec3f(0,0,-1), win) && prj->checkInViewport(win))
southPoleInViewport = true; southPoleInViewport = true;
// Get the longitude and latitude resolution at the center of the vi ewport // Get the longitude and latitude resolution at the center of the vi ewport
Vec3d centerV; Vec3d centerV;
prj->unProject(prj->getViewportPosX()+prj->getViewportWidth()/2, prj ->getViewportPosY()+prj->getViewportHeight()/2+1, centerV); prj->unProject(prj->getViewportPosX()+prj->getViewportWidth()/2., pr j->getViewportPosY()+prj->getViewportHeight()/2.+1., centerV);
double lon2, lat2; double lon2, lat2;
StelUtils::rectToSphe(&lon2, &lat2, centerV); StelUtils::rectToSphe(&lon2, &lat2, centerV);
const double gridStepParallelRad = M_PI/180.*getClosestResolutionDMS (prj->getPixelPerRadAtCenter()); const double gridStepParallelRad = M_PI/180.*getClosestResolutionDMS (prj->getPixelPerRadAtCenter());
double gridStepMeridianRad; double gridStepMeridianRad;
if (northPoleInViewport || southPoleInViewport) if (northPoleInViewport || southPoleInViewport)
gridStepMeridianRad = (frameType==StelCore::FrameAltAz || fr ameType==StelCore::FrameGalactic) ? M_PI/180.* 10. : M_PI/180.* 15.; gridStepMeridianRad = (frameType==StelCore::FrameAltAz || fr ameType==StelCore::FrameGalactic) ? M_PI/180.* 10. : M_PI/180.* 15.;
else else
{ {
const double closetResLon = (frameType==StelCore::FrameAltAz const double closestResLon = (frameType==StelCore::FrameAltA
|| frameType==StelCore::FrameGalactic) ? getClosestResolutionDMS(prj->getP z || frameType==StelCore::FrameGalactic) ? getClosestResolutionDMS(prj->get
ixelPerRadAtCenter()*std::cos(lat2)) : getClosestResolutionHMS(prj->getPixe PixelPerRadAtCenter()*std::cos(lat2)) : getClosestResolutionHMS(prj->getPix
lPerRadAtCenter()*std::cos(lat2)); elPerRadAtCenter()*std::cos(lat2));
gridStepMeridianRad = M_PI/180.* ((northPoleInViewport || so gridStepMeridianRad = M_PI/180.* ((northPoleInViewport || so
uthPoleInViewport) ? 15. : closetResLon); uthPoleInViewport) ? 15. : closestResLon);
} }
// Get the bounding halfspace // Get the bounding halfspace
const SphericalCap& viewPortSphericalCap = prj->getBoundingCap(); const SphericalCap& viewPortSphericalCap = prj->getBoundingCap();
// Compute the first grid starting point. This point is close to the center of the screen // Compute the first grid starting point. This point is close to the center of the screen
// and lies at the intersection of a meridian and a parallel // and lies at the intersection of a meridian and a parallel
lon2 = gridStepMeridianRad*((int)(lon2/gridStepMeridianRad+0.5)); lon2 = gridStepMeridianRad*((int)(lon2/gridStepMeridianRad+0.5));
lat2 = gridStepParallelRad*((int)(lat2/gridStepParallelRad+0.5)); lat2 = gridStepParallelRad*((int)(lat2/gridStepParallelRad+0.5));
Vec3d firstPoint; Vec3d firstPoint;
skipping to change at line 603 skipping to change at line 603
label = q_("Equator"); label = q_("Equator");
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:
frameType = StelCore::FrameObservercentricEcliptic;
// TRANSLATORS: Full term is "opposition/conjunction
longitude"
label = q_("O./C. longitude");
break;
} }
} }
void SkyLine::draw(StelCore *core) const void SkyLine::draw(StelCore *core) const
{ {
if (!fader.getInterstate()) if (!fader.getInterstate())
return; return;
StelProjectorP prj = core->getProjection(frameType, frameType!=StelC ore::FrameAltAz ? StelCore::RefractionAuto : StelCore::RefractionOff); StelProjectorP prj = core->getProjection(frameType, frameType!=StelC ore::FrameAltAz ? StelCore::RefractionAuto : StelCore::RefractionOff);
skipping to change at line 638 skipping to change at line 643
userData.text = label; userData.text = label;
///////////////////////////////////////////////// /////////////////////////////////////////////////
// Draw the line // Draw the line
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)
{ {
meridianSphericalCap.n.set(0,1,0); meridianSphericalCap.n.set(0,1,0);
} }
if (line_type==LONGITUDE)
{
Vec3d coord;
double lambda, beta;
StelUtils::rectToSphe(&lambda, &beta, core->getCurrentPlanet
()->getHeliocentricEclipticPos());
StelUtils::spheToRect(lambda + M_PI/2., 0., coord);
meridianSphericalCap.n.set(coord[0],coord[1],coord[2]);
fpt.set(0,0,1);
}
Vec3d p1, p2; Vec3d p1, p2;
if (!SphericalCap::intersectionPoints(viewPortSphericalCap, meridian SphericalCap, p1, p2)) if (!SphericalCap::intersectionPoints(viewPortSphericalCap, meridian SphericalCap, p1, p2))
{ {
if ((viewPortSphericalCap.d<meridianSphericalCap.d && viewPo rtSphericalCap.contains(meridianSphericalCap.n)) if ((viewPortSphericalCap.d<meridianSphericalCap.d && viewPo rtSphericalCap.contains(meridianSphericalCap.n))
|| (viewPortSphericalCap.d<-meridianSphericalCap.d & & viewPortSphericalCap.contains(-meridianSphericalCap.n))) || (viewPortSphericalCap.d<-meridianSphericalCap.d & & viewPortSphericalCap.contains(-meridianSphericalCap.n)))
{ {
// The meridian is fully included in the viewport, d raw it in 3 sub-arcs to avoid length > 180. // The meridian is fully included in the viewport, d raw it in 3 sub-arcs to avoid length > 180.
const Mat4d& rotLon120 = Mat4d::rotation(meridianSph ericalCap.n, 120.*M_PI/180.); const Mat4d& rotLon120 = Mat4d::rotation(meridianSph ericalCap.n, 120.*M_PI/180.);
Vec3d rotFpt=fpt; Vec3d rotFpt=fpt;
rotFpt.transfo4d(rotLon120); rotFpt.transfo4d(rotLon120);
skipping to change at line 687 skipping to change at line 702
equGrid = new SkyGrid(StelCore::FrameEquinoxEqu); equGrid = new SkyGrid(StelCore::FrameEquinoxEqu);
equJ2000Grid = new SkyGrid(StelCore::FrameJ2000); equJ2000Grid = new SkyGrid(StelCore::FrameJ2000);
eclJ2000Grid = new SkyGrid(StelCore::FrameObservercentricEcliptic); eclJ2000Grid = new SkyGrid(StelCore::FrameObservercentricEcliptic);
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); equatorLine = new SkyLine(SkyLine::EQUATOR);
eclipticLine = new SkyLine(SkyLine::ECLIPTIC); eclipticLine = new SkyLine(SkyLine::ECLIPTIC);
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);
} }
GridLinesMgr::~GridLinesMgr() GridLinesMgr::~GridLinesMgr()
{ {
delete equGrid; delete equGrid;
delete equJ2000Grid; delete equJ2000Grid;
delete eclJ2000Grid; delete eclJ2000Grid;
delete galacticGrid; delete galacticGrid;
delete aziGrid; delete aziGrid;
delete equatorLine; delete equatorLine;
delete eclipticLine; delete eclipticLine;
delete meridianLine; delete meridianLine;
delete horizonLine; delete horizonLine;
delete galacticEquatorLine; delete galacticEquatorLine;
delete longitudeLine;
} }
/************************************************************************* /*************************************************************************
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 728 skipping to change at line 745
setFlagAzimuthalGrid(conf->value("viewing/flag_azimuthal_grid").toBo ol()); setFlagAzimuthalGrid(conf->value("viewing/flag_azimuthal_grid").toBo ol());
setFlagEquatorGrid(conf->value("viewing/flag_equatorial_grid").toBoo l()); setFlagEquatorGrid(conf->value("viewing/flag_equatorial_grid").toBoo l());
setFlagEquatorJ2000Grid(conf->value("viewing/flag_equatorial_J2000_g rid").toBool()); setFlagEquatorJ2000Grid(conf->value("viewing/flag_equatorial_J2000_g rid").toBool());
setFlagEclipticJ2000Grid(conf->value("viewing/flag_ecliptic_J2000_gr id").toBool()); setFlagEclipticJ2000Grid(conf->value("viewing/flag_ecliptic_J2000_gr id").toBool());
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() );
setFlagEclipticLine(conf->value("viewing/flag_ecliptic_line").toBool ()); setFlagEclipticLine(conf->value("viewing/flag_ecliptic_line").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());
StelApp& app = StelApp::getInstance(); StelApp& app = StelApp::getInstance();
connect(&app, SIGNAL(colorSchemeChanged(const QString&)), this, SLOT (setStelStyle(const QString&))); 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_Equator_Line", displayGroup, N_("Equator line" ), "equatorLineDisplayed", "."); addAction("actionShow_Equator_Line", displayGroup, N_("Equator line" ), "equatorLineDisplayed", ".");
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_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");
} }
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);
galacticGrid->update(deltaTime); galacticGrid->update(deltaTime);
aziGrid->update(deltaTime); aziGrid->update(deltaTime);
equatorLine->update(deltaTime); equatorLine->update(deltaTime);
eclipticLine->update(deltaTime); eclipticLine->update(deltaTime);
meridianLine->update(deltaTime); meridianLine->update(deltaTime);
horizonLine->update(deltaTime); horizonLine->update(deltaTime);
galacticEquatorLine->update(deltaTime); galacticEquatorLine->update(deltaTime);
longitudeLine->update(deltaTime);
} }
void GridLinesMgr::draw(StelCore* core) void GridLinesMgr::draw(StelCore* core)
{ {
equGrid->draw(core); equGrid->draw(core);
galacticGrid->draw(core); galacticGrid->draw(core);
equJ2000Grid->draw(core); equJ2000Grid->draw(core);
eclJ2000Grid->draw(core); eclJ2000Grid->draw(core);
aziGrid->draw(core); aziGrid->draw(core);
equatorLine->draw(core); equatorLine->draw(core);
eclipticLine->draw(core); eclipticLine->draw(core);
meridianLine->draw(core); meridianLine->draw(core);
horizonLine->draw(core); horizonLine->draw(core);
galacticEquatorLine->draw(core); galacticEquatorLine->draw(core);
longitudeLine->draw(core);
} }
void GridLinesMgr::setStelStyle(const QString& section) void GridLinesMgr::setStelStyle(const QString& section)
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
// Load colors from config file // Load colors from config file
QString defaultColor = conf->value(section+"/default_color").toStrin g(); QString defaultColor = conf->value(section+"/default_color").toStrin g();
setColorEquatorGrid(StelUtils::strToVec3f(conf->value(section+"/equa torial_color", defaultColor).toString())); setColorEquatorGrid(StelUtils::strToVec3f(conf->value(section+"/equa torial_color", defaultColor).toString()));
setColorEquatorJ2000Grid(StelUtils::strToVec3f(conf->value(section+" /equatorial_J2000_color", defaultColor).toString())); setColorEquatorJ2000Grid(StelUtils::strToVec3f(conf->value(section+" /equatorial_J2000_color", defaultColor).toString()));
setColorEclipticJ2000Grid(StelUtils::strToVec3f(conf->value(section+ "/ecliptic_J2000_color", defaultColor).toString())); setColorEclipticJ2000Grid(StelUtils::strToVec3f(conf->value(section+ "/ecliptic_J2000_color", defaultColor).toString()));
setColorGalacticGrid(StelUtils::strToVec3f(conf->value(section+"/gal actic_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())); setColorAzimuthalGrid(StelUtils::strToVec3f(conf->value(section+"/az imuthal_color", defaultColor).toString()));
setColorEquatorLine(StelUtils::strToVec3f(conf->value(section+"/equa tor_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())); setColorEclipticLine(StelUtils::strToVec3f(conf->value(section+"/ecl iptic_color", defaultColor).toString()));
setColorMeridianLine(StelUtils::strToVec3f(conf->value(section+"/mer idian_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())); setColorHorizonLine(StelUtils::strToVec3f(conf->value(section+"/hori zon_color", defaultColor).toString()));
setColorGalacticEquatorLine(StelUtils::strToVec3f(conf->value(sectio n+"/galactic_equator_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()
{ {
equatorLine->updateLabel(); equatorLine->updateLabel();
eclipticLine->updateLabel(); eclipticLine->updateLabel();
meridianLine->updateLabel(); meridianLine->updateLabel();
horizonLine->updateLabel(); horizonLine->updateLabel();
galacticEquatorLine->updateLabel(); galacticEquatorLine->updateLabel();
longitudeLine->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 1002 skipping to change at line 1025
return meridianLine->getColor(); return meridianLine->getColor();
} }
void GridLinesMgr::setColorMeridianLine(const Vec3f& newColor) void GridLinesMgr::setColorMeridianLine(const Vec3f& newColor)
{ {
if(newColor != meridianLine->getColor()) { if(newColor != meridianLine->getColor()) {
meridianLine->setColor(newColor); meridianLine->setColor(newColor);
emit meridianLineColorChanged(newColor); emit meridianLineColorChanged(newColor);
} }
} }
//! Set flag for displaying opposition/conjunction longitude line
void GridLinesMgr::setFlagLongitudeLine(const bool displayed)
{
if(displayed != longitudeLine->isDisplayed()) {
longitudeLine->setDisplayed(displayed);
emit longitudeLineDisplayedChanged(displayed);
}
}
//! Get flag for displaying opposition/conjunction longitude line
bool GridLinesMgr::getFlagLongitudeLine(void) const
{
return longitudeLine->isDisplayed();
}
Vec3f GridLinesMgr::getColorLongitudeLine(void) const
{
return longitudeLine->getColor();
}
void GridLinesMgr::setColorLongitudeLine(const Vec3f& newColor)
{
if(newColor != longitudeLine->getColor()) {
longitudeLine->setColor(newColor);
emit longitudeLineColorChanged(newColor);
}
}
//! Set flag for displaying Horizon Line //! Set flag for displaying Horizon Line
void GridLinesMgr::setFlagHorizonLine(const bool displayed) void GridLinesMgr::setFlagHorizonLine(const bool displayed)
{ {
if(displayed != horizonLine->isDisplayed()) { if(displayed != horizonLine->isDisplayed()) {
horizonLine->setDisplayed(displayed); horizonLine->setDisplayed(displayed);
emit horizonLineDisplayedChanged(displayed); emit horizonLineDisplayedChanged(displayed);
} }
} }
//! Get flag for displaying Horizon Line //! Get flag for displaying Horizon Line
bool GridLinesMgr::getFlagHorizonLine(void) const bool GridLinesMgr::getFlagHorizonLine(void) const
 End of changes. 17 change blocks. 
11 lines changed or deleted 61 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/