예제 #1
0
void DateTimeDialog::createDialogContent()
{
	ui->setupUi(dialog);
	double jd = StelApp::getInstance().getCore()->getJD();
	// UTC -> local tz
	setDateTime(jd + (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0));

	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));
	connect(ui->TitleBar, SIGNAL(movedTo(QPoint)), this, SLOT(handleMovedTo(QPoint)));

	connectSpinnerEvents();
}
void DateTimeDialog::createDialogContent()
{
	ui->setupUi(dialog);
	double jd = StelApp::getInstance().getCore()->getJDay();
	// UTC -> local tz
	// Add in a DeltaT correction. Divide DeltaT by 86400 to convert from seconds to days.
	double deltaT = 0.;
	if (StelApp::getInstance().getCore()->getCurrentLocation().planetName=="Earth")
		deltaT = StelApp::getInstance().getCore()->getDeltaT(jd)/86400.;
	setDateTime(jd + (StelApp::getInstance().getLocaleMgr().getGMTShift(jd)/24.0)-deltaT);

	connect(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SLOT(retranslate()));
	connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close()));

	connectSpinnerEvents();
}