Sat, 26 Apr 2025 12:34:32 +0200
MicroPython
- Added a configuration option to disable the support for the no longer produced Pimoroni Pico Wireless Pack.
<!DOCTYPE html> <html><head> <title>eric7.EricGui.EricPixmapCache</title> <meta charset="UTF-8"> <link rel="stylesheet" href="styles.css"> </head> <body> <a NAME="top" ID="top"></a> <h1>eric7.EricGui.EricPixmapCache</h1> <p> Module implementing a pixmap cache for icons. </p> <h3>Global Attributes</h3> <table> <tr><td>pixCache</td></tr> </table> <h3>Classes</h3> <table> <tr> <td><a href="#EricPixmapCache">EricPixmapCache</a></td> <td>Class implementing a pixmap cache for icons.</td> </tr> </table> <h3>Functions</h3> <table> <tr> <td><a href="#addSearchPath">addSearchPath</a></td> <td>Module function to add a path to the search path.</td> </tr> <tr> <td><a href="#getCombinedIcon">getCombinedIcon</a></td> <td>Module function to retrieve a symbolic link icon.</td> </tr> <tr> <td><a href="#getIcon">getIcon</a></td> <td>Module function to retrieve an icon.</td> </tr> <tr> <td><a href="#getPixmap">getPixmap</a></td> <td>Module function to retrieve a pixmap.</td> </tr> <tr> <td><a href="#getSymlinkIcon">getSymlinkIcon</a></td> <td>Module function to retrieve a symbolic link icon.</td> </tr> <tr> <td><a href="#removeSearchPath">removeSearchPath</a></td> <td>Public method to remove a path from the search path.</td> </tr> <tr> <td><a href="#setPreferVectorIcons">setPreferVectorIcons</a></td> <td>Function to set the preference of vector based icons.</td> </tr> </table> <hr /> <hr /> <a NAME="EricPixmapCache" ID="EricPixmapCache"></a> <h2>EricPixmapCache</h2> <p> Class implementing a pixmap cache for icons. </p> <h3>Derived from</h3> None <h3>Class Attributes</h3> <table> <tr><td>SupportedExtensionsPixel</td></tr> <tr><td>SupportedExtensionsVector</td></tr> </table> <h3>Class Methods</h3> <table> <tr><td>None</td></tr> </table> <h3>Methods</h3> <table> <tr> <td><a href="#EricPixmapCache.__init__">EricPixmapCache</a></td> <td>Constructor</td> </tr> <tr> <td><a href="#EricPixmapCache.addSearchPath">addSearchPath</a></td> <td>Public method to add a path to the search path.</td> </tr> <tr> <td><a href="#EricPixmapCache.getPixmap">getPixmap</a></td> <td>Public method to retrieve a pixmap.</td> </tr> <tr> <td><a href="#EricPixmapCache.removeSearchPath">removeSearchPath</a></td> <td>Public method to remove a path from the search path.</td> </tr> <tr> <td><a href="#EricPixmapCache.setPreferVectorIcons">setPreferVectorIcons</a></td> <td>Public method to set the preference of vector based icons.</td> </tr> </table> <h3>Static Methods</h3> <table> <tr><td>None</td></tr> </table> <a NAME="EricPixmapCache.__init__" ID="EricPixmapCache.__init__"></a> <h4>EricPixmapCache (Constructor)</h4> <b>EricPixmapCache</b>(<i></i>) <p> Constructor </p> <a NAME="EricPixmapCache.addSearchPath" ID="EricPixmapCache.addSearchPath"></a> <h4>EricPixmapCache.addSearchPath</h4> <b>addSearchPath</b>(<i>path</i>) <p> Public method to add a path to the search path. </p> <dl> <dt><i>path</i> (str)</dt> <dd> path to add </dd> </dl> <a NAME="EricPixmapCache.getPixmap" ID="EricPixmapCache.getPixmap"></a> <h4>EricPixmapCache.getPixmap</h4> <b>getPixmap</b>(<i>key, size=None</i>) <p> Public method to retrieve a pixmap. </p> <dl> <dt><i>key</i> (str)</dt> <dd> name of the wanted pixmap </dd> <dt><i>size</i> (QSize (optional))</dt> <dd> requested size (defaults to None) </dd> </dl> <dl> <dt>Return:</dt> <dd> the requested pixmap </dd> </dl> <dl> <dt>Return Type:</dt> <dd> QPixmap </dd> </dl> <a NAME="EricPixmapCache.removeSearchPath" ID="EricPixmapCache.removeSearchPath"></a> <h4>EricPixmapCache.removeSearchPath</h4> <b>removeSearchPath</b>(<i>path</i>) <p> Public method to remove a path from the search path. </p> <dl> <dt><i>path</i> (str)</dt> <dd> path to remove </dd> </dl> <a NAME="EricPixmapCache.setPreferVectorIcons" ID="EricPixmapCache.setPreferVectorIcons"></a> <h4>EricPixmapCache.setPreferVectorIcons</h4> <b>setPreferVectorIcons</b>(<i>vectorFirst=True</i>) <p> Public method to set the preference of vector based icons. </p> <dl> <dt><i>vectorFirst</i> (bool (optional))</dt> <dd> flag indicating the preference of vector icons (defaults to True) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="addSearchPath" ID="addSearchPath"></a> <h2>addSearchPath</h2> <b>addSearchPath</b>(<i>path, cache=pixCache</i>) <p> Module function to add a path to the search path. </p> <dl> <dt><i>path</i> (str)</dt> <dd> path to add </dd> <dt><i>cache</i> (EricPixmapCache (optional))</dt> <dd> reference to the pixmap cache object (defaults to pixCache) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="getCombinedIcon" ID="getCombinedIcon"></a> <h2>getCombinedIcon</h2> <b>getCombinedIcon</b>(<i>keys, size=None, cache=pixCache</i>) <p> Module function to retrieve a symbolic link icon. </p> <dl> <dt><i>keys</i> (list of str)</dt> <dd> list of names of icons </dd> <dt><i>size</i> (QSize (optional))</dt> <dd> requested size of individual icons (defaults to None) </dd> <dt><i>cache</i> (EricPixmapCache (optional))</dt> <dd> reference to the pixmap cache object (defaults to pixCache) </dd> </dl> <dl> <dt>Return:</dt> <dd> the requested icon </dd> </dl> <dl> <dt>Return Type:</dt> <dd> QIcon </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="getIcon" ID="getIcon"></a> <h2>getIcon</h2> <b>getIcon</b>(<i>key, size=None, cache=pixCache</i>) <p> Module function to retrieve an icon. </p> <dl> <dt><i>key</i> (str)</dt> <dd> name of the wanted pixmap </dd> <dt><i>size</i> (QSize (optional))</dt> <dd> requested size (defaults to None) </dd> <dt><i>cache</i> (EricPixmapCache (optional))</dt> <dd> reference to the pixmap cache object (defaults to pixCache) </dd> </dl> <dl> <dt>Return:</dt> <dd> the requested icon </dd> </dl> <dl> <dt>Return Type:</dt> <dd> QIcon </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="getPixmap" ID="getPixmap"></a> <h2>getPixmap</h2> <b>getPixmap</b>(<i>key, size=None, cache=pixCache</i>) <p> Module function to retrieve a pixmap. </p> <dl> <dt><i>key</i> (str)</dt> <dd> name of the wanted pixmap </dd> <dt><i>size</i> (QSize (optional))</dt> <dd> requested size (defaults to None) </dd> <dt><i>cache</i> (EricPixmapCache (optional))</dt> <dd> reference to the pixmap cache object (defaults to pixCache) </dd> </dl> <dl> <dt>Return:</dt> <dd> the requested pixmap </dd> </dl> <dl> <dt>Return Type:</dt> <dd> QPixmap </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="getSymlinkIcon" ID="getSymlinkIcon"></a> <h2>getSymlinkIcon</h2> <b>getSymlinkIcon</b>(<i>key, size=None, cache=pixCache</i>) <p> Module function to retrieve a symbolic link icon. </p> <dl> <dt><i>key</i> (str)</dt> <dd> name of the wanted pixmap </dd> <dt><i>size</i> (QSize (optional))</dt> <dd> requested size (defaults to None) </dd> <dt><i>cache</i> (EricPixmapCache (optional))</dt> <dd> reference to the pixmap cache object (defaults to pixCache) </dd> </dl> <dl> <dt>Return:</dt> <dd> the requested icon </dd> </dl> <dl> <dt>Return Type:</dt> <dd> QIcon </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="removeSearchPath" ID="removeSearchPath"></a> <h2>removeSearchPath</h2> <b>removeSearchPath</b>(<i>path, cache=pixCache</i>) <p> Public method to remove a path from the search path. </p> <dl> <dt><i>path</i> (str)</dt> <dd> path to remove </dd> <dt><i>cache</i> (EricPixmapCache (optional))</dt> <dd> reference to the pixmap cache object (defaults to pixCache) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> <hr /> <a NAME="setPreferVectorIcons" ID="setPreferVectorIcons"></a> <h2>setPreferVectorIcons</h2> <b>setPreferVectorIcons</b>(<i>vectorFirst=True, cache=pixCache</i>) <p> Function to set the preference of vector based icons. </p> <dl> <dt><i>vectorFirst</i> (bool (optional))</dt> <dd> flag indicating the preference of vector icons (defaults to True) </dd> <dt><i>cache</i> (EricPixmapCache (optional))</dt> <dd> reference to the pixmap cache object (defaults to pixCache) </dd> </dl> <div align="right"><a href="#top">Up</a></div> <hr /> </body></html>