Marble

RoutingRunnerManager.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2008 Henry de Valence <hdevalence@gmail.com>
4// SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
5// SPDX-FileCopyrightText: 2010-2013 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
6// SPDX-FileCopyrightText: 2011 Thibaut Gridel <tgridel@free.fr>
7
8#ifndef MARBLE_ROUTINGRUNNERMANAGER_H
9#define MARBLE_ROUTINGRUNNERMANAGER_H
10
11#include <QList>
12#include <QObject>
13
14#include "marble_export.h"
15
16namespace Marble
17{
18
19class GeoDataDocument;
20class MarbleModel;
21class RouteRequest;
22class RoutingTask;
23
24class MARBLE_EXPORT RoutingRunnerManager : public QObject
25{
26 Q_OBJECT
27
28public:
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 QList<GeoDataDocument *> searchRoute(const RouteRequest *request, int timeout = 30000);
47
48Q_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
59private:
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-2024 The KDE developers.
Generated on Sat Dec 21 2024 17:04:14 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.