[Panel-devel] Applet updating

Aaron J. Seigo aseigo at kde.org
Mon Sep 17 01:52:55 CEST 2007


On Sunday 16 September 2007, Percy Leonhardt wrote:
> On Sunday 16 September 2007, Petri Damsten wrote:
> > OK. Still feels a little confusing to me. DataEngines like TimeEngine
> > don't 'create' source just call setData and there doesn't seem to be
> > function to just create one if you don't have data (other than calling
> > setData with some empty values)
>
> Hi,
>
> I am using
>
>     Plasma::DataContainer* dc = new Plasma::DataContainer( this );
>     dc->setObjectName(name);
>     addSource( dc );
>
> in sourceRequested to create a new source.

just call setData(). the only time you ever should need to create the 
DataContainer yourself is if you have, for whatever reason, extended 
DataContainer with a subclass that has extra functionality specific to your 
needs.

-- 
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/20070916/5f42a4fc/attachment-0001.pgp 


More information about the Panel-devel mailing list