[Digikam-devel] About retrieving tags from digikam and tags properties

Gilles Caulier caulier.gilles at gmail.com
Mon Jun 14 15:21:50 BST 2010


The first solution is to know the tags hierarchy for each item, using
tagspath properties :

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/kipiiface/kipiimageinfo.cpp#133

... and create a delegate widget in your plugin to display it. Of
course, it can be complicated and long to do

Alternatively, a better way is  to delegate the tags view to kipi host
application..

libkipi has already a template class which must be re-implemented in
kipi host interface. This widget is dedicated to show album tree view
(physical and virtual) to a kipi plugin and to propose to user to set
a selection of an album. Look in HTML export or Flash Export plugins
for example. The dialog show a tab widget where you can select the
right albums to export.

Code is there :

http://lxr.kde.org/source/KDE/kdegraphics/libs/libkipi/libkipi/uploadwidget.h

and re-implemented here :

http://lxr.kde.org/source/extragear/graphics/digikam/utilities/kipiiface/kipiuploadwidget.h

and used there :

http://lxr.kde.org/source/extragear/graphics/kipi-plugins/flashexport/selectionpage.cpp#58

For your needs in GPSSync2 plugin, a similar template widget need to
be declared in libkipi, and re-implemented to Digikam::Kipiinterface.

What do you think about ?

Gilles


2010/6/14 Gabriel Voicu <ping.gabi at gmail.com>:
> Thank you Gilles for fast answering, but this code is about how to retrieve
> tags from one image and I need to retrieve the tag tree containing all tags
> from digikam.
> For example, let's say we have two photos in gpssync2 and we want that
> reverse geocoding tags country name as childs for "Places" tag. We select
> Places tag.
> root Tag---Friends
>              \--Places
> And after applying reverse geocoding process, the tag tree will look like
> this:
> root Tag---Friends
>              \--Places---France
>                            \--Germany
> That's why I need digikam tag tree in kipi interface; to give the user the
> possibility to select where he wants to integrate new resulted tags in tag
> hierarchy.
> Best regards,
> Gabriel
> _______________________________________________
> Digikam-devel mailing list
> Digikam-devel at kde.org
> https://mail.kde.org/mailman/listinfo/digikam-devel
>
>



More information about the Digikam-devel mailing list