DataEngine and regular polling.
Thomas Fjellstrom
tfjellstrom at shaw.ca
Tue Jul 13 13:16:42 CEST 2010
I'm seeing a couple behaviors I didn't really expect.
1. if I let the Applet set an update frequency in connectSource, many
setData's in the data engine just aren't passed on to the Applet. Thats
probably intended, but it is somewhat annoying.
2. DataEngine::setPollingInterval seems to poll only once.
My "Network Info" data engine updates bits of its source's data
asynchronously, things like DNS lookups, and calls to ping (for about 5
seconds each), and it's kind of annoying that the widget won't see the data
till the next poll, if it does end up polling.
I suppose I could go back to setting up a timer in the data engine itself to
update all host's, but that felt dirty. I'd rather use features built into
plasma itself to manage it all. It'd probably be best to use the update
interval argument to DataEngine::connectSource in the applet, so the widget
itself could set the update frequency, but as it stands, it seems plasma
will merge "dataUpdated" signals, or ignore setData calls till the next
periodic update, which is kind of too late since the periodic update is just
going to fire off another async update of one or more of the properties.
Essentially the data will be behind quite a bit (Depending on the update
rate selected).
Oh, and in case anyone is still interested, two new screen shots of my
plasmoid:
http://strangesoft.net/plasma-networkinfo/prototype11.png
http://strangesoft.net/plasma-networkinfo/prototype12.png
My list widget shows up status with an icon, and can collapse groups now :D
--
Thomas Fjellstrom
tfjellstrom at shaw.ca
More information about the Plasma-devel
mailing list