[Kde-pim] Python object that match or binding Settings object

Kevin Krammer kevin.krammer at gmx.at
Thu Aug 18 11:39:32 BST 2011


On Thursday, 2011-08-18, Mario Santagiuliana wrote:
> Excuse my continuous questions,
> from the akonadi resource tutorial and other resource code I see that they
> use Settings to retrieve and save the resource configuration:
> http://techbase.kde.org/Development/Tutorials/Akonadi/Resources#Resource_Co
> nfiguration
> 
> I search on the web and in the python module documentation of akonadi and
> other pykde modules:
> http://api.kde.org/pykde-4.5-api/akonadi/index.html
> 
> I didn't found which is the corresponding python object of Settings c++
> object. I can create a new python resource (hope in the right way). Akonadi
> call the configure method when I create this new resource or when I click
> on edit button. But I don't understand how can I retrieve configuration or
> save it like using "Settings" in a normal akonadi resource...

The Settings class is a generated wrapper around KDE's KConfig framework.
Look here http://techbase.kde.org/Development/Tutorials/Using_KConfig_XT for 
an introduction to the concepts.

It is just a convenient way to specifiy a resource's config, it is not 
required.
We also use it to generate D-Bus accessors for the config but that is not 
required either.

> Have you got any suggestions? Should I write my own python class to write
> and read xml data configuration?

You can do that or just use KConfig API for standard KDE key/value store.

Cheers,
Kevin
-- 
Kevin Krammer, KDE developer, xdg-utils developer
KDE user support, developer mentoring
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 190 bytes
Desc: This is a digitally signed message part.
URL: <http://mail.kde.org/pipermail/kde-pim/attachments/20110818/9fd0ac5b/attachment.sig>
-------------- next part --------------
_______________________________________________
KDE PIM mailing list kde-pim at kde.org
https://mail.kde.org/mailman/listinfo/kde-pim
KDE PIM home page at http://pim.kde.org/


More information about the kde-pim mailing list