StelSkyCultureMgr.cpp   StelSkyCultureMgr.cpp 
skipping to change at line 53 skipping to change at line 53
{ {
QString pdFile = StelFileMgr::findFile("skycultures/" + dir + "/info.ini"); QString pdFile = StelFileMgr::findFile("skycultures/" + dir + "/info.ini");
if (pdFile.isEmpty()) if (pdFile.isEmpty())
{ {
qWarning() << "WARNING: unable to successfully read info.ini file from skyculture dir" << QDir::toNativeSeparators(dir); qWarning() << "WARNING: unable to successfully read info.ini file from skyculture dir" << QDir::toNativeSeparators(dir);
return; return;
} }
QSettings pd(pdFile, StelIniFormat); QSettings pd(pdFile, StelIniFormat);
dirToNameEnglish[dir].englishName = pd.value("info/name").to String(); dirToNameEnglish[dir].englishName = pd.value("info/name").to String();
dirToNameEnglish[dir].author = pd.value("info/author").toStr ing(); dirToNameEnglish[dir].author = pd.value("info/author").toStr ing();
QString boundaries = pd.value("info/boundaries", "none").toS
tring();
int boundariesIdx = -1;
if (boundaries.contains("generic", Qt::CaseInsensitive))
boundariesIdx = 0;
else if (boundaries.contains("own", Qt::CaseInsensitive))
boundariesIdx = 1;
else
boundariesIdx = -1;
dirToNameEnglish[dir].boundariesIdx = boundariesIdx;
} }
} }
StelSkyCultureMgr::~StelSkyCultureMgr() StelSkyCultureMgr::~StelSkyCultureMgr()
{ {
} }
//! Init itself from a config file. //! Init itself from a config file.
void StelSkyCultureMgr::init() void StelSkyCultureMgr::init()
{ {
skipping to change at line 105 skipping to change at line 114
} }
defaultSkyCultureID = id; defaultSkyCultureID = id;
QSettings* conf = StelApp::getInstance().getSettings(); QSettings* conf = StelApp::getInstance().getSettings();
Q_ASSERT(conf); Q_ASSERT(conf);
conf->setValue("localization/sky_culture", id); conf->setValue("localization/sky_culture", id);
emit defaultSkyCultureChanged(id); emit defaultSkyCultureChanged(id);
return true; return true;
} }
QString StelSkyCultureMgr::getCurrentSkyCultureNameI18() const {return q_(c QString StelSkyCultureMgr::getCurrentSkyCultureNameI18() const
urrentSkyCulture.englishName);} {
return q_(currentSkyCulture.englishName);
}
QString StelSkyCultureMgr::getCurrentSkyCultureEnglishName() const
{
return currentSkyCulture.englishName;
}
QString StelSkyCultureMgr::getCurrentSkyCultureEnglishName() const {return int StelSkyCultureMgr::getCurrentSkyCultureBoundariesIdx() const
currentSkyCulture.englishName;} {
return currentSkyCulture.boundariesIdx;
}
bool StelSkyCultureMgr::setCurrentSkyCultureNameI18(const QString& cultureN
ame)
{
return setCurrentSkyCultureID(skyCultureI18ToDirectory(cultureName))
;
}
//! returns newline delimited list of human readable culture names in engli sh //! returns newline delimited list of human readable culture names in engli sh
QString StelSkyCultureMgr::getSkyCultureListEnglish(void) QString StelSkyCultureMgr::getSkyCultureListEnglish(void)
{ {
QString cultures; QString cultures;
QMapIterator<QString, StelSkyCulture> i(dirToNameEnglish); QMapIterator<QString, StelSkyCulture> i(dirToNameEnglish);
while(i.hasNext()) while(i.hasNext())
{ {
i.next(); i.next();
cultures += QString("%1\n").arg(i.value().englishName); cultures += QString("%1\n").arg(i.value().englishName);
 End of changes. 3 change blocks. 
4 lines changed or deleted 30 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/