[Panel-devel] applets and multiple dataengines
Rüdiger Hacke
rudwardt at gmx.de
Sun Sep 23 01:19:09 CEST 2007
Hi all,
I'm trying to write a little system monitor applet that should be able to
display various information using more than one DataEngine.
Now with the current API the visualization gets its data via
updated(QString sourceName, Plasma::DataEngine::Data data)
If I am not mistaken, with just that I have no easy means to tell which engine
sent the data. If two engines happen to have sources with the same name,
things would get complicated.
(say, one engine providing data about drive-throughput has a source
named "hda" and an other one providing data about free/used space on disks
also has a source named "hda")
I could check the keys to try to make a distinction. Or I could use some kind
of proxy objects, one for each engine to connect its sources to.
But perhaps it is possible to add a third parameter to the above mentioned
signal which indicates the DataEngine this is coming from. Either name or
pointer. (I'd opt for pointer because getting the engine's name from the
pointer is easy, the other way round is a little less efficient)
If I correctly understood the signals & slots mechanism, excess parameters of
signals connected to a slot with a smaller signature are just ignored. So
making such an addition shouldn't break existing stuff, right?
kind regards,
Rudi
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part.
Url : http://mail.kde.org/pipermail/panel-devel/attachments/20070923/716664b1/attachment-0001.pgp
More information about the Panel-devel
mailing list