• 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
  • gosmore-routing
GosmoreRoutingPlugin.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 2010 Dennis Nienhüser <earthwings@gentoo.org>
9 // Copyright 2012 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
10 //
11 
12 #include "GosmoreRoutingPlugin.h"
13 #include "GosmoreRoutingRunner.h"
14 #include "MarbleDirs.h"
15 
16 #include <QDir>
17 #include <QFileInfo>
18 
19 namespace Marble
20 {
21 
22 GosmorePlugin::GosmorePlugin( QObject *parent ) :
23  RoutingRunnerPlugin( parent )
24 {
25  setSupportedCelestialBodies( QStringList() << "earth" );
26  setCanWorkOffline( true );
27 }
28 
29 QString GosmorePlugin::name() const
30 {
31  return tr( "Gosmore Routing" );
32 }
33 
34 QString GosmorePlugin::guiString() const
35 {
36  return tr( "Gosmore" );
37 }
38 
39 QString GosmorePlugin::nameId() const
40 {
41  return "gosmore-routing";
42 }
43 
44 QString GosmorePlugin::version() const
45 {
46  return "1.0";
47 }
48 
49 QString GosmorePlugin::description() const
50 {
51  return tr( "Offline route retrieval using Gosmore" );
52 }
53 
54 QString GosmorePlugin::copyrightYears() const
55 {
56  return "2010, 2012";
57 }
58 
59 QList<PluginAuthor> GosmorePlugin::pluginAuthors() const
60 {
61  return QList<PluginAuthor>()
62  << PluginAuthor( QString::fromUtf8( "Dennis Nienhüser" ), "earthwings@gentoo.org" )
63  << PluginAuthor( "Bernhard Beschow", "bbeschow@cs.tu-berlin.de" );
64 }
65 
66 RoutingRunner *GosmorePlugin::newRunner() const
67 {
68  return new GosmoreRunner;
69 }
70 
71 bool GosmorePlugin::canWork() const
72 {
73  QDir mapDir( MarbleDirs::localPath() + "/maps/earth/gosmore/" );
74  QFileInfo mapFile = QFileInfo ( mapDir, "gosmore.pak" );
75  return mapFile.exists();
76 }
77 
78 bool GosmorePlugin::supportsTemplate( RoutingProfilesModel::ProfileTemplate profileTemplate ) const
79 {
80  return profileTemplate == RoutingProfilesModel::CarFastestTemplate;
81 }
82 
83 }
84 
85 Q_EXPORT_PLUGIN2( GosmoreRoutingPlugin, Marble::GosmorePlugin )
86 
87 #include "GosmoreRoutingPlugin.moc"
Marble::GosmorePlugin::name
QString name() const
Returns the user-visible name of the plugin.
Definition: GosmoreReverseGeocodingPlugin.cpp:29
GosmoreRoutingPlugin.h
Marble::GosmorePlugin::description
QString description() const
Returns a user description of the plugin.
Definition: GosmoreReverseGeocodingPlugin.cpp:49
Marble::GosmorePlugin::newRunner
virtual ReverseGeocodingRunner * newRunner() const
Plugin factory method to create a new runner instance.
Definition: GosmoreReverseGeocodingPlugin.cpp:66
Marble::GosmorePlugin::pluginAuthors
QList< PluginAuthor > pluginAuthors() const
Definition: GosmoreReverseGeocodingPlugin.cpp:59
Marble::GosmorePlugin::canWork
virtual bool canWork() const
Returns.
Definition: GosmoreReverseGeocodingPlugin.cpp:71
Marble::MarbleDirs::localPath
static QString localPath()
Definition: MarbleDirs.cpp:217
QObject
MarbleDirs.h
Marble::GosmorePlugin::version
QString version() const
Definition: GosmoreReverseGeocodingPlugin.cpp:44
Q_EXPORT_PLUGIN2
#define Q_EXPORT_PLUGIN2(a, b)
Definition: marble_export.h:34
Marble::RoutingProfilesModel::CarFastestTemplate
Definition: RoutingProfilesModel.h:36
Marble::GosmorePlugin::nameId
QString nameId() const
Returns the unique name of the plugin.
Definition: GosmoreReverseGeocodingPlugin.cpp:39
Marble::GosmorePlugin::copyrightYears
QString copyrightYears() const
Definition: GosmoreReverseGeocodingPlugin.cpp:54
Marble::RoutingProfilesModel::ProfileTemplate
ProfileTemplate
Definition: RoutingProfilesModel.h:35
Marble::GosmorePlugin
Definition: GosmoreReverseGeocodingPlugin.h:21
Marble::GosmorePlugin::guiString
QString guiString() const
Returns the string that should appear in the user interface.
Definition: GosmoreReverseGeocodingPlugin.cpp:34
GosmoreRoutingRunner.h
Marble::GosmorePlugin::GosmorePlugin
GosmorePlugin(QObject *parent=0)
Definition: GosmoreReverseGeocodingPlugin.cpp:22
Marble::GosmorePlugin::supportsTemplate
virtual bool supportsTemplate(RoutingProfilesModel::ProfileTemplate profileTemplate) const
True if the plugin supports the given routing profile template.
Definition: GosmoreRoutingPlugin.cpp:78
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:38:50 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