TuiNodeDateTime.cpp   TuiNodeDateTime.cpp 
skipping to change at line 114 skipping to change at line 114
response.newNode = this; response.newNode = this;
if (setPart(editingPart, s.toInt())) if (setPart(editingPart, s.toInt()))
{ {
emit(setValue(value)); emit(setValue(value));
} }
return response; return response;
} }
return response; return response;
} }
QString TuiNodeDateTime::getDisplayText() QString TuiNodeDateTime::getDisplayText() const
{ {
QList<int> parts = getParts(value); QList<int> parts = getParts(value);
QString yy = QString("%1").arg(parts.at(0)); QString yy = QString("%1").arg(parts.at(0));
QString mm = QString("%1").arg(parts.at(1), 2, 10, QChar('0')); QString mm = QString("%1").arg(parts.at(1), 2, 10, QChar('0'));
QString dd = QString("%1").arg(parts.at(2), 2, 10, QChar('0')); QString dd = QString("%1").arg(parts.at(2), 2, 10, QChar('0'));
QString h = QString("%1").arg(parts.at(3), 2, 10, QChar('0')); QString h = QString("%1").arg(parts.at(3), 2, 10, QChar('0'));
QString m = QString("%1").arg(parts.at(4), 2, 10, QChar('0')); QString m = QString("%1").arg(parts.at(4), 2, 10, QChar('0'));
QString s = QString("%1").arg(parts.at(5), 2, 10, QChar('0')); QString s = QString("%1").arg(parts.at(5), 2, 10, QChar('0'));
//(Default format string when not editing anything) //(Default format string when not editing anything)
skipping to change at line 198 skipping to change at line 198
else if (editingPart==4) else if (editingPart==4)
{ {
value += (diff * StelCore::JD_MINUTE); value += (diff * StelCore::JD_MINUTE);
} }
else if (editingPart==5) else if (editingPart==5)
{ {
value += (diff * StelCore::JD_SECOND); value += (diff * StelCore::JD_SECOND);
} }
} }
QList<int> TuiNodeDateTime::getParts(double jd) QList<int> TuiNodeDateTime::getParts(double jd) const
{ {
int year, month, day, hour, minute, second; int year, month, day, hour, minute, second;
StelUtils::getDateFromJulianDay(jd, &year, &month, &day); StelUtils::getDateFromJulianDay(jd, &year, &month, &day);
StelUtils::getTimeFromJulianDay(jd, &hour, &minute, &second); StelUtils::getTimeFromJulianDay(jd, &hour, &minute, &second);
QList<int> parts; QList<int> parts;
parts << year << month << day << hour << minute << second; parts << year << month << day << hour << minute << second;
return parts; return parts;
} }
bool TuiNodeDateTime::setPart(int part, int val) bool TuiNodeDateTime::setPart(int part, int val)
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 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/