NebulaMgr.cpp   NebulaMgr.cpp 
skipping to change at line 102 skipping to change at line 102
// 1. config file option (list of sets to load at startup) // 1. config file option (list of sets to load at startup)
// 2. load all // 2. load all
// 3. flag in nebula_textures.fab (yuk) // 3. flag in nebula_textures.fab (yuk)
// 4. info.ini file in each set containing a "load at startup" item // 4. info.ini file in each set containing a "load at startup" item
// For now (0.9.0), just load the default set // For now (0.9.0), just load the default set
loadNebulaSet("default"); loadNebulaSet("default");
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
nebulaFont.setPixelSize(StelApp::getInstance().getSettings()->value( "gui/base_font_size", 13).toInt()); nebulaFont.setPixelSize(StelApp::getInstance().getBaseFontSize());
Nebula::texCircle = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb.png"); // Load circle texture Nebula::texCircle = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb.png"); // Load circle texture
Nebula::texGalaxy = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_gal.png"); // Load ellipse texture Nebula::texGalaxy = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_gal.png"); // Load ellipse texture
Nebula::texOpenCluster = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_ocl.png"); // Load open cluster marker texture Nebula::texOpenCluster = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_ocl.png"); // Load open cluster marker texture
Nebula::texGlobularCluster = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_gcl.png"); // Load globular cluster marker texture Nebula::texGlobularCluster = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_gcl.png"); // Load globular cluster marker texture
Nebula::texPlanetaryNebula = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_pnb.png"); // Load planetary nebula marker texture Nebula::texPlanetaryNebula = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_pnb.png"); // Load planetary nebula marker texture
Nebula::texDiffuseNebula = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_dif.png"); // Load diffuse nebula marker texture Nebula::texDiffuseNebula = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_dif.png"); // Load diffuse nebula marker texture
Nebula::texOpenClusterWithNebulosity = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_ocln.png"); // Load Ocl/Nebula marker texture Nebula::texOpenClusterWithNebulosity = StelApp::getInstance().get TextureManager().createTexture(StelFileMgr::getInstallationDir()+"/textures /neb_ocln.png"); // Load Ocl/Nebula marker texture
texPointer = StelApp::getInstance().getTextureManager().createTextur e(StelFileMgr::getInstallationDir()+"/textures/pointeur5.png"); // Load p ointer texture texPointer = StelApp::getInstance().getTextureManager().createTextur e(StelFileMgr::getInstallationDir()+"/textures/pointeur5.png"); // Load p ointer texture
setFlagShow(conf->value("astro/flag_nebula",true).toBool()); setFlagShow(conf->value("astro/flag_nebula",true).toBool());
skipping to change at line 874 skipping to change at line 874
} }
result.sort(); result.sort();
if (maxNbItem > 0) if (maxNbItem > 0)
{ {
if (result.size()>maxNbItem) result.erase(result.begin()+max NbItem, result.end()); if (result.size()>maxNbItem) result.erase(result.begin()+max NbItem, result.end());
} }
return result; return result;
} }
QStringList NebulaMgr::listAllObjects(bool inEnglish) const
{
QStringList result;
foreach(const NebulaP& n, nebArray)
{
if (!n->getEnglishName().isEmpty())
{
if (inEnglish)
result << n->getEnglishName();
else
result << n->getNameI18n();
}
}
return result;
}
QStringList NebulaMgr::listAllObjectsByType(const QString &objType, bool in
English) const
{
QStringList result;
int type = objType.toInt();
switch (type)
{
case 0: // Bright galaxies?
foreach(const NebulaP& n, nebArray)
{
if (n->nType==type && n->mag<=10.)
{
if (!n->getEnglishName().isEmpty())
{
if (inEnglish)
result << n->getEngl
ishName();
else
result << n->getName
I18n();
}
else if (n->NGC_nb>0)
result << QString("NGC %1").
arg(n->NGC_nb);
else
result << QString("IC %1").a
rg(n->IC_nb);
}
}
break;
case 10: // Messier Catalogue?
foreach(const NebulaP& n, nebArray)
{
if (n->M_nb>0)
result << QString("M%1").arg(n->M_nb
);
}
break;
case 11: // Caldwell Catalogue?
foreach(const NebulaP& n, nebArray)
{
if (n->C_nb>0)
result << QString("C%1").arg(n->C_nb
);
}
break;
default:
foreach(const NebulaP& n, nebArray)
{
if (n->nType==type)
{
if (!n->getEnglishName().isEmpty())
{
if (inEnglish)
result << n->getEngl
ishName();
else
result << n->getName
I18n();
}
else if (n->NGC_nb>0)
result << QString("NGC %1").
arg(n->NGC_nb);
else
result << QString("IC %1").a
rg(n->IC_nb);
}
}
break;
}
result.removeDuplicates();
return result;
}
 End of changes. 2 change blocks. 
1 lines changed or deleted 1 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/