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 ROUTESEGMENT_H 00024 #define ROUTESEGMENT_H 00025 00026 #include <QtGlobal> 00027 #include <QString> 00028 00036 class RouteSegment 00037 { 00038 public: 00042 RouteSegment(); 00043 00044 /******************************************************************************* 00045 * MEMBER FUNCTIONS AND SLOTS 00046 ******************************************************************************/ 00052 qreal azimuth() const; 00053 00059 const QString& earthDirection() const; 00060 00068 const QString& instruction() const; 00069 00075 qreal length() const; 00076 00084 const QString& lengthCaption() const; 00085 00091 int positionIndex() const; 00092 00098 void setAzimuth(qreal azimuth); 00099 00105 void setEarthDirection(const QString &direction); 00106 00112 void setInstruction(const QString &instruction); 00113 00119 void setLength(qreal meters); 00120 00126 void setLengthCaption(const QString &length); 00127 00133 void setPositionIndex(int index); 00134 00140 void setTime(int seconds); 00141 00147 void setTurnAngle(qreal degrees); 00148 00154 void setTurnType(const QString &type); 00155 00161 QString street() const; 00162 00168 int time() const; 00169 00175 qreal turnAngle() const; 00176 00192 const QString& turnType() const; 00193 00194 /******************************************************************************* 00195 * DATA MEMBERS 00196 ******************************************************************************/ 00197 private: 00198 int m_timeSeconds; 00199 int m_positionIndex; 00200 00201 qreal m_azimuth; 00202 qreal m_length; 00203 qreal m_turnAngle; 00204 00205 QString m_earthDirection; 00206 QString m_instruction; 00207 QString m_lengthCaption; 00208 QString m_turnType; 00209 }; 00210 00211 #endif // ROUTESEGMENT_H