KIconEffect Class Reference
Applies effects to icons. More...
#include <kiconeffect.h>
Public Types | |
| enum | Effects { NoEffect, ToGray, Colorize, ToGamma, DeSaturate, LastEffect } |
Public Member Functions | |
| KIconEffect () | |
| void | init () |
| bool | hasEffect (int group, int state) const |
| QString | fingerprint (int group, int state) const |
| QImage | apply (QImage src, int group, int state) const |
| QImage | apply (QImage src, int effect, float value, const QColor rgb, bool trans) const |
| QPixmap | apply (QPixmap src, int group, int state) const |
| QPixmap | apply (QPixmap src, int effect, float value, const QColor rgb, bool trans) const |
| QImage | doublePixels (QImage src) const |
Static Public Member Functions | |
| void | visualActivate (QWidget *widget, QRect rect) |
| void | toGray (QImage &image, float value) |
| void | colorize (QImage &image, const QColor &col, float value) |
| void | deSaturate (QImage &image, float value) |
| void | toGamma (QImage &image, float value) |
| void | semiTransparent (QImage &image) |
| void | semiTransparent (QPixmap &pixmap) |
| void | overlay (QImage &src, QImage &overlay) |
Detailed Description
Applies effects to icons.This class applies effects to icons depending on their state and group. For example, it can be used to make all disabled icons in a toolbar gray.
- See also:
- KIcon
Definition at line 35 of file kiconeffect.h.
Member Enumeration Documentation
|
|
This is the enumeration of all possible icon effects. Note that 'LastEffect' is no valid icon effect but only used internally to check for invalid icon effects.
|
Constructor & Destructor Documentation
|
|
Create a new KIconEffect. Definition at line 44 of file kiconeffect.cpp. References init(). |
Member Function Documentation
|
|
Rereads configuration. Definition at line 56 of file kiconeffect.cpp. References KGlobal::config(), KConfigBase::readBoolEntry(), KConfigBase::readColorEntry(), KConfigBase::readDoubleNumEntry(), KConfigBase::readEntry(), and KConfigBase::setGroup(). Referenced by KIconEffect(). |
|
||||||||||||
|
Tests whether an effect has been configured for the given icon group.
|
|
||||||||||||
|
Returns a fingerprint for the effect by encoding the given This is useful for caching.
|
|
||||||||||||||||
|
Applies an effect to an image.
The effect to apply depends on the
Referenced by apply(). |
|
||||||||||||||||||||||||
|
Applies an effect to an image.
References colorize(), deSaturate(), semiTransparent(), toGamma(), and toGray(). |
|
||||||||||||||||
|
Applies an effect to a pixmap.
References apply(). |
|
||||||||||||||||||||||||
|
Applies an effect to a pixmap.
References apply(), and semiTransparent(). |
|
|
Returns an image twice as large, consisting of 2x2 pixels.
|
|
||||||||||||
|
Provides visual feedback to show activation of an icon on a widget. Not strictly an 'icon effect', but in practice that's what it looks like. This method does nothing if the global 'Visual feedback on activation' option is not activated (See kcontrol/Peripherals/Mouse).
References KGlobalSettings::visualActivate(), and KGlobalSettings::visualActivateSpeed(). |
|
||||||||||||
|
Tints an image gray.
Referenced by apply(). |
|
||||||||||||||||
|
Colorizes an image with a specific color.
Referenced by apply(). |
|
||||||||||||
|
Desaturates an image.
Referenced by apply(). |
|
||||||||||||
|
Changes the gamma value of an image.
Referenced by apply(). |
|
|
Renders an image semi-transparent.
Referenced by apply(), and semiTransparent(). |
|
|
Renders a pixmap semi-transparent.
References semiTransparent(). |
|
||||||||||||
|
Overlays an image with an other image.
Referenced by KIconLoader::loadIcon(). |
The documentation for this class was generated from the following files:
