[Panel-devel] engines, applets and timing

Aaron J. Seigo aseigo at kde.org
Wed Sep 12 20:10:23 CEST 2007


hey all

so things seem to be working with the new multiple-timing thing in engines. if 
your applet doesn't care so much about when it gets updates or your engine 
doesn't care about having to deal with such things either, then this is not 
interesting to you ;)

to everyone else:

we now the ability to connect visualizations to datasources based on a timing, 
e.g. "every 60ms" or whatever. the times are normalized and everything is 
handled behind the scenes.

the big change in engines is that instead of doing their own timers, they 
should be using setUpdateInterval(uint).

additionally, engines should implement updateSource(const QString& source) if 
they have sources which need to be updated every so often (versus sources 
which respond to external events and so have no need to poll). the purpose of 
that method is probably fairly self-explanatory, and it allows the 
multiple-timing magic to happen with proper values.

setMinimumUpdateFrequency is also interesting as it allows engines to set 
lower limits on updates.

visualizations can also ask for updates to be aligned to the minute or hour 
(we can add other alignments as desired), which is obviously pretty important 
for things like clocks ;)

there are probably some gotchas here and there left in the code; hopefully we 
can shake them out as we go. but right now things seem to work; e.g. clocks 
now behave as expected, sharing the time engine like nice little boys and 
girls.

is there anyone interested in going through the existing engines and making 
the necessary changes? those would be: getting rid of engine-global update 
timers and implementing updateSource(const QString&) where appropriate.

-- 
Aaron J. Seigo
humru othro a kohnu se
GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA  EE75 D6B7 2EB1 A7F1 DB43

KDE core developer sponsored by Trolltech
-------------- 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/panel-devel/attachments/20070912/16310bb2/attachment-0001.pgp 


More information about the Panel-devel mailing list