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,
59 ReverseGeocodingRunnerManager *manager,
60 const MarbleModel *model,
61 const GeoDataCoordinates &coordinates);
62
63 /**
64 * @reimp
65 */
66 void run() override;
67
69 void finished(ReverseGeocodingTask *task);
70
71private:
72 ReverseGeocodingRunner *const m_runner;
73 GeoDataCoordinates m_coordinates;
74};
75
76/** A RunnerTask that executes a route calculation */
77class RoutingTask : public QObject, public QRunnable
78{
80
81public:
82 RoutingTask(RoutingRunner *runner, RoutingRunnerManager *manager, const RouteRequest *routeRequest);
83
84 /**
85 * @reimp
86 */
87 void run() override;
88
90 void finished(RoutingTask *task);
91
92private:
93 RoutingRunner *const m_runner;
94 const RouteRequest *const m_routeRequest;
95};
96
97/** A RunnerTask that executes a file Parsing */
98class ParsingTask : public QObject, public QRunnable
99{
101
102public:
103 ParsingTask(ParsingRunner *runner, ParsingRunnerManager *manager, const QString &fileName, DocumentRole role);
104
105 /**
106 * @reimp
107 */
108 void run() override;
109
111 void parsed(GeoDataDocument *document, const QString &error);
112 void finished();
113
114private:
115 ParsingRunner *const m_runner;
116 QString m_fileName;
117 DocumentRole m_role;
118 ParsingRunnerManager *m_manager;
119};
120
121}
122
123#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:84
A RunnerTask that executes a file Parsing.
Definition RunnerTask.h:99
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:78
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
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.