File indexing completed on 2024-05-12 07:43:20
0001 // SPDX-License-Identifier: LGPL-2.1-or-later 0002 // 0003 // SPDX-FileCopyrightText: 2011 Dennis Nienhüser <nienhueser@kde.org> 0004 // 0005 0006 #ifndef MARBLE_MANEUVER_H 0007 #define MARBLE_MANEUVER_H 0008 0009 #include <QString> 0010 0011 #include "GeoDataCoordinates.h" 0012 0013 namespace Marble 0014 { 0015 0016 class MARBLE_EXPORT Maneuver 0017 { 0018 0019 public: 0020 enum Direction { 0021 Unknown = 0, 0022 Continue = 13, 0023 Merge = 14, 0024 Straight = 1, 0025 SlightRight = 2, 0026 Right = 3, 0027 SharpRight = 4, 0028 TurnAround = 5, 0029 SharpLeft = 6, 0030 Left = 7, 0031 SlightLeft = 8, 0032 RoundaboutFirstExit = 9, 0033 RoundaboutSecondExit = 10, 0034 RoundaboutThirdExit = 11, 0035 RoundaboutExit = 12, 0036 ExitLeft = 15, 0037 ExitRight = 16 0038 }; 0039 0040 Maneuver(); 0041 0042 Direction direction() const; 0043 0044 void setDirection( Direction direction ); 0045 0046 GeoDataCoordinates position() const; 0047 0048 void setPosition( const GeoDataCoordinates &position ); 0049 0050 GeoDataCoordinates waypoint() const; 0051 0052 bool hasWaypoint() const; 0053 0054 void setWaypoint( const GeoDataCoordinates &waypoint, int index ); 0055 0056 int waypointIndex() const; 0057 0058 QString instructionText() const; 0059 0060 void setInstructionText( const QString &text ); 0061 0062 QString roadName() const; 0063 0064 void setRoadName( const QString &roadName ); 0065 0066 QString directionPixmap() const; 0067 0068 bool operator==( const Maneuver &other ) const; 0069 0070 bool operator!=( const Maneuver &other ) const; 0071 0072 private: 0073 Direction m_direction; 0074 0075 GeoDataCoordinates m_position; 0076 0077 GeoDataCoordinates m_waypoint; 0078 0079 int m_waypointIndex; 0080 0081 QString m_instructionText; 0082 0083 QString m_roadName; 0084 }; 0085 0086 } 0087 0088 #endif