KIconEffect Class Reference
#include <kiconeffect.h>
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 34 of file kiconeffect.h.
Public Types | |
enum | Effects { NoEffect, ToGray, Colorize, ToGamma, DeSaturate, ToMonochrome, LastEffect } |
Public Member Functions | |
KIconEffect () | |
~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 |
QImage | apply (QImage src, int effect, float value, const QColor rgb, const QColor rgb2, 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 |
QPixmap | apply (QPixmap src, int effect, float value, const QColor rgb, const QColor rgb2, bool trans) const |
QImage | doublePixels (QImage src) const |
Static Public Member Functions | |
static void | visualActivate (QWidget *widget, QRect rect) |
static void | visualActivate (QWidget *widget, QRect rect, QPixmap *pixmap) |
static void | toGray (QImage &image, float value) |
static void | colorize (QImage &image, const QColor &col, float value) |
static void | toMonochrome (QImage &image, const QColor &black, const QColor &white, 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) |
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.
Definition at line 55 of file kiconeffect.h. |
Constructor & Destructor Documentation
|
Create a new KIconEffect.
Definition at line 52 of file kiconeffect.cpp. |
Member Function Documentation
|
Definition at line 254 of file kiconeffect.cpp. |
|
Applies an effect to a pixmap.
Definition at line 248 of file kiconeffect.cpp. |
|
Applies an effect to a pixmap.
Definition at line 232 of file kiconeffect.cpp. |
|
Definition at line 196 of file kiconeffect.cpp. |
|
Applies an effect to an image.
Definition at line 191 of file kiconeffect.cpp. |
|
Applies an effect to an image.
The effect to apply depends on the
Definition at line 175 of file kiconeffect.cpp. |
|
Colorizes an image with a specific color.
Definition at line 307 of file kiconeffect.cpp. |
|
Desaturates an image.
Definition at line 398 of file kiconeffect.cpp. |
|
Returns an image twice as large, consisting of 2x2 pixels.
Definition at line 543 of file kiconeffect.cpp. |
|
Returns a fingerprint for the effect by encoding the given This is useful for caching.
Definition at line 145 of file kiconeffect.cpp. |
|
Tests whether an effect has been configured for the given icon group.
Definition at line 140 of file kiconeffect.cpp. |
|
Rereads configuration.
Definition at line 64 of file kiconeffect.cpp. |
|
Overlays an image with an other image.
Definition at line 592 of file kiconeffect.cpp. |
|
Renders a pixmap semi-transparent.
Definition at line 512 of file kiconeffect.cpp. |
|
Renders an image semi-transparent.
Definition at line 438 of file kiconeffect.cpp. |
|
Changes the gamma value of an image.
Definition at line 416 of file kiconeffect.cpp. |
|
Tints an image gray.
Definition at line 285 of file kiconeffect.cpp. |
|
Produces a monochrome icon with a given foreground and background color.
Definition at line 348 of file kiconeffect.cpp. |
|
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).
Definition at line 707 of file kiconeffect.cpp. |
The documentation for this class was generated from the following files: