(A)synchronous DataEngines?
Aaron J. Seigo
aseigo at kde.org
Sat Mar 8 02:06:41 CET 2008
On Friday 07 March 2008, Christopher Blauvelt wrote:
> Don't implement updateSource(QString).
you can do this, but then you'll never know when an update is actually wanted.
only skip implementating updateSource if none of the data is requested on
demand, otherwise you will break things such as, e.g., timed updates ("give
me this web page evern 10 minutes)
> Create a timer in your engine that directs the HTTP data to be updated.
if you ever need to create a timer in your engine, you're either doing
something wrong or DataEngine needs fixing.
perhaps what you are looking for is setUpdateInterval?
however, this is usually controlled by the visualization (e.g. an applet) that
is connecting to the data source by providing a number for how often it would
like to get updated.
for web data you probably want to pass a reasonable value to
setMinimumUpdateInterval so the engine doesn't get update requests too often.
> Once it returns the data, set the
> required information using setData. Once everything is updated call
> checkForUpdates().
calling checkForUpdates should never be needed unless you are setting the data
on the DataContainer* objects directly (you probably want to be using
DataEngine::setData)
--
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: 194 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20080307/c784b05d/attachment.pgp
More information about the Panel-devel
mailing list