Marble

RoutingRunner.h
1 // SPDX-License-Identifier: LGPL-2.1-or-later
2 //
3 // SPDX-FileCopyrightText: 2010 Dennis Nienhüser <[email protected]>
4 // SPDX-FileCopyrightText: 2011 Thibaut Gridel <[email protected]>
5 // SPDX-FileCopyrightText: 2012, 2013 Bernhard Beschow <[email protected]>
6 
7 #ifndef MARBLE_ROUTINGRUNNER_H
8 #define MARBLE_ROUTINGRUNNER_H
9 
10 #include <QObject>
11 #include "marble_export.h"
12 
13 class QTime;
14 
15 namespace Marble
16 {
17 
18 class GeoDataExtendedData;
19 class GeoDataDocument;
20 class RouteRequest;
21 
22 class MARBLE_EXPORT RoutingRunner : public QObject
23 {
24  Q_OBJECT
25 
26 public:
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 
37 Q_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 
44 protected:
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
Binds a QML item to a specific geodetic location in screen coordinates.
KCALUTILS_EXPORT QString durationString(const KCalendarCore::Incidence::Ptr &incidence)
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon Sep 25 2023 03:50:20 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.