Marble

RoutingRunner.h
1// SPDX-License-Identifier: LGPL-2.1-or-later
2//
3// SPDX-FileCopyrightText: 2010 Dennis Nienhüser <nienhueser@kde.org>
4// SPDX-FileCopyrightText: 2011 Thibaut Gridel <tgridel@free.fr>
5// SPDX-FileCopyrightText: 2012, 2013 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
6
7#ifndef MARBLE_ROUTINGRUNNER_H
8#define MARBLE_ROUTINGRUNNER_H
9
10#include "marble_export.h"
11#include <QObject>
12
13class QTime;
14
15namespace Marble
16{
17
18class GeoDataExtendedData;
19class GeoDataDocument;
20class RouteRequest;
21
22class MARBLE_EXPORT RoutingRunner : public QObject
23{
24 Q_OBJECT
25
26public:
27 explicit RoutingRunner(QObject *parent);
28
29 /**
30 * Start a route download orw calculation. Called by MarbleRunnerManager, runners
31 * are expected to return the result via the routeCalculated signal.
32 * If implemented in a plugin, make sure to include Routing in the
33 * plugin capabilities, otherwise MarbleRunnerManager will ignore the plugin
34 */
35 virtual void retrieveRoute(const RouteRequest *request) = 0;
36
37Q_SIGNALS:
38 /**
39 * Route download/calculation is finished, result in the given route object.
40 * To be emitted by runners after a @see retrieveRoute call.
41 */
42 void routeCalculated(GeoDataDocument *route);
43
44protected:
45 const QString nameString(const QString &name, qreal length, const QTime &duration) const;
46 const QString lengthString(qreal length) const;
47 const QString durationString(const QTime &duration) const;
48 const GeoDataExtendedData routeData(qreal length, const QTime &duration) const;
49};
50
51}
52
53#endif
KCALUTILS_EXPORT QString durationString(const KCalendarCore::Incidence::Ptr &incidence)
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 Mon Nov 4 2024 16:37:04 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.