[Digikam-devel] Signal, when item count of album changed

Marcel Wiesweg marcel.wiesweg at gmx.de
Thu Oct 26 21:53:41 BST 2006


> > It seems to me these are the signals to be watched, but that's only from
> > looking at the code, so you will have to try and test.
>
> I have implemented a new signal, which collects all affected albums during
> a KIO job and which is emitted when the job is finished.
>
> New items are recognized and the count of items is updated but this effect
> is not reached when deleting images.

Take a look at AlbumManager::refresh.
It's called from dio.cpp, Watch::slotDone, which is called after DIO::scan, 
which is called from AlbumManager::slotDirty, which is called from the 
KDirWatch.

>
> I send my current patch (it is not yet complete) but I have no clue and
> cannot continue. Perhaps somebody can have a look at the code and give me a
> hint where the problem is.
>
> Is there an other way to get the item count of an album?

SELECT count(*) FROM Images  WHERE dirid=%1
(see albumdb.cpp for many other SQL statements)
It'd need to be passed through AlbumManager.

Marcel



More information about the Digikam-devel mailing list