Marble

ReverseGeocodingRunner.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_REVERSEGEOCODINGRUNNER_H
8#define MARBLE_REVERSEGEOCODINGRUNNER_H
9
10#include "marble_export.h"
11#include <QObject>
12
13namespace Marble
14{
15
16class GeoDataCoordinates;
17class GeoDataPlacemark;
18class MarbleModel;
19
20class MARBLE_EXPORT ReverseGeocodingRunner : public QObject
21{
22 Q_OBJECT
23
24public:
25 explicit ReverseGeocodingRunner(QObject *parent);
26
27 /**
28 * Stores a pointer to the currently used model
29 */
30 void setModel(const MarbleModel *model);
31
32 /**
33 * Start a reverse geocoding request. Called by MarbleRunnerManager, runners
34 * are expected to return the result via the reverseGeocodingFinished signal.
35 * If implemented in a plugin, make sure to include ReverseGeocoding in the
36 * plugin capabilities, otherwise MarbleRunnerManager will ignore the plugin
37 */
38 virtual void reverseGeocoding(const GeoDataCoordinates &coordinates) = 0;
39
40Q_SIGNALS:
41 /**
42 * Reverse geocoding is finished, result in the given placemark.
43 * To be emitted by runners after a @see reverseGeocoding call.
44 */
45 void reverseGeocodingFinished(const GeoDataCoordinates &coordinates, const GeoDataPlacemark &placemark);
46
47protected:
48 /**
49 * Access to the currently used model, or null if no was set with @see setModel
50 */
51 const MarbleModel *model() const;
52
53private:
54 const MarbleModel *m_model;
55};
56
57}
58
59#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 Mon Nov 18 2024 12:15:46 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.