hyperspyui.smartcolorsvgiconengine module
Created on Wed Jul 29 18:09:56 2015
@author: vidarton
- class hyperspyui.smartcolorsvgiconengine.SmartColorSVGIconEngine(use_qt_disabled=False, other=None)
Bases:
QIconEngine
This class is basically a port to Python from the code for Qt’s QSvgIconEnginePlugin. On top of this has been added the ability to exchange colors in the icons. It’s also possible in the future to do more advanced XML pro-processing. Note: Some of the more esoteric uses of QIcon might not be fully tested for yet.
- _loadDataForModeAndState(renderer, mode, state)
Load SVG data to renderer.
- _make_cache_key(size, mode, state)
Make a unique, reproducable key to store/lookup icons in the pixmap cache.
- _replace_in_stream(filename, color_key='default')
Opens supplied SVG file, parses the file replacing colors according to the dictionary color_replacements. Returns a QByteArray of the processed content.
- _set_replacements_from_palette()
Sets _automatic_color_replacements attribute from application palette. Updates _palette_key to the cacheKey of the used palette.
- actualSize(self, size: QSize, mode: QIcon.Mode, state: QIcon.State) QSize
- addPixmap(self, pixmap: QPixmap, mode: QIcon.Mode, state: QIcon.State)
- pixmap(self, size: QSize, mode: QIcon.Mode, state: QIcon.State) QPixmap
- serial_gen = 0