DateTimeDialog.cpp   DateTimeDialog.cpp 
skipping to change at line 26 skipping to change at line 26
* along with this program; if not, write to the Free Software * along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA. * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, U SA.
*/ */
#include "Dialog.hpp" #include "Dialog.hpp"
#include "DateTimeDialog.hpp" #include "DateTimeDialog.hpp"
#include "StelMainGraphicsView.hpp" #include "StelMainGraphicsView.hpp"
#include "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "Navigator.hpp" #include "StelNavigator.hpp"
#include "ui_dateTimeDialogGui.h" #include "ui_dateTimeDialogGui.h"
#include "TextEntryDateTimeValidator.hpp"
#include <QDebug> #include <QDebug>
#include <QFrame> #include <QFrame>
#include <QLineEdit> #include <QLineEdit>
#include <QValidator>
DateTimeDialog::DateTimeDialog() : DateTimeDialog::DateTimeDialog() :
year(0), year(0),
month(0), month(0),
day(0), day(0),
hour(0), hour(0),
minute(0), minute(0),
second(0) second(0)
{ {
ui = new Ui_dateTimeDialogForm; ui = new Ui_dateTimeDialogForm;
skipping to change at line 55 skipping to change at line 53
DateTimeDialog::~DateTimeDialog() DateTimeDialog::~DateTimeDialog()
{ {
delete ui; delete ui;
ui=NULL; ui=NULL;
} }
void DateTimeDialog::createDialogContent() void DateTimeDialog::createDialogContent()
{ {
ui->setupUi(dialog); ui->setupUi(dialog);
double jd = StelApp::getInstance().getCore()->getNavigation()->getJD ay(); double jd = StelApp::getInstance().getCore()->getNavigator()->getJDa y();
setDateTime(jd + (StelApp::getInstance().getLocaleMgr().getGMTShift( jd)/24.0)); // UTC -> local tz setDateTime(jd + (StelApp::getInstance().getLocaleMgr().getGMTShift( jd)/24.0)); // UTC -> local tz
connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ; connect(ui->closeStelWindow, SIGNAL(clicked()), this, SLOT(close())) ;
connect(ui->spinner_year, SIGNAL(valueChanged(int)), this, SLOT(year Changed(int))); connect(ui->spinner_year, SIGNAL(valueChanged(int)), this, SLOT(year Changed(int)));
connect(ui->spinner_month, SIGNAL(valueChanged(int)), this, SLOT(mon thChanged(int))); connect(ui->spinner_month, SIGNAL(valueChanged(int)), this, SLOT(mon thChanged(int)));
connect(ui->spinner_day, SIGNAL(valueChanged(int)), this, SLOT(dayCh anged(int))); connect(ui->spinner_day, SIGNAL(valueChanged(int)), this, SLOT(dayCh anged(int)));
connect(ui->spinner_hour, SIGNAL(valueChanged(int)), this, SLOT(hour Changed(int))); connect(ui->spinner_hour, SIGNAL(valueChanged(int)), this, SLOT(hour Changed(int)));
connect(ui->spinner_minute, SIGNAL(valueChanged(int)), this, SLOT(mi nuteChanged(int))); connect(ui->spinner_minute, SIGNAL(valueChanged(int)), this, SLOT(mi nuteChanged(int)));
connect(ui->spinner_second, SIGNAL(valueChanged(int)), this, SLOT(se condChanged(int))); connect(ui->spinner_second, SIGNAL(valueChanged(int)), this, SLOT(se condChanged(int)));
connect(this, SIGNAL(dateTimeChanged(double)), StelApp::getInstance( ).getCore()->getNavigation(), SLOT(setJDay(double))); connect(this, SIGNAL(dateTimeChanged(double)), StelApp::getInstance( ).getCore()->getNavigator(), SLOT(setJDay(double)));
} }
//! take in values, adjust for calendrical correctness if needed, and push to //! take in values, adjust for calendrical correctness if needed, and push to
//! the widgets and signals //! the widgets and signals
bool DateTimeDialog::valid(int y, int m, int d, int h, int min, int s) bool DateTimeDialog::valid(int y, int m, int d, int h, int min, int s)
{ {
int dy, dm, dd, dh, dmin, ds; int dy, dm, dd, dh, dmin, ds;
if ( ! StelUtils::changeDateTimeForRollover(y, m, d, h, min, s, &dy, &dm, &dd, &dh, &dmin, &ds) ) if ( ! StelUtils::changeDateTimeForRollover(y, m, d, h, min, s, &dy, &dm, &dd, &dh, &dmin, &ds) )
{ {
 End of changes. 5 change blocks. 
5 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/