• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdeedu API Reference
  • KDE Home
  • Contact Us
 

marble

  • sources
  • kde-4.14
  • kdeedu
  • marble
  • src
  • lib
  • marble
SearchRunnerPlugin.cpp
Go to the documentation of this file.
1 //
2 // This file is part of the Marble Virtual Globe.
3 //
4 // This program is free software licensed under the GNU LGPL. You can
5 // find a copy of this license in LICENSE.txt in the top directory of
6 // the source code.
7 //
8 // Copyright 2010 Dennis Nienhüser <earthwings@gentoo.org>
9 // Copyright 2011 Thibaut Gridel <tgridel@free.fr>
10 // Copyright 2012 Bernhard Beschow <bbeschow@cs.tu-berlin.de>
11 //
12 
13 #include "SearchRunnerPlugin.h"
14 
15 namespace Marble
16 {
17 
18 class SearchRunnerPlugin::Private
19 {
20 public:
21  QStringList m_supportedCelestialBodies;
22 
23  bool m_canWorkOffline;
24 
25  Private();
26 };
27 
28 SearchRunnerPlugin::Private::Private()
29  : m_canWorkOffline( true )
30 {
31  // nothing to do
32 }
33 
34 SearchRunnerPlugin::SearchRunnerPlugin( QObject* parent ) :
35  QObject( parent ),
36  d( new Private )
37 {
38 }
39 
40 SearchRunnerPlugin::~SearchRunnerPlugin()
41 {
42  delete d;
43 }
44 
45 QIcon SearchRunnerPlugin::icon() const
46 {
47  return QIcon();
48 }
49 
50 bool SearchRunnerPlugin::supportsCelestialBody( const QString &celestialBodyId ) const
51 {
52  if ( d->m_supportedCelestialBodies.isEmpty() ) {
53  return true;
54  }
55 
56  return d->m_supportedCelestialBodies.contains( celestialBodyId );
57 }
58 
59 void SearchRunnerPlugin::setSupportedCelestialBodies( const QStringList &celestialBodies )
60 {
61  d->m_supportedCelestialBodies = celestialBodies;
62 }
63 
64 void SearchRunnerPlugin::setCanWorkOffline( bool canWorkOffline )
65 {
66  d->m_canWorkOffline = canWorkOffline;
67 }
68 
69 bool SearchRunnerPlugin::canWorkOffline() const
70 {
71  return d->m_canWorkOffline;
72 }
73 
74 bool SearchRunnerPlugin::canWork() const
75 {
76  return true;
77 }
78 
79 }
80 
81 #include "SearchRunnerPlugin.moc"
SearchRunnerPlugin.h
Marble::SearchRunnerPlugin::supportsCelestialBody
bool supportsCelestialBody(const QString &celestialBodyId) const
True if the plugin supports its tasks on the given planet.
Definition: SearchRunnerPlugin.cpp:50
Marble::SearchRunnerPlugin::canWorkOffline
bool canWorkOffline() const
True if the plugin can execute its tasks without network access.
Definition: SearchRunnerPlugin.cpp:69
QObject
QString
Marble::SearchRunnerPlugin::setSupportedCelestialBodies
void setSupportedCelestialBodies(const QStringList &celestialBodies)
Definition: SearchRunnerPlugin.cpp:59
QStringList
Marble::SearchRunnerPlugin::SearchRunnerPlugin
SearchRunnerPlugin(QObject *parent=0)
Constructor with optional parent object.
Definition: SearchRunnerPlugin.cpp:34
Marble::SearchRunnerPlugin::setCanWorkOffline
void setCanWorkOffline(bool canWorkOffline)
Definition: SearchRunnerPlugin.cpp:64
Marble::SearchRunnerPlugin::canWork
virtual bool canWork() const
Returns.
Definition: SearchRunnerPlugin.cpp:74
QIcon
Marble::SearchRunnerPlugin::~SearchRunnerPlugin
virtual ~SearchRunnerPlugin()
Destructor.
Definition: SearchRunnerPlugin.cpp:40
Marble::SearchRunnerPlugin::icon
virtual QIcon icon() const
Returns an icon for the plugin.
Definition: SearchRunnerPlugin.cpp:45
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:13:41 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

marble

Skip menu "marble"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Related Pages

kdeedu API Reference

Skip menu "kdeedu API Reference"
  • Analitza
  •     lib
  • kalgebra
  • kalzium
  •   libscience
  • kanagram
  • kig
  •   lib
  • klettres
  • marble
  • parley
  • rocs
  •   App
  •   RocsCore
  •   VisualEditor
  •   stepcore

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal