Skip to content

PythonQt.QtGui.QIconEngine · declarations 001

Back to PythonQt.QtGui.QIconEngine

AvailableSizesHook instance-attribute

AvailableSizesHook: Any

IconEngineHook instance-attribute

IconEngineHook: type

int([x]) -> integer int(x, base=10) -> integer

Convert a number or string to an integer, or return 0 if no arguments are given. If x is a number, return x.int(). For floating point numbers, this truncates towards zero.

If x is not a number or if base is given, then x must be a string, bytes, or bytearray instance representing an integer literal in the given base. The literal can be preceded by '+' or '-' and be surrounded by whitespace. The base defaults to 10. Valid bases are 0 and 2-36. Base 0 means to interpret the base from the string as an integer literal.

int('0b100', base=0) 4

IconNameHook instance-attribute

IconNameHook: Any

actualSize

actualSize(size: Any, mode: Any, state: Any) -> Any

X.actualSize(size, mode, state) -> PythonQt.QtCore.QSize

Supplemental documentation: Qt 5 reference:

[virtual] QSize QIconEngine::actualSize(const QSize \&size, QIcon::Mode mode, QIcon::State state)

Returns the actual size of the icon the engine provides for the requested size, mode and state. The default implementation returns the given size.

Upstream PySide2 reference signatures (binding differences may apply):

actualSize(self, size: PySide2.QtCore.QSize, mode: PySide2.QtGui.QIcon.Mode, state: PySide2.QtGui.QIcon.State) -> PySide2.QtCore.QSize

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#actualSize

addFile

addFile(fileName: str, size: Any, mode: Any, state: Any) -> None

X.addFile(fileName, size, mode, state)

Supplemental documentation: Qt 5 reference:

[virtual] void QIconEngine::addFile(const QString \&fileName, const QSize \&size, QIcon::Mode mode, QIcon::State state)

Called by QIcon::addFile(). Adds a specialized pixmap from the file with the given fileName, size, mode and state. The default pixmap-based engine stores any supplied file names, and it loads the pixmaps on demand instead of using scaled pixmaps if the size of a pixmap matches the size of icon requested. Custom icon engines that implement scalable vector formats are free to ignores any extra files.

Upstream PySide2 reference signatures (binding differences may apply):

addFile(self, fileName: str, size: PySide2.QtCore.QSize, mode: PySide2.QtGui.QIcon.Mode, state: PySide2.QtGui.QIcon.State) -> None

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#addFile

addPixmap

addPixmap(pixmap: Any, mode: Any, state: Any) -> None

X.addPixmap(pixmap, mode, state)

Supplemental documentation: Qt 5 reference:

[virtual] void QIconEngine::addPixmap(const QPixmap \&pixmap, QIcon::Mode mode, QIcon::State state)

Called by QIcon::addPixmap(). Adds a specialized pixmap for the given mode and state. The default pixmap-based engine stores any supplied pixmaps, and it uses them instead of scaled pixmaps if the size of a pixmap matches the size of icon requested. Custom icon engines that implement scalable vector formats are free to ignores any extra pixmaps.

Upstream PySide2 reference signatures (binding differences may apply):

addPixmap(self, pixmap: PySide2.QtGui.QPixmap, mode: PySide2.QtGui.QIcon.Mode, state: PySide2.QtGui.QIcon.State) -> None

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#addPixmap

availableSizes

availableSizes(mode: Any, state: Any) -> tuple

X.availableSizes(mode, state) -> tuple

Supplemental documentation: Qt 5 reference:

[virtual] QList\<QSize> QIconEngine::availableSizes(QIcon::Mode mode \= QIcon::Normal, QIcon::State state \= QIcon::Off) const

Returns sizes of all images that are contained in the engine for the specific mode and state.

Note: This is a helper method and the actual work is done by the virtual_hook() method, hence this method depends on icon engine support and may not work with all icon engines.

This function was introduced in Qt 4.5.

Upstream PySide2 reference signatures (binding differences may apply):

availableSizes(self, mode: PySide2.QtGui.QIcon.Mode=..., state: PySide2.QtGui.QIcon.State=...) -> typing.List[PySide2.QtCore.QSize]

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#availableSizes

