def __init__ (self, groupName=None): # HINT: please redefine in inheriting classes self.configValues= () if groupName is not None: self.config= KSharedConfig.openConfig ('satyrrc').group (groupName) else: self.config= None
def config(self) : if self.sharedconfig == None : rcpath = KStandardDirs.locateLocal("config", "fb-plasmoidrc") self.sharedconfig = KSharedConfig.openConfig(rcpath) self.initSettings() self.writeSettings() return KConfigGroup(self.sharedconfig, "main")
def init_config(): global config config = KSharedConfig.openConfig("pynalrc") add_default_values(config)