2 Situare - A location system for Facebook
3 Copyright (C) 2010 Ixonos Plc. Authors:
5 Sami Rämö - sami.ramo@ixonos.com
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.
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.
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,
29 #include "coordinates/geocoordinate.h"
30 #include "routesegment.h"
33 * @brief Container for a single route
35 * Contains all data for a single route including route geometry points (a.k.a track points) and
38 * @author Sami Rämö - sami.ramo@ixonos.com
48 /*******************************************************************************
49 * MEMBER FUNCTIONS AND SLOTS
50 ******************************************************************************/
52 * @brief Append geometry point (a.k.a track point) of the route
54 * Appending must be done in order starting from the beginning of the route.
56 * @param geometryPoint Geometry point
58 void appendGeometryPoint(const GeoCoordinate &geometryPoint);
61 * @brief Append a route segment to the route
63 * Appending must be done in order starting from the beginning of the route.
65 * @param segment Route segment object
67 void appendSegment(const RouteSegment &segment);
70 * @brief Getter for route end point name
72 * @returns Name of the end point (or empty QString)
74 const QString& endPointName() const;
77 * @brief Get list of geometry points
79 * @returns Reference to list of geometry points
81 const QList<GeoCoordinate>& geometryPoints() const;
84 * @brief Get list of route segments
86 * @returns Reference to list of route segments
88 const QList<RouteSegment>& segments() const;
91 * @brief Set name of the route end point
93 * @param endPoint Name of the end point
95 void setEndPointName(const QString &endPoint);
98 * @brief Set name of the route start point
100 * @param startPoint Name of the route start point
102 void setStartPointName(const QString &startPoint);
105 * @brief Set total distance of the route
107 * @param meters Total distance of the route in meters
109 void setTotalDistance(int meters);
112 * @brief Set estimated total travel time of the route
114 * @param seconds Estimated total travel time
116 void setTotalTime(int seconds);
119 * @brief Getter for route start point name
121 * @returns Name of the start point (or empty QString)
123 const QString& startPointName() const;
126 * @brief Getter for total route distance
128 * @returns Total route distance in meters
130 int totalDistance() const;
133 * @brief Getter for estimated travel time
135 * @returns Estimated travel time in seconds
137 int totalTime() const;
139 /*******************************************************************************
141 ******************************************************************************/
143 int m_totalDistance; ///< route total distance in meters
144 int m_totalTime; ///< estimated route total time in seconds
146 QList<GeoCoordinate> m_geometryPoints; ///< lat/lon coordinates of the route points
147 QList<RouteSegment> m_segments; ///< route segments
149 QString m_endPointName; ///< name of the route end point
150 QString m_startPointName; ///< name of the route starting point