[Kde-bindings] How to use KServices with PyKDE4

François K. daitheflu at free.fr
Fri Jan 7 13:26:57 UTC 2011


Hi,

I've already posted this message on the kde-devel list without result, so, I'm trying this one :)
I apologize for the noise for those who are subscribed to both list. Well here is the thing :

I'm writing an application with PyQt4/PyKDE4 which I want to be plugin-based. For example, I plan to have a "pictures module" which can get its data from different sources such as my local files, flickr, picasa or even digiKam.
For now, I wanted to stuck to PyQt4 but I changed my mind and I would like it to be well integrated with KDE. As a result, I'm now deeply immersed into KDE's API and found out about KServices, which seems to be exactly what I need. Each module of the application (like the "pictures module") could be a plugin, and each source of data (local files, flickr, digiKam...) could be one too.
My problem is that the doc seems to miss some aspects of it, and provides help for C++ dev. I tried to study some C++ code but things are still a bit fuzzy, especially because I guess things won't work the same way with PyKDE4 (there is no CMakeLists.txt, or Macro for example). I've also looked at the printer config dialog which is written with PyKDE4 but it works as KCModule, and things are also different.

My problem is that I don't have precise questions, I'd just like to study some working example to understand everything before I dive into my code.

Does anyone already dealt with KServices and PyKDE4 ? Do you know where I can find some examples, or further help ?

Thanks a lot again,

-- 
François

PS: oh, happy new year, of course :)



More information about the Kde-bindings mailing list