kiconeffect.h
/* vi: ts=8 sts=4 sw=4
*
* This file is part of the KDE project, module kdecore.
* Copyright (C) 2000 Geert Jansen <jansen@kde.org>
* with minor additions and based on ideas from
* Torsten Rahn <torsten@kde.org>
*
* This is free software; it comes under the GNU Library General
* Public License, version 2. See the file "COPYING.LIB" for the
* exact licensing terms.
*/
#ifndef __KIconEffect_h_Included__
#define __KIconEffect_h_Included__
#include <qimage.h>
#include <qpixmap.h>
#include <qcolor.h>
#include <qrect.h>
#include "kdelibs_export.h"
class QWidget;
class KIconEffectPrivate;
class KDECORE_EXPORT KIconEffect
{
public:
KIconEffect();
~KIconEffect();
enum Effects { NoEffect, ToGray, Colorize, ToGamma, DeSaturate,
ToMonochrome,
LastEffect };
void init();
bool hasEffect(int group, int state) const;
QString fingerprint(int group, int state) const;
QImage apply(QImage src, int group, int state) const;
// KDE4: make them references
QImage apply(QImage src, int effect, float value, const QColor rgb, bool trans) const;
QImage apply(QImage src, int effect, float value, const QColor rgb, const QColor rgb2, bool trans) const;
QPixmap apply(QPixmap src, int group, int state) const;
QPixmap apply(QPixmap src, int effect, float value, const QColor rgb, bool trans) const;
QPixmap apply(QPixmap src, int effect, float value, const QColor rgb, const QColor rgb2, bool trans) const;
QImage doublePixels(QImage src) const;
static void visualActivate(QWidget *widget, QRect rect);
static void toGray(QImage &image, float value);
static void colorize(QImage &image, const QColor &col, float value);
static void toMonochrome(QImage &image, const QColor &black, const QColor &white, float value);
static void deSaturate(QImage &image, float value);
static void toGamma(QImage &image, float value);
static void semiTransparent(QImage &image);
static void semiTransparent(QPixmap &pixmap);
static void overlay(QImage &src, QImage &overlay);
private:
int mEffect[6][3];
float mValue[6][3];
QColor mColor[6][3];
bool mTrans[6][3];
KIconEffectPrivate *d;
};
#endif
KIconEffect::ToMonochrome
Definition: kiconeffect.h:56
KIconEffect
Applies effects to icons.
Definition: kiconeffect.h:34
KIconEffect::Effects
Effects
This is the enumeration of all possible icon effects.
Definition: kiconeffect.h:55

KDE Home | KDE Accessibility Home | Description of Access Keys