KIconThemes 5.109.0
Public Member Functions | List of all members
KIconEngine

A class to provide rendering of KDE icons. More...

#include <KIconEngine>

Public Member Functions

 KIconEngine (const QString &iconName, const KIconColors &colors, KIconLoader *iconLoader)
 Constructs an icon engine for a KDE named icon with a specific palette.
 
 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.
 
 KIconEngine (const QString &iconName, KIconLoader *iconLoader, const QStringList &overlays)
 Constructs an icon engine for a KDE named icon.
 
 ~KIconEngine () override
 Destructor.
 
QSize actualSize (const QSize &size, QIcon::Mode mode, QIcon::State state) override
 Reimplementation.
 
QList< QSize > availableSizes (QIcon::Mode mode, QIcon::State state) override
 Reimplementation.
 
QIconEngine * clone () const override
 
QString iconName () override
 Reimplementation.
 
QString key () const override
 
void paint (QPainter *painter, const QRect &rect, QIcon::Mode mode, QIcon::State state) override
 Reimplementation.
 
QPixmap pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state) override
 Reimplementation.
 
bool read (QDataStream &in) override
 
void virtual_hook (int id, void *data) override
 
bool write (QDataStream &out) const override
 

Detailed Description

A class to provide rendering of KDE icons.

Currently, this class is not much more than a wrapper around QIconEngine. However, it should not be difficult to extend with features such as SVG rendered icons.

Icon themes specifying a KDE-Extensions string list setting, will limit themselves to checking these extensions exclusively, in the order specified in the setting.

Author
Hamish Rodda rodda.nosp@m.@kde.nosp@m..org

Constructor & Destructor Documentation

◆ KIconEngine() [1/3]

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

Constructs an icon engine for a KDE named icon.

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

◆ KIconEngine() [2/3]

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.

◆ KIconEngine() [3/3]

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.

◆ ~KIconEngine()

KIconEngine::~KIconEngine ( )
override

Destructor.

Member Function Documentation

◆ actualSize()

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

Reimplementation.

◆ availableSizes()

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

Reimplementation.

◆ iconName()

QString KIconEngine::iconName ( )
override

Reimplementation.

◆ paint()

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

Reimplementation.

◆ pixmap()

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

Reimplementation.