StelSkyLayerMgr.cpp   StelSkyLayerMgr.cpp 
skipping to change at line 89 skipping to change at line 89
{ {
if (key=="clilayer") if (key=="clilayer")
insertSkyImage(uri, "Command-line layer"); insertSkyImage(uri, "Command-line layer");
else else
insertSkyImage(uri); insertSkyImage(uri);
} }
} }
conf->endGroup(); conf->endGroup();
setFlagShow(!conf->value("astro/flag_nebula_display_no_texture", fal se).toBool()); setFlagShow(!conf->value("astro/flag_nebula_display_no_texture", fal se).toBool());
addAction("actionShow_DSS", N_("Display Options"), N_("Deep-sky obje cts background images"), "flagShow", "I"); addAction("actionShow_DSO_Textures", N_("Display Options"), N_("Deep -sky objects background images"), "flagShow", "I");
} }
QString StelSkyLayerMgr::insertSkyLayer(StelSkyLayerP tile, const QString& keyHint, bool ashow) QString StelSkyLayerMgr::insertSkyLayer(StelSkyLayerP tile, const QString& keyHint, bool ashow)
{ {
SkyLayerElem* bEl = new SkyLayerElem(tile, ashow); SkyLayerElem* bEl = new SkyLayerElem(tile, ashow);
QString key = tile->getKeyHint(); QString key = tile->getKeyHint();
if (key.isEmpty() || key=="no name") if (key.isEmpty() || key=="no name")
{ {
if (!keyHint.isEmpty()) if (!keyHint.isEmpty())
{ {
skipping to change at line 180 skipping to change at line 180
} }
} }
} }
void noDelete(StelSkyLayer*) {;} void noDelete(StelSkyLayer*) {;}
// Called when loading of data started or stopped for one collection // Called when loading of data started or stopped for one collection
void StelSkyLayerMgr::loadingStateChanged(bool b) void StelSkyLayerMgr::loadingStateChanged(bool b)
{ {
StelSkyLayer* tile = qobject_cast<StelSkyLayer*>(QObject::sender()); StelSkyLayer* tile = qobject_cast<StelSkyLayer*>(QObject::sender());
Q_ASSERT(tile!=0); Q_ASSERT(tile!=Q_NULLPTR);
SkyLayerElem* elem = skyLayerElemForLayer(tile); SkyLayerElem* elem = skyLayerElemForLayer(tile);
Q_ASSERT(elem!=NULL); Q_ASSERT(elem!=Q_NULLPTR);
if (b) if (b)
{ {
Q_ASSERT(elem->progressBar==NULL); Q_ASSERT(elem->progressBar==Q_NULLPTR);
elem->progressBar = StelApp::getInstance().addProgressBar(); elem->progressBar = StelApp::getInstance().addProgressBar();
QString serverStr = elem->layer->getShortServerCredits(); QString serverStr = elem->layer->getShortServerCredits();
if (!serverStr.isEmpty()) if (!serverStr.isEmpty())
serverStr = " from "+serverStr; serverStr = " from "+serverStr;
elem->progressBar->setFormat("Loading "+elem->layer->getShor tName()+serverStr); elem->progressBar->setFormat("Loading "+elem->layer->getShor tName()+serverStr);
elem->progressBar->setRange(0,100); elem->progressBar->setRange(0,100);
} }
else else
{ {
Q_ASSERT(elem->progressBar!=NULL); Q_ASSERT(elem->progressBar!=Q_NULLPTR);
StelApp::getInstance().removeProgressBar(elem->progressBar); StelApp::getInstance().removeProgressBar(elem->progressBar);
elem->progressBar = NULL; elem->progressBar = Q_NULLPTR;
} }
} }
// Called when the percentage of loading tiles/tiles to be displayed change d for one collection // Called when the percentage of loading tiles/tiles to be displayed change d for one collection
void StelSkyLayerMgr::percentLoadedChanged(int percentage) void StelSkyLayerMgr::percentLoadedChanged(int percentage)
{ {
StelSkyLayer* tile = qobject_cast<StelSkyLayer*>(QObject::sender()); StelSkyLayer* tile = qobject_cast<StelSkyLayer*>(QObject::sender());
Q_ASSERT(tile!=0); Q_ASSERT(tile!=0);
SkyLayerElem* elem = skyLayerElemForLayer(tile); SkyLayerElem* elem = skyLayerElemForLayer(tile);
Q_ASSERT(elem!=NULL); Q_ASSERT(elem!=Q_NULLPTR);
Q_ASSERT(elem->progressBar!=NULL); Q_ASSERT(elem->progressBar!=Q_NULLPTR);
elem->progressBar->setValue(percentage); elem->progressBar->setValue(percentage);
} }
StelSkyLayerMgr::SkyLayerElem* StelSkyLayerMgr::skyLayerElemForLayer(const StelSkyLayer* t) StelSkyLayerMgr::SkyLayerElem* StelSkyLayerMgr::skyLayerElemForLayer(const StelSkyLayer* t)
{ {
foreach (SkyLayerElem* e, allSkyLayers) foreach (SkyLayerElem* e, allSkyLayers)
{ {
if (e->layer==t) if (e->layer==t)
{ {
return e; return e;
} }
} }
return NULL; return Q_NULLPTR;
} }
QString StelSkyLayerMgr::keyForLayer(const StelSkyLayer* t) QString StelSkyLayerMgr::keyForLayer(const StelSkyLayer* t)
{ {
return allSkyLayers.key(skyLayerElemForLayer(t)); return allSkyLayers.key(skyLayerElemForLayer(t));
} }
StelSkyLayerMgr::SkyLayerElem::SkyLayerElem(StelSkyLayerP t, bool ashow) : layer(t), progressBar(NULL), show(ashow) StelSkyLayerMgr::SkyLayerElem::SkyLayerElem(StelSkyLayerP t, bool ashow) : layer(t), progressBar(Q_NULLPTR), show(ashow)
{;} {;}
StelSkyLayerMgr::SkyLayerElem::~SkyLayerElem() StelSkyLayerMgr::SkyLayerElem::~SkyLayerElem()
{ {
if (progressBar) if (progressBar)
StelApp::getInstance().removeProgressBar(progressBar); StelApp::getInstance().removeProgressBar(progressBar);
progressBar = NULL; progressBar = Q_NULLPTR;
} }
bool StelSkyLayerMgr::loadSkyImage(const QString& id, const QString& filena me, bool StelSkyLayerMgr::loadSkyImage(const QString& id, const QString& filena me,
double lo ng0, double lat0, double lo ng0, double lat0,
double lo ng1, double lat1, double lo ng1, double lat1,
double lo ng2, double lat2, double lo ng2, double lat2,
double lo ng3, double lat3, double lo ng3, double lat3,
double mi nRes, double maxBright, bool visible, StelCore::FrameType frameType) double mi nRes, double maxBright, bool visible, StelCore::FrameType frameType)
{ {
if (allSkyLayers.contains(id)) if (allSkyLayers.contains(id))
skipping to change at line 386 skipping to change at line 386
qWarning() << e.what(); qWarning() << e.what();
return false; return false;
} }
*/ */
} }
void StelSkyLayerMgr::showLayer(const QString& id, bool b) void StelSkyLayerMgr::showLayer(const QString& id, bool b)
{ {
if (allSkyLayers.contains(id)) if (allSkyLayers.contains(id))
{ {
if (allSkyLayers[id]!=NULL) if (allSkyLayers[id]!=Q_NULLPTR)
allSkyLayers[id]->show = b; allSkyLayers[id]->show = b;
} }
} }
bool StelSkyLayerMgr::getShowLayer(const QString& id) const bool StelSkyLayerMgr::getShowLayer(const QString& id) const
{ {
if (allSkyLayers.contains(id)) if (allSkyLayers.contains(id))
{ {
if (allSkyLayers[id]!=NULL) if (allSkyLayers[id]!=Q_NULLPTR)
return allSkyLayers[id]->show; return allSkyLayers[id]->show;
} }
return false; return false;
} }
//! Get the list of all the currently loaded layers. //! Get the list of all the currently loaded layers.
QMap<QString, StelSkyLayerP> StelSkyLayerMgr::getAllSkyLayers() const QMap<QString, StelSkyLayerP> StelSkyLayerMgr::getAllSkyLayers() const
{ {
QMap<QString, StelSkyLayerP> res; QMap<QString, StelSkyLayerP> res;
for (QMap<QString, StelSkyLayerMgr::SkyLayerElem*>::ConstIterator it er=allSkyLayers.constBegin();iter!=allSkyLayers.constEnd();++iter) for (QMap<QString, StelSkyLayerMgr::SkyLayerElem*>::ConstIterator it er=allSkyLayers.constBegin();iter!=allSkyLayers.constEnd();++iter)
 End of changes. 12 change blocks. 
13 lines changed or deleted 13 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/