From 54a1499586d5395f0f4589ce6deb6431d02eb866 Mon Sep 17 00:00:00 2001 From: Peter Penz Date: Sat, 13 Mar 2010 13:38:40 +0000 Subject: Provide a KMetaDataModel for KMetaDataWidget. This allows to extend the model with custom meta data (might e. g. be useful for Gwenview). svn path=/trunk/KDE/kdebase/apps/; revision=1102749 --- src/panels/information/kmetadatawidget.h | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'src/panels/information/kmetadatawidget.h') diff --git a/src/panels/information/kmetadatawidget.h b/src/panels/information/kmetadatawidget.h index 715defbc3..858f1998a 100644 --- a/src/panels/information/kmetadatawidget.h +++ b/src/panels/information/kmetadatawidget.h @@ -1,6 +1,6 @@ /***************************************************************************** * Copyright (C) 2008 by Sebastian Trueg * - * Copyright (C) 2009 by Peter Penz * + * Copyright (C) 2009-2010 by Peter Penz * * * * This library is free software; you can redistribute it and/or * * modify it under the terms of the GNU Library General Public * @@ -27,6 +27,7 @@ #include +class KMetaDataModel; class KUrl; /** @@ -38,6 +39,10 @@ class KUrl; * to change specific meta data like rating, tags and * comment. The changes are stored automatically by the * meta data widget. + * + * To show more than basic meta data, the meta data widget + * must be provided with a meta data model + * (see KMetaDataWidget::setModel()). */ class KMetaDataWidget : public QWidget { @@ -101,6 +106,13 @@ public: KFileItemList items() const; + /** + * Sets the used model which provides the data for the widget. + * One model can be shared by several meta data widgets. + */ + void setModel(KMetaDataModel* model); + KMetaDataModel* model() const; + /** * If set to true, data like comment, tag or rating cannot be changed by the user. * Per default read-only is disabled. -- cgit v1.3