3 Copyright (C) 2011 mikelima
5 This program is free software; you can redistribute it and/or modify
6 it under the terms of the GNU General Public License as published by
7 the Free Software Foundation; either version 2 of the License, or
8 (at your option) any later version.
10 This program is distributed in the hope that it will be useful,
11 but WITHOUT ANY WARRANTY; without even the implied warranty of
12 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 General Public License for more details.
15 You should have received a copy of the GNU General Public License
16 along with this program; see the file COPYING. If not, write to
17 the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
18 Boston, MA 02110-1301, USA.
22 #include "stationscheduleitem.h"
23 #include <QSharedData>
26 class StationScheduleItemData : public QSharedData {
29 QString departureStation;
30 QString departureTime;
31 QString arrivalStation;
35 QString expectedPlatform;
36 QString actualPlatform;
40 StationScheduleItem::StationScheduleItem() : d(new StationScheduleItemData)
44 StationScheduleItem::StationScheduleItem(const StationScheduleItem &rhs) : d(rhs.d)
48 StationScheduleItem &StationScheduleItem::operator=(const StationScheduleItem &rhs)
55 StationScheduleItem::~StationScheduleItem()
59 QString &StationScheduleItem::train()
64 void StationScheduleItem::setTrain(const QString &value)
69 QString &StationScheduleItem::departureStation()
71 return d->departureStation;
74 void StationScheduleItem::setDepartureStation(const QString &value)
76 d->departureStation = value;
79 QString &StationScheduleItem::departureTime()
81 return d->departureTime;
84 void StationScheduleItem::setDepartureTime(const QString &value)
86 d->departureTime = value;
89 QString &StationScheduleItem::arrivalStation()
91 return d->arrivalStation;
94 void StationScheduleItem::setArrivalStation(const QString &value)
96 d->arrivalStation = value;
99 QString &StationScheduleItem::arrivalTime()
101 return d->arrivalTime;
104 void StationScheduleItem::setArrivalTime(const QString &value)
106 d->arrivalTime = value;
109 QString &StationScheduleItem::detailsUrl()
111 return d->detailsUrl;
114 void StationScheduleItem::setDetailsUrl(const QString &value)
116 d->detailsUrl = value;
119 QString &StationScheduleItem::delay()
124 void StationScheduleItem::setDelay(const QString &value)
129 int StationScheduleItem::delayClass()
131 return d->delayClass;
134 void StationScheduleItem::setDelayClass(int value)
136 d->delayClass = value;
139 QString &StationScheduleItem::expectedPlatform()
141 return d->expectedPlatform;
144 void StationScheduleItem::setExpectedPlatform(const QString &value)
146 d->expectedPlatform = value;
149 QString &StationScheduleItem::actualPlatform()
151 return d->actualPlatform;
154 void StationScheduleItem::setActualPlatform(const QString &value)
156 d->actualPlatform = value;
159 bool StationScheduleItem::isValid()
161 return !d->train.isEmpty();