def icon(self, iconName): """ Retrieves an icon from the theme Arguments: iconName -- the name of the icon Returns: A QIcon """ if iconName in self.mapping: icon = self.mapping[iconName] else: icon = "edit-undo" if not QIcon.hasThemeIcon(icon): print "libqnotero._themes.icon(): failed to find '%s'" % icon return QIcon.fromTheme("icon", Default.icon(self, iconName))