[Kde-imaging] How to identify an album

Aurelien Gateau aurelien.gateau at free.fr
Sun Apr 25 11:12:12 CEST 2004


Le samedi 24 Avril 2004 19:38, Jesper K. Pedersen a écrit :
> In the cdarchiving plugin there is code looking like this:
>   if (album == Digikam::AlbumManager::instance()->currentAlbum())
> 		....
>
> where album is one from a list of all albums.
>
> with kipi this will not work, as there are no requirement that the pointers
> returned from all albums may not be created on the fly.
>
> So the question is how do we identify that an album is the current one?
> One option would simply be to comare the name of the albums, and if they
> match, compare all items (two albums might very well have the same name, or
> do we have a limitation I dont know there?)

My first reaction would be to investigate if this is really needed: what does 
the content of the if does?
If it is, the simplest way to implement this would be to add a "bool 
isCurrent()" method to the ImageAlbum class.

Aurélien


More information about the Kde-imaging mailing list