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

Nepomuk-Core

  • sources
  • kde-4.12
  • kdelibs
  • nepomuk-core
  • cleaner
cleaningjob.h
Go to the documentation of this file.
1 /*
2  This file is part of the Nepomuk KDE project.
3  Copyright (C) 2012 Vishesh Handa <me@vhanda.in>
4  Copyright (C) 2013 Sebastian Trueg <trueg@kde.org>
5 
6  This library is free software; you can redistribute it and/or
7  modify it under the terms of the GNU Lesser General Public
8  License as published by the Free Software Foundation; either
9  version 2.1 of the License, or (at your option) version 3, or any
10  later version accepted by the membership of KDE e.V. (or its
11  successor approved by the membership of KDE e.V.), which shall
12  act as a proxy defined in Section 6 of version 3 of the license.
13 
14  This library is distributed in the hope that it will be useful,
15  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  Lesser General Public License for more details.
18 
19  You should have received a copy of the GNU Lesser General Public
20  License along with this library. If not, see <http://www.gnu.org/licenses/>.
21 */
22 
23 #ifndef NEPOMUK2_CLEANINGJOB_H
24 #define NEPOMUK2_CLEANINGJOB_H
25 
26 #include <KJob>
27 #include <KLocalizedString>
28 #include <QtCore/QUrl>
29 #include <KService>
30 
31 #include "nepomuk_export.h"
32 
33 #ifndef NEPOMUK_NEPOMUKCLEANER_EXPORT
34 # if defined(KDELIBS_STATIC_LIBS)
35  /* No export/import for static libraries */
36 # define NEPOMUK_NEPOMUKCLEANER_EXPORT
37 # elif defined(MAKE_NEPOMUKCLEANER_LIB)
38  /* We are building this library */
39 # define NEPOMUK_NEPOMUKCLEANER_EXPORT KDE_EXPORT
40 # else
41  /* We are using this library */
42 # define NEPOMUK_NEPOMUKCLEANER_EXPORT KDE_IMPORT
43 # endif
44 #endif
45 
46 namespace Nepomuk2 {
47  class NEPOMUK_NEPOMUKCLEANER_EXPORT CleaningJob : public KJob
48  {
49  Q_OBJECT
50  public:
51  explicit CleaningJob(QObject* parent = 0);
52  virtual ~CleaningJob();
53 
54  virtual void start();
55  virtual QString jobName() = 0;
56 
57  void quit();
58 
59  protected:
60  bool shouldQuit();
61 
62  private slots:
63  void slotStartExecution();
64 
65  private:
66  virtual void execute() = 0;
67 
68  bool m_shouldQuit;
69  };
70 } // namespace Nepomuk2
71 
78 #define NEPOMUK_EXPORT_CLEANINGJOB( classname, libname ) \
79 K_PLUGIN_FACTORY(factory, registerPlugin<classname>();) \
80 K_EXPORT_PLUGIN(factory(#libname))
81 
82 #endif // NEPOMUK2_CLEANINGJOB_H
NEPOMUK_NEPOMUKCLEANER_EXPORT
#define NEPOMUK_NEPOMUKCLEANER_EXPORT
Definition: cleaningjob.h:42
QObject
Nepomuk2::CleaningJob
Definition: cleaningjob.h:47
start
void start()
Definition: ontologydownloadjob.cpp:13
KJob
nepomuk_export.h
This file is part of the KDE documentation.
Documentation copyright © 1996-2014 The KDE developers.
Generated on Tue Oct 14 2014 22:48:08 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

Nepomuk-Core

Skip menu "Nepomuk-Core"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  • kjsembed
  •   WTF
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Nepomuk-Core
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

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