StelGuiItems.cpp   StelGuiItems.cpp 
skipping to change at line 25 skipping to change at line 25
* 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., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. * Foundation, Inc., 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA.
*/ */
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelProjector.hpp" #include "StelProjector.hpp"
#include "StelUtils.hpp" #include "StelUtils.hpp"
#include "SolarSystem.hpp"
#include "StelGuiItems.hpp" #include "StelGuiItems.hpp"
#include "StelGui.hpp" #include "StelGui.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelLocation.hpp" #include "StelLocation.hpp"
#include "StelMainView.hpp" #include "StelMainView.hpp"
#include "StelMovementMgr.hpp" #include "StelMovementMgr.hpp"
#include "StelModuleMgr.hpp"
#include "StelActionMgr.hpp" #include "StelActionMgr.hpp"
#include "StelProgressController.hpp" #include "StelProgressController.hpp"
#include "StelObserver.hpp" #include "StelObserver.hpp"
#include <QPainter> #include <QPainter>
#include <QGraphicsScene> #include <QGraphicsScene>
#include <QGraphicsView> #include <QGraphicsView>
#include <QGraphicsLineItem> #include <QGraphicsLineItem>
#include <QRectF> #include <QRectF>
#include <QDebug> #include <QDebug>
skipping to change at line 629 skipping to change at line 631
newDateInfo = QString("%1 %2").arg(locmgr.getPrintab leDateLocal(jd)).arg(locmgr.getPrintableTimeLocal(jd)); newDateInfo = QString("%1 %2").arg(locmgr.getPrintab leDateLocal(jd)).arg(locmgr.getPrintableTimeLocal(jd));
} }
QString newDateAppx = QString("JD %1").arg(jd, 0, 'f', 6); QString newDateAppx = QString("JD %1").arg(jd, 0, 'f', 6);
if (getFlagTimeJd()) if (getFlagTimeJd())
{ {
newDateAppx = newDateInfo; newDateAppx = newDateInfo;
newDateInfo = QString("JD %1").arg(jd, 0, 'f', 6); newDateInfo = QString("JD %1").arg(jd, 0, 'f', 6);
} }
QString planetName = core->getCurrentLocation().planetName; QString planetName = core->getCurrentLocation().planetName;
QString planetNameI18n;
if (planetName=="SpaceShip") // Avoid crash
{
const StelTranslator& trans = StelApp::getInstance().getLoca
leMgr().getSkyTranslator();
planetNameI18n = trans.qtranslate(planetName);
}
else
planetNameI18n = GETSTELMODULE(SolarSystem)->searchByEnglish
Name(planetName)->getNameI18n();
QString tzName = core->getCurrentTimeZone(); QString tzName = core->getCurrentTimeZone();
if (tzName.contains("system_default") || (tzName.isEmpty() && planet Name=="Earth")) if (tzName.contains("system_default") || (tzName.isEmpty() && planet Name=="Earth"))
tzName = q_("System default"); tzName = q_("System default");
QString currTZ = QString("%1: %2").arg(q_("Time zone")).arg(tzName); QString currTZ = QString("%1: %2").arg(q_("Time zone")).arg(tzName);
if (tzName.contains("LMST") || tzName.contains("auto") || (planetNam e=="Earth" && jd<=StelCore::TZ_ERA_BEGINNING && !core->getUseCustomTimeZone ()) || planetName!="Earth") if (tzName.contains("LMST") || tzName.contains("auto") || (planetNam e=="Earth" && jd<=StelCore::TZ_ERA_BEGINNING && !core->getUseCustomTimeZone ()) || planetName!="Earth")
currTZ = q_("Local Mean Solar Time"); currTZ = q_("Local Mean Solar Time");
if (tzName.contains("LTST")) if (tzName.contains("LTST"))
skipping to change at line 700 skipping to change at line 711
if (qApp->property("text_texture")==true) // CLI option -t given? if (qApp->property("text_texture")==true) // CLI option -t given?
{ {
datetime->setVisible(false); // hide normal thingy. datetime->setVisible(false); // hide normal thingy.
datetimePixmap->setPixmap(getTextPixmap(newDateInfo, datetim e->font())); datetimePixmap->setPixmap(getTextPixmap(newDateInfo, datetim e->font()));
} }
// build location tooltip // build location tooltip
QString newLocation = ""; QString newLocation = "";
const StelLocation* loc = &core->getCurrentLocation(); const StelLocation* loc = &core->getCurrentLocation();
const StelTranslator& trans = locmgr.getSkyTranslator();
if (getFlagShowLocation() && !loc->name.isEmpty()) if (getFlagShowLocation() && !loc->name.isEmpty())
{ {
newLocation = trans.qtranslate(loc->planetName) +", "+loc->n //TRANSLATORS: Unit of measure for distance - meter
ame + ", "+q_("%1m").arg(loc->altitude); newLocation = planetNameI18n +", "+loc->name + ", "+ QString
("%1 %2").arg(loc->altitude).arg(qc_("m", "distance"));
} }
if (getFlagShowLocation() && loc->name.isEmpty()) if (getFlagShowLocation() && loc->name.isEmpty())
{ {
newLocation = trans.qtranslate(loc->planetName)+", "+StelUti ls::decDegToDmsStr(loc->latitude)+", "+StelUtils::decDegToDmsStr(loc->longi tude); newLocation = planetNameI18n +", "+StelUtils::decDegToDmsStr (loc->latitude)+", "+StelUtils::decDegToDmsStr(loc->longitude);
} }
// TODO: When topocentric switch is toggled, this must be redrawn! // TODO: When topocentric switch is toggled, this must be redrawn!
if (location->text()!=newLocation || updatePos) if (location->text()!=newLocation || updatePos)
{ {
updatePos = true; updatePos = true;
location->setText(newLocation); location->setText(newLocation);
float lat = core->getCurrentLocation().latitude; float lat = core->getCurrentLocation().latitude;
float lon = core->getCurrentLocation().longitude; float lon = core->getCurrentLocation().longitude;
QString latStr, lonStr, pm; QString latStr, lonStr, pm;
if (lat >= 0) if (lat >= 0)
skipping to change at line 735 skipping to change at line 746
if (lon >= 0) if (lon >= 0)
pm = "E"; pm = "E";
else else
{ {
pm = "W"; pm = "W";
lon *= -1; lon *= -1;
} }
lonStr = QString("%1%2%3").arg(pm).arg(lon).arg(QChar(0x00B0 )); lonStr = QString("%1%2%3").arg(pm).arg(lon).arg(QChar(0x00B0 ));
QString rho; QString rho;
if (core->getUseTopocentricCoordinates()) if (core->getUseTopocentricCoordinates())
rho = q_("planetocentric distance %1 km").arg(core-> getCurrentObserver()->getDistanceFromCenter() * AU); rho = QString("%1 %2 %3").arg(q_("planetocentric dis tance")).arg(core->getCurrentObserver()->getDistanceFromCenter() * AU).arg( qc_("km", "distance"));
else else
rho = q_("planetocentric observer"); rho = q_("planetocentric observer");
location->setToolTip(QString("%1 %2; %3").arg(latStr).arg(lo nStr).arg(rho)); location->setToolTip(QString("%1 %2; %3").arg(latStr).arg(lo nStr).arg(rho));
if (qApp->property("text_texture")==true) // CLI option -t g iven? if (qApp->property("text_texture")==true) // CLI option -t g iven?
{ {
locationPixmap->setPixmap(getTextPixmap(newLocation, location->font())); locationPixmap->setPixmap(getTextPixmap(newLocation, location->font()));
location->setVisible(false); location->setVisible(false);
} }
} }
 End of changes. 7 change blocks. 
5 lines changed or deleted 18 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/