DateTimeDialog.cpp   DateTimeDialog.cpp 
skipping to change at line 58 skipping to change at line 58
} }
void DateTimeDialog::createDialogContent() void DateTimeDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
double jd = StelApp::getInstance().getCore()->getJDay(); double jd = StelApp::getInstance().getCore()->getJDay();
// UTC -> local tz // UTC -> local tz
// 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.
double deltaT = 0.; double deltaT = 0.;
if (StelApp::getInstance().getCore()->getCurrentLocation().planetNam e=="Earth") if (StelApp::getInstance().getCore()->getCurrentLocation().planetNam e=="Earth")
deltaT = StelUtils::getDeltaT(jd)/86400.; deltaT = StelApp::getInstance().getCore()->getDeltaT(jd)/864 00.;
setDateTime(jd + (StelApp::getInstance().getLocaleMgr().getGMTShift( jd)/24.0)-deltaT); setDateTime(jd + (StelApp::getInstance().getLocaleMgr().getGMTShift( jd)/24.0)-deltaT);
connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate())); connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(retranslate()));
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
connectSpinnerEvents(); connectSpinnerEvents();
} }
void DateTimeDialog::connectSpinnerEvents() const void DateTimeDialog::connectSpinnerEvents() const
{ {
skipping to change at line 179 skipping to change at line 179
} }
} }
double DateTimeDialog::newJd() double DateTimeDialog::newJd()
{ {
double jd; double jd;
StelUtils::getJDFromDate(&jd,year, month, day, hour, minute, second); StelUtils::getJDFromDate(&jd,year, month, day, hour, minute, second);
// Add in a DeltaT correction. Divide DeltaT by 86400 to convert from sec onds to days. // Add in a DeltaT correction. Divide DeltaT by 86400 to convert from sec onds to days.
double deltaT = 0.; double deltaT = 0.;
if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="E arth") if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="E arth")
deltaT = StelUtils::getDeltaT(jd)/86400.; deltaT = StelApp::getInstance().getCore()->getDeltaT(jd)/86400.;
jd -= (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0-deltaT) ; // local tz -> UTC jd -= (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0-deltaT) ; // local tz -> UTC
return jd; return jd;
} }
void DateTimeDialog::pushToWidgets() void DateTimeDialog::pushToWidgets()
{ {
disconnectSpinnerEvents(); disconnectSpinnerEvents();
ui->spinner_year->setValue(year); ui->spinner_year->setValue(year);
ui->spinner_month->setValue(month); ui->spinner_month->setValue(month);
ui->spinner_day->setValue(day); ui->spinner_day->setValue(day);
skipping to change at line 213 skipping to change at line 213
/************************************************************************ /************************************************************************
Send newJd to spinner_* Send newJd to spinner_*
************************************************************************/ ************************************************************************/
void DateTimeDialog::setDateTime(double newJd) void DateTimeDialog::setDateTime(double newJd)
{ {
if (this->visible()) { if (this->visible()) {
// Add in a DeltaT correction. Divide DeltaT by 86400 to con vert from seconds to days. // Add in a DeltaT correction. Divide DeltaT by 86400 to con vert from seconds to days.
double deltaT = 0.; double deltaT = 0.;
if (StelApp::getInstance().getCore()->getCurrentLocation().p lanetName=="Earth") if (StelApp::getInstance().getCore()->getCurrentLocation().p lanetName=="Earth")
deltaT = StelUtils::getDeltaT(newJd)/86400.; deltaT = StelApp::getInstance().getCore()->getDeltaT (newJd)/86400.;
newJd += (StelApp::getInstance().getLocaleMgr().getGMTShift( newJd)/24.0-deltaT); // UTC -> local tz newJd += (StelApp::getInstance().getLocaleMgr().getGMTShift( newJd)/24.0-deltaT); // UTC -> local tz
StelUtils::getDateFromJulianDay(newJd, &year, &month, &day); StelUtils::getDateFromJulianDay(newJd, &year, &month, &day);
StelUtils::getTimeFromJulianDay(newJd, &hour, &minute, &seco nd); StelUtils::getTimeFromJulianDay(newJd, &hour, &minute, &seco nd);
pushToWidgets(); pushToWidgets();
} }
} }
 End of changes. 3 change blocks. 
3 lines changed or deleted 3 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/