KIconEngine

Search for usage in LXR

KIconEngine Class Reference

#include <KIconEngine>

Inheritance diagram for KIconEngine:

Public Member Functions

 KIconEngine (const QString &iconName, const KIconColors &colors, KIconLoader *iconLoader)
 
 KIconEngine (const QString &iconName, const KIconColors &colors, KIconLoader *iconLoader, const QStringList &overlays)
 
 KIconEngine (const QString &iconName, KIconLoader *iconLoader)
 
 KIconEngine (const QString &iconName, KIconLoader *iconLoader, const QStringList &overlays)
 
 ~KIconEngine () override
 
QSize actualSize (const QSize &size, QIcon::Mode mode, QIcon::State state) override
 
QList< QSizeavailableSizes (QIcon::Mode mode, QIcon::State state) override
 
QIconEngineclone () const override
 
QString iconName () override
 
bool isNull () override
 
QString key () const override
 
void paint (QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override
 
QPixmap pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state) override
 
bool read (QDataStream &in) override
 
QPixmap scaledPixmap (const QSize &size, QIcon::Mode mode, QIcon::State state, qreal scale) override
 
bool write (QDataStream &out) const override
 
- Public Member Functions inherited from QIconEngine
virtual void addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state)
 
virtual void addPixmap (const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state)
 
virtual void virtual_hook (int id, void *data)
 

Additional Inherited Members

- Public Types inherited from QIconEngine
enum  IconEngineHook
 
- Public Attributes inherited from QIconEngine
 IsNullHook
 
 ScaledPixmapHook
 

Detailed Description

A class to provide rendering of KDE icons.

This is mostly used to provide Qt's icon loading in plasma-integration

Application developers should use QIcon::fromTheme instead of using it directly.

Definition at line 28 of file kiconengine.h.

Constructor & Destructor Documentation

◆ KIconEngine() [1/4]

KIconEngine::KIconEngine ( const QString & iconName,
KIconLoader * iconLoader,
const QStringList & overlays )

Constructs an icon engine for a named icon.

Parameters
iconNamethe name of the icon to load
iconLoaderThe icon loader that this engine is to use.
overlaysAdd one or more overlays to the icon. See KIconLoader::Overlays.
See also
KIconLoader

Definition at line 29 of file kiconengine.cpp.

◆ KIconEngine() [2/4]

KIconEngine::KIconEngine ( const QString & iconName,
KIconLoader * iconLoader )

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 36 of file kiconengine.cpp.

◆ KIconEngine() [3/4]

KIconEngine::KIconEngine ( const QString & iconName,
const KIconColors & colors,
KIconLoader * iconLoader )

Constructs an icon engine for a KDE named icon with a specific palette.

Parameters
iconNamethe name of the icon to load
colorsdefines the colors we want to be applied on this icon
iconLoaderThe KDE icon loader that this engine is to use.

Definition at line 42 of file kiconengine.cpp.

◆ KIconEngine() [4/4]

KIconEngine::KIconEngine ( const QString & iconName,
const KIconColors & colors,
KIconLoader * iconLoader,
const QStringList & overlays )

Constructs an icon engine for a KDE named icon with a specific palette and overlays.

Parameters
iconNamethe name of the icon to load
colorsdefines the colors we want to be applied on this icon
iconLoaderThe KDE icon loader that this engine is to use.
overlaysAdd one or more overlays to the icon. See KIconLoader::Overlays.
Since
6.1

Definition at line 48 of file kiconengine.cpp.

◆ ~KIconEngine()

KIconEngine::~KIconEngine ( )
override

Destructor.

Definition at line 55 of file kiconengine.cpp.

Member Function Documentation

◆ actualSize()

QSize KIconEngine::actualSize ( const QSize & size,
QIcon::Mode mode,
QIcon::State state )
overridevirtual

Reimplementation.

Reimplemented from QIconEngine.

Definition at line 76 of file kiconengine.cpp.

◆ availableSizes()

QList< QSize > KIconEngine::availableSizes ( QIcon::Mode mode,
QIcon::State state )
overridevirtual

Reimplementation.

Reimplemented from QIconEngine.

◆ clone()

QIconEngine * KIconEngine::clone ( ) const
overridevirtual

Implements QIconEngine.

Definition at line 203 of file kiconengine.cpp.

◆ iconName()

QString KIconEngine::iconName ( )
overridevirtual

Reimplementation.

Reimplemented from QIconEngine.

Definition at line 161 of file kiconengine.cpp.

◆ isNull()

bool KIconEngine::isNull ( )
overridevirtual

Reimplemented from QIconEngine.

Definition at line 220 of file kiconengine.cpp.

◆ key()

QString KIconEngine::key ( ) const
overridevirtual

Reimplemented from QIconEngine.

Definition at line 198 of file kiconengine.cpp.

◆ paint()

void KIconEngine::paint ( QPainter * painter,
const QRect & rect,
QIcon::Mode mode,
QIcon::State state )
overridevirtual

Reimplementation.

Implements QIconEngine.

Definition at line 81 of file kiconengine.cpp.

◆ pixmap()

QPixmap KIconEngine::pixmap ( const QSize & size,
QIcon::Mode mode,
QIcon::State state )
overridevirtual

Reimplementation.

Reimplemented from QIconEngine.

Definition at line 146 of file kiconengine.cpp.

◆ read()

bool KIconEngine::read ( QDataStream & in)
overridevirtual

Reimplemented from QIconEngine.

Definition at line 208 of file kiconengine.cpp.

◆ scaledPixmap()

QPixmap KIconEngine::scaledPixmap ( const QSize & size,
QIcon::Mode mode,
QIcon::State state,
qreal scale )
overridevirtual

Reimplemented from QIconEngine.

Definition at line 151 of file kiconengine.cpp.

◆ write()

bool KIconEngine::write ( QDataStream & out) const
overridevirtual

Reimplemented from QIconEngine.

Definition at line 214 of file kiconengine.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:08:02 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.