def disableAttribute(self, attr): """ Disable attribute to be displayed in the dialog. It disables the given attribute to be displayed in the dialog, and it is removed from the cached . """ config.setResourceAttrEnable(attr, False) config.setResourceAttrValues(attr, None) if attr in self.cache['attrs']: self.cache['attrs'].remove(attr)
def enableAttribute(self, attr, handler): """ Enable attribute to be displayed in the dialog. It enables the given attribute to be displayed in the dialog, and it is cached internally in order to be re-initialized when dialog is closed. """ config.setResourceAttrEnable(attr, True) config.setResourceAttrValues(attr, handler) if attr not in self.cache['attrs']: self.cache['attrs'].append(attr)