![]() |
Qt 6.x
The Qt SDK
|
A named-based icon engine for providing theme icons. More...
#include <qiconloader_p.h>
Public Member Functions | |
QThemeIconEngine (const QString &iconName=QString()) | |
QIconEngine * | clone () const override |
Reimplement this method to return a clone of this icon engine. | |
bool | read (QDataStream &in) override |
Reads icon engine contents from the QDataStream in. | |
bool | write (QDataStream &out) const override |
Writes the contents of this engine to the QDataStream out. | |
![]() | |
void | paint (QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override |
Uses the given painter to paint the icon with the required mode and state into the rectangle rect. | |
QSize | actualSize (const QSize &size, QIcon::Mode mode, QIcon::State state) override |
Returns the actual size of the icon the engine provides for the requested size, mode and state. | |
QPixmap | pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state) override |
Returns the icon as a pixmap with the required size, mode, and state. | |
void | addPixmap (const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) override |
Called by QIcon::addPixmap(). | |
void | addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) override |
Called by QIcon::addFile(). | |
QString | key () const override |
\variable QIconEngine::ScaledPixmapArgument::size | |
QIconEngine * | clone () const override |
Reimplement this method to return a clone of this icon engine. | |
bool | read (QDataStream &in) override |
Reads icon engine contents from the QDataStream in. | |
bool | write (QDataStream &out) const override |
Writes the contents of this engine to the QDataStream out. | |
QList< QSize > | availableSizes (QIcon::Mode mode=QIcon::Normal, QIcon::State state=QIcon::Off) override |
QString | iconName () override |
bool | isNull () override |
QPixmap | scaledPixmap (const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override |
void | virtual_hook (int id, void *data) override |
![]() | |
QIconEngine () | |
virtual | ~QIconEngine () |
Destroys the icon engine. | |
virtual void | paint (QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state)=0 |
Uses the given painter to paint the icon with the required mode and state into the rectangle rect. | |
virtual QSize | 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. | |
virtual QPixmap | pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state) |
Returns the icon as a pixmap with the required size, mode, and state. | |
virtual void | addPixmap (const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state) |
Called by QIcon::addPixmap(). | |
virtual void | addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state) |
Called by QIcon::addFile(). | |
virtual QString | key () const |
\variable QIconEngine::ScaledPixmapArgument::size | |
virtual QIconEngine * | clone () const =0 |
Reimplement this method to return a clone of this icon engine. | |
virtual bool | read (QDataStream &in) |
Reads icon engine contents from the QDataStream in. | |
virtual bool | write (QDataStream &out) const |
Writes the contents of this engine to the QDataStream out. | |
virtual QList< QSize > | availableSizes (QIcon::Mode mode=QIcon::Normal, QIcon::State state=QIcon::Off) |
virtual QString | iconName () |
virtual bool | isNull () |
virtual QPixmap | scaledPixmap (const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) |
virtual void | virtual_hook (int id, void *data) |
Protected Member Functions | |
QIconEngine * | proxiedEngine () const override |
virtual QIconEngine * | proxiedEngine () const =0 |
![]() | |
QIconEngine (const QIconEngine &other) | |
Private Member Functions | |
QString | key () const override |
\variable QIconEngine::ScaledPixmapArgument::size | |
Additional Inherited Members | |
![]() | |
enum | IconEngineHook { IsNullHook = 3 , ScaledPixmapHook } |
A named-based icon engine for providing theme icons.
\inmodule QtGui
The engine supports invalidation of prior lookups, e.g. when the platform theme changes or the user sets an explicit icon theme.
The actual icon lookup is handed over to an engine provided by QIconLoader::iconEngine().
Definition at line 90 of file qiconloader_p.h.
Definition at line 645 of file qiconloader.cpp.
|
overridevirtual |
Reimplement this method to return a clone of this icon engine.
Reimplemented from QProxyIconEngine.
Definition at line 665 of file qiconloader.cpp.
|
overrideprivatevirtual |
\variable QIconEngine::ScaledPixmapArgument::size
The requested size of the pixmap.
\variable QIconEngine::ScaledPixmapArgument::mode
The requested mode of the pixmap.
\variable QIconEngine::ScaledPixmapArgument::state
The requested state of the pixmap.
\variable QIconEngine::ScaledPixmapArgument::scale
The requested scale of the pixmap.
\variable QIconEngine::ScaledPixmapArgument::pixmap
The pixmap that is the best match for the given \l size, \l mode, \l state, and \l scale. This is an output parameter that is set after calling \l virtual_hook().
Returns a key that identifies this icon engine.
Reimplemented from QProxyIconEngine.
Definition at line 657 of file qiconloader.cpp.
|
overrideprotectedvirtual |
Implements QProxyIconEngine.
Definition at line 681 of file qiconloader.cpp.
References QIconLoader::instance(), and qCDebug.
|
overridevirtual |
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.
Reimplemented from QProxyIconEngine.
Definition at line 670 of file qiconloader.cpp.
|
overridevirtual |
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.
Reimplemented from QProxyIconEngine.
Definition at line 675 of file qiconloader.cpp.
References out.