┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src/panels/information/kmetadatamodel.h
diff options
context:
space:
mode:
authorPeter Penz <[email protected]>2010-03-13 15:32:48 +0000
committerPeter Penz <[email protected]>2010-03-13 15:32:48 +0000
commit6b9c4f7b45e07e93afadd50b4a0350ef901e8683 (patch)
tree232e1ff1b5bf9f8e2746c4c2806e1d19399b0d41 /src/panels/information/kmetadatamodel.h
parent54a1499586d5395f0f4589ce6deb6431d02eb866 (diff)
Allow to specify a group for a meta data item.
The sorting of the meta data items is now done by the group. Within the group the sorting is done by their translated labels. svn path=/trunk/KDE/kdebase/apps/; revision=1102778
Diffstat (limited to 'src/panels/information/kmetadatamodel.h')
-rw-r--r--src/panels/information/kmetadatamodel.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/src/panels/information/kmetadatamodel.h b/src/panels/information/kmetadatamodel.h
index 4b12563d3..ad8099dad 100644
--- a/src/panels/information/kmetadatamodel.h
+++ b/src/panels/information/kmetadatamodel.h
@@ -21,11 +21,10 @@
#include <kurl.h>
+#include <QHash>
#include <QObject>
-#include <QMap>
#include <QString>
-
#include <config-nepomuk.h>
#ifdef HAVE_NEPOMUK
#define DISABLE_NEPOMUK_LEGACY
@@ -64,6 +63,15 @@ public:
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
@@ -71,7 +79,7 @@ public:
* be invoked after the signal loadingFinished() has
* been received (otherwise no data will be returned).
*/
- QMap<KUrl, Nepomuk::Variant> data() const;
+ QHash<KUrl, Nepomuk::Variant> data() const;
protected:
/**
@@ -83,7 +91,7 @@ protected:
* blocked if the operation takes longer. The default implementation
* returns an empty list.
*/
- virtual QMap<KUrl, Nepomuk::Variant> loadData() const;
+ virtual QHash<KUrl, Nepomuk::Variant> loadData() const;
#endif
signals: