• Skip to content
  • Skip to link menu
KDE API Reference
  • KDE API Reference
  • kdelibs API Reference
  • KDE Home
  • Contact Us
 

KDEUI

Public Member Functions | List of all members
KIcon Class Reference

#include <kicon.h>

Inheritance diagram for KIcon:
Inheritance graph
[legend]

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 ()
 
KIcon & operator= (const KIcon &other)
 
- Public Member Functions inherited from QIcon
 QIcon ()
 
 QIcon (const QPixmap &pixmap)
 
 QIcon (const QString &fileName)
 
 QIcon (QIconEngine *engine)
 
 QIcon (const QIcon &other)
 
 QIcon (QIconEngineV2 *engine)
 
 ~QIcon ()
 
QSize actualSize (const QSize &size, Mode mode, State state) const
 
void addFile (const QString &fileName, const QSize &size, Mode mode, State state)
 
void addPixmap (const QPixmap &pixmap, Mode mode, State state)
 
QList< QSize > availableSizes (Mode mode, State state) const
 
qint64 cacheKey () const
 
bool isNull () const
 
QString name () const
 
 operator QVariant () const
 
QIcon & operator= (const QIcon &other)
 
void paint (QPainter *painter, const QRect &rect, QFlags< Qt::AlignmentFlag > alignment, Mode mode, State state) const
 
void paint (QPainter *painter, int x, int y, int w, int h, QFlags< Qt::AlignmentFlag > alignment, Mode mode, State state) const
 
QPixmap pixmap () const
 
QPixmap pixmap (Size size, Mode mode, State state) const
 
QPixmap pixmap (const QSize &size, Mode mode, State state) const
 
QPixmap pixmap (int extent, Mode mode, State state) const
 
QPixmap pixmap (int w, int h, Mode mode, State state) const
 
QPixmap pixmap (Size size, bool enabled, State state) const
 
void reset (const QPixmap &pixmap, Size size)
 
int serialNumber () const
 
void setPixmap (const QString &fileName, Size size, Mode mode, State state)
 
void setPixmap (const QPixmap &pixmap, Size size, Mode mode, State state)
 
void swap (QIcon &other)
 

Additional Inherited Members

- Static Public Member Functions inherited from QIcon
QIcon fromTheme (const QString &name, const QIcon &fallback)
 
bool hasThemeIcon (const QString &name)
 
QSize pixmapSize (Size which)
 
void setPixmapSize (Size which, const QSize &size)
 
void setThemeName (const QString &name)
 
void setThemeSearchPaths (const QStringList &paths)
 
QString themeName ()
 
QStringList themeSearchPaths ()
 

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.nosp@m.@kde.nosp@m..org

Definition at line 40 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 26 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 32 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 38 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 49 of file kicon.cpp.

KIcon::KIcon ( )

Constructor for a null icon.

Definition at line 44 of file kicon.cpp.

KIcon::~KIcon ( )

Destroys the icon.

Definition at line 55 of file kicon.cpp.

Member Function Documentation

KIcon & KIcon::operator= ( const KIcon &  other)

Definition at line 60 of file kicon.cpp.


The documentation for this class was generated from the following files:
  • kicon.h
  • kicon.cpp
This file is part of the KDE documentation.
Documentation copyright © 1996-2020 The KDE developers.
Generated on Mon Jun 22 2020 13:24:02 by doxygen 1.8.7 written by Dimitri van Heesch, © 1997-2006

KDE's Doxygen guidelines are available online.

KDEUI

Skip menu "KDEUI"
  • Main Page
  • Namespace List
  • Namespace Members
  • Alphabetical List
  • Class List
  • Class Hierarchy
  • Class Members
  • File List
  • File Members
  • Modules
  • Related Pages

kdelibs API Reference

Skip menu "kdelibs API Reference"
  • DNSSD
  • Interfaces
  •   KHexEdit
  •   KMediaPlayer
  •   KSpeech
  •   KTextEditor
  • kconf_update
  • KDE3Support
  •   KUnitTest
  • KDECore
  • KDED
  • KDEsu
  • KDEUI
  • KDEWebKit
  • KDocTools
  • KFile
  • KHTML
  • KImgIO
  • KInit
  • kio
  • KIOSlave
  • KJS
  •   KJS-API
  •   WTF
  • kjsembed
  • KNewStuff
  • KParts
  • KPty
  • Kross
  • KUnitConversion
  • KUtils
  • Nepomuk
  • Plasma
  • Solid
  • Sonnet
  • ThreadWeaver

Search



Report problems with this website to our bug tracking system.
Contact the specific authors with questions and comments about the page contents.

KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. | Legal