eric7.EricGui.EricPixmapCache
Module implementing a pixmap cache for icons.
Global Attributes
Classes
Functions
EricPixmapCache
Class implementing a pixmap cache for icons.
Derived from
None
Class Attributes
SupportedExtensionsPixel |
SupportedExtensionsVector |
Class Methods
Methods
Static Methods
EricPixmapCache (Constructor)
EricPixmapCache()
Constructor
EricPixmapCache.addSearchPath
addSearchPath(path)
Public method to add a path to the search path.
- path (str)
-
path to add
EricPixmapCache.getPixmap
getPixmap(key, size=None)
Public method to retrieve a pixmap.
- key (str)
-
name of the wanted pixmap
- size (QSize (optional))
-
requested size (defaults to None)
- Return:
-
the requested pixmap
- Return Type:
-
QPixmap
EricPixmapCache.removeSearchPath
removeSearchPath(path)
Public method to remove a path from the search path.
- path (str)
-
path to remove
EricPixmapCache.setPreferVectorIcons
setPreferVectorIcons(vectorFirst=True)
Public method to set the preference of vector based icons.
- vectorFirst (bool (optional))
-
flag indicating the preference of vector icons
(defaults to True)
addSearchPath
addSearchPath(path, cache=pixCache)
Module function to add a path to the search path.
- path (str)
-
path to add
- cache (EricPixmapCache (optional))
-
reference to the pixmap cache object (defaults to pixCache)
getCombinedIcon
getCombinedIcon(keys, size=None, cache=pixCache)
Module function to retrieve a symbolic link icon.
- keys (list of str)
-
list of names of icons
- size (QSize (optional))
-
requested size of individual icons (defaults to None)
- cache (EricPixmapCache (optional))
-
reference to the pixmap cache object (defaults to pixCache)
- Return:
-
the requested icon
- Return Type:
-
QIcon
getIcon
getIcon(key, size=None, cache=pixCache)
Module function to retrieve an icon.
- key (str)
-
name of the wanted pixmap
- size (QSize (optional))
-
requested size (defaults to None)
- cache (EricPixmapCache (optional))
-
reference to the pixmap cache object (defaults to pixCache)
- Return:
-
the requested icon
- Return Type:
-
QIcon
getPixmap
getPixmap(key, size=None, cache=pixCache)
Module function to retrieve a pixmap.
- key (str)
-
name of the wanted pixmap
- size (QSize (optional))
-
requested size (defaults to None)
- cache (EricPixmapCache (optional))
-
reference to the pixmap cache object (defaults to pixCache)
- Return:
-
the requested pixmap
- Return Type:
-
QPixmap
getSymlinkIcon
getSymlinkIcon(key, size=None, cache=pixCache)
Module function to retrieve a symbolic link icon.
- key (str)
-
name of the wanted pixmap
- size (QSize (optional))
-
requested size (defaults to None)
- cache (EricPixmapCache (optional))
-
reference to the pixmap cache object (defaults to pixCache)
- Return:
-
the requested icon
- Return Type:
-
QIcon
removeSearchPath
removeSearchPath(path, cache=pixCache)
Public method to remove a path from the search path.
- path (str)
-
path to remove
- cache (EricPixmapCache (optional))
-
reference to the pixmap cache object (defaults to pixCache)
setPreferVectorIcons
setPreferVectorIcons(vectorFirst=True, cache=pixCache)
Function to set the preference of vector based icons.
- vectorFirst (bool (optional))
-
flag indicating the preference of vector icons
(defaults to True)
- cache (EricPixmapCache (optional))
-
reference to the pixmap cache object (defaults to pixCache)