[Kde-imaging] How to identify an album

Jesper K. Pedersen blackie at kde.org
Sun Apr 25 11:16:56 CEST 2004


On Sunday 25 April 2004 11:12, Aurelien Gateau wrote:
| 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?
It checks the checkbox for the album in question, so when you choose to write 
to cd, then you current album is already checked

| If it is, the simplest way to implement this would be to add a "bool
| isCurrent()" method to the ImageAlbum class.
This would be the ImageCollection call needing this - ImageCollections are 
used for say currentView and currentSelection too, so adding an isCurrent 
there sounds suboptimal to me


More information about the Kde-imaging mailing list