[Panel-devel] Data engine questions

Aaron J. Seigo aseigo at kde.org
Mon Nov 26 10:38:57 CET 2007


On Saturday 24 November 2007, Ryan Bitanga wrote:
> the data engine isn't as simple as I had hoped. Data engines are more
> suitable for receiving signals from objects that aren't connected to
> it, e.g. filesystem and network information, or accepting input with
> an associated output.

not really.

> However, there seems to be no lightweight 
> message passing, e.g. sending a string to the data engine without

that is correct. the DataEngine class is currently designed for read-only. you 
are the second person to ask for read-write, so it's probably something we 
need to look at for 4.1

given the interesting things you were trying, it really does show that some 
thought needs to go into this to prevent people from doing truly outlandish 
things that break plasma concepts.

> needing an associated data object. The query method returns an unused
> empty Data object and seems quite wasteful.

that's also completely abusing the point of the query method.

> Even a signal and slot 
> implementation would require me to include the header file of the data
> engine,

no it doesn't. signals and slots are just const char*'s; there is no 
compile-time validation of them, it's all runtime. so just use the 
DataEngine* you get from dataEngine() in the applet (or however you are 
getting it) and connect away.

> A data engine would allow the information to be shared with a quick
> launch plasmoid, which would need to notify the data engine of
> additional launches itself, but a non-data engine would give allow me
> to use a more suitable API.

if by "suitable" one means "we're going back to making purpose-specific APIs 
that are then completely un-interoperable with anything else on the desktop" 
then .. sure. ;)

-- 
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/20071126/a514fa21/attachment.pgp 


More information about the Panel-devel mailing list