DateTimeDialog.cpp   DateTimeDialog.cpp 
skipping to change at line 25 skipping to change at line 25
* You should have received a copy of the GNU General Public License * You should have received a copy of the GNU General Public License
* 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 "StelApp.hpp" #include "StelApp.hpp"
#include "StelCore.hpp" #include "StelCore.hpp"
#include "StelLocaleMgr.hpp" #include "StelLocaleMgr.hpp"
#include "StelNavigator.hpp"
#include "ui_dateTimeDialogGui.h" #include "ui_dateTimeDialogGui.h"
#include <QDebug> #include <QDebug>
#include <QFrame> #include <QFrame>
#include <QLineEdit> #include <QLineEdit>
DateTimeDialog::DateTimeDialog() : DateTimeDialog::DateTimeDialog() :
year(0), year(0),
month(0), month(0),
day(0), day(0),
skipping to change at line 52 skipping to change at line 52
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()->getNavigator()->getJDa y(); double jd = StelApp::getInstance().getCore()->getJDay();
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(&StelApp::getInstance(), SIGNAL(languageChanged()), this, SL OT(languageChanged()));
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()->getNavigator(), SLOT(setJDay(double))); connect(this, SIGNAL(dateTimeChanged(double)), StelApp::getInstance( ).getCore(), 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. 4 change blocks. 
3 lines changed or deleted 4 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/