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
31ReverseGeocodingRunnerPlugin::ReverseGeocodingRunnerPlugin( QObject* parent ) :
32 QObject( parent ),
33 d( new Private )
34{
35}
36
41
43{
44 return QIcon();
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"
QIcon icon() const override
Returns an icon for the plugin.
bool canWorkOffline() const
True if the plugin can execute its tasks without network access.
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.
bool isEmpty() const const
T qobject_cast(QObject *object)
bool contains(QLatin1StringView str, Qt::CaseSensitivity cs) const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Fri Jun 21 2024 12:00:07 by doxygen 1.10.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.