ConstellationMgr.cpp   ConstellationMgr.cpp 
skipping to change at line 148 skipping to change at line 148
StelApp *app = &StelApp::getInstance(); StelApp *app = &StelApp::getInstance();
connect(app, SIGNAL(languageChanged()), this, SLOT(updateI18n())); connect(app, SIGNAL(languageChanged()), this, SLOT(updateI18n()));
connect(&app->getSkyCultureMgr(), SIGNAL(currentSkyCultureChanged(QS tring)), this, SLOT(updateSkyCulture(const QString&))); connect(&app->getSkyCultureMgr(), SIGNAL(currentSkyCultureChanged(QS tring)), this, SLOT(updateSkyCulture(const QString&)));
QString displayGroup = N_("Display Options"); QString displayGroup = N_("Display Options");
addAction("actionShow_Constellation_Lines", displayGroup, N_("Conste llation lines"), "linesDisplayed", "C"); addAction("actionShow_Constellation_Lines", displayGroup, N_("Conste llation lines"), "linesDisplayed", "C");
addAction("actionShow_Constellation_Art", displayGroup, N_("Constell ation art"), "artDisplayed", "R"); addAction("actionShow_Constellation_Art", displayGroup, N_("Constell ation art"), "artDisplayed", "R");
addAction("actionShow_Constellation_Labels", displayGroup, N_("Const ellation labels"), "namesDisplayed", "V"); addAction("actionShow_Constellation_Labels", displayGroup, N_("Const ellation labels"), "namesDisplayed", "V");
addAction("actionShow_Constellation_Boundaries", displayGroup, N_("C onstellation boundaries"), "boundariesDisplayed", "B"); addAction("actionShow_Constellation_Boundaries", displayGroup, N_("C onstellation boundaries"), "boundariesDisplayed", "B");
addAction("actionShow_Constellation_Isolated", displayGroup, N_("Sel ect single constellation"), "isolateSelected"); // no shortcut, sync with G UI addAction("actionShow_Constellation_Isolated", displayGroup, N_("Sel ect single constellation"), "isolateSelected"); // no shortcut, sync with G UI
addAction("actionShow_Constellation_Deselect", displayGroup, N_("Rem ove selection of constellations"), this, "deselectConstellations()", "Tab") ; addAction("actionShow_Constellation_Deselect", displayGroup, N_("Rem ove selection of constellations"), this, "deselectConstellations()", "W");
} }
/************************************************************************* /*************************************************************************
Reimplementation of the getCallOrder method Reimplementation of the getCallOrder method
*************************************************************************/ *************************************************************************/
double ConstellationMgr::getCallOrder(StelModuleActionName actionName) cons t double ConstellationMgr::getCallOrder(StelModuleActionName actionName) cons t
{ {
if (actionName==StelModule::ActionDraw) if (actionName==StelModule::ActionDraw)
return StelApp::getInstance().getModuleMgr().getModule("Grid LinesMgr")->getCallOrder(actionName)+10; return StelApp::getInstance().getModuleMgr().getModule("Grid LinesMgr")->getCallOrder(actionName)+10;
return 0; return 0;
skipping to change at line 595 skipping to change at line 595
sPainter.setFont(asterFont); sPainter.setFont(asterFont);
drawLines(sPainter, core); drawLines(sPainter, core);
drawNames(sPainter); drawNames(sPainter);
drawArt(sPainter); drawArt(sPainter);
drawBoundaries(sPainter); drawBoundaries(sPainter);
} }
// Draw constellations art textures // Draw constellations art textures
void ConstellationMgr::drawArt(StelPainter& sPainter) const void ConstellationMgr::drawArt(StelPainter& sPainter) const
{ {
glBlendFunc(GL_ONE, GL_ONE); sPainter.setBlending(true, GL_ONE, GL_ONE);
sPainter.enableTexture2d(true); sPainter.setCullFace(true);
glEnable(GL_BLEND);
glEnable(GL_CULL_FACE);
vector < Constellation * >::const_iterator iter; vector < Constellation * >::const_iterator iter;
SphericalRegionP region = sPainter.getProjector()->getViewportConvex Polygon(); SphericalRegionP region = sPainter.getProjector()->getViewportConvex Polygon();
for (iter = asterisms.begin(); iter != asterisms.end(); ++iter) for (iter = asterisms.begin(); iter != asterisms.end(); ++iter)
{ {
(*iter)->drawArtOptim(sPainter, *region); (*iter)->drawArtOptim(sPainter, *region);
} }
glDisable(GL_CULL_FACE); sPainter.setCullFace(false);
} }
// Draw constellations lines // Draw constellations lines
void ConstellationMgr::drawLines(StelPainter& sPainter, const StelCore* cor e) const void ConstellationMgr::drawLines(StelPainter& sPainter, const StelCore* cor e) const
{ {
sPainter.enableTexture2d(false); sPainter.setBlending(true);
glEnable(GL_BLEND);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
if (constellationLineThickness>1.f) if (constellationLineThickness>1.f)
glLineWidth(constellationLineThickness); // set line thickne sPainter.setLineWidth(constellationLineThickness); // set li
ss ne thickness
// OpenGL ES 2.0 doesn't have GL_LINE_SMOOTH. But it looks much bett sPainter.setLineSmooth(true);
er.
#ifdef GL_LINE_SMOOTH
if (QOpenGLContext::currentContext()->format().renderableType()==QSu
rfaceFormat::OpenGL)
glEnable(GL_LINE_SMOOTH);
#endif
const SphericalCap& viewportHalfspace = sPainter.getProjector()->get BoundingCap(); const SphericalCap& viewportHalfspace = sPainter.getProjector()->get BoundingCap();
vector < Constellation * >::const_iterator iter; vector < Constellation * >::const_iterator iter;
for (iter = asterisms.begin(); iter != asterisms.end(); ++iter) for (iter = asterisms.begin(); iter != asterisms.end(); ++iter)
{ {
(*iter)->drawOptim(sPainter, core, viewportHalfspace); (*iter)->drawOptim(sPainter, core, viewportHalfspace);
} }
if (constellationLineThickness>1.f) if (constellationLineThickness>1.f)
glLineWidth(1.f); // restore line thickness sPainter.setLineWidth(1.f); // restore line thickness
// OpenGL ES 2.0 doesn't have GL_LINE_SMOOTH. But it looks much bett sPainter.setLineSmooth(false);
er.
#ifdef GL_LINE_SMOOTH
if (QOpenGLContext::currentContext()->format().renderableType()==QSu
rfaceFormat::OpenGL)
glDisable(GL_LINE_SMOOTH);
#endif
} }
// Draw the names of all the constellations // Draw the names of all the constellations
void ConstellationMgr::drawNames(StelPainter& sPainter) const void ConstellationMgr::drawNames(StelPainter& sPainter) const
{ {
glEnable(GL_BLEND); sPainter.setBlending(true);
sPainter.enableTexture2d(true);
glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA);
vector < Constellation * >::const_iterator iter; vector < Constellation * >::const_iterator iter;
for (iter = asterisms.begin(); iter != asterisms.end(); iter++) for (iter = asterisms.begin(); iter != asterisms.end(); iter++)
{ {
// Check if in the field of view // Check if in the field of view
if (sPainter.getProjector()->projectCheck((*iter)->XYZname, (*iter)->XYname)) if (sPainter.getProjector()->projectCheck((*iter)->XYZname, (*iter)->XYname))
(*iter)->drawName(sPainter, constellationDisplayStyl e); (*iter)->drawName(sPainter, constellationDisplayStyl e);
} }
} }
Constellation *ConstellationMgr::isStarIn(const StelObject* s) const Constellation *ConstellationMgr::isStarIn(const StelObject* s) const
skipping to change at line 1328 skipping to change at line 1314
} }
dataFile.close(); dataFile.close();
qDebug() << "Loaded" << i << "constellation boundary segments"; qDebug() << "Loaded" << i << "constellation boundary segments";
delete points; delete points;
return true; return true;
} }
void ConstellationMgr::drawBoundaries(StelPainter& sPainter) const void ConstellationMgr::drawBoundaries(StelPainter& sPainter) const
{ {
sPainter.enableTexture2d(false); sPainter.setBlending(false);
glDisable(GL_BLEND);
vector < Constellation * >::const_iterator iter; vector < Constellation * >::const_iterator iter;
for (iter = asterisms.begin(); iter != asterisms.end(); ++iter) for (iter = asterisms.begin(); iter != asterisms.end(); ++iter)
{ {
(*iter)->drawBoundaryOptim(sPainter); (*iter)->drawBoundaryOptim(sPainter);
} }
} }
StelObjectP ConstellationMgr::searchByNameI18n(const QString& nameI18n) con st StelObjectP ConstellationMgr::searchByNameI18n(const QString& nameI18n) con st
{ {
QString objw = nameI18n.toUpper(); QString objw = nameI18n.toUpper();
 End of changes. 8 change blocks. 
31 lines changed or deleted 12 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/