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

KIO

kfilemetadataprovider_p.h

Go to the documentation of this file.
00001 /*****************************************************************************
00002  * Copyright (C) 2010 by Peter Penz <peter.penz@gmx.at>                      *
00003  *                                                                           *
00004  * This library is free software; you can redistribute it and/or             *
00005  * modify it under the terms of the GNU Library General Public               *
00006  * License as published by the Free Software Foundation; either              *
00007  * version 2 of the License, or (at your option) any later version.          *
00008  *                                                                           *
00009  * This library is distributed in the hope that it will be useful,           *
00010  * but WITHOUT ANY WARRANTY; without even the implied warranty of            *
00011  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU         *
00012  * Library General Public License for more details.                          *
00013  *                                                                           *
00014  * You should have received a copy of the GNU Library General Public License *
00015  * along with this library; see the file COPYING.LIB.  If not, write to      *
00016  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,      *
00017  * Boston, MA 02110-1301, USA.                                               *
00018  *****************************************************************************/
00019 
00020 #ifndef KFILEMETADATAMODEL_H
00021 #define KFILEMETADATAMODEL_H
00022 
00023 #include <kurl.h>
00024 
00025 #include <QtCore/QHash>
00026 #include <QtCore/QObject>
00027 #include <QtCore/QString>
00028 
00029 #include <config-kio.h>
00030 #ifndef KIO_NO_NEPOMUK
00031     #define DISABLE_NEPOMUK_LEGACY
00032     #include <variant.h>
00033 #endif
00034 
00035 class KFileItemList;
00036 class KUrl;
00037 class QWidget;
00038 
00049 class KFileMetaDataProvider : public QObject
00050 {
00051     Q_OBJECT
00052 
00053 public:
00054     explicit KFileMetaDataProvider(QObject* parent = 0);
00055     virtual ~KFileMetaDataProvider();
00056 
00066     void setItems(const KFileItemList& items);
00067     KFileItemList items() const;
00068 
00074     void setReadOnly(bool readOnly);
00075     bool isReadOnly() const;
00076 
00082     virtual QString label(const KUrl& metaDataUri) const;
00083 
00095     virtual QString group(const KUrl& metaDataUri) const;
00096 
00097 #ifndef KIO_NO_NEPOMUK
00098 
00104     virtual QHash<KUrl, Nepomuk::Variant> data() const;
00105 
00113     virtual QWidget* createValueWidget(const KUrl& metaDataUri,
00114                                        const Nepomuk::Variant& value,
00115                                        QWidget* parent) const;
00116 #endif
00117 
00118 Q_SIGNALS:
00123     void loadingFinished();
00124 
00125     void urlActivated(const KUrl& url);
00126 
00127     void dataChangeStarted();
00128     void dataChangeFinished();
00129 
00130 private:
00131     class Private;
00132     Private* const d;
00133 
00134     Q_PRIVATE_SLOT(d, void slotLoadingFinished(QThread* finishedThread))
00135     Q_PRIVATE_SLOT(d, void slotRatingChanged(unsigned int rating))
00136     Q_PRIVATE_SLOT(d, void slotTagsChanged(const QList<Nepomuk::Tag>& tags))
00137     Q_PRIVATE_SLOT(d, void slotCommentChanged(const QString& comment))
00138     Q_PRIVATE_SLOT(d, void slotTagClicked(const Nepomuk::Tag& tag))
00139     Q_PRIVATE_SLOT(d, void slotLinkActivated(const QString&))
00140 
00141     friend class KLoadMetaDataThread; // invokes KMetaDataObject::loadData()
00142 };
00143 
00144 #endif

KIO

Skip menu "KIO"
  • Main Page
  • 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