┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/kmetadatamodel.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-03-22 22:23:02 +0000
committerPeter Penz <[email protected]>2010-03-22 22:23:02 +0000
commitcaf017c2fefa8280046b02cfd071a118f2909ced (patch)
treea17f5bd569830806d679c7aedf103861ff9b2507 /src/panels/information/kmetadatamodel.h
parent622acabf23b6c8c3badab6a8c2e93e0ae8963f1b (diff)
Use KFileMetaDataWidget from kdelibs. Still open: Provide dialog which wraps KFileMetaDataConfigurationWidget.
svn path=/trunk/KDE/kdebase/apps/; revision=1106465
Diffstat (limited to 'src/panels/information/kmetadatamodel.h')
-rw-r--r--src/panels/information/kmetadatamodel.h113
1 files changed, 0 insertions, 113 deletions
diff --git a/src/panels/information/kmetadatamodel.h b/src/panels/information/kmetadatamodel.h
deleted file mode 100644
index ad8099dad..000000000
--- a/src/panels/information/kmetadatamodel.h
+++ /dev/null
@@ -1,113 +0,0 @@
-/*****************************************************************************
- * Copyright (C) 2010 by Peter Penz <[email protected]> *
- * *
- * This library is free software; you can redistribute it and/or *
- * modify it under the terms of the GNU Library General Public *
- * License version 2 as published by the Free Software Foundation. *
- * *
- * This library is distributed in the hope that it will be useful, *
- * but WITHOUT ANY WARRANTY; without even the implied warranty of *
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
- * Library General Public License for more details. *
- * *
- * You should have received a copy of the GNU Library General Public License *
- * along with this library; see the file COPYING.LIB. If not, write to *
- * the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, *
- * Boston, MA 02110-1301, USA. *
- *****************************************************************************/
-
-#ifndef KMETADATAMODEL_H
-#define KMETADATAMODEL_H
-
-#include <kurl.h>
-
-#include <QHash>
-#include <QObject>
-#include <QString>
-
-#include <config-nepomuk.h>
-#ifdef HAVE_NEPOMUK
- #define DISABLE_NEPOMUK_LEGACY
- #include <nepomuk/variant.h>
-#endif
-
-class KFileItemList;
-class KUrl;
-
-/**
- * @brief Provides the data for the KMetaDataWidget.
- *
- * The default implementation provides all meta data
- * that are available due to Strigi and Nepomuk. If custom
- * meta data should be added, the method KMetaDataModel::loadData()
- * must be overwritten.
- *
- * @see KMetaDataWidget
- */
-class KMetaDataModel : public QObject
-{
- Q_OBJECT
-
-public:
- explicit KMetaDataModel(QObject* parent = 0);
- virtual ~KMetaDataModel();
-
- /**
- * Sets the items, where the meta data should be
- * requested. The loading of the meta data is done
- * asynchronously. The signal loadingFinished() is
- * emitted, as soon as the loading has been finished.
- * The meta data can be retrieved by
- * KMetaDataModel::data() afterwards.
- */
- void setItems(const KFileItemList& items);
- KFileItemList items() const;
-
- /**
- * @return Returns the name of the group the meta data indicated
- * by \p metaDataUri belongs to. All meta data items are
- * sorted by the group. Items within the group are sorted
- * by their translated labels. The group name is not shown
- * to the user interface and does not need to get translated.
- */
- virtual QString group(const KUrl& metaDataUri) const;
-
-#ifdef HAVE_NEPOMUK
- /**
- * @return Meta data for the items that have been set by
- * KMetaDataModel::setItems(). The method should
- * be invoked after the signal loadingFinished() has
- * been received (otherwise no data will be returned).
- */
- QHash<KUrl, Nepomuk::Variant> data() const;
-
-protected:
- /**
- * Implement this method if custom meta data should be retrieved
- * and added to the list returned by KMetaDataModel::data().
- * Use KMetaDataModel::items() to get the list of items, where
- * the meta data should be requested. The method is invoked in
- * a custom thread context, so that the user interface won't get
- * blocked if the operation takes longer. The default implementation
- * returns an empty list.
- */
- virtual QHash<KUrl, Nepomuk::Variant> loadData() const;
-#endif
-
-signals:
- /**
- * Is emitted after the loading triggered by KMetaDataModel::setItems()
- * has been finished.
- */
- void loadingFinished();
-
-private:
- class Private;
- Private* d;
-
- Q_PRIVATE_SLOT(d, void slotLoadingFinished())
-
- friend class KLoadMetaDataThread; // invokes KMetaDataObject::loadData()
-};
-
-#endif