76938210edc0d13f26538ec1d6f8137a80883b1a
[situare] / src / routing / route.h
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
23 #ifndef ROUTE_H
24 #define ROUTE_H
25
26 #include <QList>
27 #include <QPointF>
28 #include <QString>
29
30 #include "routesegment.h"
31
32 class Route
33 {
34 public:
35     Route();
36
37     QString endPointName() const;
38     const QList<QPointF>& geometryPoints() const;
39     const QList<RouteSegment>& segments() const;
40     void setEndPointName(QString endPoint);
41     /// @todo append segments & points, pointers?, takes ownership, no copying data
42     void setGeometryPoints(QList<QPointF> geometryPoints);
43     void setSegments(QList<RouteSegment> segments);
44     void setStartPointName(QString startPoint);
45     void setTotalDistance(int meters);
46     void setTotalTime(int seconds);
47     QString startPointName() const;
48     int totalDistance() const;
49     int totalTime() const;
50
51 private:
52     int m_totalDistance;                // route total distance in meters
53     int m_totalTime;                    // estimated route total time in seconds
54
55     QList<QPointF> m_geometryPoints;    // lat/lon coordinates of the route points
56     QList<RouteSegment> m_segments;     // route segments
57
58     QString m_endPointName;             // name of the route end point
59     QString m_startPointName;           // name of the route starting point
60 };
61
62 #endif // ROUTE_H