# class KIconEffect | Apply effects to icons. More...
Definition | `#include <kiconeffect.h>`
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

#### Public Types

- enum Effects { NoEffect, ToGray, Colorize, ToGamma, DeSaturate, LastEffect }

#### Public Methods

- KIconEffect ()
- ~KIconEffect ()
- void init ()
- QString fingerprint (int group, int state)
- QImage apply (QImage src, int group, int state)
- QImage apply (QImage src, int effect, float value, const QColor rgb, bool trans)
- QPixmap apply (QPixmap src, int group, int state)
- QPixmap apply (QPixmap src, int effect, float value, const QColor rgb, bool trans)
- QImage doublePixels (QImage src)

#### Public Static Methods

- static void visualActivate (QWidget *, QRect)
- static void toGray (QImage &image, float value)
- static void colorize (QImage &image, const QColor &col, float value)
- static void deSaturate (QImage &image, float value)
- static void toGamma (QImage &image, float value)
- static void semiTransparent (QImage &image)
- static void semiTransparent (QPixmap &pixmap)
- static void overlay (QImage &src, QImage &overlay)

## Detailed Description

Apply effects to icons.

KIconEffect () | ### KIconEffect

~KIconEffect () | ### ~KIconEffect

enum Effects { NoEffect, ToGray, Colorize, ToGamma, DeSaturate, LastEffect } | ### Effects

void init () | ### init

Reread configuration.

QString fingerprint (int group, int state) | ### fingerprint

Returns a fingerprint for the effect selected by [`group`, `state`]. This is usefull for caching.

QImage apply (QImage src, int group, int state) | ### apply

Apply an effect to an image. The effect to apply depends on the `group` and `state` parameters, and is configured by the user.

Parameters:

src | The image.
group | The group for the icon.
state | The icon's state.

Returns: An image with the effect applied.

QImage apply (QImage src, int effect, float value, const QColor rgb, bool trans) | ### apply

Apply an effect to an image.

Parameters:

src | The image.
effect | The effect to apply, one of KIconEffect::Effects.
value | Strength of the effect. 0 <= `value` <= 1.
color | Color parameter for effects that need one.
trans | Add Transparency if trans = true.

Returns: An image with the effect applied.

QPixmap apply (QPixmap src, int group, int state) | ### apply

Apply an effect to a pixmap.

QPixmap apply (QPixmap src, int effect, float value, const QColor rgb, bool trans) | ### apply

Apply an effect to a pixmap.

QImage doublePixels (QImage src) | ### doublePixels

Returns an image twice as large, consisting of 2x2 pixels.

void visualActivate (QWidget *, QRect) | ### visualActivate

[static]

Provide 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.

void toGray (QImage &image, float value) | ### toGray

[static]

void colorize (QImage &image, const QColor &col, float value) | ### colorize

[static]

void deSaturate (QImage &image, float value) | ### deSaturate

[static]

void toGamma (QImage &image, float value) | ### toGamma

[static]

void semiTransparent (QImage &image) | ### semiTransparent

[static]

void semiTransparent (QPixmap &pixmap) | ### semiTransparent

[static]

void overlay (QImage &src, QImage &overlay) | ### overlay

[static]

Generated by: root@sparc.ports.openbsd.org on Wed May 2 09:34:58 2001, using kdoc 2.0a53.