class KIconEffect |
|
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 |
|
Create a new KIconEffect. |
|
Applies an effect to an image. The effect to apply depends on the
group and state parameters, and is configured by the user.
src - The image. group - The group for the icon, see KIconLoader.Group state - The icon's state, see KIconLoader.States Returns An image with the effect applied. |
|
Applies an effect to an image.
src - The image. effect - The effect to apply, one of KIconEffect.Effects. value - Strength of the effect. 0 <= value <= 1. rgb - Color parameter for effects that need one. trans - Add Transparency if trans = true. Returns An image with the effect applied. |
|
|
Applies an effect to a pixmap.
src - The pixmap. group - The group for the icon, see KIconLoader.Group state - The icon's state, see KIconLoader.States Returns A pixmap with the effect applied. |
|
Applies an effect to a pixmap.
src - The pixmap. effect - The effect to apply, one of KIconEffect.Effects. value - Strength of the effect. 0 <= value <= 1. rgb - Color parameter for effects that need one. trans - Add Transparency if trans = true. Returns A pixmap with the effect applied. |
|
|
Colorizes an image with a specific color.
image - The image col - The color with which the image is tinted value - Strength of the effect. 0 <= value <= 1 |
|
Desaturates an image.
image - The image value - Strength of the effect. 0 <= value <= 1 |
|
Returns an image twice as large, consisting of 2x2 pixels.
src - the image. Returns the scaled image. |
|
Returns a fingerprint for the effect by encoding
the given group and state into a QString. This
is useful for caching.
group - the group, see KIconLoader.Group state - the state, see KIconLoader.States Returns the fingerprint of the given group+@p state |
|
Tests whether an effect has been configured for the given icon group.
group - the group to check, see KIconLoader.Group state - the state to check, see KIconLoader.States Returns true if an effect is configured for the given group in state, otherwise false. See also KIconLoader.Group KIconLoader.States |
|
Rereads configuration. |
|
Overlays an image with an other image.
src - The image overlay - The image to overlay src with |
|
Renders an image semi-transparent.
image - The image |
|
Renders a pixmap semi-transparent.
pixmap - The pixmap |
|
Changes the gamma value of an image.
image - The image value - Strength of the effect. 0 <= value <= 1 |
|
Tints an image gray.
image - The image value - Strength of the effect. 0 <= value <= 1 |
|
Produces a monochrome icon with a given foreground and background color
image - The image white - The color with which the white parts of image are painted black - The color with which the black parts of image are painted value - Strength of the effect. 0 <= value <= 1 |
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.
NoEffect | - | - | ||
ToGray | - | - | ||
Colorize | - | - | ||
ToGamma | - | - | ||
DeSaturate | - | - | ||
ToMonochrome | - | - | ||
LastEffect | - | - |