kiconeffect.h
00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015 #ifndef __KIconEffect_h_Included__
00016 #define __KIconEffect_h_Included__
00017
00018 #include <qimage.h>
00019 #include <qpixmap.h>
00020 #include <qcolor.h>
00021 #include <qrect.h>
00022
00023 class QWidget;
00024
00025 class KIconEffectPrivate;
00026
00035 class KIconEffect
00036 {
00037 public:
00041 KIconEffect();
00042 ~KIconEffect();
00043
00055 enum Effects { NoEffect, ToGray, Colorize, ToGamma, DeSaturate, LastEffect };
00056
00060 void init();
00061
00071 bool hasEffect(int group, int state) const;
00072
00081 QString fingerprint(int group, int state) const;
00082
00091 QImage apply(QImage src, int group, int state) const;
00092
00102 QImage apply(QImage src, int effect, float value, const QColor rgb, bool trans) const;
00103
00111 QPixmap apply(QPixmap src, int group, int state) const;
00112
00122 QPixmap apply(QPixmap src, int effect, float value, const QColor rgb, bool trans) const;
00123
00129 QImage doublePixels(QImage src) const;
00130
00143 static void visualActivate(QWidget *widget, QRect rect);
00144
00151 static void toGray(QImage &image, float value);
00152
00160 static void colorize(QImage &image, const QColor &col, float value);
00161
00168 static void deSaturate(QImage &image, float value);
00169
00176 static void toGamma(QImage &image, float value);
00177
00183 static void semiTransparent(QImage &image);
00184
00190 static void semiTransparent(QPixmap &pixmap);
00191
00198 static void overlay(QImage &src, QImage &overlay);
00199
00200 private:
00201 int mEffect[6][3];
00202 float mValue[6][3];
00203 QColor mColor[6][3];
00204 bool mTrans[6][3];
00205 KIconEffectPrivate *d;
00206 };
00207
00208 #endif
This file is part of the documentation for kdelibs Version 3.1.4.