clone

clone() -> Any

X.clone() -> PythonQt.QtGui.QIconEngine

Supplemental documentation: Qt 5 reference:

[pure virtual] QIconEngine *QIconEngine::clone() const

Reimplement this method to return a clone of this icon engine.

Upstream PySide2 reference signatures (binding differences may apply):

clone(self) -> PySide2.QtGui.QIconEngine

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#clone

iconName

iconName() -> str

X.iconName() -> str

Supplemental documentation: Qt 5 reference:

[virtual] QString QIconEngine::iconName() const

Returns the name used to create the engine, if available.

Note: This is a helper method and the actual work is done by the virtual_hook() method, hence this method depends on icon engine support and may not work with all icon engines.

This function was introduced in Qt 4.7.

Upstream PySide2 reference signatures (binding differences may apply):

iconName(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#iconName

key

key() -> str

X.key() -> str

Supplemental documentation: Qt 5 reference:

[virtual] QString QIconEngine::key() const

Returns a key that identifies this icon engine.

Upstream PySide2 reference signatures (binding differences may apply):

key(self) -> str

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#key

paint

paint(painter: Any, rect: Any, mode: Any, state: Any) -> None

X.paint(painter, rect, mode, state)

Supplemental documentation: Qt 5 reference:

[pure virtual] void QIconEngine::paint(QPainter *painter, const QRect \&rect, QIcon::Mode mode, QIcon::State state)

Uses the given painter to paint the icon with the required mode and state into the rectangle rect.

Upstream PySide2 reference signatures (binding differences may apply):

paint(self, painter: PySide2.QtGui.QPainter, rect: PySide2.QtCore.QRect, mode: PySide2.QtGui.QIcon.Mode, state: PySide2.QtGui.QIcon.State) -> None

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#paint

pixmap

pixmap(size: Any, mode: Any, state: Any) -> Any

X.pixmap(size, mode, state) -> PythonQt.QtGui.QPixmap

Supplemental documentation: Qt 5 reference:

[virtual] QPixmap QIconEngine::pixmap(const QSize \&size, QIcon::Mode mode, QIcon::State state)

Returns the icon as a pixmap with the required size, mode, and state. The default implementation creates a new pixmap and calls paint() to fill it.

Upstream PySide2 reference signatures (binding differences may apply):

pixmap(self, size: PySide2.QtCore.QSize, mode: PySide2.QtGui.QIcon.Mode, state: PySide2.QtGui.QIcon.State) -> PySide2.QtGui.QPixmap

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#pixmap

read

read(*args: Any, **kwargs: Any) -> bool

X.read(in) -> bool

Supplemental documentation: Qt 5 reference:

[virtual] bool QIconEngine::read(QDataStream \&in)

Reads icon engine contents from the QDataStream in. Returns true if the contents were read; otherwise returns false.

QIconEngine's default implementation always return false.

Upstream PySide2 reference signatures (binding differences may apply):

read(self, in_: PySide2.QtCore.QDataStream) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#read

virtual_hook

virtual_hook(id: Any, data: Any) -> Any

X.virtual_hook(id, data)

Supplemental documentation: Qt 5 reference:

[virtual] void QIconEngine::virtual_hook(int id, void *data)

Additional method to allow extending QIconEngine without adding new virtual methods (and without breaking binary compatibility). The actual action and format of data depends on id argument which is in fact a constant from IconEngineHook enum.

This function was introduced in Qt 4.5.

See also IconEngineHook.

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#virtual_hook

write

write(out: Any) -> bool

X.write(out) -> bool

Supplemental documentation: Qt 5 reference:

[virtual] bool QIconEngine::write(QDataStream \&out) const

Writes the contents of this engine to the QDataStream out. Returns true if the contents were written; otherwise returns false.

QIconEngine's default implementation always return false.

Upstream PySide2 reference signatures (binding differences may apply):

write(self, out: PySide2.QtCore.QDataStream) -> bool

Source: https://doc.qt.io/archives/qt-5.15/qiconengine.html#write