Options System
From PsiWiki
[edit]
Current situation
There has been much talk on
- options provided for the interface
- adding new options - FAQ: I would like an option for... Can you add it?
- having hidden options in the config files
[edit]
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.

