QML and DBus in plasma

Rohan Garg rohan16garg at gmail.com
Tue Jul 19 10:24:43 CEST 2011


Hi Weng
I've been looking into a solution for this myself as well, and the best way
i could come up was using C++/Python and then using the setContextProperty
to set the property of any QML objects, the code would be something like
this [1][2].
I found these Qt docs [3] to be quite helpful in this case. But yes, i would
absolutely love it if there was a way to access DBus interfaces from within
QML.

[1] http://paste.kde.org/98635 ( main.py )
[2] http://paste.kde.org/98641 ( main.qml )
[3] http://doc.qt.nokia.com/4.7-snapshot/qml-extending.html
www.launchpad.net/~rohangarg


On Tue, Jul 19, 2011 at 1:46 PM, Weng Xuetian <wengxt at gmail.com> wrote:

> Hello Plasma world,
> I'm not quite familiar with plasmoid implementation, but I'd like to
> implement something in plasma with DBus.
> Actually I'm a input method developer, and I plan to rewrite/pick up
> kimpanel in kdeplasma-addons. Currently it seems that nobody maintains
> it anymore (I tried to communicate with the origin author but no reply
> serval month ago), and there is some known bug that really annoying
> and make it unusable...
>
> I'm not going to change the protocol (current DBus interface) that it
> communicates with input method (Since that would requires other IM
> changes code and current protocol is good to work). I have learned
> that plasma has add QML support (And yes I already tries to write a
> simple plasmoid with QML), but for QML, seems it lacks direct DBus
> support and need some C++ wrapper for it. So dataengine comes into my
> head, but I found that dataengine might not suitable for this, because
> kimpanel get updates only when IM notifies it via DBus, so it doesn't
> need a interval to check.
>
> So I'd like to know that is the dataengine has some way to "push" the
> changes to plasmoid? Or for such dbus application, is the QtDBus and
> C++ the only choice? (Sorry but I don't know anything of Python..).
>
> Regards,
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20110719/c4a4e4bb/attachment.htm 


More information about the Plasma-devel mailing list