Marble

RoutingRunnerManager.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2008 Henry de Valence <[email protected]>
4 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <[email protected]>
5 // SPDX-FileCopyrightText: 2010-2013 Bernhard Beschow <[email protected]>
6 // SPDX-FileCopyrightText: 2011 Thibaut Gridel <[email protected]>
7 
8 #ifndef MARBLE_ROUTINGRUNNERMANAGER_H
9 #define MARBLE_ROUTINGRUNNERMANAGER_H
10 
11 #include <QObject>
12 #include <QVector>
13 
14 #include "marble_export.h"
15 
16 namespace Marble
17 {
18 
19 class GeoDataDocument;
20 class MarbleModel;
21 class RouteRequest;
22 class RoutingTask;
23 
24 class MARBLE_EXPORT RoutingRunnerManager : public QObject
25 {
26  Q_OBJECT
27 
28 public:
29  /**
30  * Constructor.
31  * @param pluginManager The plugin manager that gives access to RunnerPlugins
32  * @param parent Optional parent object
33  */
34  explicit RoutingRunnerManager( const MarbleModel *marbleModel, QObject *parent = nullptr );
35 
36  ~RoutingRunnerManager() override;
37 
38  /**
39  * Download routes traversing the stopover points in the given route request
40  * @see retrieveRoute is asynchronous with results returned using the
41  * @see routeRetrieved signal.
42  * @see searchRoute is blocking.
43  * @see routingFinished signal indicates all runners are finished.
44  */
45  void retrieveRoute( const RouteRequest *request );
46  QVector<GeoDataDocument *> searchRoute( const RouteRequest *request, int timeout = 30000 );
47 
48 Q_SIGNALS:
49  /**
50  * A route was retrieved
51  */
52  void routeRetrieved( GeoDataDocument *route );
53 
54  /**
55  * Emitted whenever all runners are finished for the query
56  */
57  void routingFinished();
58 
59 private:
60  Q_PRIVATE_SLOT( d, void addRoutingResult( GeoDataDocument *route ) )
61  Q_PRIVATE_SLOT( d, void cleanupRoutingTask( RoutingTask *task ) )
62 
63  class Private;
64  friend class Private;
65  Private *const d;
66 };
67 
68 }
69 
70 #endif
Binds a QML item to a specific geodetic location in screen coordinates.
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Thu Sep 21 2023 04:12:28 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.