StarWrapper.cpp   StarWrapper.cpp 
skipping to change at line 21 skipping to change at line 21
* as published by the Free Software Foundation; either version 2 * as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version. * of the License, or (at your option) any later version.
* *
* This program is distributed in the hope that it will be useful, * This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of * but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
* *
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StarWrapper.hpp" #include "StarWrapper.hpp"
#include "ZoneArray.hpp" #include "ZoneArray.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "StelTranslator.hpp" #include "StelTranslator.hpp"
#include <QTextStream> #include <QTextStream>
#include <limits> #include <limits>
skipping to change at line 51 skipping to change at line 51
} }
namespace BigStarCatalogExtension { namespace BigStarCatalogExtension {
QString StarWrapperBase::getInfoString(const StelCore *core, const InfoStri ngGroup& flags) const QString StarWrapperBase::getInfoString(const StelCore *core, const InfoStri ngGroup& flags) const
{ {
QString str; QString str;
QTextStream oss(&str); QTextStream oss(&str);
if (flags&Magnitude) if (flags&Magnitude)
oss << q_("Magnitude: <b>%1</b> (B-V: %2)").arg(QString::num {
ber(getVMagnitude(core), 'f', 2), QString::number(getBV(), 'f', 2)) << "<br oss << q_("Magnitude: <b>%1</b> (B-V: %2)").arg(QString::number(
>"; getVMagnitude(core, false), 'f', 2), QString::number(getBV(), 'f', 2)) << "
<br>";
oss << getPositionInfoString(core, flags); if (core->getSkyDrawer()->getFlagHasAtmosphere())
{
oss << q_("Apparent Magnitude: <b>%1</b> (by extinction)").
arg(QString::number(getVMagnitude(core, true), 'f', 2)) << "<br>";
}
}
oss << getPositionInfoString(core, flags);
StelObject::postProcessInfoString(str, flags); StelObject::postProcessInfoString(str, flags);
return str; return str;
} }
QString StarWrapper1::getEnglishName(void) const QString StarWrapper1::getEnglishName(void) const
{ {
if (s->hip) if (s->hip)
return QString("HIP %1").arg(s->hip); return QString("HIP %1").arg(s->hip);
skipping to change at line 107 skipping to change at line 112
if (flags&CatalogNumber || (nameWasEmpty && (flags&Name))) if (flags&CatalogNumber || (nameWasEmpty && (flags&Name)))
oss << "HIP " << s->hip; oss << "HIP " << s->hip;
if (s->componentIds) if (s->componentIds)
oss << " " << StarMgr::convertToComponentIds(s->comp onentIds); oss << " " << StarMgr::convertToComponentIds(s->comp onentIds);
if ((flags&Name) || (flags&CatalogNumber)) if ((flags&Name) || (flags&CatalogNumber))
oss << "</h2>"; oss << "</h2>";
} }
if (flags&Magnitude) if (flags&Magnitude)
oss << q_("Magnitude: <b>%1</b> (B-V: %2)").arg(QString::num {
ber(getVMagnitude(core), 'f', 2), if (core->getSkyDrawer()->getFlagHasAtmosphere())
oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2</b>. B
QString::number(s->getBV(), 'f', 2)) << -V: <b>%3</b>)").arg(QString::number(getVMagnitude(core, false), 'f', 2),
"<br>";
QString::number(getVMagnitude(core, true), 'f', 2),
QString::number(s->getBV(), 'f', 2)) << "<br>";
else
oss << q_("Magnitude: <b>%1</b> (B-V: <b>%2</b>)").arg(QStri
ng::number(getVMagnitude(core, false), 'f', 2),
QStri
ng::number(s->getBV(), 'f', 2)) << "<br>";
}
if ((flags&AbsoluteMagnitude) && s->plx && !isNan(s->plx) && !isInf( s->plx)) if ((flags&AbsoluteMagnitude) && s->plx && !isNan(s->plx) && !isInf( s->plx))
oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core)+ 5.*(1.+std::log10(0.00001*s->plx)), 0, 'f', 2) << "<br>"; oss << q_("Absolute Magnitude: %1").arg(getVMagnitude(core, false)+5.*(1.+std::log10(0.00001*s->plx)), 0, 'f', 2) << "<br>";
oss << getPositionInfoString(core, flags); oss << getPositionInfoString(core, flags);
if (s->spInt && flags&Extra1) if (s->spInt && flags&Extra1)
{ {
oss << q_("Spectral Type: %1").arg(StarMgr::convertToSpectra lType(s->spInt)) << "<br>"; oss << q_("Spectral Type: %1").arg(StarMgr::convertToSpectra lType(s->spInt)) << "<br>";
} }
if ((flags&Distance) && s->plx && !isNan(s->plx) && !isInf(s->plx)) if ((flags&Distance) && s->plx && !isNan(s->plx) && !isInf(s->plx))
oss << q_("Distance: %1 Light Years").arg((AU/(SPEED_OF_LIGH T*86400*365.25)) / (s->plx*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br >"; oss << q_("Distance: %1 Light Years").arg((AU/(SPEED_OF_LIGH T*86400*365.25)) / (s->plx*((0.00001/3600)*(M_PI/180))), 0, 'f', 2) << "<br >";
 End of changes. 4 change blocks. 
12 lines changed or deleted 27 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/