Review Request: Add KMetaDataWidget, KMetaDataModel and KMetaDataConfigurationDialog
peter.penz at gmx.at
Tue Mar 16 20:39:26 GMT 2010
This is an automatically generated e-mail. To reply, visit:
(Updated 2010-03-16 20:39:25.707278)
Review request for kdelibs, Sebastian Trueg, David Faure, and Aurélien Gâteau.
Christoph, I've uploaded a new diff which fixes most of your suggestions. Still open are:
1. Naming of KMetaDataModel. I've left it as before currently.
2. KMetaDataModel::group(): I still return a QString currently and tried to improve the documentation.
3. virtual method "KMetaDataModel::loadData()" encapsulated in HAVE_NEPOMUK define. Before changing this I need to be sure that the method "KMetaDataModel::data()" does not have the same problem (IMO both have to be handled equally).
4. QVariant approach in KMetaDataWidget not considered yet.
5. Interface for saving application dependent visibility not offered yet. I'd like to postpone this after the current patch is in kdelibs. It requires some implementation effort + testing and only a minor interface extension will be required.
6. KMetaDataWidget::setValue(): No widget is passed currently. I'll adjust it during this week and update the patch.
The patch adds KMetaDataWidget, KMetaDataModel and KMetaDataConfigurationDialog as public classes to kdelibs/kfile. The KMetaDataWidget allows an application in an easy way to show meta data of a file (or several files). The widget also allows to change meta data like tags, comments and rating (see http://enzosworld.gmxhome.de/temp/metadatawidget.png or attached screenshot). KMetaDataConfigurationDialog allows to configure which meta tags should be hidden/shown. The classes also work without Nepomuk (and show only very basic meta data like size, permissions, ...). It is possible for applications to add custom meta data if wanted (including widgets to manipulate this meta data).
The classes have been used by Dolphin internally until now and have originally been written by Sebastian Trüg. After the request from Tom Albers and Oliver Heidbüchel to integrate the widget also in Mailody/Okular I've adjusted the classes to get them ready for a kdelibs-integration. I'd also like to to adjust KPropertiesDialog later to use this widget.
I'd ask mainly to look at the files kfile/kmetadatawidget.h, kfile/kmetadatamodel.h and kfile/kmetadataconfigurationdialog.h, the other APIs are internal.
Tested in Dolphin. An early version has been tested also in Mailody and Okular.
More information about the kde-core-devel