Marble

RunnerTask.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
6#ifndef MARBLE_RUNNERTASK_H
7#define MARBLE_RUNNERTASK_H
8
9#include "GeoDataCoordinates.h"
10#include "GeoDataDocument.h"
11#include "GeoDataLatLonBox.h"
12
13#include <QRunnable>
14#include <QString>
15
16namespace Marble
17{
18
19class MarbleModel;
20class ParsingRunner;
21class SearchRunner;
22class ReverseGeocodingRunner;
23class RouteRequest;
24class RoutingRunner;
25class ParsingRunnerManager;
26class SearchRunnerManager;
27class ReverseGeocodingRunnerManager;
28class RoutingRunnerManager;
29
30/** A RunnerTask that executes a placemark search */
31class SearchTask : public QObject, public QRunnable
32{
34
35public:
36 SearchTask( SearchRunner *runner, SearchRunnerManager *manager, const MarbleModel *model, const QString &searchTerm, const GeoDataLatLonBox &preferred );
37
38 /**
39 * @reimp
40 */
41 void run() override;
42
44 void finished( SearchTask *task );
45
46private:
47 SearchRunner *const m_runner;
48 QString m_searchTerm;
49 GeoDataLatLonBox m_preferredBbox;
50};
51
52/** A RunnerTask that executes reverse geocoding */
54{
56
57public:
58 ReverseGeocodingTask( ReverseGeocodingRunner*runner, ReverseGeocodingRunnerManager *manager, const MarbleModel *model, const GeoDataCoordinates &coordinates );
59
60 /**
61 * @reimp
62 */
63 void run() override;
64
66 void finished( ReverseGeocodingTask *task );
67
68private:
69 ReverseGeocodingRunner *const m_runner;
70 GeoDataCoordinates m_coordinates;
71};
72
73
74/** A RunnerTask that executes a route calculation */
75class RoutingTask : public QObject, public QRunnable
76{
78
79public:
80 RoutingTask( RoutingRunner *runner, RoutingRunnerManager *manager, const RouteRequest* routeRequest );
81
82 /**
83 * @reimp
84 */
85 void run() override;
86
88 void finished( RoutingTask *task );
89
90private:
91 RoutingRunner *const m_runner;
92 const RouteRequest *const m_routeRequest;
93};
94
95/** A RunnerTask that executes a file Parsing */
96class ParsingTask : public QObject, public QRunnable
97{
99
100public:
101 ParsingTask( ParsingRunner *runner, ParsingRunnerManager *manager, const QString& fileName, DocumentRole role );
102
103 /**
104 * @reimp
105 */
106 void run() override;
107
109 void parsed(GeoDataDocument* document, const QString &error);
110 void finished();
111
112private:
113 ParsingRunner *const m_runner;
114 QString m_fileName;
115 DocumentRole m_role;
116 ParsingRunnerManager* m_manager;
117};
118
119}
120
121#endif
A 3d point representation.
A container for Features, Styles and in the future Schemas.
A class that defines a 2D bounding box for geographic data.
The data model (not based on QAbstractModel) for a MarbleWidget.
Definition MarbleModel.h:87
A RunnerTask that executes a file Parsing.
Definition RunnerTask.h:97
void run() override
A RunnerTask that executes reverse geocoding.
Definition RunnerTask.h:54
Points to be included in a route.
A RunnerTask that executes a route calculation.
Definition RunnerTask.h:76
void run() override
A RunnerTask that executes a placemark search.
Definition RunnerTask.h:32
void run() override
Binds a QML item to a specific geodetic location in screen coordinates.
Q_OBJECTQ_OBJECT
Q_SIGNALSQ_SIGNALS
T qobject_cast(QObject *object)
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri May 24 2024 11:50:53 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.