Bump version to 0.9.0
[quandoparte] / application / stationscheduleitem.cpp
1 /*
2
3 Copyright (C) 2011 Luciano Montanaro <mikelima@cirulla.net>
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 train;
29     QString departureStation;
30     QString departureTime;
31     QString arrivalStation;
32     QString arrivalTime;
33     QString detailsUrl;
34     QString delay;
35     QString expectedPlatform;
36     QString actualPlatform;
37     int delayClass;
38 };
39
40 StationScheduleItem::StationScheduleItem() : d(new StationScheduleItemData)
41 {
42 }
43
44 StationScheduleItem::StationScheduleItem(const StationScheduleItem &rhs) : d(rhs.d)
45 {
46 }
47
48 StationScheduleItem &StationScheduleItem::operator=(const StationScheduleItem &rhs)
49 {
50     if (this != &rhs)
51         d.operator=(rhs.d);
52     return *this;
53 }
54
55 StationScheduleItem::~StationScheduleItem()
56 {
57 }
58
59 QString &StationScheduleItem::train()
60 {
61     return d->train;
62 }
63
64 void StationScheduleItem::setTrain(const QString &value)
65 {
66     d->train = value;
67 }
68
69 QString &StationScheduleItem::departureStation()
70 {
71     return d->departureStation;
72 }
73
74 void StationScheduleItem::setDepartureStation(const QString &value)
75 {
76     d->departureStation = value;
77 }
78
79 QString &StationScheduleItem::departureTime()
80 {
81     return d->departureTime;
82 }
83
84 void StationScheduleItem::setDepartureTime(const QString &value)
85 {
86     d->departureTime = value;
87 }
88
89 QString &StationScheduleItem::arrivalStation()
90 {
91     return d->arrivalStation;
92 }
93
94 void StationScheduleItem::setArrivalStation(const QString &value)
95 {
96     d->arrivalStation = value;
97 }
98
99 QString &StationScheduleItem::arrivalTime()
100 {
101     return d->arrivalTime;
102 }
103
104 void StationScheduleItem::setArrivalTime(const QString &value)
105 {
106     d->arrivalTime = value;
107 }
108
109 QString &StationScheduleItem::detailsUrl()
110 {
111     return d->detailsUrl;
112 }
113
114 void StationScheduleItem::setDetailsUrl(const QString &value)
115 {
116     d->detailsUrl = value;
117 }
118
119 QString &StationScheduleItem::delay()
120 {
121     return d->delay;
122 }
123
124 void StationScheduleItem::setDelay(const QString &value)
125 {
126     d->delay = value;
127 }
128
129 int StationScheduleItem::delayClass()
130 {
131     return d->delayClass;
132 }
133
134 void StationScheduleItem::setDelayClass(int value)
135 {
136     d->delayClass = value;
137 }
138
139 QString &StationScheduleItem::expectedPlatform()
140 {
141     return d->expectedPlatform;
142 }
143
144 void StationScheduleItem::setExpectedPlatform(const QString &value)
145 {
146     d->expectedPlatform = value;
147 }
148
149 QString &StationScheduleItem::actualPlatform()
150 {
151     return d->actualPlatform;
152 }
153
154 void StationScheduleItem::setActualPlatform(const QString &value)
155 {
156     d->actualPlatform = value;
157 }
158
159 bool StationScheduleItem::isValid()
160 {
161     return !d->train.isEmpty();
162 }