StelGuiItems.cpp   StelGuiItems.cpp 
skipping to change at line 616 skipping to change at line 616
QString sigmaInfo = ""; QString sigmaInfo = "";
QString validRangeMarker = ""; QString validRangeMarker = "";
core->getCurrentDeltaTAlgorithmValidRangeDescription(jd, &validRange Marker); core->getCurrentDeltaTAlgorithmValidRangeDescription(jd, &validRange Marker);
const StelLocaleMgr& locmgr = StelApp::getInstance().getLocaleMgr(); const StelLocaleMgr& locmgr = StelApp::getInstance().getLocaleMgr();
QString tz = locmgr.getPrintableTimeZoneLocal(jd); QString tz = locmgr.getPrintableTimeZoneLocal(jd);
QString newDateInfo = " "; QString newDateInfo = " ";
if (getFlagShowTime()) if (getFlagShowTime())
{ {
if (getFlagShowTz()) if (getFlagShowTz())
newDateInfo = QString("%1 %2 %3").arg(locmgr.getPr intableDateLocal(jd)).arg(locmgr.getPrintableTimeLocal(jd)).arg(tz); newDateInfo = QString("%1 %2 %3").arg(locmgr.getPrin tableDateLocal(jd)).arg(locmgr.getPrintableTimeLocal(jd)).arg(tz);
else else
newDateInfo = QString("%1 %2").arg(locmgr.getPrint ableDateLocal(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', 5); 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', 5); newDateInfo = QString("JD %1").arg(jd, 0, 'f', 6);
} }
QString planetName = core->getCurrentLocation().planetName;
QString tzName = core->getCurrentTimeZone();
if (tzName.contains("system_default") || (tzName.isEmpty() && planet
Name=="Earth"))
tzName = q_("System default");
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) || planetName!="Earth")
currTZ = q_("Local Mean Solar Time");
if (tzName.contains("LTST"))
currTZ = q_("Local True Solar Time");
if (datetime->text()!=newDateInfo) if (datetime->text()!=newDateInfo)
{ {
updatePos = true; updatePos = true;
datetime->setText(newDateInfo); datetime->setText(newDateInfo);
if (core->getCurrentDeltaTAlgorithm()!=StelCore::WithoutCorr ection) if (core->getCurrentDeltaTAlgorithm()!=StelCore::WithoutCorr ection)
{ {
if (sigma>0) if (sigma>0)
sigmaInfo = QString("; %1(%2T) = %3s").arg(Q Char(0x03c3)).arg(QChar(0x0394)).arg(sigma, 3, 'f', 1); sigmaInfo = QString("; %1(%2T) = %3s").arg(Q Char(0x03c3)).arg(QChar(0x0394)).arg(sigma, 3, 'f', 1);
QString deltaTInfo = ""; QString deltaTInfo = "";
if (qAbs(deltaT)>60.) if (qAbs(deltaT)>60.)
deltaTInfo = QString("%1 (%2s)%3").arg(StelU tils::hoursToHmsStr(deltaT/3600.)).arg(deltaT, 5, 'f', 2).arg(validRangeMar ker); deltaTInfo = QString("%1 (%2s)%3").arg(StelU tils::hoursToHmsStr(deltaT/3600.)).arg(deltaT, 5, 'f', 2).arg(validRangeMar ker);
else else
deltaTInfo = QString("%1s%2").arg(deltaT, 3, 'f', 3).arg(validRangeMarker); deltaTInfo = QString("%1s%2").arg(deltaT, 3, 'f', 3).arg(validRangeMarker);
datetime->setToolTip(QString("<p style='white-space: float ndot = -23.8946f;
pre'>%1T = %2 [n-dot @ -23.8946\"/cy%3%4]<br>%5</p>").arg(QChar(0x0394)).ar if (core->de430IsActive() || core->de431IsActive())
g(deltaTInfo).arg(QChar(0x00B2)).arg(sigmaInfo).arg(newDateAppx)); ndot = -25.8f;
datetime->setToolTip(QString("<p style='white-space:
pre'>%1T = %2 [n-dot @ %3\"/cy%4%5]<br>%6<br>%7</p>").arg(QChar(0x0394)).ar
g(deltaTInfo).arg(QString::number(ndot, 'f', 4)).arg(QChar(0x00B2)).arg(sig
maInfo).arg(newDateAppx).arg(currTZ));
} }
else else
datetime->setToolTip(QString("%1").arg(newDateAppx)) datetime->setToolTip(QString("<p style='white-space:
; pre'>%1<br>%2</p>").arg(newDateAppx).arg(currTZ));
if (qApp->property("text_texture")==true) // CLI option -t g iven? if (qApp->property("text_texture")==true) // CLI option -t g iven?
{ {
datetime->setVisible(false); // hide normal thingy. datetime->setVisible(false); // hide normal thingy.
datetimePixmap->setPixmap(getTextPixmap(newDateInfo, datetime->font())); datetimePixmap->setPixmap(getTextPixmap(newDateInfo, datetime->font()));
} }
} }
// build location tooltip // build location tooltip
QString newLocation = ""; QString newLocation = "";
const StelLocation* loc = &core->getCurrentLocation(); const StelLocation* loc = &core->getCurrentLocation();
skipping to change at line 707 skipping to change at line 725
{ {
locationPixmap->setPixmap(getTextPixmap(newLocation, location->font())); locationPixmap->setPixmap(getTextPixmap(newLocation, location->font()));
location->setVisible(false); location->setVisible(false);
} }
} }
QString str; QString str;
// build fov tooltip // build fov tooltip
QTextStream wos(&str); QTextStream wos(&str);
// TRANSLATORS: Field of view. Please use abbreviation.
QString fovstr = QString("%1 ").arg(qc_("FOV", "abbreviation"));
if (getFlagFovDms()) if (getFlagFovDms())
{ {
wos << "FOV " << StelUtils::decDegToDmsStr(core->getMovement Mgr()->getCurrentFov()); wos << fovstr << StelUtils::decDegToDmsStr(core->getMovement Mgr()->getCurrentFov());
} }
else else
{ {
wos << "FOV " << qSetRealNumberPrecision(3) << core->getMove mentMgr()->getCurrentFov() << QChar(0x00B0); wos << fovstr << qSetRealNumberPrecision(3) << core->getMove mentMgr()->getCurrentFov() << QChar(0x00B0);
} }
if (fov->text()!=str) if (fov->text()!=str)
{ {
updatePos = true; updatePos = true;
if (getFlagShowFov()) if (getFlagShowFov())
{ {
fov->setText(str); fov->setText(str);
fov->setToolTip(q_("Field of view")); fov->setToolTip(q_("Field of view"));
if (qApp->property("text_texture")==true) // CLI opt ion -t given? if (qApp->property("text_texture")==true) // CLI opt ion -t given?
skipping to change at line 740 skipping to change at line 760
{ {
fov->setText(""); fov->setText("");
fov->setToolTip(""); fov->setToolTip("");
} }
} }
str=""; str="";
// build fps tooltip // build fps tooltip
QTextStream wos2(&str); QTextStream wos2(&str);
wos2 << qSetRealNumberPrecision(3) << StelApp::getInstance().getFps( // TRANSLATORS: Frames per second. Please use abbreviation.
) << " FPS"; QString fpsstr = QString(" %1").arg(qc_("FPS", "abbreviation"));
wos2 << qSetRealNumberPrecision(3) << StelApp::getInstance().getFps(
) << fpsstr;
if (fps->text()!=str) if (fps->text()!=str)
{ {
updatePos = true; updatePos = true;
if (getFlagShowFps()) if (getFlagShowFps())
{ {
fps->setText(str); fps->setText(str);
fps->setToolTip(q_("Frames per second")); fps->setToolTip(q_("Frames per second"));
if (qApp->property("text_texture")==true) // CLI opt ion -t given? if (qApp->property("text_texture")==true) // CLI opt ion -t given?
{ {
fpsPixmap->setPixmap(getTextPixmap(str, fps- >font())); fpsPixmap->setPixmap(getTextPixmap(str, fps- >font()));
skipping to change at line 763 skipping to change at line 785
} }
else else
{ {
fps->setText(""); fps->setText("");
fps->setToolTip(""); fps->setToolTip("");
} }
} }
if (updatePos) if (updatePos)
{ {
int fovShift = 170;
if (getFlagFovDms())
fovShift = 195;
QRectF rectCh = getButtonsBoundingRect(); QRectF rectCh = getButtonsBoundingRect();
location->setPos(0, 0); location->setPos(0, 0);
int dtp = rectCh.right()-datetime->boundingRect().width()-5; int dtp = rectCh.right()-datetime->boundingRect().width()-5;
if ((dtp%2) == 1) dtp--; // make even pixel if ((dtp%2) == 1) dtp--; // make even pixel
datetime->setPos(dtp,0); datetime->setPos(dtp,0);
fov->setPos(datetime->x()-200, 0); fov->setPos(datetime->x()-fovShift, 0);
fps->setPos(datetime->x()-95, 0); fps->setPos(datetime->x()-75, 0);
if (qApp->property("text_texture")==true) // CLI option -t g iven? if (qApp->property("text_texture")==true) // CLI option -t g iven?
{ {
locationPixmap->setPos(0,0); locationPixmap->setPos(0,0);
int dtp = rectCh.right()-datetimePixmap->boundingRec t().width()-5; int dtp = rectCh.right()-datetimePixmap->boundingRec t().width()-5;
if ((dtp%2) == 1) dtp--; // make even pixel if ((dtp%2) == 1) dtp--; // make even pixel
datetimePixmap->setPos(dtp,0); datetimePixmap->setPos(dtp,0);
fovPixmap->setPos(datetime->x()-200, 0); fovPixmap->setPos(datetime->x()-fovShift, 0);
fpsPixmap->setPos(datetime->x()-95, 0); fpsPixmap->setPos(datetime->x()-75, 0);
} }
} }
} }
void BottomStelBar::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidg et*) void BottomStelBar::paint(QPainter*, const QStyleOptionGraphicsItem*, QWidg et*)
{ {
updateText(); updateText();
} }
QRectF BottomStelBar::boundingRect() const QRectF BottomStelBar::boundingRect() const
 End of changes. 14 change blocks. 
17 lines changed or deleted 46 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/