Progress notification

Thomas Zander zander at kde.org
Sat Oct 21 17:58:09 CEST 2006


On Friday 20 October 2006 16:34, Boudewijn Rempt wrote:
> Currently, we use an event based progress architecture, with vestiges of
> the old publish/subscribe architecture. This architecture has a couple of
> big problems

Here is a first draft;

You create one ProgressUpdater for the progressBar thats already in your Gui 
and keep that instance around for as long as you want.

ProgressUpdater  *pu = new ProgressUpdater (widget);

For each action that has progress updating you do a;

pu->start(100);
Updater updater = pu->startSubtask();
where you can do things like:
updater.forward(10); // adds 10 percent to the progress of this subtask.

You can have multiple Updater instances around if you have different subtasks. 
So having a filter that does 3 things means you end up with 3 Updater 
instances which you can pass to your filter. The filter can manipulate the 
Updater from any thread.
When one Updater has reached 100% done, in this example the progressBar will 
show 33%.

I'll continue hacking on this for now. :)
-- 
Thomas Zander
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ProgressUpdater.h
Type: text/x-c++hdr
Size: 1349 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20061021/87cc70f6/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/kimageshop/attachments/20061021/87cc70f6/attachment.pgp 


More information about the kimageshop mailing list