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

Nepomuk

nepomukmassupdatejob.h

Go to the documentation of this file.
00001 /*
00002    This file is part of the Nepomuk KDE project.
00003    Copyright 2008-2009 Sebastian Trueg <trueg@kde.org>
00004 
00005    This library is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU Lesser General Public
00007    License as published by the Free Software Foundation; either
00008    version 2.1 of the License, or (at your option) version 3, or any
00009    later version accepted by the membership of KDE e.V. (or its
00010    successor approved by the membership of KDE e.V.), which shall
00011    act as a proxy defined in Section 6 of version 3 of the license.
00012 
00013    This library is distributed in the hope that it will be useful,
00014    but WITHOUT ANY WARRANTY; without even the implied warranty of
00015    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016    Lesser General Public License for more details.
00017 
00018    You should have received a copy of the GNU Lesser General Public
00019    License along with this library.  If not, see <http://www.gnu.org/licenses/>.
00020 */
00021 
00022 #ifndef _NEPOMUK_MASS_UPDATE_JOB_H_
00023 #define _NEPOMUK_MASS_UPDATE_JOB_H_
00024 
00025 #include "kjob.h"
00026 #include "kurl.h"
00027 
00028 #include <QtCore/QList>
00029 #include <QtCore/QPair>
00030 #include <QtCore/QTimer>
00031 
00032 #include "resource.h"
00033 #include "variant.h"
00034 
00035 
00036 namespace Nepomuk {
00044     class NEPOMUK_EXPORT MassUpdateJob : public KJob
00045     {
00046         Q_OBJECT
00047 
00048     public:
00054         MassUpdateJob( QObject* parent = 0 );
00055 
00059         ~MassUpdateJob();
00060 
00066         void setFiles( const KUrl::List& urls );
00067 
00071         void setResources( const QList<Nepomuk::Resource>& );
00072 
00076         void setProperties( const QList<QPair<QUrl, Nepomuk::Variant> >& props );
00077 
00081         void start();
00082 
00083         static MassUpdateJob* tagResources( const QList<Nepomuk::Resource>&, const QList<Nepomuk::Tag>& tags );
00084         static MassUpdateJob* rateResources( const QList<Nepomuk::Resource>&, int rating );
00085         static MassUpdateJob* commentResources( const QList<Nepomuk::Resource>&, const QString& comment);
00086 
00087     protected:
00088         bool doKill();
00089         bool doSuspend();
00090         bool doResume();
00091 
00092     private Q_SLOTS:
00093         void slotNext();
00094 
00095     private:
00096         QList<Nepomuk::Resource> m_resources;
00097         QList<QPair<QUrl,Nepomuk::Variant> > m_properties;
00098         int m_index;
00099         QTimer m_processTimer;
00100     };
00101 }
00102 
00103 #endif

Nepomuk

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

kdelibs

Skip menu "kdelibs"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • Kate
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
Generated for kdelibs by doxygen 1.7.3
This website is maintained by Adriaan de Groot and Allen Winter.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal