Adds logic and GUI to handle preferences without adding a separate widget to
prefsdialog. Changes within the application because of a preferences change still
needs to be handled separately in other parts of the code.
When adding a preferences there is the option whether to have the preference in
the advanced list or not. If not a separate widget must be added to prefsdialog.
Note: Enums are currently not supported (as there are no enums in the advanced
list as of now, but can be easily added.