StelGuiItems.cpp   StelGuiItems.cpp 
skipping to change at line 336 skipping to change at line 336
fov = new QGraphicsSimpleTextItem("FOV 43.45", this); fov = new QGraphicsSimpleTextItem("FOV 43.45", this);
fps = new QGraphicsSimpleTextItem("43.2 FPS", this); fps = new QGraphicsSimpleTextItem("43.2 FPS", this);
// Create the help label // Create the help label
helpLabel = new QGraphicsSimpleTextItem("", this); helpLabel = new QGraphicsSimpleTextItem("", this);
helpLabel->setBrush(QBrush(QColor::fromRgbF(1,1,1,1))); helpLabel->setBrush(QBrush(QColor::fromRgbF(1,1,1,1)));
QColor color = QColor::fromRgbF(1,1,1,1); QColor color = QColor::fromRgbF(1,1,1,1);
setColor(color); setColor(color);
datetime->font().setPixelSize(12); // Font size is 12
location->font().setPixelSize(12); int baseFontSize = StelApp::getInstance().getBaseFontSize()-1;
fov->font().setPixelSize(12); datetime->font().setPixelSize(baseFontSize);
fps->font().setPixelSize(12); location->font().setPixelSize(baseFontSize);
fov->font().setPixelSize(baseFontSize);
fps->font().setPixelSize(baseFontSize);
flagShowTime = true; QSettings* confSettings = StelApp::getInstance().getSettings();
flagShowLocation = true; setFlagShowTime(confSettings->value("gui/flag_show_datetime", true).
toBool());
setFlagShowLocation(confSettings->value("gui/flag_show_location", tr
ue).toBool());
setFlagShowFov(confSettings->value("gui/flag_show_fov", true).toBool
());
setFlagShowFps(confSettings->value("gui/flag_show_fps", true).toBool
());
setFlagTimeJd(confSettings->value("gui/flag_time_jd", false).toBool(
));
setFlagFovDms(confSettings->value("gui/flag_fov_dms", false).toBool(
));
} }
BottomStelBar::~BottomStelBar() BottomStelBar::~BottomStelBar()
{ {
// Remove currently hidden buttons which are not delete by a parent element // Remove currently hidden buttons which are not delete by a parent element
for (QMap<QString, ButtonGroup>::iterator iter=buttonGroups.begin(); iter!=buttonGroups.end();++iter) for (QMap<QString, ButtonGroup>::iterator iter=buttonGroups.begin(); iter!=buttonGroups.end();++iter)
{ {
foreach (StelButton* b, iter.value().elems) foreach (StelButton* b, iter.value().elems)
{ {
if (b->parentItem()==0) if (b->parentItem()==0)
skipping to change at line 552 skipping to change at line 559
bool displayDeltaT = false; bool displayDeltaT = false;
if (core->getCurrentLocation().planetName.contains("Earth")) if (core->getCurrentLocation().planetName.contains("Earth"))
{ {
deltaT = core->getDeltaT(jd); deltaT = core->getDeltaT(jd);
displayDeltaT = true; displayDeltaT = true;
sigma = StelUtils::getDeltaTStandardError(jd); sigma = StelUtils::getDeltaTStandardError(jd);
core->getCurrentDeltaTAlgorithmValidRange(jd, &validRangeInf o); 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 = getFlagShowTime() ? StelApp::getInstance().getLoca leMgr().getPrintableDateLocal(jd-deltaT/86400.) +" "
+StelApp::getInstance().getLocaleMgr().getPrintableT imeLocal(jd-deltaT/86400.) : " "; +StelApp::getInstance().getLocaleMgr().getPrintableT imeLocal(jd-deltaT/86400.) : " ";
if (getFlagTimeJd())
{
newDate = QString("%1").arg(jd+StelApp::getInstance().getLoc
aleMgr().getGMTShift(jd)/24.-deltaT/86400., 0, 'f', 5); // UTC -> local tz
}
if (datetime->text()!=newDate) if (datetime->text()!=newDate)
{ {
updatePos = true; updatePos = true;
datetime->setText(newDate); datetime->setText(newDate);
if (displayDeltaT && core->getCurrentDeltaTAlgorithm()!=Stel Core::WithoutCorrection) if (displayDeltaT && core->getCurrentDeltaTAlgorithm()!=Stel Core::WithoutCorrection)
{ {
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);
if (std::abs(deltaT)>60.) if (std::abs(deltaT)>60.)
datetime->setToolTip(QString("%1T = %2 (%3s) %6 [n-dot @ -23.8946\"/cy%4%5]").arg(QChar(0x0394)).arg(StelUtils::hoursToH msStr(deltaT/3600.)).arg(deltaT, 5, 'f', 2).arg(QChar(0x00B2)).arg(sigmaInf o).arg(validRangeInfo)); datetime->setToolTip(QString("%1T = %2 (%3s) %6 [n-dot @ -23.8946\"/cy%4%5]").arg(QChar(0x0394)).arg(StelUtils::hoursToH msStr(deltaT/3600.)).arg(deltaT, 5, 'f', 2).arg(QChar(0x00B2)).arg(sigmaInf o).arg(validRangeInfo));
else else
datetime->setToolTip(QString("%1T = %2s%5 [n -dot @ -23.8946\"/cy%3%4]").arg(QChar(0x0394)).arg(deltaT, 3, 'f', 3).arg(Q Char(0x00B2)).arg(sigmaInfo).arg(validRangeInfo)); datetime->setToolTip(QString("%1T = %2s%5 [n -dot @ -23.8946\"/cy%3%4]").arg(QChar(0x0394)).arg(deltaT, 3, 'f', 3).arg(Q Char(0x00B2)).arg(sigmaInfo).arg(validRangeInfo));
} }
else else
datetime->setToolTip(""); datetime->setToolTip("");
} }
QString newLocation = ""; QString newLocation = "";
const StelLocation* loc = &core->getCurrentLocation(); const StelLocation* loc = &core->getCurrentLocation();
if (flagShowLocation && !loc->name.isEmpty()) if (getFlagShowLocation() && !loc->name.isEmpty())
{ {
newLocation = q_(loc->planetName) +", "+loc->name + ", "+q_( "%1m").arg(loc->altitude); newLocation = q_(loc->planetName) +", "+loc->name + ", "+q_( "%1m").arg(loc->altitude);
} }
if (flagShowLocation && loc->name.isEmpty()) if (getFlagShowLocation() && loc->name.isEmpty())
{ {
newLocation = q_(loc->planetName)+", " newLocation = q_(loc->planetName)+", "+StelUtils::decDegToDm
+StelUtils::radToDmsStr(loc->latitude)+", " sStr(loc->latitude)+", "+StelUtils::decDegToDmsStr(loc->longitude);
+StelUtils::radToDmsStr(loc->longitude);
} }
if (location->text()!=newLocation) if (location->text()!=newLocation)
{ {
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)
pm = "N"; pm = "N";
else else
{
pm = "S"; pm = "S";
lat *= -1;
}
latStr = QString("%1%2%3").arg(pm).arg(lat).arg(QChar(0x00B0 )); latStr = QString("%1%2%3").arg(pm).arg(lat).arg(QChar(0x00B0 ));
if (lat >= 0) if (lon >= 0)
pm = "E"; pm = "E";
else else
{
pm = "W"; pm = "W";
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 ));
location->setToolTip(QString("%1 %2").arg(latStr).arg(lonStr )); location->setToolTip(QString("%1 %2").arg(latStr).arg(lonStr ));
} }
QSettings* confSettings = StelApp::getInstance().getSettings();
QString str; QString str;
QTextStream wos(&str); QTextStream wos(&str);
wos << "FOV " << qSetRealNumberPrecision(3) << core->getMovementMgr( if (getFlagFovDms())
)->getCurrentFov() << QChar(0x00B0); {
wos << "FOV " << StelUtils::decDegToDmsStr(core->getMovement
Mgr()->getCurrentFov());
}
else
{
wos << "FOV " << qSetRealNumberPrecision(3) << core->getMove
mentMgr()->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 (getFlagShowFov())
{ {
fov->setText(str); fov->setText(str);
fov->setToolTip(q_("Field of view")); fov->setToolTip(q_("Field of view"));
} }
else else
{ {
fov->setText(""); fov->setText("");
fov->setToolTip(""); fov->setToolTip("");
} }
} }
str=""; str="";
QTextStream wos2(&str); QTextStream wos2(&str);
wos2 << qSetRealNumberPrecision(3) << StelApp::getInstance().getFps( ) << " FPS"; wos2 << qSetRealNumberPrecision(3) << StelApp::getInstance().getFps( ) << " FPS";
if (fps->text()!=str) if (fps->text()!=str)
{ {
updatePos = true; updatePos = true;
if (confSettings->value("gui/flag_show_fps", true).toBool()) if (getFlagShowFps())
{ {
fps->setText(str); fps->setText(str);
fps->setToolTip(q_("Frames per second")); fps->setToolTip(q_("Frames per second"));
} }
else else
{ {
fps->setText(""); fps->setText("");
fps->setToolTip(""); fps->setToolTip("");
} }
} }
 End of changes. 16 change blocks. 
18 lines changed or deleted 50 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/