Marble

ReverseGeocodingRunner.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_REVERSEGEOCODINGRUNNER_H
8 #define MARBLE_REVERSEGEOCODINGRUNNER_H
9 
10 #include <QObject>
11 #include "marble_export.h"
12 
13 namespace Marble
14 {
15 
16 class GeoDataCoordinates;
17 class GeoDataPlacemark;
18 class MarbleModel;
19 
20 class MARBLE_EXPORT ReverseGeocodingRunner : public QObject
21 {
22  Q_OBJECT
23 
24 public:
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 
40 Q_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 
47 protected:
48  /**
49  * Access to the currently used model, or null if no was set with @see setModel
50  */
51  const MarbleModel *model() const;
52 
53 private:
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-2023 The KDE developers.
Generated on Wed Oct 4 2023 04:09:43 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.