parameters: (self, iconset)
return_statement: return iset.icon
docstring: Return an icon described by the given iconset tag.
docstring_summary: Return an icon described by the given iconset tag.
docstring_tokens: Return an icon described by the given iconset tag .
function: def get_icon(self, iconset):
          """Return an icon described by the given iconset tag."""
  
          # Handle a themed icon.
          theme = iconset.attrib.get('theme')
          if theme is not None:
              return self._object_factory.createQObject("QIcon.fromTheme",
                      'icon', (self._object_factory.asString(theme), ),
                      is_attribute=False)
  
          # Handle an empty iconset property.
          if iconset.text is None:
              return None
  
          iset = _IconSet(iconset, self._base_dir)
  
          try:
              idx = self._cache.index(iset)
          except ValueError:
              idx = -1
  
          if idx >= 0:
              # Return the icon from the cache.
              iset = self._cache[idx]
          else:
              # Follow uic's naming convention.
              name = 'icon'
              idx = len(self._cache)
  
              if idx > 0:
                  name += str(idx)
  
              icon = self._object_factory.createQObject("QIcon", name, (),
                      is_attribute=False)
              iset.set_icon(icon, self._qtgui_module)
              self._cache.append(iset)
  
          return iset.icon
function_tokens: def get_icon ( self , iconset ) : # Handle a themed icon. theme = iconset . attrib . get ( 'theme' ) if theme is not None : return self . _object_factory . createQObject ( "QIcon.fromTheme" , 'icon' , ( self . _object_factory . asString ( theme ) , ) , is_attribute = False ) # Handle an empty iconset property. if iconset . text is None : return None iset = _IconSet ( iconset , self . _base_dir ) try : idx = self . _cache . index ( iset ) except ValueError : idx = - 1 if idx >= 0 : # Return the icon from the cache. iset = self . _cache [ idx ] else : # Follow uic's naming convention. name = 'icon' idx = len ( self . _cache ) if idx > 0 : name += str ( idx ) icon = self . _object_factory . createQObject ( "QIcon" , name , ( ) , is_attribute = False ) iset . set_icon ( icon , self . _qtgui_module ) self . _cache . append ( iset ) return iset . icon