Marble

ReverseGeocodingRunnerPlugin.cpp
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 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
6//
7
8#include "ReverseGeocodingRunnerPlugin.h"
9
10#include <QIcon>
11
12namespace Marble
13{
14
15class Q_DECL_HIDDEN ReverseGeocodingRunnerPlugin::Private
16{
17public:
18 QStringList m_supportedCelestialBodies;
19
20 bool m_canWorkOffline;
21
22 Private();
23};
24
25ReverseGeocodingRunnerPlugin::Private::Private()
26 : m_canWorkOffline(true)
27{
28 // nothing to do
29}
30
36
41
43{
44 return {};
45}
46
48{
49 if (d->m_supportedCelestialBodies.isEmpty()) {
50 return true;
51 }
52
53 return d->m_supportedCelestialBodies.contains(celestialBodyId);
54}
55
56void ReverseGeocodingRunnerPlugin::setSupportedCelestialBodies(const QStringList &celestialBodies)
57{
58 d->m_supportedCelestialBodies = celestialBodies;
59}
60
61void ReverseGeocodingRunnerPlugin::setCanWorkOffline(bool canWorkOffline)
62{
63 d->m_canWorkOffline = canWorkOffline;
64}
65
67{
68 return d->m_canWorkOffline;
69}
70
72{
73 return true;
74}
75
76}
77
78#include "moc_ReverseGeocodingRunnerPlugin.cpp"
A plugin for Marble to execute a reverse geocoding task.
QIcon icon() const override
Returns an icon for the plugin.
bool canWorkOffline() const
True if the plugin can execute its tasks without network access.
ReverseGeocodingRunnerPlugin(QObject *parent=nullptr)
Constructor with optional parent object.
bool supportsCelestialBody(const QString &celestialBodyId) const
True if the plugin supports its tasks on the given planet.
Binds a QML item to a specific geodetic location in screen coordinates.
QObject(QObject *parent)
QObject * parent() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2025 The KDE developers.
Generated on Fri Jan 24 2025 11:52:10 by doxygen 1.13.2 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.