'Returns dict of UI-readable options
To check, whether the option is readable self.isOptionReadable() is used'

def getOptions(self):

    res = {}
    for section_key in self.options.keys():
        section_orig = self.options[section_key]
        section_name = (section_orig.get('name') if ('name' in section_orig) else section_key)
        if self.isSectionReadable(section_name):
            section_copy = {}
            section_copy_groups = []
            for section_field in section_orig:
                if (section_field.lower() != 'groups'):
                    section_copy[section_field] = section_orig[section_field]
                else:
                    for group_orig in section_orig['groups']:
                        group_copy = {}
                        group_copy_options = []
                        for group_field in group_orig:
                            if (group_field.lower() != 'options'):
                                group_copy[group_field] = group_orig[group_field]
                            else:
                                for option in group_orig[group_field]:
                                    option_name = option.get('name')
                                    if self.isOptionReadable(section_name, option_name):
                                        group_copy_options.append(option)
                                        if (not self.isOptionWritable(section_name, option_name)):
                                            option['readonly'] = True
                        if (len(group_copy_options) > 0):
                            group_copy['options'] = group_copy_options
                            section_copy_groups.append(group_copy)
            if (len(section_copy_groups) > 0):
                section_copy['groups'] = section_copy_groups
                res[section_key] = section_copy
    return res
