QML and DBus in plasma

Weng Xuetian wengxt at gmail.com
Tue Jul 19 11:24:24 CEST 2011


On Tue, Jul 19, 2011 at 5:11 PM, Aaron J. Seigo <aseigo at kde.org> wrote:
> On Tuesday, July 19, 2011 16:16:21 Weng Xuetian wrote:
>> So I'd like to know that is the dataengine has some way to "push" the
>> changes to plasmoid?
>
> Yes; if something is connected to a source without an update interval, and the
> DataEngine changes the data for that source, then the visualization is
> notified of this. In other words, with no update interval defined, the
> DataEngine operates essentially in push mode.
>
>> Or for such dbus application, is the QtDBus and
>> C++ the only choice? (Sorry but I don't know anything of Python..).
>
> That's one possibility. Another is a DataEngine. The nice thing about using a
> DataEngine is that you get a very clean, re-usable split between data and
> visualization. This means that in future if someone once again wishes to redo
> the UI or do a different UI, the logic code does not need to change.
>
> Also keep in mind that a DataEngine may provide services and that you can also
> load Services directly with a DataEngine if needed. Services allow both read
> and write access, so if your Plasmoid needs to interact with the DBus service
> (e.g. make DBus calls itself), then this may be a good way to go about it.
Thank you very much! Seems that DataEngine is exactly what I need.
Then I have another question, is dataengine load only once and being
shared in the Plasma? Or this is only an option?


More information about the Plasma-devel mailing list