Split out StationScheduleItem to its own file set
[quandoparte] / application / stationscheduleitem.cpp
1 /*
2
3 Copyright (C) 2011 mikelima
4
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.
9
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.
14
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.
19
20 */
21
22 #include "stationscheduleitem.h"
23 #include <QSharedData>
24 #include <QString>
25
26 class StationScheduleItemData : public QSharedData {
27 public:
28     QString id;
29     QString departureStation;
30     QString departureTime;
31     QString arrivalStation;
32     QString arrivalTime;
33     QString detailsUrl;
34     QString delay;
35     int delayClass;
36 };
37
38 StationScheduleItem::StationScheduleItem() : d(new StationScheduleItemData)
39 {
40 }
41
42 StationScheduleItem::StationScheduleItem(const StationScheduleItem &rhs) : d(rhs.d)
43 {
44 }
45
46 StationScheduleItem &StationScheduleItem::operator=(const StationScheduleItem &rhs)
47 {
48     if (this != &rhs)
49         d.operator=(rhs.d);
50     return *this;
51 }
52
53 StationScheduleItem::~StationScheduleItem()
54 {
55 }
56
57 QString &StationScheduleItem::id()
58 {
59     return d->id;
60 }
61
62 void StationScheduleItem::setId(const QString &value)
63 {
64     d->id = value;
65 }
66
67 QString &StationScheduleItem::departureStation()
68 {
69     return d->departureStation;
70 }
71
72 void StationScheduleItem::setDepartureStation(const QString &value)
73 {
74     d->departureStation = value;
75 }
76
77 QString &StationScheduleItem::departureTime()
78 {
79     return d->departureTime;
80 }
81
82 void StationScheduleItem::setDepartureTime(const QString &value)
83 {
84     d->departureTime = value;
85 }
86
87 QString &StationScheduleItem::arrivalStation()
88 {
89     return d->arrivalStation;
90 }
91
92 void StationScheduleItem::setArrivalStation(const QString &value)
93 {
94     d->arrivalStation = value;
95 }
96
97 QString &StationScheduleItem::arrivalTime()
98 {
99     return d->arrivalTime;
100 }
101
102 void StationScheduleItem::setArrivalTime(const QString &value)
103 {
104     d->arrivalTime = value;
105 }
106
107 QString &StationScheduleItem::detailsUrl()
108 {
109     return d->detailsUrl;
110 }
111
112 void StationScheduleItem::setDetailsUrl(const QString &value)
113 {
114     d->detailsUrl = value;
115 }
116
117 QString &StationScheduleItem::delay()
118 {
119     return d->delay;
120 }
121
122 void StationScheduleItem::setDelay(const QString &value)
123 {
124     d->delay = value;
125 }
126
127 int StationScheduleItem::delayClass()
128 {
129     return d->delayClass;
130 }
131
132 void StationScheduleItem::setDelayClass(const int value)
133 {
134     d->delayClass = value;
135 }