StelGuiItems.cpp   StelGuiItems.cpp 
skipping to change at line 582 skipping to change at line 582
} }
updateText(true); updateText(true);
} }
// Make sure to avoid any change if not necessary to avoid triggering usele ss redraw // Make sure to avoid any change if not necessary to avoid triggering usele ss redraw
void BottomStelBar::updateText(bool updatePos) void BottomStelBar::updateText(bool updatePos)
{ {
StelCore* core = StelApp::getInstance().getCore(); StelCore* core = StelApp::getInstance().getCore();
double jd = core->getJDay(); double jd = core->getJDay();
double deltaT = 0.; double deltaT = 0.;
double sigma = -1.;
QString sigmaInfo = "";
QString validRangeInfo = "";
bool displayDeltaT = false; bool displayDeltaT = false;
if (StelApp::getInstance().getCore()->getCurrentLocation().planetNam e=="Earth") if (core->getCurrentLocation().planetName.contains("Earth"))
{ {
deltaT = StelUtils::getDeltaT(jd); deltaT = core->getDeltaT(jd);
displayDeltaT = true; displayDeltaT = true;
sigma = StelUtils::getDeltaTStandardError(jd);
core->getCurrentDeltaTAlgorithmValidRange(jd, &validRangeInf
o);
} }
// Add in a DeltaT correction. Divide DeltaT by 86400 to convert fro m seconds to days. // Add in a DeltaT correction. Divide DeltaT by 86400 to convert fro m seconds to days.
QString newDate = flagShowTime ? StelApp::getInstance().getLocaleMgr ().getPrintableDateLocal(jd-deltaT/86400.) +" " QString newDate = flagShowTime ? StelApp::getInstance().getLocaleMgr ().getPrintableDateLocal(jd-deltaT/86400.) +" "
+StelApp::getInstance().getLocaleMgr().getPrintableT imeLocal(jd-deltaT/86400.) : " "; +StelApp::getInstance().getLocaleMgr().getPrintableT imeLocal(jd-deltaT/86400.) : " ";
if (datetime->text()!=newDate) if (datetime->text()!=newDate)
{ {
updatePos = true; updatePos = true;
datetime->setText(newDate); datetime->setText(newDate);
if (displayDeltaT) if (displayDeltaT && core->getCurrentDeltaTAlgorithm()!=Stel Core::WithoutCorrection)
{ {
if (deltaT>60.) if (sigma>0)
datetime->setToolTip(QString("%1T = %2 (%3s) sigmaInfo = QString("; %1(%2T) = %3s").arg(Q
").arg(QChar(0x0394)).arg(StelUtils::hoursToHmsStr(deltaT/3600.)).arg(delta Char(0x03c3)).arg(QChar(0x0394)).arg(sigma, 3, 'f', 1);
T, 5, 'f', 2));
if (std::abs(deltaT)>60.)
datetime->setToolTip(QString("%1T = %2 (%3s)
%8 [%4 @ -23.8946%5/cy%6%7]").arg(QChar(0x0394)).arg(StelUtils::hoursToHmsS
tr(deltaT/3600.)).arg(deltaT, 5, 'f', 2).arg(QChar(0x1e45)).arg(QChar(0x203
3)).arg(QChar(0x00B2)).arg(sigmaInfo).arg(validRangeInfo));
else else
datetime->setToolTip(QString("%1T = %2s").ar g(QChar(0x0394)).arg(deltaT, 3, 'f', 3)); datetime->setToolTip(QString("%1T = %2s%7 [% 3 @ -23.8946%4/cy%5%6]").arg(QChar(0x0394)).arg(deltaT, 3, 'f', 3).arg(QCha r(0x1e45)).arg(QChar(0x2033)).arg(QChar(0x00B2)).arg(sigmaInfo).arg(validRa ngeInfo));
} }
else else
datetime->setToolTip(""); datetime->setToolTip("");
} }
QString newLocation = flagShowLocation ? q_(core->getCurrentLocation ().planetName) +", " QString newLocation = flagShowLocation ? q_(core->getCurrentLocation ().planetName) +", "
+core->getCurrentLocation().name + ", " +core->getCurrentLocation().name + ", "
// xgettext:no-c-format // xgettext:no-c-format
+q_("%1m").arg(core->getCurrentLocation().altitude) : " "; +q_("%1m").arg(core->getCurrentLocation().altitude) : " ";
if (location->text()!=newLocation) if (location->text()!=newLocation)
{ {
updatePos = true; updatePos = true;
location->setText(newLocation); location->setText(newLocation);
float lat = core->getCurrentLocation().latitude;
float lon = core->getCurrentLocation().longitude;
QString latStr, lonStr, pm;
if (lat >= 0)
pm = "N";
else
pm = "S";
latStr = QString("%1%2%3").arg(pm).arg(lat).arg(QChar(0x00B0
));
if (lat >= 0)
pm = "E";
else
pm = "W";
lonStr = QString("%1%2%3").arg(pm).arg(lon).arg(QChar(0x00B0
));
location->setToolTip(QString("%1 %2").arg(latStr).arg(lonStr
));
} }
QSettings* confSettings = StelApp::getInstance().getSettings(); QSettings* confSettings = StelApp::getInstance().getSettings();
QString str; QString str;
QTextStream wos(&str); QTextStream wos(&str);
wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr( )->getCurrentFov() << QChar(0x00B0); wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr( )->getCurrentFov() << QChar(0x00B0);
if (fov->text()!=str) if (fov->text()!=str)
{ {
updatePos = true; updatePos = true;
if (confSettings->value("gui/flag_show_fov", true).toBool()) if (confSettings->value("gui/flag_show_fov", true).toBool())
skipping to change at line 719 skipping to change at line 741
} }
} }
// Update the help label when a button is hovered // Update the help label when a button is hovered
void BottomStelBar::buttonHoverChanged(bool b) void BottomStelBar::buttonHoverChanged(bool b)
{ {
StelButton* button = qobject_cast<StelButton*>(sender()); StelButton* button = qobject_cast<StelButton*>(sender());
Q_ASSERT(button); Q_ASSERT(button);
if (b==true) if (b==true)
{ {
if (button->action) QAction* action = button->action;
if (action)
{ {
QString tip(button->action->toolTip()); QString tip(action->toolTip());
QString shortcut(button->action->shortcut().toString QString shortcut(action->shortcut().toString(QKeySeq
()); uence::NativeText));
if (!shortcut.isEmpty()) if (!shortcut.isEmpty())
{ {
if (shortcut == "Space") if (shortcut == "Space")
shortcut = q_("Space"); shortcut = q_("Space");
tip += " [" + shortcut + "]"; tip += " [" + shortcut + "]";
} }
helpLabel->setText(tip); helpLabel->setText(tip);
//helpLabel->setPos(button->pos().x()+button->pixmap ().size().width()/2,-27); //helpLabel->setPos(button->pos().x()+button->pixmap ().size().width()/2,-27);
helpLabel->setPos(20,-27); helpLabel->setPos(20,-27);
} }
 End of changes. 10 change blocks. 
12 lines changed or deleted 41 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/