Options System

From PsiWiki

Current situation

There has been much talk on


Implementation

Kev is producing a new options system as part of his Summer of Code work towards the plugin interface, all options can be accessed through the static class Options.

 Options::setValue("appearance.emoticons.enableEmoticons",QVariant(true));
 QString val = Options::getValue("appearance.iconsets.roster").toString();

Each node can also have a comment associated with it in the same manner. This allows us to create self-documenting config files, and to build a descriptive options tree

 Options::setComment("appearance.emoticons.enableEmoticons","Render emoticons");

The structure will be written to, and read from, an xml config file into memory. Accessing each node is pretty fast.

Once the system works well for plugins, we'll think about moving the old options system across. This won't affect the GUI until we create a nice tree structure for the advanced options editor and is not going to replace the current options dialog.