Skip to content

Commit

Permalink
Improve readability of NebulaMgr::init by reducing line lengths
Browse files Browse the repository at this point in the history
  • Loading branch information
10110111 committed Sep 28, 2022
1 parent 8b07754 commit ef0f5c7
Showing 1 changed file with 20 additions and 19 deletions.
39 changes: 20 additions & 19 deletions src/core/modules/NebulaMgr.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -186,44 +186,45 @@ void NebulaMgr::init()

nebulaFont.setPixelSize(StelApp::getInstance().getScreenFontSize());
connect(&StelApp::getInstance(), SIGNAL(screenFontSizeChanged(int)), SLOT(setFontSizeFromApp(int)));
auto& texMan = StelApp::getInstance().getTextureManager();
// Load circle texture
Nebula::texCircle = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb.png");
Nebula::texCircle = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb.png");
// Load circle texture for large DSO
Nebula::texCircleLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_lrg.png");
Nebula::texCircleLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_lrg.png");
// Load dashed shape texture
Nebula::texRegion = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_reg.png");
Nebula::texRegion = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_reg.png");
// Load ellipse texture
Nebula::texGalaxy = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_gal.png");
Nebula::texGalaxy = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_gal.png");
// Load ellipse texture for large galaxies
Nebula::texGalaxyLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_gal_lrg.png");
Nebula::texGalaxyLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_gal_lrg.png");
// Load open cluster marker texture
Nebula::texOpenCluster = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocl.png");
Nebula::texOpenCluster = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocl.png");
// Load open cluster marker texture for large objects
Nebula::texOpenClusterLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocl_lrg.png");
Nebula::texOpenClusterLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocl_lrg.png");
// Load open cluster marker texture for extra large objects
Nebula::texOpenClusterXLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocl_xlrg.png");
Nebula::texOpenClusterXLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocl_xlrg.png");
// Load globular cluster marker texture
Nebula::texGlobularCluster = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_gcl.png");
Nebula::texGlobularCluster = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_gcl.png");
// Load globular cluster marker texture for large GCls
Nebula::texGlobularClusterLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_gcl_lrg.png");
Nebula::texGlobularClusterLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_gcl_lrg.png");
// Load planetary nebula marker texture
Nebula::texPlanetaryNebula = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_pnb.png");
Nebula::texPlanetaryNebula = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_pnb.png");
// Load diffuse nebula marker texture
Nebula::texDiffuseNebula = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_dif.png");
Nebula::texDiffuseNebula = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_dif.png");
// Load diffuse nebula marker texture for large DSO
Nebula::texDiffuseNebulaLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_dif_lrg.png");
Nebula::texDiffuseNebulaLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_dif_lrg.png");
// Load diffuse nebula marker texture for extra large DSO
Nebula::texDiffuseNebulaXLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_dif_xlrg.png");
Nebula::texDiffuseNebulaXLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_dif_xlrg.png");
// Load dark nebula marker texture
Nebula::texDarkNebula = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_drk.png");
Nebula::texDarkNebula = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_drk.png");
// Load dark nebula marker texture for large DSO
Nebula::texDarkNebulaLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_drk_lrg.png");
Nebula::texDarkNebulaLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_drk_lrg.png");
// Load Ocl/Nebula marker texture
Nebula::texOpenClusterWithNebulosity = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocln.png");
Nebula::texOpenClusterWithNebulosity = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocln.png");
// Load Ocl/Nebula marker texture for large objects
Nebula::texOpenClusterWithNebulosityLarge = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocln_lrg.png");
Nebula::texOpenClusterWithNebulosityLarge = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/neb_ocln_lrg.png");
// Load pointer texture
texPointer = StelApp::getInstance().getTextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures/pointeur5.png");
texPointer = texMan.createTexture(StelFileMgr::getInstallationDir()+"/textures/pointeur5.png");

setFlagShow(conf->value("astro/flag_nebula",true).toBool());
setFlagHints(conf->value("astro/flag_nebula_name",false).toBool());
Expand Down

0 comments on commit ef0f5c7

Please sign in to comment.