00001 /* 00002 Situare - A location system for Facebook 00003 Copyright (C) 2010 Ixonos Plc. Authors: 00004 00005 Sami Rämö - sami.ramo@ixonos.com 00006 00007 Situare is free software; you can redistribute it and/or 00008 modify it under the terms of the GNU General Public License 00009 version 2 as published by the Free Software Foundation. 00010 00011 Situare is distributed in the hope that it will be useful, 00012 but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 GNU General Public License for more details. 00015 00016 You should have received a copy of the GNU General Public License 00017 along with Situare; if not, write to the Free Software 00018 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, 00019 USA. 00020 */ 00021 00022 00023 #ifndef ROUTE_H 00024 #define ROUTE_H 00025 00026 #include <QList> 00027 #include <QString> 00028 00029 #include "coordinates/geocoordinate.h" 00030 #include "routesegment.h" 00031 00040 class Route 00041 { 00042 public: 00046 Route(); 00047 00048 /******************************************************************************* 00049 * MEMBER FUNCTIONS AND SLOTS 00050 ******************************************************************************/ 00058 void appendGeometryPoint(const GeoCoordinate &geometryPoint); 00059 00067 void appendSegment(const RouteSegment &segment); 00068 00074 const QString& endPointName() const; 00075 00081 const QList<GeoCoordinate>& geometryPoints() const; 00082 00088 const QList<RouteSegment>& segments() const; 00089 00095 void setEndPointName(const QString &endPoint); 00096 00102 void setStartPointName(const QString &startPoint); 00103 00109 void setTotalDistance(int meters); 00110 00116 void setTotalTime(int seconds); 00117 00123 const QString& startPointName() const; 00124 00130 int totalDistance() const; 00131 00137 int totalTime() const; 00138 00139 /******************************************************************************* 00140 * DATA MEMBERS 00141 ******************************************************************************/ 00142 private: 00143 int m_totalDistance; 00144 int m_totalTime; 00145 00146 QList<GeoCoordinate> m_geometryPoints; 00147 QList<RouteSegment> m_segments; 00148 00149 QString m_endPointName; 00150 QString m_startPointName; 00151 }; 00152 00153 #endif // ROUTE_H