<div dir="ltr">Hi Weng<div>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].</div>
<div>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.</div><div><br></div><div>[1] <a href="http://paste.kde.org/98635">http://paste.kde.org/98635</a> ( main.py ) </div>
<div>[2] <a href="http://paste.kde.org/98641">http://paste.kde.org/98641</a> ( main.qml )</div><div>[3] <a href="http://doc.qt.nokia.com/4.7-snapshot/qml-extending.html">http://doc.qt.nokia.com/4.7-snapshot/qml-extending.html</a><br>
<div><a href="http://www.launchpad.net/~rohangarg" target="_blank">www.launchpad.net/~rohangarg</a><br>
<br><br><div class="gmail_quote">On Tue, Jul 19, 2011 at 1:46 PM, Weng Xuetian <span dir="ltr"><<a href="mailto:wengxt@gmail.com">wengxt@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hello Plasma world,<br>
I'm not quite familiar with plasmoid implementation, but I'd like to<br>
implement something in plasma with DBus.<br>
Actually I'm a input method developer, and I plan to rewrite/pick up<br>
kimpanel in kdeplasma-addons. Currently it seems that nobody maintains<br>
it anymore (I tried to communicate with the origin author but no reply<br>
serval month ago), and there is some known bug that really annoying<br>
and make it unusable...<br>
<br>
I'm not going to change the protocol (current DBus interface) that it<br>
communicates with input method (Since that would requires other IM<br>
changes code and current protocol is good to work). I have learned<br>
that plasma has add QML support (And yes I already tries to write a<br>
simple plasmoid with QML), but for QML, seems it lacks direct DBus<br>
support and need some C++ wrapper for it. So dataengine comes into my<br>
head, but I found that dataengine might not suitable for this, because<br>
kimpanel get updates only when IM notifies it via DBus, so it doesn't<br>
need a interval to check.<br>
<br>
So I'd like to know that is the dataengine has some way to "push" the<br>
changes to plasmoid? Or for such dbus application, is the QtDBus and<br>
C++ the only choice? (Sorry but I don't know anything of Python..).<br>
<br>
Regards,<br>
_______________________________________________<br>
Plasma-devel mailing list<br>
<a href="mailto:Plasma-devel@kde.org">Plasma-devel@kde.org</a><br>
<a href="https://mail.kde.org/mailman/listinfo/plasma-devel" target="_blank">https://mail.kde.org/mailman/listinfo/plasma-devel</a><br>
</blockquote></div><br></div></div></div>