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

KIO

  • kio
  • kfile
kfilemetadataprovider_p.h
Go to the documentation of this file.
1 /*****************************************************************************
2  * Copyright (C) 2010 by Peter Penz <peter.penz@gmx.at> *
3  * *
4  * This library is free software; you can redistribute it and/or *
5  * modify it under the terms of the GNU Library General Public *
6  * License as published by the Free Software Foundation; either *
7  * version 2 of the License, or (at your option) any later version. *
8  * *
9  * This library is distributed in the hope that it will be useful, *
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
12  * Library General Public License for more details. *
13  * *
14  * You should have received a copy of the GNU Library General Public License *
15  * along with this library; see the file COPYING.LIB. If not, write to *
16  * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
17  * Boston, MA 02110-1301, USA. *
18  *****************************************************************************/
19 
20 #ifndef KFILEMETADATAMODEL_H
21 #define KFILEMETADATAMODEL_H
22 
23 #include <kurl.h>
24 
25 #include <QtCore/QHash>
26 #include <QtCore/QObject>
27 #include <QtCore/QString>
28 
29 #include <config-kio.h>
30 #ifndef KIO_NO_NEPOMUK
31  #define DISABLE_NEPOMUK_LEGACY
32  #include <variant.h>
33 #endif
34 
35 class KFileItemList;
36 class KProcess;
37 class KUrl;
38 class QWidget;
39 
50 class KFileMetaDataProvider : public QObject
51 {
52  Q_OBJECT
53 
54 public:
55  explicit KFileMetaDataProvider(QObject* parent = 0);
56  virtual ~KFileMetaDataProvider();
57 
67  void setItems(const KFileItemList& items);
68  KFileItemList items() const;
69 
75  void setReadOnly(bool readOnly);
76  bool isReadOnly() const;
77 
83  virtual QString label(const KUrl& metaDataUri) const;
84 
96  virtual QString group(const KUrl& metaDataUri) const;
97 
98 #ifndef KIO_NO_NEPOMUK
99 
105  virtual QHash<KUrl, Nepomuk::Variant> data() const;
106 
114  virtual QWidget* createValueWidget(const KUrl& metaDataUri,
115  const Nepomuk::Variant& value,
116  QWidget* parent) const;
117 #endif
118 
119 Q_SIGNALS:
124  void loadingFinished();
125 
126  void urlActivated(const KUrl& url);
127 
128  void dataChangeStarted();
129  void dataChangeFinished();
130 
131 private:
132  class Private;
133  Private* const d;
134 
135  Q_PRIVATE_SLOT(d, void slotLoadingFinished())
136  Q_PRIVATE_SLOT(d, void slotRatingChanged(unsigned int rating))
137  Q_PRIVATE_SLOT(d, void slotTagsChanged(const QList<Nepomuk::Tag>& tags))
138  Q_PRIVATE_SLOT(d, void slotCommentChanged(const QString& comment))
139  Q_PRIVATE_SLOT(d, void slotTagClicked(const Nepomuk::Tag& tag))
140  Q_PRIVATE_SLOT(d, void slotLinkActivated(const QString&))
141 
142  friend class KLoadMetaDataThread; // invokes KMetaDataObject::loadData()
143 };
144 
145 #endif
This file is part of the KDE documentation.
Documentation copyright © 1996-2013 The KDE developers.
Generated on Sun Apr 28 2013 14:27:32 by doxygen 1.8.1.1 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KIO

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

kdelibs-4.10.2 API Reference

Skip menu "kdelibs-4.10.2 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
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver
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