• 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
OSRMPlugin.cpp
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 #include "OSRMPlugin.h"
12 #include "OSRMRunner.h"
13 
14 namespace Marble
15 {
16 
17 OSRMPlugin::OSRMPlugin( QObject *parent ) :
18  RoutingRunnerPlugin( parent )
19 {
20  setSupportedCelestialBodies( QStringList() << "earth" );
21  setCanWorkOffline( false );
22  setStatusMessage( tr ( "This service requires an Internet connection." ) );
23 }
24 
25 QString OSRMPlugin::name() const
26 {
27  return tr( "Open Source Routing Machine (OSRM) Routing" );
28 }
29 
30 QString OSRMPlugin::guiString() const
31 {
32  return tr( "OSRM" );
33 }
34 
35 QString OSRMPlugin::nameId() const
36 {
37  return "osrm";
38 }
39 
40 QString OSRMPlugin::version() const
41 {
42  return "1.0";
43 }
44 
45 QString OSRMPlugin::description() const
46 {
47  return tr( "Worldwide routing using project-osrm.org" );
48 }
49 
50 QString OSRMPlugin::copyrightYears() const
51 {
52  return "2012";
53 }
54 
55 QList<PluginAuthor> OSRMPlugin::pluginAuthors() const
56 {
57  return QList<PluginAuthor>()
58  << PluginAuthor( QString::fromUtf8( "Dennis Nienhüser" ), "earthwings@gentoo.org" );
59 }
60 
61 RoutingRunner *OSRMPlugin::newRunner() const
62 {
63  return new OSRMRunner;
64 }
65 
66 bool OSRMPlugin::supportsTemplate( RoutingProfilesModel::ProfileTemplate profileTemplate ) const
67 {
68  return profileTemplate == RoutingProfilesModel::CarFastestTemplate;
69 }
70 
71 }
72 
73 Q_EXPORT_PLUGIN2( OSRMPlugin, Marble::OSRMPlugin )
74 
75 #include "OSRMPlugin.moc"
Marble::OSRMPlugin::pluginAuthors
QList< PluginAuthor > pluginAuthors() const
Definition: OSRMPlugin.cpp:55
Marble::OSRMPlugin
Definition: OSRMPlugin.h:20
Marble::PluginAuthor
Definition: PluginInterface.h:28
Marble::OSRMPlugin::newRunner
virtual RoutingRunner * newRunner() const
Plugin factory method to create a new runner instance.
Definition: OSRMPlugin.cpp:61
Marble::OSRMPlugin::version
QString version() const
Definition: OSRMPlugin.cpp:40
QObject
Marble::OSRMPlugin::guiString
QString guiString() const
Returns the string that should appear in the user interface.
Definition: OSRMPlugin.cpp:30
Marble::OSRMPlugin::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: OSRMPlugin.cpp:35
OSRMPlugin.h
Marble::OSRMPlugin::description
QString description() const
Returns a user description of the plugin.
Definition: OSRMPlugin.cpp:45
Q_EXPORT_PLUGIN2
#define Q_EXPORT_PLUGIN2(a, b)
Definition: marble_export.h:34
Marble::RoutingProfilesModel::CarFastestTemplate
Definition: RoutingProfilesModel.h:36
OSRMRunner.h
Marble::OSRMPlugin::supportsTemplate
virtual bool supportsTemplate(RoutingProfilesModel::ProfileTemplate profileTemplate) const
True if the plugin supports the given routing profile template.
Definition: OSRMPlugin.cpp:66
Marble::RoutingProfilesModel::ProfileTemplate
ProfileTemplate
Definition: RoutingProfilesModel.h:35
Marble::OSRMPlugin::copyrightYears
QString copyrightYears() const
Definition: OSRMPlugin.cpp:50
Marble::RoutingRunnerPlugin::setSupportedCelestialBodies
void setSupportedCelestialBodies(const QStringList &celestialBodies)
Definition: RoutingRunnerPlugin.cpp:61
Marble::RoutingRunnerPlugin::setCanWorkOffline
void setCanWorkOffline(bool canWorkOffline)
Definition: RoutingRunnerPlugin.cpp:66
Marble::RoutingRunner
Definition: RoutingRunner.h:27
Marble::OSRMPlugin::name
QString name() const
Returns the user-visible name of the plugin.
Definition: OSRMPlugin.cpp:25
Marble::RoutingRunnerPlugin
A plugin for Marble to execute a routing task.
Definition: RoutingRunnerPlugin.h:33
Marble::RoutingRunnerPlugin::setStatusMessage
void setStatusMessage(const QString &message)
Definition: RoutingRunnerPlugin.cpp:101
Marble::OSRMRunner
Definition: OSRMRunner.h:28
Marble::OSRMPlugin::OSRMPlugin
OSRMPlugin(QObject *parent=0)
Definition: OSRMPlugin.cpp:17
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