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 "StelTextureMgr.hpp"
#include "StelFileMgr.hpp"
#include "precession.h" #include "precession.h"
#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 62 skipping to change at line 64
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;}
bool isDisplayed(void) const {return fader;} bool isDisplayed(void) const {return fader;}
private: private:
Vec3f color; Vec3f color;
StelCore::FrameType frameType; StelCore::FrameType frameType;
QFont font; QFont font;
LinearFader fader; LinearFader fader;
}; };
//! @class SkyPoint
//! Class which manages a point to display around the sky like the North Ce
lestial Pole.
class SkyPoint
{
public:
enum SKY_POINT_TYPE
{
CELESTIALPOLES_J2000,
CELESTIALPOLES_OF_DATE,
ZENITH_NADIR,
ECLIPTICPOLES_J2000,
ECLIPTICPOLES_OF_DATE,
GALACTICPOLES,
SUPERGALACTICPOLES,
EQUINOXES_J2000,
EQUINOXES_OF_DATE
};
// Create and precompute positions of a SkyGrid
SkyPoint(SKY_POINT_TYPE _point_type = CELESTIALPOLES_J2000);
virtual ~SkyPoint();
void draw(StelCore* core) const;
void setColor(const Vec3f& c) {color = c;}
const Vec3f& getColor() {return color;}
void update(double deltaTime) {fader.update((int)(deltaTime*1000));}
void setFadeDuration(float duration) {fader.setDuration((int)(durati
on*1000.f));}
void setDisplayed(const bool displayed){fader = displayed;}
bool isDisplayed(void) const {return fader;}
void setFontSize(double newSize);
//! Re-translates the label.
void updateLabel();
private:
SKY_POINT_TYPE point_type;
Vec3f color;
StelCore::FrameType frameType;
LinearFader fader;
QFont font;
QString northernLabel, southernLabel;
StelTextureSP texCross;
};
//! @class SkyLine //! @class SkyLine
//! 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_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,
SUPERGALACTICEQUATOR,
LONGITUDE, LONGITUDE,
PRIME_VERTICAL, PRIME_VERTICAL,
COLURE_1, COLURE_1,
COLURE_2, COLURE_2,
CIRCUMPOLARCIRCLE_N, CIRCUMPOLARCIRCLE_N,
CIRCUMPOLARCIRCLE_S 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();
skipping to change at line 248 skipping to change at line 291
textAngle = 0; textAngle = 0;
if (withDecimalDegree) if (withDecimalDegree)
text = StelUtils::radToDecDegStr(tex tAngle, 4, false, true); text = StelUtils::radToDecDegStr(tex tAngle, 4, false, true);
else else
text = StelUtils::radToDmsStrAdapt(t extAngle); text = StelUtils::radToDmsStrAdapt(t extAngle);
break; break;
} }
case StelCore::FrameGalactic: case StelCore::FrameGalactic:
case StelCore::FrameSupergalactic:
{ {
double raAngle = M_PI-d->raAngle; double raAngle = M_PI-d->raAngle;
lon = M_PI-lon; lon = M_PI-lon;
if (raAngle<0) if (raAngle<0)
raAngle=+2.*M_PI; raAngle=+2.*M_PI;
if (lon<0) if (lon<0)
lon=+2.*M_PI; lon=+2.*M_PI;
skipping to change at line 343 skipping to change at line 387
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., pr j->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 || frameType==StelCore::FrameSupergalactic ) ? M_PI/180.* 10. : M_PI/180.* 15.;
else else
{ {
const double closestResLon = (frameType==StelCore::FrameAltA z || frameType==StelCore::FrameGalactic) ? getClosestResolutionDMS(prj->get PixelPerRadAtCenter()*std::cos(lat2)) : getClosestResolutionHMS(prj->getPix elPerRadAtCenter()*std::cos(lat2)); const double closestResLon = (frameType==StelCore::FrameAltA z || frameType==StelCore::FrameGalactic || frameType==StelCore::FrameSuperg alactic) ? getClosestResolutionDMS(prj->getPixelPerRadAtCenter()*std::cos(l at2)) : getClosestResolutionHMS(prj->getPixelPerRadAtCenter()*std::cos(lat2 ));
gridStepMeridianRad = M_PI/180.* ((northPoleInViewport || so uthPoleInViewport) ? 15. : closestResLon); gridStepMeridianRad = M_PI/180.* ((northPoleInViewport || so 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));
skipping to change at line 575 skipping to change at line 619
fpt.transfo4d(rotLon); fpt.transfo4d(rotLon);
} }
} }
// OpenGL ES 2.0 doesn't have GL_LINE_SMOOTH // OpenGL ES 2.0 doesn't have GL_LINE_SMOOTH
#ifdef GL_LINE_SMOOTH #ifdef GL_LINE_SMOOTH
if (QOpenGLContext::currentContext()->format().renderableType()==QSu rfaceFormat::OpenGL) if (QOpenGLContext::currentContext()->format().renderableType()==QSu rfaceFormat::OpenGL)
glDisable(GL_LINE_SMOOTH); glDisable(GL_LINE_SMOOTH);
#endif #endif
} }
SkyLine::SkyLine(SKY_LINE_TYPE _line_type) : color(0.f, 0.f, 1.f) SkyLine::SkyLine(SKY_LINE_TYPE _line_type) : line_type(_line_type), color(0 .f, 0.f, 1.f)
{ {
// Font size is 14 // Font size is 14
font.setPixelSize(StelApp::getInstance().getBaseFontSize()+1); font.setPixelSize(StelApp::getInstance().getBaseFontSize()+1);
line_type = _line_type;
updateLabel(); updateLabel();
} }
SkyLine::~SkyLine() SkyLine::~SkyLine()
{ {
} }
void SkyLine::setFontSize(double newFontSize) void SkyLine::setFontSize(double newFontSize)
{ {
skipping to change at line 630 skipping to change at line 673
label = q_("Precession Circle"); label = q_("Precession Circle");
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 SUPERGALACTICEQUATOR:
frameType = StelCore::FrameSupergalactic;
label = q_("Supergalactic Equator");
break;
case LONGITUDE: case LONGITUDE:
frameType = StelCore::FrameObservercentricEclipticJ2 000; 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: case PRIME_VERTICAL:
frameType=StelCore::FrameAltAz; frameType=StelCore::FrameAltAz;
label = q_("Prime Vertical"); label = q_("Prime Vertical");
break; break;
case COLURE_1: case COLURE_1:
skipping to change at line 838 skipping to change at line 885
#endif #endif
glDisable(GL_BLEND); glDisable(GL_BLEND);
// // Johannes: use a big radius as a dirty workaround for the bug that the // // Johannes: use a big radius as a dirty workaround for the bug that the
// // ecliptic line is not drawn around the observer, but around the su n: // // ecliptic line is not drawn around the observer, but around the su n:
// const Vec3d vv(1000000,0,0); // const Vec3d vv(1000000,0,0);
} }
SkyPoint::SkyPoint(SKY_POINT_TYPE _point_type) : point_type(_point_type), c
olor(0.f, 0.f, 1.f)
{
// Font size is 14
font.setPixelSize(StelApp::getInstance().getBaseFontSize()+1);
texCross = StelApp::getInstance().getTextureManager().createTexture(
StelFileMgr::getInstallationDir()+"/textures/cross.png");
updateLabel();
}
SkyPoint::~SkyPoint()
{
texCross.clear();
}
void SkyPoint::setFontSize(double newFontSize)
{
font.setPixelSize(newFontSize);
}
void SkyPoint::updateLabel()
{
switch (point_type)
{
case CELESTIALPOLES_J2000:
{
frameType = StelCore::FrameJ2000;
// TRANSLATORS: North Celestial Pole
northernLabel = q_("NCP");
// TRANSLATORS: South Celestial Pole
southernLabel = q_("SCP");
break;
}
case CELESTIALPOLES_OF_DATE:
{
frameType = StelCore::FrameEquinoxEqu;
// TRANSLATORS: North Celestial Pole
northernLabel = q_("NCP");
// TRANSLATORS: South Celestial Pole
southernLabel = q_("SCP");
break;
}
case ZENITH_NADIR:
{
frameType = StelCore::FrameAltAz;
// TRANSLATORS: Zenith
northernLabel = qc_("Z", "zenith");
// TRANSLATORS: Nadir
southernLabel = qc_("Z'", "nadir");
break;
}
case ECLIPTICPOLES_J2000:
{
frameType = StelCore::FrameObservercentricEclipticJ2
000;
// TRANSLATORS: North Ecliptic Pole
northernLabel = q_("NEP");
// TRANSLATORS: South Ecliptic Pole
southernLabel = q_("SEP");
break;
}
case ECLIPTICPOLES_OF_DATE:
{
frameType = StelCore::FrameObservercentricEclipticOf
Date;
// TRANSLATORS: North Ecliptic Pole
northernLabel = q_("NEP");
// TRANSLATORS: South Ecliptic Pole
southernLabel = q_("SEP");
break;
}
case GALACTICPOLES:
{
frameType = StelCore::FrameGalactic;
// TRANSLATORS: North Galactic Pole
northernLabel = q_("NGP");
// TRANSLATORS: South Galactic Pole
southernLabel = q_("SGP");
break;
}
case SUPERGALACTICPOLES:
{
frameType = StelCore::FrameSupergalactic;
// TRANSLATORS: North Supergalactic Pole
northernLabel = q_("NSGP");
// TRANSLATORS: South Supergalactic Pole
southernLabel = q_("SSGP");
break;
}
case EQUINOXES_J2000:
{
frameType = StelCore::FrameJ2000;
northernLabel = QChar(0x2648); // Vernal equinox
southernLabel = QChar(0x264E); // Autumnal equinox
break;
}
case EQUINOXES_OF_DATE:
{
frameType = StelCore::FrameEquinoxEqu;
northernLabel = QChar(0x2648); // Vernal equinox
southernLabel = QChar(0x264E); // Autumnal equinox
break;
}
default:
Q_ASSERT(0);
}
}
void SkyPoint::draw(StelCore *core) const
{
if (!fader.getInterstate())
return;
StelProjectorP prj = core->getProjection(frameType, frameType!=StelC
ore::FrameAltAz ? StelCore::RefractionAuto : StelCore::RefractionOff);
// Initialize a painter and set openGL state
StelPainter sPainter(prj);
sPainter.setColor(color[0], color[1], color[2], fader.getInterstate(
));
Vec4f textColor(color[0], color[1], color[2], 0);
textColor[3]=fader.getInterstate();
sPainter.setFont(font);
/////////////////////////////////////////////////
// Draw the point
texCross->bind();
float size = 0.00001*M_PI/180.*sPainter.getProjector()->getPixelPerR
adAtCenter();
float shift = 4.f + size/1.8f;
switch (point_type)
{
case CELESTIALPOLES_J2000:
case CELESTIALPOLES_OF_DATE:
case ZENITH_NADIR:
case ECLIPTICPOLES_J2000:
case ECLIPTICPOLES_OF_DATE:
case GALACTICPOLES:
case SUPERGALACTICPOLES:
{
// North Pole
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
sPainter.drawSprite2dMode(Vec3d(0,0,1), 5.f);
sPainter.drawText(Vec3d(0,0,1), northernLabel, 0, sh
ift, shift, false);
// South Pole
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
sPainter.drawSprite2dMode(Vec3d(0,0,-1), 5.f);
sPainter.drawText(Vec3d(0,0,-1), southernLabel, 0, s
hift, shift, false);
break;
}
case EQUINOXES_J2000:
case EQUINOXES_OF_DATE:
{
// Vernal equinox
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
sPainter.drawSprite2dMode(Vec3d(1,0,0), 5.f);
sPainter.drawText(Vec3d(1,0,0), northernLabel, 0, sh
ift, shift, false);
// Autumnal equinox
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE);
sPainter.drawSprite2dMode(Vec3d(-1,0,0), 5.f);
sPainter.drawText(Vec3d(-1,0,0), southernLabel, 0, s
hift, shift, false);
break;
}
default:
Q_ASSERT(0);
}
}
GridLinesMgr::GridLinesMgr() GridLinesMgr::GridLinesMgr()
{ {
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);
supergalacticGrid = new SkyGrid(StelCore::FrameSupergalactic);
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); // NEW in 0.1 4 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);
supergalacticEquatorLine = new SkyLine(SkyLine::SUPERGALACTICEQUATOR );
longitudeLine = new SkyLine(SkyLine::LONGITUDE); longitudeLine = new SkyLine(SkyLine::LONGITUDE);
primeVerticalLine = new SkyLine(SkyLine::PRIME_VERTICAL); primeVerticalLine = new SkyLine(SkyLine::PRIME_VERTICAL);
colureLine_1 = new SkyLine(SkyLine::COLURE_1); colureLine_1 = new SkyLine(SkyLine::COLURE_1);
colureLine_2 = new SkyLine(SkyLine::COLURE_2); colureLine_2 = new SkyLine(SkyLine::COLURE_2);
circumpolarCircleN = new SkyLine(SkyLine::CIRCUMPOLARCIRCLE_N); circumpolarCircleN = new SkyLine(SkyLine::CIRCUMPOLARCIRCLE_N);
circumpolarCircleS = new SkyLine(SkyLine::CIRCUMPOLARCIRCLE_S); circumpolarCircleS = new SkyLine(SkyLine::CIRCUMPOLARCIRCLE_S);
celestialJ2000Poles = new SkyPoint(SkyPoint::CELESTIALPOLES_J2000);
celestialPoles = new SkyPoint(SkyPoint::CELESTIALPOLES_OF_DATE);
zenithNadir = new SkyPoint(SkyPoint::ZENITH_NADIR);
eclipticJ2000Poles = new SkyPoint(SkyPoint::ECLIPTICPOLES_J2000);
eclipticPoles = new SkyPoint(SkyPoint::ECLIPTICPOLES_OF_DATE);
galacticPoles = new SkyPoint(SkyPoint::GALACTICPOLES);
supergalacticPoles = new SkyPoint(SkyPoint::SUPERGALACTICPOLES);
equinoxJ2000Points = new SkyPoint(SkyPoint::EQUINOXES_J2000);
equinoxPoints = new SkyPoint(SkyPoint::EQUINOXES_OF_DATE);
} }
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 supergalacticGrid;
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 supergalacticEquatorLine;
delete longitudeLine; delete longitudeLine;
delete primeVerticalLine; delete primeVerticalLine;
delete colureLine_1; delete colureLine_1;
delete colureLine_2; delete colureLine_2;
delete circumpolarCircleN; delete circumpolarCircleN;
delete circumpolarCircleS; delete circumpolarCircleS;
delete celestialJ2000Poles;
delete celestialPoles;
delete zenithNadir;
delete eclipticJ2000Poles;
delete eclipticPoles;
delete galacticPoles;
delete supergalacticPoles;
delete equinoxJ2000Points;
delete equinoxPoints;
} }
/************************************************************************* /*************************************************************************
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 910 skipping to change at line 1148
{ {
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
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());
setFlagEclipticGrid(conf->value("viewing/flag_ecliptic_grid").toBool ()); setFlagEclipticGrid(conf->value("viewing/flag_ecliptic_grid").toBool ());
setFlagGalacticGrid(conf->value("viewing/flag_galactic_grid").toBool ()); setFlagGalacticGrid(conf->value("viewing/flag_galactic_grid").toBool ());
setFlagSupergalacticGrid(conf->value("viewing/flag_supergalactic_gri d").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());
setFlagSupergalacticEquatorLine(conf->value("viewing/flag_supergalac tic_equator_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()); setFlagPrimeVerticalLine(conf->value("viewing/flag_prime_vertical_li ne").toBool());
setFlagColureLines(conf->value("viewing/flag_colure_lines").toBool() ); setFlagColureLines(conf->value("viewing/flag_colure_lines").toBool() );
setFlagCircumpolarCircles(conf->value("viewing/flag_circumpolar_circ les").toBool()); setFlagCircumpolarCircles(conf->value("viewing/flag_circumpolar_circ les").toBool());
setFlagCelestialJ2000Poles(conf->value("viewing/flag_celestial_J2000
_poles").toBool());
setFlagCelestialPoles(conf->value("viewing/flag_celestial_poles").to
Bool());
setFlagZenithNadir(conf->value("viewing/flag_zenith_nadir").toBool()
);
setFlagEclipticJ2000Poles(conf->value("viewing/flag_ecliptic_J2000_p
oles").toBool());
setFlagEclipticPoles(conf->value("viewing/flag_ecliptic_poles").toBo
ol());
setFlagGalacticPoles(conf->value("viewing/flag_galactic_poles").toBo
ol());
setFlagSupergalacticPoles(conf->value("viewing/flag_supergalactic_po
les").toBool());
setFlagEquinoxJ2000Points(conf->value("viewing/flag_equinox_J2000_po
ints").toBool());
setFlagEquinoxPoints(conf->value("viewing/flag_equinox_points").toBo
ol());
// Load colors from config file // Load colors from config file
QString defaultColor = conf->value("color/default_color").toString() ; QString defaultColor = conf->value("color/default_color").toString() ;
setColorEquatorGrid(StelUtils::strToVec3f(conf->value("color/equator ial_color", defaultColor).toString())); setColorEquatorGrid(StelUtils::strToVec3f(conf->value("color/equator ial_color", defaultColor).toString()));
setColorEquatorJ2000Grid(StelUtils::strToVec3f(conf->value("color/eq uatorial_J2000_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())); setColorEclipticJ2000Grid(StelUtils::strToVec3f(conf->value("color/e cliptical_J2000_color", defaultColor).toString()));
setColorEclipticGrid(StelUtils::strToVec3f(conf->value("color/eclipt ical_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())); setColorGalacticGrid(StelUtils::strToVec3f(conf->value("color/galact ic_color", defaultColor).toString()));
setColorSupergalacticGrid(StelUtils::strToVec3f(conf->value("color/s upergalactic_color", defaultColor).toString()));
setColorAzimuthalGrid(StelUtils::strToVec3f(conf->value("color/azimu thal_color", defaultColor).toString())); setColorAzimuthalGrid(StelUtils::strToVec3f(conf->value("color/azimu thal_color", defaultColor).toString()));
setColorEquatorLine(StelUtils::strToVec3f(conf->value("color/equator _color", defaultColor).toString())); setColorEquatorLine(StelUtils::strToVec3f(conf->value("color/equator _color", defaultColor).toString()));
setColorEquatorJ2000Line(StelUtils::strToVec3f(conf->value("color/eq uator_J2000_color", defaultColor).toString()));
setColorEclipticLine(StelUtils::strToVec3f(conf->value("color/eclipt ic_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())); setColorEclipticJ2000Line(StelUtils::strToVec3f(conf->value("color/e cliptic_J2000_color", defaultColor).toString()));
setColorPrecessionCircles(StelUtils::strToVec3f(conf->value("color/p recession_circles_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())); setColorMeridianLine(StelUtils::strToVec3f(conf->value("color/meridi an_color", defaultColor).toString()));
setColorHorizonLine(StelUtils::strToVec3f(conf->value("color/horizon _color", defaultColor).toString())); setColorHorizonLine(StelUtils::strToVec3f(conf->value("color/horizon _color", defaultColor).toString()));
setColorGalacticEquatorLine(StelUtils::strToVec3f(conf->value("color /galactic_equator_color", defaultColor).toString())); setColorGalacticEquatorLine(StelUtils::strToVec3f(conf->value("color /galactic_equator_color", defaultColor).toString()));
setColorSupergalacticEquatorLine(StelUtils::strToVec3f(conf->value(" color/supergalactic_equator_color", defaultColor).toString()));
setColorLongitudeLine(StelUtils::strToVec3f(conf->value("color/longi tude_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())); setColorPrimeVerticalLine(StelUtils::strToVec3f(conf->value("color/p rime_vertical_color", defaultColor).toString()));
setColorColureLines(StelUtils::strToVec3f(conf->value("color/colures _color", defaultColor).toString())); setColorColureLines(StelUtils::strToVec3f(conf->value("color/colures _color", defaultColor).toString()));
setColorCircumpolarCircles(StelUtils::strToVec3f(conf->value("color/ circumpolar_circles_color", defaultColor).toString())); setColorCircumpolarCircles(StelUtils::strToVec3f(conf->value("color/ circumpolar_circles_color", defaultColor).toString()));
setColorCelestialJ2000Poles(StelUtils::strToVec3f(conf->value("color
/celestial_J2000_poles_color", defaultColor).toString()));
setColorCelestialPoles(StelUtils::strToVec3f(conf->value("color/cele
stial_poles_color", defaultColor).toString()));
setColorZenithNadir(StelUtils::strToVec3f(conf->value("color/zenith_
nadir_color", defaultColor).toString()));
setColorEclipticJ2000Poles(StelUtils::strToVec3f(conf->value("color/
ecliptic_J2000_poles_color", defaultColor).toString()));
setColorEclipticPoles(StelUtils::strToVec3f(conf->value("color/eclip
tic_poles_color", defaultColor).toString()));
setColorGalacticPoles(StelUtils::strToVec3f(conf->value("color/galac
tic_poles_color", defaultColor).toString()));
setColorSupergalacticPoles(StelUtils::strToVec3f(conf->value("color/
supergalactic_poles_color", defaultColor).toString()));
setColorEquinoxJ2000Points(StelUtils::strToVec3f(conf->value("color/
equinox_J2000_points_color", defaultColor).toString()));
setColorEquinoxPoints(StelUtils::strToVec3f(conf->value("color/equin
ox_points_color", defaultColor).toString()));
StelApp& app = StelApp::getInstance(); StelApp& app = StelApp::getInstance();
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_Supergalactic_Grid", displayGroup, N_("Superga
lactic grid"), "supergalacticGridDisplayed");
addAction("actionShow_Supergalactic_Equator_Line", displayGroup, N_(
"Supergalactic equator"), "supergalacticEquatorLineDisplayed");
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_Prime_Vertical_Line", displayGroup, N_("Prime Vertical"), "primeVerticalLineDisplayed");
addAction("actionShow_Colure_Lines", displayGroup, N_("Colure Lines" ), "colureLinesDisplayed"); addAction("actionShow_Colure_Lines", displayGroup, N_("Colure Lines" ), "colureLinesDisplayed");
addAction("actionShow_Circumpolar_Circles", displayGroup, N_("Circum polar Circles"), "circumpolarCirclesDisplayed"); addAction("actionShow_Circumpolar_Circles", displayGroup, N_("Circum polar Circles"), "circumpolarCirclesDisplayed");
addAction("actionShow_Celestial_J2000_Poles", displayGroup, N_("Cele
stial J2000 poles"), "celestialJ2000PolesDisplayed");
addAction("actionShow_Celestial_Poles", displayGroup, N_("Celestial
poles"), "celestialPolesDisplayed");
addAction("actionShow_Zenith_Nadir", displayGroup, N_("Zenith and na
dir"), "zenithNadirDisplayed");
addAction("actionShow_Ecliptic_J2000_Poles", displayGroup, N_("Eclip
tic J2000 poles"), "eclipticJ2000PolesDisplayed");
addAction("actionShow_Ecliptic_Poles", displayGroup, N_("Ecliptic po
les"), "eclipticPolesDisplayed");
addAction("actionShow_Galactic_Poles", displayGroup, N_("Galactic po
les"), "galacticPolesDisplayed");
addAction("actionShow_Supergalactic_Poles", displayGroup, N_("Superg
alactic poles"), "supergalacticPolesDisplayed");
addAction("actionShow_Equinox_J2000_Points", displayGroup, N_("Equin
ox J2000 points"), "equinoxJ2000PointsDisplayed");
addAction("actionShow_Equinox_Points", displayGroup, N_("Equinox poi
nts"), "equinoxPointsDisplayed");
} }
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);
supergalacticGrid->update(deltaTime);
aziGrid->update(deltaTime); aziGrid->update(deltaTime);
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);
supergalacticEquatorLine->update(deltaTime);
longitudeLine->update(deltaTime); longitudeLine->update(deltaTime);
primeVerticalLine->update(deltaTime); primeVerticalLine->update(deltaTime);
colureLine_1->update(deltaTime); colureLine_1->update(deltaTime);
colureLine_2->update(deltaTime); colureLine_2->update(deltaTime);
circumpolarCircleN->update(deltaTime); circumpolarCircleN->update(deltaTime);
circumpolarCircleS->update(deltaTime); circumpolarCircleS->update(deltaTime);
celestialJ2000Poles->update(deltaTime);
celestialPoles->update(deltaTime);
zenithNadir->update(deltaTime);
eclipticJ2000Poles->update(deltaTime);
eclipticPoles->update(deltaTime);
galacticPoles->update(deltaTime);
supergalacticPoles->update(deltaTime);
equinoxJ2000Points->update(deltaTime);
equinoxPoints->update(deltaTime);
} }
void GridLinesMgr::draw(StelCore* core) void GridLinesMgr::draw(StelCore* core)
{ {
galacticGrid->draw(core); galacticGrid->draw(core);
supergalacticGrid->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")
eclGrid->draw(core); eclGrid->draw(core);
equJ2000Grid->draw(core); equJ2000Grid->draw(core);
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);
supergalacticEquatorLine->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_1->draw(core);
colureLine_2->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); primeVerticalLine->draw(core);
circumpolarCircleN->draw(core); circumpolarCircleN->draw(core);
circumpolarCircleS->draw(core); circumpolarCircleS->draw(core);
celestialJ2000Poles->draw(core);
celestialPoles->draw(core);
zenithNadir->draw(core);
eclipticJ2000Poles->draw(core);
eclipticPoles->draw(core);
galacticPoles->draw(core);
supergalacticPoles->draw(core);
equinoxJ2000Points->draw(core);
equinoxPoints->draw(core);
} }
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();
supergalacticEquatorLine->updateLabel();
longitudeLine->updateLabel(); longitudeLine->updateLabel();
primeVerticalLine->updateLabel(); primeVerticalLine->updateLabel();
colureLine_1->updateLabel(); colureLine_1->updateLabel();
colureLine_2->updateLabel(); colureLine_2->updateLabel();
circumpolarCircleN->updateLabel(); circumpolarCircleN->updateLabel();
circumpolarCircleS->updateLabel(); circumpolarCircleS->updateLabel();
celestialJ2000Poles->updateLabel();
celestialPoles->updateLabel();
zenithNadir->updateLabel();
eclipticJ2000Poles->updateLabel();
eclipticPoles->updateLabel();
galacticPoles->updateLabel();
supergalacticPoles->updateLabel();
equinoxJ2000Points->updateLabel();
equinoxPoints->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 1195 skipping to change at line 1499
return galacticGrid->getColor(); return galacticGrid->getColor();
} }
void GridLinesMgr::setColorGalacticGrid(const Vec3f& newColor) void GridLinesMgr::setColorGalacticGrid(const Vec3f& newColor)
{ {
if(newColor != galacticGrid->getColor()) { if(newColor != galacticGrid->getColor()) {
galacticGrid->setColor(newColor); galacticGrid->setColor(newColor);
emit galacticGridColorChanged(newColor); emit galacticGridColorChanged(newColor);
} }
} }
//! Set flag for displaying Supergalactic Grid
void GridLinesMgr::setFlagSupergalacticGrid(const bool displayed)
{
if(displayed != supergalacticGrid->isDisplayed()) {
supergalacticGrid->setDisplayed(displayed);
emit supergalacticGridDisplayedChanged(displayed);
}
}
//! Get flag for displaying Supergalactic Grid
bool GridLinesMgr::getFlagSupergalacticGrid(void) const
{
return supergalacticGrid->isDisplayed();
}
Vec3f GridLinesMgr::getColorSupergalacticGrid(void) const
{
return supergalacticGrid->getColor();
}
void GridLinesMgr::setColorSupergalacticGrid(const Vec3f& newColor)
{
if(newColor != supergalacticGrid->getColor()) {
supergalacticGrid->setColor(newColor);
emit supergalacticGridColorChanged(newColor);
}
}
//! Set flag for displaying Equatorial Line //! Set flag for displaying Equatorial Line
void GridLinesMgr::setFlagEquatorLine(const bool displayed) void GridLinesMgr::setFlagEquatorLine(const bool displayed)
{ {
if(displayed != equatorLine->isDisplayed()) { if(displayed != equatorLine->isDisplayed()) {
equatorLine->setDisplayed(displayed); equatorLine->setDisplayed(displayed);
emit equatorLineDisplayedChanged(displayed); emit equatorLineDisplayedChanged(displayed);
} }
} }
//! Get flag for displaying Equatorial Line //! Get flag for displaying Equatorial Line
bool GridLinesMgr::getFlagEquatorLine(void) const bool GridLinesMgr::getFlagEquatorLine(void) const
skipping to change at line 1423 skipping to change at line 1752
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 Supergalactic Equator Line
void GridLinesMgr::setFlagSupergalacticEquatorLine(const bool displayed)
{
if(displayed != supergalacticEquatorLine->isDisplayed()) {
supergalacticEquatorLine->setDisplayed(displayed);
emit supergalacticEquatorLineDisplayedChanged(displayed);
}
}
//! Get flag for displaying Supergalactic Equator Line
bool GridLinesMgr::getFlagSupergalacticEquatorLine(void) const
{
return supergalacticEquatorLine->isDisplayed();
}
Vec3f GridLinesMgr::getColorSupergalacticEquatorLine(void) const
{
return supergalacticEquatorLine->getColor();
}
void GridLinesMgr::setColorSupergalacticEquatorLine(const Vec3f& newColor)
{
if(newColor != supergalacticEquatorLine->getColor()) {
supergalacticEquatorLine->setColor(newColor);
emit supergalacticEquatorLineColorChanged(newColor);
}
}
//! Set flag for displaying Prime Vertical Line //! Set flag for displaying Prime Vertical Line
void GridLinesMgr::setFlagPrimeVerticalLine(const bool displayed) void GridLinesMgr::setFlagPrimeVerticalLine(const bool displayed)
{ {
if(displayed != primeVerticalLine->isDisplayed()) { if(displayed != primeVerticalLine->isDisplayed()) {
primeVerticalLine->setDisplayed(displayed); primeVerticalLine->setDisplayed(displayed);
emit primeVerticalLineDisplayedChanged(displayed); emit primeVerticalLineDisplayedChanged(displayed);
} }
} }
//! Get flag for displaying Prime Vertical Line //! Get flag for displaying Prime Vertical Line
bool GridLinesMgr::getFlagPrimeVerticalLine(void) const bool GridLinesMgr::getFlagPrimeVerticalLine(void) const
skipping to change at line 1502 skipping to change at line 1856
return circumpolarCircleN->getColor(); return circumpolarCircleN->getColor();
} }
void GridLinesMgr::setColorCircumpolarCircles(const Vec3f& newColor) void GridLinesMgr::setColorCircumpolarCircles(const Vec3f& newColor)
{ {
if(newColor != circumpolarCircleN->getColor()) { if(newColor != circumpolarCircleN->getColor()) {
circumpolarCircleN->setColor(newColor); circumpolarCircleN->setColor(newColor);
circumpolarCircleS->setColor(newColor); circumpolarCircleS->setColor(newColor);
emit circumpolarCirclesColorChanged(newColor); emit circumpolarCirclesColorChanged(newColor);
} }
} }
//! Set flag for displaying celestial poles of J2000
void GridLinesMgr::setFlagCelestialJ2000Poles(const bool displayed)
{
if(displayed != celestialJ2000Poles->isDisplayed()) {
celestialJ2000Poles->setDisplayed(displayed);
emit celestialJ2000PolesDisplayedChanged(displayed);
}
}
//! Get flag for displaying celestial poles of J2000
bool GridLinesMgr::getFlagCelestialJ2000Poles(void) const
{
return celestialJ2000Poles->isDisplayed();
}
Vec3f GridLinesMgr::getColorCelestialJ2000Poles(void) const
{
return celestialJ2000Poles->getColor();
}
void GridLinesMgr::setColorCelestialJ2000Poles(const Vec3f& newColor)
{
if(newColor != celestialJ2000Poles->getColor()) {
celestialJ2000Poles->setColor(newColor);
emit celestialJ2000PolesColorChanged(newColor);
}
}
//! Set flag for displaying celestial poles
void GridLinesMgr::setFlagCelestialPoles(const bool displayed)
{
if(displayed != celestialPoles->isDisplayed()) {
celestialPoles->setDisplayed(displayed);
emit celestialPolesDisplayedChanged(displayed);
}
}
//! Get flag for displaying celestial poles
bool GridLinesMgr::getFlagCelestialPoles(void) const
{
return celestialPoles->isDisplayed();
}
Vec3f GridLinesMgr::getColorCelestialPoles(void) const
{
return celestialPoles->getColor();
}
void GridLinesMgr::setColorCelestialPoles(const Vec3f& newColor)
{
if(newColor != celestialPoles->getColor()) {
celestialPoles->setColor(newColor);
emit celestialPolesColorChanged(newColor);
}
}
//! Set flag for displaying zenith and nadir
void GridLinesMgr::setFlagZenithNadir(const bool displayed)
{
if(displayed != zenithNadir->isDisplayed()) {
zenithNadir->setDisplayed(displayed);
emit zenithNadirDisplayedChanged(displayed);
}
}
//! Get flag for displaying zenith and nadir
bool GridLinesMgr::getFlagZenithNadir(void) const
{
return zenithNadir->isDisplayed();
}
Vec3f GridLinesMgr::getColorZenithNadir(void) const
{
return zenithNadir->getColor();
}
void GridLinesMgr::setColorZenithNadir(const Vec3f& newColor)
{
if(newColor != zenithNadir->getColor()) {
zenithNadir->setColor(newColor);
emit zenithNadirColorChanged(newColor);
}
}
//! Set flag for displaying ecliptic poles of J2000
void GridLinesMgr::setFlagEclipticJ2000Poles(const bool displayed)
{
if(displayed != eclipticJ2000Poles->isDisplayed()) {
eclipticJ2000Poles->setDisplayed(displayed);
emit eclipticJ2000PolesDisplayedChanged(displayed);
}
}
//! Get flag for displaying ecliptic poles of J2000
bool GridLinesMgr::getFlagEclipticJ2000Poles(void) const
{
return eclipticJ2000Poles->isDisplayed();
}
Vec3f GridLinesMgr::getColorEclipticJ2000Poles(void) const
{
return eclipticJ2000Poles->getColor();
}
void GridLinesMgr::setColorEclipticJ2000Poles(const Vec3f& newColor)
{
if(newColor != eclipticJ2000Poles->getColor()) {
eclipticJ2000Poles->setColor(newColor);
emit eclipticJ2000PolesColorChanged(newColor);
}
}
//! Set flag for displaying ecliptic poles
void GridLinesMgr::setFlagEclipticPoles(const bool displayed)
{
if(displayed != eclipticPoles->isDisplayed()) {
eclipticPoles->setDisplayed(displayed);
emit eclipticPolesDisplayedChanged(displayed);
}
}
//! Get flag for displaying ecliptic poles
bool GridLinesMgr::getFlagEclipticPoles(void) const
{
return eclipticPoles->isDisplayed();
}
Vec3f GridLinesMgr::getColorEclipticPoles(void) const
{
return eclipticPoles->getColor();
}
void GridLinesMgr::setColorEclipticPoles(const Vec3f& newColor)
{
if(newColor != eclipticPoles->getColor()) {
eclipticPoles->setColor(newColor);
emit eclipticPolesColorChanged(newColor);
}
}
//! Set flag for displaying galactic poles
void GridLinesMgr::setFlagGalacticPoles(const bool displayed)
{
if(displayed != galacticPoles->isDisplayed()) {
galacticPoles->setDisplayed(displayed);
emit galacticPolesDisplayedChanged(displayed);
}
}
//! Get flag for displaying galactic poles
bool GridLinesMgr::getFlagGalacticPoles(void) const
{
return galacticPoles->isDisplayed();
}
Vec3f GridLinesMgr::getColorGalacticPoles(void) const
{
return galacticPoles->getColor();
}
void GridLinesMgr::setColorGalacticPoles(const Vec3f& newColor)
{
if(newColor != galacticPoles->getColor()) {
galacticPoles->setColor(newColor);
emit galacticPolesColorChanged(newColor);
}
}
//! Set flag for displaying supergalactic poles
void GridLinesMgr::setFlagSupergalacticPoles(const bool displayed)
{
if(displayed != supergalacticPoles->isDisplayed()) {
supergalacticPoles->setDisplayed(displayed);
emit supergalacticPolesDisplayedChanged(displayed);
}
}
//! Get flag for displaying supergalactic poles
bool GridLinesMgr::getFlagSupergalacticPoles(void) const
{
return supergalacticPoles->isDisplayed();
}
Vec3f GridLinesMgr::getColorSupergalacticPoles(void) const
{
return supergalacticPoles->getColor();
}
void GridLinesMgr::setColorSupergalacticPoles(const Vec3f& newColor)
{
if(newColor != supergalacticPoles->getColor()) {
supergalacticPoles->setColor(newColor);
emit supergalacticPolesColorChanged(newColor);
}
}
//! Set flag for displaying equinox points of J2000
void GridLinesMgr::setFlagEquinoxJ2000Points(const bool displayed)
{
if(displayed != equinoxJ2000Points->isDisplayed()) {
equinoxJ2000Points->setDisplayed(displayed);
emit equinoxJ2000PointsDisplayedChanged(displayed);
}
}
//! Get flag for displaying equinox points of J2000
bool GridLinesMgr::getFlagEquinoxJ2000Points(void) const
{
return equinoxJ2000Points->isDisplayed();
}
Vec3f GridLinesMgr::getColorEquinoxJ2000Points(void) const
{
return equinoxJ2000Points->getColor();
}
void GridLinesMgr::setColorEquinoxJ2000Points(const Vec3f& newColor)
{
if(newColor != equinoxJ2000Points->getColor()) {
equinoxJ2000Points->setColor(newColor);
emit equinoxJ2000PointsColorChanged(newColor);
}
}
//! Set flag for displaying equinox points
void GridLinesMgr::setFlagEquinoxPoints(const bool displayed)
{
if(displayed != equinoxPoints->isDisplayed()) {
equinoxPoints->setDisplayed(displayed);
emit equinoxPointsDisplayedChanged(displayed);
}
}
//! Get flag for displaying equinox points
bool GridLinesMgr::getFlagEquinoxPoints(void) const
{
return equinoxPoints->isDisplayed();
}
Vec3f GridLinesMgr::getColorEquinoxPoints(void) const
{
return equinoxPoints->getColor();
}
void GridLinesMgr::setColorEquinoxPoints(const Vec3f& newColor)
{
if(newColor != equinoxPoints->getColor()) {
equinoxPoints->setColor(newColor);
emit equinoxPointsColorChanged(newColor);
}
}
 End of changes. 36 change blocks. 
4 lines changed or deleted 400 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/