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

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
  • routing
RoutingManager.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 2010 Dennis Nienhüser <earthwings@gentoo.org>
9 //
10 
11 #ifndef MARBLE_ROUTINGMANAGER_H
12 #define MARBLE_ROUTINGMANAGER_H
13 
14 #include "marble_export.h"
15 #include "GeoDataCoordinates.h"
16 #include "RoutingProfile.h"
17 
18 #include <QAbstractItemModel>
19 
20 namespace Marble
21 {
22 
23 class RoutingManagerPrivate;
24 class RoutingModel;
25 class RouteRequest;
26 class MarbleModel;
27 class GeoDataDocument;
28 class GeoDataFolder;
29 class AlternativeRoutesModel;
30 class AutoNavigation;
31 class RoutingProfilesModel;
32 
37 class MARBLE_EXPORT RoutingManager : public QObject
38 {
39  Q_OBJECT
40 
41 public:
42  enum State {
43  Downloading, // A new route is downloaded in the background
44  Retrieved // No download in progress
45  };
46 
48  explicit RoutingManager( MarbleModel *marbleModel, QObject *parent = 0 );
49 
51  ~RoutingManager();
52 
56  RoutingProfilesModel *profilesModel();
57 
64  RoutingModel *routingModel();
65 
66  const RoutingModel *routingModel() const;
67 
72  AlternativeRoutesModel* alternativeRoutesModel();
73 
74  // This is a temporary location for AutoNavigation. The code would be refactored soon.
75  void setAutoNavigation( AutoNavigation * adjustNavigation );
76 
81  const AutoNavigation* adjustNavigation() const;
82 
86  RouteRequest* routeRequest();
87 
91  void writeSettings() const;
92 
96  void readSettings();
97 
102  void saveRoute( const QString &filename ) const;
103 
107  void loadRoute( const QString &filename );
108 
112  RoutingProfile defaultProfile( RoutingProfile::TransportType transportType ) const;
113 
118  void setShowGuidanceModeStartupWarning( bool show );
119 
124  bool showGuidanceModeStartupWarning() const;
125 
129  void setLastOpenPath( const QString &path );
130 
134  QString lastOpenPath() const;
135 
139  void setLastSavePath( const QString &path );
140 
144  QString lastSavePath() const;
145 
149  void setRouteColorStandard( QColor color );
150 
154  QColor routeColorStandard() const;
155 
159  void setRouteColorHighlighted( QColor color );
160 
164  QColor routeColorHighlighted() const;
165 
169  void setRouteColorAlternative( QColor color );
170 
174  QColor routeColorAlternative() const;
175 
176  bool guidanceModeEnabled() const;
177 
178 public Q_SLOTS:
180  void reverseRoute();
181 
183  void retrieveRoute();
184 
186  void clearRoute();
187 
189  void setGuidanceModeEnabled( bool enabled );
190 
191 Q_SIGNALS:
196  void stateChanged( RoutingManager::State newState );
197 
198  void routeRetrieved( GeoDataDocument* route );
199 
200 private:
201  Q_PRIVATE_SLOT( d, void addRoute( GeoDataDocument* route ) )
202 
203  Q_PRIVATE_SLOT( d, void recalculateRoute( bool deviated ) )
204 
205 private:
206  friend class RoutingManagerPrivate;
207  RoutingManagerPrivate *const d;
208 };
209 
210 } // namespace Marble
211 
212 #endif
GeoDataCoordinates.h
Marble::GeoDataDocument
A container for Features, Styles and in the future Schemas.
Definition: GeoDataDocument.h:65
Marble::RoutingProfilesModel
Definition: RoutingProfilesModel.h:25
Marble::AutoNavigation
Definition: AutoNavigation.h:27
Marble::RoutingProfile
Definition: RoutingProfile.h:24
Marble::RouteRequest
Points to be included in a route.
Definition: RouteRequest.h:31
QObject
MARBLE_EXPORT
#define MARBLE_EXPORT
Definition: marble_export.h:20
RoutingProfile.h
QString
QColor
Marble::RoutingProfile::TransportType
TransportType
Definition: RoutingProfile.h:29
Marble::RoutingManager
Delegates data retrieval and model updates to the appropriate routing provider.
Definition: RoutingManager.h:37
Marble::RoutingModel
Definition: RoutingModel.h:34
Marble::MarbleModel
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition: MarbleModel.h:97
Marble::AlternativeRoutesModel
Definition: AlternativeRoutesModel.h:31
Marble::RoutingManager::State
State
Definition: RoutingManager.h:42
marble_export.h
Marble::RoutingManager::Downloading
Definition: RoutingManager.h:43
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 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
  • 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