Detecting plasmoid in use

Shaun Reich predator106 at gmail.com
Tue Jul 5 00:52:47 CEST 2011


On Mon, Jul 4, 2011 at 2:07 PM, Martin Klapetek
<martin.klapetek at gmail.com> wrote:
>The plasmoid is pure QML, therefore we can't do any dbus
> magic directly with it (or can we?).

Well, remember, JS == QML, basically. So I don't see why not...

> So I'd like to know - is there any way that we can detect if the plasmoid is
> in use from any KApp and not depend on Plasma libs?

A dbus interface sounds the most reasonable, here -- in that case.

>And related question is the dataengine in use only when the plasmoid is active?

In general I'd say yes, although it depends on what you are referring
to when you say "active". DataEngines do not exist until they are
called upon. When they are no longer being used (e.g. applet dies)
they will die as well.

>If so, is it "safe" (in terms that we can rely on it 100%) to export some activity
> indicator from the dataengine on dbus?

That would be fine. Other dataengines create dbus interfaces as well,
so you are not alone in your need.

-- 
Shaun Reich,
KDE Software Developer (kde.org)


More information about the Plasma-devel mailing list