775ece7fd3922b26da7e8ee2dccfd113afa5c999
12 Journey::Journey(quint64 start
, quint32 duration
, quint32 overtook
, quint32 overtakenby
) :
16 overtakenby(overtakenby
)
20 quint64
Journey::getStart () const {
24 QDate
Journey::getStartDate() const {
27 date
.setMSecsSinceEpoch(start
);
31 QTime
Journey::getStartTime() const {
34 time
.setMSecsSinceEpoch(start
);
38 QTime
Journey::getEndTime() const {
41 time
.setMSecsSinceEpoch(start
);
42 time
.addSecs(duration
);
47 qint32
Journey::getDuration () const {
51 qint32
Journey::getOvertook () const {
55 qint32
Journey::getOvertakenBy () const {
60 void Journey::setStart (const quint64 value
) {
64 void Journey::setStartDate (const QDate
&value
) {
67 time
.setMSecsSinceEpoch(start
);
71 void Journey::setStartTime (const QTime
&value
) {
74 time
.setMSecsSinceEpoch(start
);
78 void Journey::setEndTime(const QTime
&value
) {
83 starttime
.setMSecsSinceEpoch(start
);
84 endtime
= QDateTime(starttime
);
85 endtime
.setTime(value
);
86 difference
= starttime
.secsTo(endtime
);
88 difference
%= 24 * 60 * 60;
90 duration
= difference
;
93 void Journey::setDuration (qint32 value
) {
97 void Journey::setOvertook (qint32 value
) {
101 void Journey::setOvertakenBy (qint32 value
) {