From 90825e2392b2d70e43c7a25b8a3752299a933894 Mon Sep 17 00:00:00 2001 From: toma Date: Wed, 25 Nov 2009 17:56:58 +0000 Subject: Copy the KDE 3.5 branch to branches/trinity for new KDE 3.5 features. BUG:215923 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebindings@1054174 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kdejava/koala/org/kde/koala/KIconEffect.java | 236 +++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) create mode 100644 kdejava/koala/org/kde/koala/KIconEffect.java (limited to 'kdejava/koala/org/kde/koala/KIconEffect.java') diff --git a/kdejava/koala/org/kde/koala/KIconEffect.java b/kdejava/koala/org/kde/koala/KIconEffect.java new file mode 100644 index 00000000..5422b0a8 --- /dev/null +++ b/kdejava/koala/org/kde/koala/KIconEffect.java @@ -0,0 +1,236 @@ +//Auto-generated by kalyptus. DO NOT EDIT. +package org.kde.koala; + +import org.kde.qt.Qt; +import org.kde.qt.QColor; +import org.kde.qt.QRect; +import org.kde.qt.QtSupport; +import org.kde.qt.QPixmap; +import org.kde.qt.QImage; +import org.kde.qt.QWidget; + +/** + + 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. + @short Applies effects to icons. + @see KIcon + +*/ +public class KIconEffect implements QtSupport { + private long _qt; + private boolean _allocatedInJavaWorld = true; + protected KIconEffect(Class dummy){} + + /** + 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: Don't apply any icon effect +
  • + +
  • + ToGray: Tints the icon gray +
  • + +
  • + Colorize: Tints the icon with an other color +
  • + +
  • + ToGamma: Change the gamma value of the icon +
  • + +
  • + DeSaturate: Reduce the saturation of the icon +
  • + +
  • + ToMonochrome: Produces a monochrome icon + +
  • @short This is the enumeration of all possible icon effects. + */ + public static final int NoEffect = 0; + public static final int ToGray = 1; + public static final int Colorize = 2; + public static final int ToGamma = 3; + public static final int DeSaturate = 4; + public static final int ToMonochrome = 5; + public static final int LastEffect = 6; + + /** + Create a new KIconEffect. + @short Create a new KIconEffect. + */ + public KIconEffect() { + newKIconEffect(); + } + private native void newKIconEffect(); + /** + Rereads configuration. + @short Rereads configuration. + */ + public native void init(); + /** + Tests whether an effect has been configured for the given icon group. + @param group the group to check, see KIcon.Group + @param state the state to check, see KIcon.States + @return true if an effect is configured for the given group + in state, otherwise false. + + @short Tests whether an effect has been configured for the given icon group. + @see KIcon#Group + @see KIcon#States + */ + public native boolean hasEffect(int group, int state); + /** + Returns a fingerprint for the effect by encoding + the given group and state into a String. This + is useful for caching. + @param group the group, see KIcon.Group + @param state the state, see KIcon.States + @return the fingerprint of the given group+state + + @short Returns a fingerprint for the effect by encoding the given group and state into a String. + */ + public native String fingerprint(int group, int state); + /** + Applies an effect to an image. The effect to apply depends on the + group and state parameters, and is configured by the user. + @param src The image. + @param group The group for the icon, see KIcon.Group + @param state The icon's state, see KIcon.States + @return An image with the effect applied. + + @short Applies an effect to an image. + */ + public native QImage apply(QImage src, int group, int state); + /** + Applies an effect to an image. + @param src The image. + @param effect The effect to apply, one of KIconEffect.Effects. + @param value Strength of the effect. 0 <= value <= 1. + @param rgb Color parameter for effects that need one. + @param trans Add Transparency if trans = true. + @return An image with the effect applied. + + @short Applies an effect to an image. + */ + public native QImage apply(QImage src, int effect, float value, QColor rgb, boolean trans); + /** + @short + */ + public native QImage apply(QImage src, int effect, float value, QColor rgb, QColor rgb2, boolean trans); + /** + Applies an effect to a pixmap. + @param src The pixmap. + @param group The group for the icon, see KIcon.Group + @param state The icon's state, see KIcon.States + @return A pixmap with the effect applied. + + @short Applies an effect to a pixmap. + */ + public native QPixmap apply(QPixmap src, int group, int state); + /** + Applies an effect to a pixmap. + @param src The pixmap. + @param effect The effect to apply, one of KIconEffect.Effects. + @param value Strength of the effect. 0 <= value <= 1. + @param rgb Color parameter for effects that need one. + @param trans Add Transparency if trans = true. + @return A pixmap with the effect applied. + + @short Applies an effect to a pixmap. + */ + public native QPixmap apply(QPixmap src, int effect, float value, QColor rgb, boolean trans); + /** + @short + */ + public native QPixmap apply(QPixmap src, int effect, float value, QColor rgb, QColor rgb2, boolean trans); + /** + Returns an image twice as large, consisting of 2x2 pixels. + @param src the image. + @return the scaled image. + + @short Returns an image twice as large, consisting of 2x2 pixels. + */ + public native QImage doublePixels(QImage src); + /** + 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). + @param widget The widget on which the effect should be painted + @param rect This rectangle defines the effect's borders + @short Provides visual feedback to show activation of an icon on a widget. + */ + public static native void visualActivate(QWidget widget, QRect rect); + /** + Tints an image gray. + @param image The image + @param value Strength of the effect. 0 <= value <= 1 + @short Tints an image gray. + */ + public static native void toGray(QImage image, float value); + /** + Colorizes an image with a specific color. + @param image The image + @param col The color with which the image is tinted + @param value Strength of the effect. 0 <= value <= 1 + @short Colorizes an image with a specific color. + */ + public static native void colorize(QImage image, QColor col, float value); + /** + Produces a monochrome icon with a given foreground and background color + @param image The image + @param white The color with which the white parts of image are painted + @param black The color with which the black parts of image are painted + @param value Strength of the effect. 0 <= value <= 1 + @short Produces a monochrome icon with a given foreground and background color + */ + public static native void toMonochrome(QImage image, QColor black, QColor white, float value); + /** + Desaturates an image. + @param image The image + @param value Strength of the effect. 0 <= value <= 1 + @short Desaturates an image. + */ + public static native void deSaturate(QImage image, float value); + /** + Changes the gamma value of an image. + @param image The image + @param value Strength of the effect. 0 <= value <= 1 + @short Changes the gamma value of an image. + */ + public static native void toGamma(QImage image, float value); + /** + Renders an image semi-transparent. + @param image The image + @short Renders an image semi-transparent. + */ + public static native void semiTransparent(QImage image); + /** + Renders a pixmap semi-transparent. + @param pixmap The pixmap + @short Renders a pixmap semi-transparent. + */ + public static native void semiTransparent(QPixmap pixmap); + /** + Overlays an image with an other image. + @param src The image + @param overlay The image to overlay src with + @short Overlays an image with an other image. + */ + public static native void overlay(QImage src, QImage overlay); + /** Deletes the wrapped C++ instance */ + protected native void finalize() throws InternalError; + /** Delete the wrapped C++ instance ahead of finalize() */ + public native void dispose(); + /** Has the wrapped C++ instance been deleted? */ + public native boolean isDisposed(); +} -- cgit v1.2.3