devctrl.resources.icon.ThemedIconEngine#

class ThemedIconEngine(icon_name: str)[source]#

Bases: QIconEngine

Methods

class IconEngineHook(*values)#

Bases: Enum

IsNullHook = 3#
ScaledPixmapHook = 4#
classmethod __contains__(value)#

Return True if value is in cls.

value is in cls if: 1) value is a member of cls, or 2) value is the value of one of the cls’s members. 3) value is a pseudo-member (flags)

classmethod __getitem__(name)#

Return the member matching name.

classmethod __iter__()#

Return members in definition order.

classmethod __len__()#

Return the number of members (no aliases)

__members__ = mappingproxy({'IsNullHook': <IconEngineHook.IsNullHook: 3>, 'ScaledPixmapHook': <IconEngineHook.ScaledPixmapHook: 4>})#
__module__ = 'PyQt6.QtGui'#
__name__ = 'IconEngineHook'#
__qualname__ = 'QIconEngine.IconEngineHook'#
__sip__ = <capsule object NULL>#
classmethod _missing_(object, /)#
class ScaledPixmapArgument#
class ScaledPixmapArgument(a0: QIconEngine.ScaledPixmapArgument)

Bases: simplewrapper

__dict__ = mappingproxy({'__module__': 'PyQt6.QtGui', '__weakref__': <attribute '__weakref__' of 'ScaledPixmapArgument' objects>, '__doc__': 'QIconEngine.ScaledPixmapArgument()\nQIconEngine.ScaledPixmapArgument(a0: QIconEngine.ScaledPixmapArgument)', 'mode': <sip.variabledescriptor object>, 'pixmap': <sip.variabledescriptor object>, 'scale': <sip.variabledescriptor object>, 'size': <sip.variabledescriptor object>, 'state': <sip.variabledescriptor object>, '__annotations__': {}})#
__init__(*args, **kwargs)#
__module__ = 'PyQt6.QtGui'#
classmethod __new__(*args, **kwargs)#
__weakref__#

list of weak references to the object

mode#
pixmap#
scale#
size#
state#
__annotations__ = {}#
__dict__ = mappingproxy({'__module__': 'devctrl.resources.icon', '__firstlineno__': 120, '__doc__': 'Subclass of QIconEngine that implements automatic dark-light mode switching.\n\n:param icon_name: The icon name, without extension or path.\n', '__init__': <function ThemedIconEngine.__init__>, '_get_icon': <function ThemedIconEngine._get_icon>, 'paint': <function ThemedIconEngine.paint>, 'pixmap': <function ThemedIconEngine.pixmap>, 'actualSize': <function ThemedIconEngine.actualSize>, 'availableSizes': <function ThemedIconEngine.availableSizes>, 'isNull': <function ThemedIconEngine.isNull>, 'clone': <function ThemedIconEngine.clone>, '__static_attributes__': ('_icons', 'icon_name'), '__annotations__': {'_icons': 'dict[bool, QIcon]'}})#
__firstlineno__ = 120#
__init__(icon_name: str)[source]#
__module__ = 'devctrl.resources.icon'#
classmethod __new__(*args, **kwargs)#
__static_attributes__ = ('_icons', 'icon_name')#
__weakref__#

list of weak references to the object

_get_icon() QIcon[source]#
actualSize(self, size: QSize, mode: QIcon.Mode, state: QIcon.State) QSize[source]#
classmethod addFile(self, fileName: str | None, size: QSize, mode: QIcon.Mode, state: QIcon.State)#
classmethod addPixmap(self, pixmap: QPixmap, mode: QIcon.Mode, state: QIcon.State)#
availableSizes(self, mode: QIcon.Mode = QIcon.Normal, state: QIcon.State = QIcon.Off) list[QSize][source]#
clone(self) QIconEngine | None[source]#
classmethod iconName(self) str#
isNull(self) bool[source]#
classmethod key(self) str#
paint(self, painter: QPainter | None, rect: QRect, mode: QIcon.Mode, state: QIcon.State)[source]#
pixmap(self, size: QSize, mode: QIcon.Mode, state: QIcon.State) QPixmap[source]#
classmethod read(self, in_: QDataStream) bool#
classmethod scaledPixmap(self, size: QSize, mode: QIcon.Mode, state: QIcon.State, scale: float) QPixmap#
classmethod write(self, out: QDataStream) bool#