Qt
Internal/Contributor docs for the Qt SDK. <b>Note:</b> These are NOT official API docs; those are found <a href='https://doc.qt.io/'>here</a>.
Loading...
Searching...
No Matches
QThemeIconEngine Class Reference

A named-based icon engine for providing theme icons. More...

#include <qiconloader_p.h>

+ Inheritance diagram for QThemeIconEngine:
+ Collaboration diagram for QThemeIconEngine:

Public Member Functions

 QThemeIconEngine (const QString &iconName=QString())
 
QIconEngineclone () 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.
 
- Public Member Functions inherited from QProxyIconEngine
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().
 
QList< QSizeavailableSizes (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
 
- Public Member Functions inherited from QIconEngine
 QIconEngine ()
 
virtual ~QIconEngine ()
 Destroys the icon engine.
 

Protected Member Functions

QIconEngineproxiedEngine () const override
 
- Protected Member Functions inherited from QIconEngine
 QIconEngine (const QIconEngine &other)
 

Private Member Functions

QString key () const override
 \variable QIconEngine::ScaledPixmapArgument::size
 

Additional Inherited Members

- Public Types inherited from QIconEngine
enum  IconEngineHook { IsNullHook = 3 , ScaledPixmapHook }
 

Detailed Description

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 93 of file qiconloader_p.h.

Constructor & Destructor Documentation

◆ QThemeIconEngine()

QThemeIconEngine::QThemeIconEngine ( const QString & iconName = QString())

Definition at line 689 of file qiconloader.cpp.

Referenced by clone().

+ Here is the caller graph for this function:

Member Function Documentation

◆ clone()

QIconEngine * QThemeIconEngine::clone ( ) const
overridevirtual

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

Reimplemented from QProxyIconEngine.

Definition at line 709 of file qiconloader.cpp.

References QThemeIconEngine().

+ Here is the call graph for this function:

◆ key()

QString QThemeIconEngine::key ( ) const
overrideprivatevirtual

\variable QIconEngine::ScaledPixmapArgument::size

The requested size of the pixmap.

\variable QIconEngine::ScaledPixmapArgument::mode

The requested mode of the pixmap.

See also
QIcon::Mode

\variable QIconEngine::ScaledPixmapArgument::state

The requested state of the pixmap.

See also
QIcon::State

\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 701 of file qiconloader.cpp.

◆ proxiedEngine()

QIconEngine * QThemeIconEngine::proxiedEngine ( ) const
overrideprotectedvirtual

Implements QProxyIconEngine.

Definition at line 725 of file qiconloader.cpp.

References QIconLoader::instance(), and qCDebug.

+ Here is the call graph for this function:

◆ read()

bool QThemeIconEngine::read ( QDataStream & in)
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 714 of file qiconloader.cpp.

◆ write()

bool QThemeIconEngine::write ( QDataStream & out) const
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 719 of file qiconloader.cpp.

References out.


The documentation for this class was generated from the following files: