| # kdecore Library API Documentation
Overview | Class Hierarchy | Classes | Classes (annotated) | Members | Source Files

# kiconeffect.h

    00001 /* vi: ts=8 sts=4 sw=4
    00002  *
    00003  * $Id: kiconeffect.h,v 1.19 2002/09/14 16:11:58 tjansen Exp $
    00004  *
    00005  * This file is part of the KDE project, module kdecore.
    00006  * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
    00007  * with minor additions and based on ideas from
    00008  * Torsten Rahn <torsten@kde.org>
    00009  *
    00010  * This is free software; it comes under the GNU Library General
    00011  * Public License, version 2. See the file "COPYING.LIB" for the
    00012  * exact licensing terms.
    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.5.
Documentation copyright © 1996-2002 the KDE developers.
Generated on Wed Jan 28 12:46:32 2004 by doxygen 1.3.4 written by Dimitri van Heesch, © 1997-2001