Nebula.cpp   Nebula.cpp 
skipping to change at line 18 skipping to change at line 18
* 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 <QTextStream> #include <QTextStream>
#include <QFile> #include <QFile>
#include <QString> #include <QString>
#include "Nebula.hpp" #include "Nebula.hpp"
#include "NebulaMgr.hpp" #include "NebulaMgr.hpp"
#include "StelTexture.hpp" #include "StelTexture.hpp"
skipping to change at line 99 skipping to change at line 99
oss << ")"; oss << ")";
} }
if ((flags&Name) || (flags&CatalogNumber)) if ((flags&Name) || (flags&CatalogNumber))
oss << "</h2>"; oss << "</h2>";
if (flags&Extra1) if (flags&Extra1)
oss << q_("Type: <b>%1</b>").arg(getTypeString()) << "<br>"; oss << q_("Type: <b>%1</b>").arg(getTypeString()) << "<br>";
if (mag < 50 && flags&Magnitude) if (mag < 50 && flags&Magnitude)
oss << q_("Magnitude: <b>%1</b>").arg(mag, 0, 'f', 2) << "<b {
r>"; if (core->getSkyDrawer()->getFlagHasAtmosphere())
oss << q_("Magnitude: <b>%1</b> (extincted to: <b>%2</b>)").
arg(QString::number(getVMagnitude(core, false), 'f', 2),
QString::number(getVMagnitude(core, true), 'f', 2)) << "<br>";
else
oss << q_("Magnitude: <b>%1</b>").arg(getVMagnitude(core, fa
lse), 0, 'f', 2) << "<br>";
}
oss << getPositionInfoString(core, flags); oss << getPositionInfoString(core, flags);
if (angularSize>0 && flags&Size) if (angularSize>0 && flags&Size)
oss << q_("Size: %1").arg(StelUtils::radToDmsStr(angularSize *M_PI/180.)) << "<br>"; oss << q_("Size: %1").arg(StelUtils::radToDmsStr(angularSize *M_PI/180.)) << "<br>";
postProcessInfoString(str, flags); postProcessInfoString(str, flags);
return str; return str;
} }
float Nebula::getVMagnitude(const StelCore* core, bool withExtinction) cons
t
{
float extinctionMag=0.0; // track magnitude loss
if (withExtinction && core->getSkyDrawer()->getFlagHasAtmosphere())
{
Vec3d altAz=getAltAzPosApparent(core);
altAz.normalize();
core->getSkyDrawer()->getExtinction().forward(&altAz[2], &extinction
Mag);
}
return mag+extinctionMag;
}
float Nebula::getSelectPriority(const StelCore* core) const float Nebula::getSelectPriority(const StelCore* core) const
{ {
if( ((NebulaMgr*)StelApp::getInstance().getModuleMgr().getModule("Ne bulaMgr"))->getFlagHints() ) if( ((NebulaMgr*)StelApp::getInstance().getModuleMgr().getModule("Ne bulaMgr"))->getFlagHints() )
{ {
// make very easy to select IF LABELED // make very easy to select IF LABELED
return -10.f; return -10.f;
} }
else else
{ {
if (getVMagnitude(core)>20.f) return 20.f; if (getVMagnitude(core, false)>20.f) return 20.f;
return getVMagnitude(core); return getVMagnitude(core, false);
} }
} }
Vec3f Nebula::getInfoColor(void) const Vec3f Nebula::getInfoColor(void) const
{ {
return StelApp::getInstance().getVisionModeNight() ? Vec3f(0.6, 0.0, 0.4) : ((NebulaMgr*)StelApp::getInstance().getModuleMgr().getModule("Nebul aMgr"))->getLabelsColor(); return StelApp::getInstance().getVisionModeNight() ? Vec3f(0.6, 0.0, 0.4) : ((NebulaMgr*)StelApp::getInstance().getModuleMgr().getModule("Nebul aMgr"))->getLabelsColor();
} }
double Nebula::getCloseViewFov(const StelCore*) const double Nebula::getCloseViewFov(const StelCore*) const
{ {
 End of changes. 4 change blocks. 
6 lines changed or deleted 28 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/