• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.12
  • kdeedu
  • marble
  • src
  • plugins
  • runner
  • open-source-routing-machine
OSRMRunner.h
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2012 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 
12 #ifndef MARBLE_OSMOSRMRUNNER_H
13 #define MARBLE_OSMOSRMRUNNER_H
14 
15 #include "RoutingRunner.h"
16 #include "GeoDataCoordinates.h"
17 #include "routing/instructions/RoutingInstruction.h"
18 
19 #include <QString>
20 #include <QNetworkAccessManager>
21 #include <QNetworkReply>
22 
23 namespace Marble
24 {
25 
26 class GeoDataLineString;
27 
28 class OSRMRunner : public RoutingRunner
29 {
30  Q_OBJECT
31 
32 public:
33  explicit OSRMRunner(QObject *parent = 0);
34 
35  ~OSRMRunner();
36 
37  // Overriding MarbleAbstractRunner
38  virtual void retrieveRoute( const RouteRequest *request );
39 
40 private Q_SLOTS:
42  void retrieveData( QNetworkReply *reply );
43 
45  void handleError( QNetworkReply::NetworkError );
46 
47  void get();
48 
49 private:
50  void append( QString* input, const QString &key, const QString &value ) const;
51 
52  GeoDataLineString* decodePolyline( const QString &geometry ) const;
53 
54  RoutingInstruction::TurnType parseTurnType( const QString &instruction ) const;
55 
56  GeoDataDocument* parse( const QByteArray &input );
57 
58  QNetworkAccessManager m_networkAccessManager;
59 
60  QNetworkRequest m_request;
61 
62  static QVector<QPair<GeoDataCoordinates,QString> > m_cachedHints;
63 
64  static QString m_hintChecksum;
65 };
66 
67 }
68 
69 #endif
GeoDataCoordinates.h
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:64
RoutingInstruction.h
Marble::RoutingInstruction::TurnType
TurnType
Definition: RoutingInstruction.h:32
QObject
Marble::RouteRequest
Points to be included in a route.
Definition: RouteRequest.h:31
Marble::OSRMRunner::~OSRMRunner
~OSRMRunner()
Definition: OSRMRunner.cpp:48
RoutingRunner.h
Marble::OSRMRunner::retrieveRoute
virtual void retrieveRoute(const RouteRequest *request)
Start a route download orw calculation.
Definition: OSRMRunner.cpp:53
Marble::OSRMRunner::OSRMRunner
OSRMRunner(QObject *parent=0)
Definition: OSRMRunner.cpp:40
Marble::GeoDataLineString
A LineString that allows to store a contiguous set of line segments.
Definition: GeoDataLineString.h:75
Marble::RoutingRunner
Definition: RoutingRunner.h:27
Marble::OSRMRunner
Definition: OSRMRunner.h:28
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:52 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • kstars
  • libkdeedu
  •   keduvocdocument
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal