Home 

How to add the setting items

For auto-generation of setter/getter code of your options, you have to follow certain rules. For each setting item you need an entry in kmymoney2/kmymoney2.kcfg. This is an XML formatted file. The contents of the 'name' attribute will be used as method for the C++-code, eg. a name of "AutoSavePeriod" for an integer parameter results in a setter and getter named

void KMyMoneySettings::setAutoSavePeriod(int)
int KMyMoneySettings::autoSavePeriod(void)

You should not access those functions directly from within your code but rather use the KMyMoneyGlobalSettings class which contains the same interface as KMyMoneySettings with some additional functionality.

When you name the GUI widget that controls the setting for this parameter make sure to name it "kcfg_AutoSavePeriod", that is "kcfg_" prepended with the name used in kmymoney2/kmymoney2.kcfg.

That should be it.