Nebula.cpp   Nebula.cpp 
skipping to change at line 104 skipping to change at line 104
, Sh2_nb(0) , Sh2_nb(0)
, VdB_nb(0) , VdB_nb(0)
, RCW_nb(0) , RCW_nb(0)
, LDN_nb(0) , LDN_nb(0)
, LBN_nb(0) , LBN_nb(0)
, Cr_nb(0) , Cr_nb(0)
, Mel_nb(0) , Mel_nb(0)
, PGC_nb(0) , PGC_nb(0)
, UGC_nb(0) , UGC_nb(0)
, Ced_nb() , Ced_nb()
, nameI18("")
, mTypeString() , mTypeString()
, bMag(99.) , bMag(99.)
, vMag(99.) , vMag(99.)
, majorAxisSize(0.) , majorAxisSize(0.)
, minorAxisSize(0.) , minorAxisSize(0.)
, orientationAngle(0) , orientationAngle(0)
, oDistance(0.) , oDistance(0.)
, oDistanceErr(0.) , oDistanceErr(0.)
, redshift(99.) , redshift(99.)
, redshiftErr(0.) , redshiftErr(0.)
, parallax(0.) , parallax(0.)
, parallaxErr(0.) , parallaxErr(0.)
, nType() , nType()
{ {
nameI18 = "";
} }
Nebula::~Nebula() Nebula::~Nebula()
{ {
} }
QString Nebula::getInfoString(const StelCore *core, const InfoStringGroup& flags) const QString Nebula::getInfoString(const StelCore *core, const InfoStringGroup& flags) const
{ {
QString str; QString str;
QTextStream oss(&str); QTextStream oss(&str);
double az_app, alt_app; double az_app, alt_app;
StelUtils::rectToSphe(&az_app,&alt_app,getAltAzPosApparent(core)); StelUtils::rectToSphe(&az_app,&alt_app,getAltAzPosApparent(core));
Q_UNUSED(az_app); Q_UNUSED(az_app);
if ((flags&Name) || (flags&CatalogNumber)) if ((flags&Name) || (flags&CatalogNumber))
oss << "<h2>"; oss << "<h2>";
if (!nameI18.isEmpty() && flags&Name) if (!nameI18.isEmpty() && flags&Name)
{ {
oss << getNameI18n(); oss << getNameI18n();
QString aliases = getI18nAliases();
if (!aliases.isEmpty())
oss << " (" << aliases << ")";
} }
if (flags&CatalogNumber) if (flags&CatalogNumber)
{ {
QStringList catIds; QStringList catIds;
if (M_nb > 0) if (M_nb > 0)
catIds << QString("M %1").arg(M_nb); catIds << QString("M %1").arg(M_nb);
if (C_nb > 0) if (C_nb > 0)
catIds << QString("C %1").arg(C_nb); catIds << QString("C %1").arg(C_nb);
if (NGC_nb > 0) if (NGC_nb > 0)
catIds << QString("NGC %1").arg(NGC_nb); catIds << QString("NGC %1").arg(NGC_nb);
if (IC_nb > 0) if (IC_nb > 0)
catIds << QString("IC %1").arg(IC_nb); catIds << QString("IC %1").arg(IC_nb);
if (B_nb > 0) if (B_nb > 0)
catIds << QString("B %1").arg(B_nb); catIds << QString("B %1").arg(B_nb);
if (Sh2_nb > 0) if (Sh2_nb > 0)
catIds << QString("Sh 2-%1").arg(Sh2_nb); catIds << QString("SH 2-%1").arg(Sh2_nb);
if (VdB_nb > 0) if (VdB_nb > 0)
catIds << QString("VdB %1").arg(VdB_nb); catIds << QString("VdB %1").arg(VdB_nb);
if (RCW_nb > 0) if (RCW_nb > 0)
catIds << QString("RCW %1").arg(RCW_nb); catIds << QString("RCW %1").arg(RCW_nb);
if (LDN_nb > 0) if (LDN_nb > 0)
catIds << QString("LDN %1").arg(LDN_nb); catIds << QString("LDN %1").arg(LDN_nb);
if (LBN_nb > 0) if (LBN_nb > 0)
catIds << QString("LBN %1").arg(LBN_nb); catIds << QString("LBN %1").arg(LBN_nb);
if (Cr_nb > 0) if (Cr_nb > 0)
catIds << QString("Cr %1").arg(Cr_nb); catIds << QString("Cr %1").arg(Cr_nb);
skipping to change at line 274 skipping to change at line 277
if (oDistance==0.f) if (oDistance==0.f)
{ {
//TRANSLATORS: Unit of measure for distance - Light Years //TRANSLATORS: Unit of measure for distance - Light Years
oss << q_("Distance: %1 ly").arg(dx) << "<br >"; oss << q_("Distance: %1 ly").arg(dx) << "<br >";
} }
} }
if (oDistance>0.f) if (oDistance>0.f)
{ {
QString dx, dy, du; QString dx, dy;
float dc = 3262.f;
int ms = 1;
//TRANSLATORS: Unit of measure for distance - kilopa
rsecs
QString dupc = q_("kpc");
//TRANSLATORS: Unit of measure for distance - Light
Years
QString duly = q_("ly");
if (nType==NebAGx || nType==NebGx || nType==NebRGx |
| nType==NebIGx || nType==NebQSO || nType==NebPossQSO)
{
dc = 3.262f;
ms = 3;
//TRANSLATORS: Unit of measure for distance
- Megaparsecs
dupc = q_("Mpc");
//TRANSLATORS: Unit of measure for distance
- Millions of Light Years
duly = q_("Mio. ly");
}
if (oDistanceErr>0.f) if (oDistanceErr>0.f)
{ {
dx = QString("%1%2%3").arg(QString::number(o Distance, 'f', 3)).arg(QChar(0x00B1)).arg(QString::number(oDistanceErr, 'f' , 3)); dx = QString("%1%2%3").arg(QString::number(o Distance, 'f', 3)).arg(QChar(0x00B1)).arg(QString::number(oDistanceErr, 'f' , 3));
dy = QString("%1%2%3").arg(QString::number(o Distance*3262, 'f', 1)).arg(QChar(0x00B1)).arg(QString::number(oDistanceErr *3262, 'f', 1)); dy = QString("%1%2%3").arg(QString::number(o Distance*dc, 'f', ms)).arg(QChar(0x00B1)).arg(QString::number(oDistanceErr* dc, 'f', ms));
} }
else else
{ {
dx = QString("%1").arg(QString::number(oDist ance, 'f', 3)); dx = QString("%1").arg(QString::number(oDist ance, 'f', 3));
dy = QString("%1").arg(QString::number(oDist ance*3262, 'f', 1)); dy = QString("%1").arg(QString::number(oDist ance*dc, 'f', ms));
} }
if (nType==NebAGx || nType==NebGx || nType==NebRGx | oss << q_("Distance: %1 %2 (%3 %4)").arg(dx).arg(dup
| nType==NebIGx || nType==NebQSO || nType==NebISM) c).arg(dy).arg(duly) << "<br>";
{
//TRANSLATORS: Unit of measure for distance
- megaparsecs
du = q_("Mpc");
}
else
{
du = QString("%1 (%2 %3)")
//TRANSLATORS: Unit of measu
re for distance - kiloparsecs
.arg(q_("kpc"))
.arg(dy)
//TRANSLATORS: Unit of measu
re for distance - Light Years
.arg(q_("ly"));
}
oss << q_("Distance: %1 %2").arg(dx).arg(du) << "<br
>";
} }
} }
if (flags&Extra) if (flags&Extra)
{ {
if (redshift<99.f) if (redshift<99.f)
{ {
QString z; QString z;
if (redshiftErr>0.f) if (redshiftErr>0.f)
z = QString("%1%2%3").arg(QString::number(re dshift, 'f', 6)).arg(QChar(0x00B1)).arg(QString::number(redshiftErr, 'f', 6 )); z = QString("%1%2%3").arg(QString::number(re dshift, 'f', 6)).arg(QChar(0x00B1)).arg(QString::number(redshiftErr, 'f', 6 ));
skipping to change at line 338 skipping to change at line 344
if (!getMorphologicalTypeDescription().isEmpty()) if (!getMorphologicalTypeDescription().isEmpty())
oss << q_("Morphological description: ") << getMorph ologicalTypeDescription() << ".<br>"; oss << q_("Morphological description: ") << getMorph ologicalTypeDescription() << ".<br>";
} }
postProcessInfoString(str, flags); postProcessInfoString(str, flags);
return str; return str;
} }
QString Nebula::getEnglishAliases() const
{
QString aliases = "";
if (englishAliases.size()!=0)
aliases = englishAliases.join(" - ");
return aliases;
}
QString Nebula::getI18nAliases() const
{
QString aliases = "";
if (nameI18Aliases.size()!=0)
aliases = nameI18Aliases.join(" - ");
return aliases;
}
float Nebula::getVMagnitude(const StelCore* core) const float Nebula::getVMagnitude(const StelCore* core) const
{ {
Q_UNUSED(core); Q_UNUSED(core);
return vMag; return vMag;
} }
double Nebula::getAngularSize(const StelCore *) const double Nebula::getAngularSize(const StelCore *) const
{ {
float size = majorAxisSize; float size = majorAxisSize;
if (majorAxisSize!=minorAxisSize || minorAxisSize>0) if (majorAxisSize!=minorAxisSize || minorAxisSize>0)
skipping to change at line 681 skipping to change at line 703
str = QString("M %1").arg(M_nb); str = QString("M %1").arg(M_nb);
else if (catalogFilters&CatC && C_nb>0) else if (catalogFilters&CatC && C_nb>0)
str = QString("C %1").arg(C_nb); str = QString("C %1").arg(C_nb);
else if (catalogFilters&CatNGC && NGC_nb>0) else if (catalogFilters&CatNGC && NGC_nb>0)
str = QString("NGC %1").arg(NGC_nb); str = QString("NGC %1").arg(NGC_nb);
else if (catalogFilters&CatIC && IC_nb>0) else if (catalogFilters&CatIC && IC_nb>0)
str = QString("IC %1").arg(IC_nb); str = QString("IC %1").arg(IC_nb);
else if (catalogFilters&CatB && B_nb>0) else if (catalogFilters&CatB && B_nb>0)
str = QString("B %1").arg(B_nb); str = QString("B %1").arg(B_nb);
else if (catalogFilters&CatSh2 && Sh2_nb>0) else if (catalogFilters&CatSh2 && Sh2_nb>0)
str = QString("Sh 2-%1").arg(Sh2_nb); str = QString("SH 2-%1").arg(Sh2_nb);
else if (catalogFilters&CatVdB && VdB_nb>0) else if (catalogFilters&CatVdB && VdB_nb>0)
str = QString("VdB %1").arg(VdB_nb); str = QString("VdB %1").arg(VdB_nb);
else if (catalogFilters&CatRCW && RCW_nb>0) else if (catalogFilters&CatRCW && RCW_nb>0)
str = QString("RCW %1").arg(RCW_nb); str = QString("RCW %1").arg(RCW_nb);
else if (catalogFilters&CatLDN && LDN_nb>0) else if (catalogFilters&CatLDN && LDN_nb>0)
str = QString("LDN %1").arg(LDN_nb); str = QString("LDN %1").arg(LDN_nb);
else if (catalogFilters&CatLBN && LBN_nb > 0) else if (catalogFilters&CatLBN && LBN_nb > 0)
str = QString("LBN %1").arg(LBN_nb); str = QString("LBN %1").arg(LBN_nb);
else if (catalogFilters&CatCr && Cr_nb > 0) else if (catalogFilters&CatCr && Cr_nb > 0)
str = QString("Cr %1").arg(Cr_nb); str = QString("Cr %1").arg(Cr_nb);
skipping to change at line 815 skipping to change at line 837
QString Nebula::getMorphologicalTypeString(void) const QString Nebula::getMorphologicalTypeString(void) const
{ {
return mTypeString; return mTypeString;
} }
QString Nebula::getMorphologicalTypeDescription(void) const QString Nebula::getMorphologicalTypeDescription(void) const
{ {
QString m, r = ""; QString m, r = "";
// Let's avoid showing a wrong morphological description for galaxie
s
// NOTE: Is required the morphological description for galaxies?
if (nType==NebGx || nType==NebAGx || nType==NebRGx || nType==NebIGx
|| nType==NebQSO || nType==NebPossQSO || nType==NebBLA || nType==NebBLL)
return QString();
QRegExp GlClRx("\\.*(I|II|III|IV|V|VI|VI|VII|VIII|IX|X|XI|XII)\\.*") ; QRegExp GlClRx("\\.*(I|II|III|IV|V|VI|VI|VII|VIII|IX|X|XI|XII)\\.*") ;
int idx = GlClRx.indexIn(mTypeString); int idx = GlClRx.indexIn(mTypeString);
if (idx>0) if (idx>0)
m = mTypeString.mid(idx); m = mTypeString.mid(idx);
else else
m = mTypeString; m = mTypeString;
QStringList glclass; QStringList glclass;
glclass << "I" << "II" << "III" << "IV" << "V" << "VI" << "VII" << " VIII" << "IX" << "X" << "XI" << "XII"; glclass << "I" << "II" << "III" << "IV" << "V" << "VI" << "VII" << " VIII" << "IX" << "X" << "XI" << "XII";
 End of changes. 11 change blocks. 
26 lines changed or deleted 56 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/