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 #include "kdelibs_export.h"
00023
00024 class QWidget;
00025
00026 class KIconEffectPrivate;
00027
00036 class KDECORE_EXPORT KIconEffect
00037 {
00038 public:
00042 KIconEffect();
00043 ~KIconEffect();
00044
00057 enum Effects { NoEffect, ToGray, Colorize, ToGamma, DeSaturate,
00058 LastEffect };
00059
00063 void init();
00064
00074 bool hasEffect(int group, int state) const;
00075
00084 QString fingerprint(int group, int state) const;
00085
00094 QImage apply(QImage src, int group, int state) const;
00095
00105
00106 QImage apply(QImage src, int effect, float value, const QColor rgb, bool trans) const;
00107
00115 QPixmap apply(QPixmap src, int group, int state) const;
00116
00126 QPixmap apply(QPixmap src, int effect, float value, const QColor rgb, bool trans) const;
00132 QImage doublePixels(QImage src) const;
00133
00146 static void visualActivate(QWidget *widget, QRect rect);
00147
00154 static void toGray(QImage &image, float value);
00155
00163 static void colorize(QImage &image, const QColor &col, float value);
00164
00171 static void deSaturate(QImage &image, float value);
00172
00179 static void toGamma(QImage &image, float value);
00180
00186 static void semiTransparent(QImage &image);
00187
00193 static void semiTransparent(QPixmap &pixmap);
00194
00201 static void overlay(QImage &src, QImage &overlay);
00202
00203 private:
00204 int mEffect[6][3];
00205 float mValue[6][3];
00206 QColor mColor[6][3];
00207 bool mTrans[6][3];
00208 KIconEffectPrivate *d;
00209 };
00210
00211 #endif
This file is part of the documentation for kdecore Library Version 3.3.90.