KIcon

#include <kicon.h>

Inheritance diagram for KIcon:

Public Member Functions

 KIcon (const QString &iconName, KIconLoader *iconLoader, const QStringList &overlays)
 
 KIcon (const QString &iconName, KIconLoader *iconLoader)
 
 KIcon (const QString &iconName)
 
 KIcon (const QIcon &copy)
 
 KIcon ()
 
 ~KIcon ()
 
- Public Member Functions inherited from QIcon
 QIcon (const QPixmap &pixmap)
 
 QIcon (QIcon &&other)
 
 QIcon (const QString &fileName)
 
 QIcon (const QIcon &other)
 
 QIcon (QIconEngine *engine)
 
QSize actualSize (const QSize &size, QIcon::Mode mode, QIcon::State state) const const
 
QSize actualSize (QWindow *window, const QSize &size, QIcon::Mode mode, QIcon::State state) const const
 
void addFile (const QString &fileName, const QSize &size, QIcon::Mode mode, QIcon::State state)
 
void addPixmap (const QPixmap &pixmap, QIcon::Mode mode, QIcon::State state)
 
QList< QSizeavailableSizes (QIcon::Mode mode, QIcon::State state) const const
 
qint64 cacheKey () const const
 
bool isMask () const const
 
bool isNull () const const
 
QString name () const const
 
QVariant operator QVariant () const const
 
QDataStreamoperator<< (QDataStream &stream, const QIcon &icon)
 
QIconoperator= (const QIcon &other)
 
QIconoperator= (QIcon &&other)
 
QDataStreamoperator>> (QDataStream &stream, QIcon &icon)
 
void paint (QPainter *painter, const QRect &rect, Qt::Alignment alignment, QIcon::Mode mode, QIcon::State state) const const
 
void paint (QPainter *painter, int x, int y, int w, int h, Qt::Alignment alignment, QIcon::Mode mode, QIcon::State state) const const
 
QPixmap pixmap (int extent, QIcon::Mode mode, QIcon::State state) const const
 
QPixmap pixmap (QWindow *window, const QSize &size, QIcon::Mode mode, QIcon::State state) const const
 
QPixmap pixmap (const QSize &size, QIcon::Mode mode, QIcon::State state) const const
 
QPixmap pixmap (int w, int h, QIcon::Mode mode, QIcon::State state) const const
 
int serialNumber () const const
 
void setIsMask (bool isMask)
 
void swap (QIcon &other)
 

Additional Inherited Members

- Public Types inherited from QIcon
enum  Mode
 
enum  State
 
- Static Public Member Functions inherited from QIcon
QStringList fallbackSearchPaths ()
 
QString fallbackThemeName ()
 
QIcon fromTheme (const QString &name, const QIcon &fallback)
 
QIcon fromTheme (const QString &name)
 
bool hasThemeIcon (const QString &name)
 
void setFallbackSearchPaths (const QStringList &paths)
 
void setFallbackThemeName (const QString &name)
 
void setThemeName (const QString &name)
 
void setThemeSearchPaths (const QStringList &paths)
 
QString themeName ()
 
QStringList themeSearchPaths ()
 
- Public Attributes inherited from QIcon
 Active
 
 Disabled
 
 Normal
 
 Off
 
 On
 
 Selected
 

Detailed Description

A wrapper around QIcon that provides KDE icon features.

KIcon is a convenience class for creating a QIcon with an appropriate KIconEngine to perform loading and rendering. KIcons thus adhere to KDE style and effect standards.

See also
KIconEngine, KIconLoader, KIconTheme
Author
Hamish Rodda rodda[email protected]@kde[email protected].org
Deprecated:
use QIcon::fromTheme

Definition at line 46 of file kicon.h.

Constructor & Destructor Documentation

KIcon::KIcon ( const QString iconName,
KIconLoader iconLoader,
const QStringList overlays 
)
explicit

Constructor which takes a kde style icon name, and optionally a custom icon loader.

Parameters
iconNameThe name of the kde icon to load
iconLoaderThe icon loader to use in loading this icon, or null to use the default global icon loader.
overlaysA list of overlays to apply to this icon. They are loaded from the emblems icons and up to four (one per corner) is currently supported

Definition at line 24 of file kicon.cpp.

KIcon::KIcon ( const QString iconName,
KIconLoader iconLoader 
)
explicit

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 30 of file kicon.cpp.

KIcon::KIcon ( const QString iconName)
explicit

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 kicon.cpp.

KIcon::KIcon ( const QIcon copy)
explicit

Copy constructor which takes any QIcon.

Parameters
copythe icon to copy. This should have once been a KIcon, if you want to preserve KDE icon effects.

Definition at line 47 of file kicon.cpp.

KIcon::KIcon ( )

Constructor for a null icon.

Definition at line 42 of file kicon.cpp.

KIcon::~KIcon ( )

Destroys the icon.

Definition at line 53 of file kicon.cpp.


The documentation for this class was generated from the following files:
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Wed Aug 5 2020 22:56:36 by doxygen 1.8.11 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.