Is there a PreviewJob version where i can add more items?

Mark markg85 at gmail.com
Thu Jan 24 21:48:00 GMT 2013


Hi,

In my project is need to create thumbnails of files and am using
PreviewJob for that right now. It works fine, no issue there, but i
have a slightly different workflow that doesn't seem to fit the
PreviewJob class.

My flow "should" go as follows:

- A batch of files arrives
- - for each item a check is done to see if a thumbnail exists for it,
if not then the item should be added to a Queue (QQueue perhaps?)
- - PreviewJob gets notified of items in the queue and start processing them

That is how i would like to have it because then i can just add items
to the queue as a want and the PreviewJob class just progresses all
items. Not really a strange request, right?

So the question is, how can i use the current PreviewJob class for
this? It doesn't seem to be capable of doing that. There also doesn't
seem to be a function to add additional items other then through the
constructor.

What i'm doing right now is creating a PreviewJob instance for every
batch that arrives. It works, but "feels" as if it needs to be changed
to a proper queue. Please do correct me if i'm wrong.

It really seems like i'm taking on all kdelibs part that have anything
to do with file listing and progressing.. It's fun though :)

Kind regards,
Mark




More information about the kde-core-devel mailing list