def get_pixmap(icon_name):
 global plugin_icon_resources, plugin_name
 if (not icon_name.startswith(u'images/')):
  pixmap = QPixmap()
  pixmap.load(I(icon_name))
  return pixmap
 if plugin_name:
  local_images_dir = get_local_images_dir(plugin_name)
  local_image_path = os.path.join(local_images_dir, icon_name.replace(u'images/', u''))
  if os.path.exists(local_image_path):
   pixmap = QPixmap()
   pixmap.load(local_image_path)
   return pixmap
 if (icon_name in plugin_icon_resources):
  pixmap = QPixmap()
  pixmap.loadFromData(plugin_icon_resources[icon_name])
  return pixmap
 return None

def get_pixmap ( icon_name ) : global plugin_icon_resources , plugin_name if ( not icon_name . startswith ( u'images/' ) ) : pixmap = QPixmap ( ) pixmap . load ( I ( icon_name ) ) return pixmap if plugin_name : local_images_dir = get_local_images_dir ( plugin_name ) local_image_path = os . path . join ( local_images_dir , icon_name . replace ( u'images/' , u'' ) ) if os . path . exists ( local_image_path ) : pixmap = QPixmap ( ) pixmap . load ( local_image_path ) return pixmap if ( icon_name in plugin_icon_resources ) : pixmap = QPixmap ( ) pixmap . loadFromData ( plugin_icon_resources [ icon_name ] ) return pixmap return None
retrieve a qpixmap for the named image any icons belonging to the plugin must be prefixed with images/ .