LandscapeMgr.cpp   LandscapeMgr.cpp 
skipping to change at line 783 skipping to change at line 783
} }
QString LandscapeMgr::getCurrentLandscapeName() const QString LandscapeMgr::getCurrentLandscapeName() const
{ {
return landscape->getName(); return landscape->getName();
} }
QString LandscapeMgr::getCurrentLandscapeHtmlDescription() const QString LandscapeMgr::getCurrentLandscapeHtmlDescription() const
{ {
QString desc = getDescription(); QString desc = getDescription();
desc+="<p>";
desc+="<b>"+q_("Author: ")+"</b>"; QString author = landscape->getAuthorName();
desc+=landscape->getAuthorName();
desc+="<br>"; desc += "<p>";
if (!author.isEmpty())
desc += QString("<b>%1</b>: %2<br />").arg(q_("Author"), aut
hor);
// This previously showed 0/0 for locationless landscapes! // This previously showed 0/0 for locationless landscapes!
if (landscape->hasLocation()) if (landscape->hasLocation())
{ {
desc+="<b>"+q_("Location: ")+"</b>"; //TRANSLATORS: Unit of measure for distance - meter
desc += StelUtils::radToDmsStrAdapt(landscape->getLocation() QString alt = qc_("m", "distance");
.longitude * M_PI/180.);
desc += "/" + StelUtils::radToDmsStrAdapt(landscape->getLoca desc += QString("<b>%1</b>: %2, %3, %4 %5")
tion().latitude *M_PI/180.); .arg(q_("Location"))
desc += QString(q_(", %1 m")).arg(landscape->getLocation().a .arg(StelUtils::radToDmsStrAdapt(landscape->
ltitude); getLocation().latitude *M_PI/180.))
.arg(StelUtils::radToDmsStrAdapt(landscape->
getLocation().longitude * M_PI/180.))
.arg(landscape->getLocation().altitude).arg(
alt);
QString planetName = landscape->getLocation().planetName; QString planetName = landscape->getLocation().planetName;
if (!planetName.isEmpty()) if (!planetName.isEmpty())
{ {
const StelTranslator& trans = StelApp::getInstance() .getLocaleMgr().getSkyTranslator(); const StelTranslator& trans = StelApp::getInstance() .getLocaleMgr().getSkyTranslator();
desc += "<br><b>"+q_("Celestial body:")+"</b> "+ tra desc += QString(", %1").arg(trans.qtranslate(planetN
ns.qtranslate(planetName); ame));
}
desc += "<br />";
QStringList atmosphere;
atmosphere.clear();
float pressure = landscape->getDefaultAtmosphericPressure();
if (pressure>-1.0)
{
// 1 mbar = 1 hPa
//TRANSLATORS: Unit of measure for pressure - hectop
ascals
QString hPa = qc_("hPa", "pressure");
atmosphere.append(QString("%1 %2").arg(QString::numb
er(pressure, 'f', 1), hPa));
} }
desc += "<br><br>";
float temperature = landscape->getDefaultAtmosphericTemperat
ure();
if (temperature>-1000.0)
atmosphere.append(QString("%1 %2C").arg(QString::num
ber(temperature, 'f', 1)).arg(QChar(0x00B0)));
float extcoeff = landscape->getDefaultAtmosphericExtinction(
);
if (extcoeff>-1.0)
atmosphere.append(QString("%1: %2").arg(q_("extincti
on coefficient")).arg(QString::number(extcoeff, 'f', 2)));
if (atmosphere.size()>0)
desc += QString("<b>%1</b>: %2<br />").arg(q_("Atmos
pheric conditions"), atmosphere.join(", "));
int bortle = landscape->getDefaultBortleIndex();
if (bortle>-1)
desc += QString("<b>%1</b>: %2 (%3)").arg(q_("Light
pollution")).arg(bortle).arg(q_("by Bortle scale"));
} }
// TBD: Activate this or delete?
//else
// desc+="<b>"+q_("Location: ")+"</b>" + q_("not specified (jus
t decoration)") + "<br><br>";
return desc; return desc;
} }
//! Set flag for displaying Cardinals Points //! Set flag for displaying Cardinals Points
void LandscapeMgr::setFlagCardinalsPoints(const bool displayed) void LandscapeMgr::setFlagCardinalsPoints(const bool displayed)
{ {
if (cardinalsPoints->getFlagShow() != displayed) { if (cardinalsPoints->getFlagShow() != displayed) {
cardinalsPoints->setFlagShow(displayed); cardinalsPoints->setFlagShow(displayed);
emit cardinalsPointsDisplayedChanged(displayed); emit cardinalsPointsDisplayedChanged(displayed);
} }
 End of changes. 5 change blocks. 
18 lines changed or deleted 59 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/