Emit error signal when login fails
[situare] / src / routing / route.cpp
1 /*
2     Situare - A location system for Facebook
3     Copyright (C) 2010  Ixonos Plc. Authors:
4
5         Sami Rämö - sami.ramo@ixonos.com
6
7     Situare is free software; you can redistribute it and/or
8     modify it under the terms of the GNU General Public License
9     version 2 as published by the Free Software Foundation.
10
11     Situare is distributed in the hope that it will be useful,
12     but WITHOUT ANY WARRANTY; without even the implied warranty of
13     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14     GNU General Public License for more details.
15
16     You should have received a copy of the GNU General Public License
17     along with Situare; if not, write to the Free Software
18     Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301,
19     USA.
20 */
21
22 #include <QDebug>
23
24 #include "routingcommon.h"
25
26 #include "route.h"
27
28 Route::Route()
29     : m_totalDistance(ROUTING_VALUE_UNDEFINED),
30       m_totalTime(ROUTING_VALUE_UNDEFINED)
31 {
32     qDebug() << __PRETTY_FUNCTION__;
33 }
34
35 void Route::appendGeometryPoint(const GeoCoordinate &geometryPoint)
36 {
37     qDebug() << __PRETTY_FUNCTION__;
38
39     m_geometryPoints.append(geometryPoint);
40 }
41
42 void Route::appendSegment(const RouteSegment &segment)
43 {
44     qDebug() << __PRETTY_FUNCTION__;
45
46     m_segments.append(segment);
47 }
48
49 const QString& Route::endPointName() const
50 {
51     qDebug() << __PRETTY_FUNCTION__;
52
53     return m_endPointName;
54 }
55
56 const QList<GeoCoordinate>& Route::geometryPoints() const
57 {
58     qDebug() << __PRETTY_FUNCTION__;
59
60     return m_geometryPoints;
61 }
62
63 const QList<RouteSegment>& Route::segments() const
64 {
65     qDebug() << __PRETTY_FUNCTION__;
66
67     return m_segments;
68 }
69
70 void Route::setEndPointName(const QString &endPoint)
71 {
72     qDebug() << __PRETTY_FUNCTION__;
73
74     m_endPointName = endPoint;
75 }
76
77 void Route::setStartPointName(const QString &startPoint)
78 {
79     qDebug() << __PRETTY_FUNCTION__;
80
81     m_startPointName = startPoint;
82 }
83
84 void Route::setTotalDistance(int meters)
85 {
86     qDebug() << __PRETTY_FUNCTION__;
87
88     m_totalDistance = meters;
89 }
90
91 void Route::setTotalTime(int seconds)
92 {
93     qDebug() << __PRETTY_FUNCTION__;
94
95     m_totalTime = seconds;
96 }
97
98 const QString& Route::startPointName() const
99 {
100     qDebug() << __PRETTY_FUNCTION__;
101
102     return m_startPointName;
103 }
104
105 int Route::totalDistance() const
106 {
107     qDebug() << __PRETTY_FUNCTION__;
108
109     return m_totalDistance;
110 }
111
112 int Route::totalTime() const
113 {
114     qDebug() << __PRETTY_FUNCTION__;
115
116     return m_totalTime;
117 }