[Kde-imaging] KIPI::ImageCollection and attributes()/setAttributes()

Jesper K. Pedersen blackie at blackie.dk
Mon May 29 05:12:42 CEST 2006


First of all, sorry for the late response - you know work and all :-)

The attributes was a way to allow plugins to access the acategories 
annotations of the host application. I dont remember much about the other 
host applications, but let me explain how it works in KPhotoAlbum.

In KPhotoAlbum users may annotate their images using categories, and they may 
themself specify which categories exists. I do e.g. have the categories 
Persons, Locations, and Keywords.

This is what these attributes are about.
If you started storing general key/value pairs using this mechanism, you would 
make KPhotoAlbum beleive that it had new categories, so that would not really 
be so good :-)

IIRC, some of the other plugins do actually store some data for the plugin, 
using the KConfig mechanism. I do realize your need is per album/image, but 
wouldn't this still be a valid way for you, you may e.g. use say the file 
name as a key.

Cheers
Jesper.
On Sunday 21 May 2006 21:39, Colin Guthrie wrote:
| Hi,
|
| Apologies if I'm getting ahead of myself here as I've only just read the
| docs and not really fully absorbed it all yet.
|
| As I posted on the Digikam list (and in another thread here I think), I
| want to make the Gallery2 integration much tighter in Digikam (and make
| it possible for other applications to do the same if so desired.
|
| One of the things I want to do is to be able to configure an Album (or
| KIPI::ImageCollection in KIPI speak) to be synced (sunk?) to a given
| remote Gallery2 (and within a given album in that gallery).
|
| I'd also like the ability to exclude certain images from the sync. Now,
| I notice from the docs that there exists a few methods in
| KIPI::ImageInfo called attributes(), clearAttributes() and
| addAttribute(). Unf. the docs are a little lacking here. Do these
| methods allow me to use the host application to store generic key/value
| pairs of data about a given image? If so this this perfect for my "Do
| not sync flag" and also for storing the remote gallery image id etc. for
| subsequent syncs.
|
| But unfortunatly the same methods are not present in the
| KIPI::ImageCollection object where I would store my sync preferences...
|    (e.g. Which remote gallery, which remote album etc.)
|
| If I've guessed correctly, would it be OK to add this extra
| functionality to KIPI::ImageCollection?
|
| Cheers
|
| Col.

-- 
Jesper K. Pedersen          |  Klarälvdalens Datakonsult
Senior Software Engineer    |  www.klaralvdalens-datakonsult.se
Prinsensgade 4a st.         |
9800 Hjørring               |  Platform-independent
Denmark                     |  software solutions



More information about the Kde-imaging mailing list