• Skip to content
  • Skip to link menu
Trinity API Reference
  • Trinity API Reference
  • kdecore
 

kdecore

  • kdecore
kiconeffect.h
1 /* vi: ts=8 sts=4 sw=4
2  *
3  * This file is part of the KDE project, module kdecore.
4  * Copyright (C) 2000 Geert Jansen <jansen@kde.org>
5  * with minor additions and based on ideas from
6  * Torsten Rahn <torsten@kde.org>
7  *
8  * This is free software; it comes under the GNU Library General
9  * Public License, version 2. See the file "COPYING.LIB" for the
10  * exact licensing terms.
11  */
12 
13 #ifndef __KIconEffect_h_Included__
14 #define __KIconEffect_h_Included__
15 
16 #include <tqimage.h>
17 #include <tqpixmap.h>
18 #include <tqcolor.h>
19 #include <tqrect.h>
20 #include "kdelibs_export.h"
21 
22 class TQWidget;
23 
24 class KIconEffectPrivate;
25 
34 class KDECORE_EXPORT KIconEffect
35 {
36 public:
40  KIconEffect();
41  ~KIconEffect();
42 
55  enum Effects { NoEffect, ToGray, Colorize, ToGamma, DeSaturate,
56  ToMonochrome,
57  LastEffect };
58 
62  void init();
63 
73  bool hasEffect(int group, int state) const;
74 
83  TQString fingerprint(int group, int state) const;
84 
93  TQImage apply(TQImage src, int group, int state) const;
94 
104  // KDE4: make them references
105  TQImage apply(TQImage src, int effect, float value, const TQColor rgb, bool trans) const;
109  TQImage apply(TQImage src, int effect, float value, const TQColor rgb, const TQColor rgb2, bool trans) const;
110 
118  TQPixmap apply(TQPixmap src, int group, int state) const;
119 
129  TQPixmap apply(TQPixmap src, int effect, float value, const TQColor rgb, bool trans) const;
133  TQPixmap apply(TQPixmap src, int effect, float value, const TQColor rgb, const TQColor rgb2, bool trans) const;
134 
140  TQImage doublePixels(TQImage src) const;
141 
154  static void visualActivate(TQWidget *widget, TQRect rect);
155  static void visualActivate(TQWidget *widget, TQRect rect, TQPixmap *pixmap);
156 
163  static void toGray(TQImage &image, float value);
164 
172  static void colorize(TQImage &image, const TQColor &col, float value);
173 
183  static void toMonochrome(TQImage &image, const TQColor &black, const TQColor &white, float value);
184 
191  static void deSaturate(TQImage &image, float value);
192 
199  static void toGamma(TQImage &image, float value);
200 
206  static void semiTransparent(TQImage &image);
207 
213  static void semiTransparent(TQPixmap &pixmap);
214 
221  static void overlay(TQImage &src, TQImage &overlay);
222 
223 private:
224  int mEffect[6][3];
225  float mValue[6][3];
226  TQColor mColor[6][3];
227  bool mTrans[6][3];
228  KIconEffectPrivate *d;
229 };
230 
231 #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

kdecore

Skip menu "kdecore"
  • Main Page
  • Modules
  • Namespace List
  • Class Hierarchy
  • Alphabetical List
  • Class List
  • File List
  • Namespace Members
  • Class Members
  • Related Pages

kdecore

Skip menu "kdecore"
  • arts
  • dcop
  • dnssd
  • interfaces
  •     interface
  •     library
  •   kspeech
  •   ktexteditor
  • kabc
  • kate
  • kcmshell
  • kdecore
  • kded
  • kdefx
  • kdeprint
  • kdesu
  • kdeui
  • kdoctools
  • khtml
  • kimgio
  • kinit
  • kio
  •   bookmarks
  •   httpfilter
  •   kfile
  •   kio
  •   kioexec
  •   kpasswdserver
  •   kssl
  • kioslave
  •   http
  • kjs
  • kmdi
  •   kmdi
  • knewstuff
  • kparts
  • krandr
  • kresources
  • kspell2
  • kunittest
  • kutils
  • kwallet
  • libkmid
  • libkscreensaver
Generated for kdecore by doxygen 1.8.13
This website is maintained by Timothy Pearson.
KDE® and the K Desktop Environment® logo are registered trademarks of KDE e.V. |