[Panel-devel] applets and multiple dataengines

Aaron J. Seigo aseigo at kde.org
Tue Sep 25 00:04:53 CEST 2007


On Saturday 22 September 2007, Rüdiger Hacke wrote:
> I'm trying to write a little system monitor applet that should be able to
> display various information using more than one DataEngine.

could you provide a bit more detail on this, so i can understand the use case 
better?

> 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.

*sigh* well, unfortunately i had anticipated people to write things such that 
they would create visualizations and connect *a* source to *a* visualization; 
the multiple source per vis was really a corner case for multimeters and what 
not... 

> 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)

the pointer approach would break various purposeful design decisions that are 
meant to make things more data centric and easier for script writers.

> 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?

well .. yes, but "source, data, engine" seems pretty odd. i'd probably opt for 
the harder to port, but more correct imho, approach of "data, source, 
engine". still, i'd like to know the use case better first =)

-- 
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/20070924/3a9a34c6/attachment.pgp 


More information about the Panel-devel mailing list