[Digikam-devel] Changes in libkipi

Marcel Wiesweg marcel.wiesweg at gmx.de
Sun Jun 20 17:10:57 CEST 2010

> Hello everyone!
> I've added a function in libkipi that returns the tagModel from digikam.
> I've needed a new function instead of the existing selection widget because
> selection widget had some extra options that are not needed in gpssync(like
> the search tool or album selection tool).
> The code from libkipi is here [0] (interface.h, interface.cpp) and the
> changes from digikam's kipiinterface are here [1] (kipiinterface.h,
> kipiinterface.cpp).
> If you have any observation or suggestion about this, please tell me.

- a model or a widget? Getting a widget (for digikam, a TagTreeView) will 
ensure consistent behavior with widgets in the application.
Btw, if only a model is returned, you dont need a widget as parent.

- how do you want to retrieve the selected tag? Qt::DisplayRole is not enough.
You could define a role returning a unique identifier (for digikam, the tag 

Different suggestion:

Create two new classes in libkipi:

- One class representing a tag, inheriting KipiImageCollection, but with 
additional methods:
	- a tag name and an identifier (= tag path)
	- constructable and creatable from a tag path
	- you can get and set attributes to tags (an optional Kipi::Interface 
feature), as you need it. Name-value pairs, similar to KipiImageInfo's 
	- assigning tags can still be done via KipiImageInfo::addAttributes
- one tag selection widget (for digikam, trivially inheriting TagTreeView)
	- returning the currently selected Kipi Tag object

+ any more needs you have for your project

> Gabriel Voicu
> [0] websvn.kde.org/branches/extragear/graphics/libkipi-gsoc-2010/libkipi/
> [1] websvn.kde.org/branches/extragear/graphics/gsoc-geocoding/

More information about the Digikam-devel mailing list