summaryrefslogtreecommitdiffstats
path: root/tdecore/kiconeffect.cpp
diff options
context:
space:
mode:
authorTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-04 14:16:51 -0600
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2013-02-04 14:16:51 -0600
commitf2bfcad7ffdd09911f282afe2a2051b3708601c9 (patch)
treece4bebc206b6f9753745218e6a4c4368df624c16 /tdecore/kiconeffect.cpp
parenta14eaa044240517f1f3d7eb5dacbff96fd447ada (diff)
downloadtdelibs-f2bfcad7ffdd09911f282afe2a2051b3708601c9.tar.gz
tdelibs-f2bfcad7ffdd09911f282afe2a2051b3708601c9.zip
Rename KIcon to enhance compatibility with KDE4
Diffstat (limited to 'tdecore/kiconeffect.cpp')
-rw-r--r--tdecore/kiconeffect.cpp58
1 files changed, 29 insertions, 29 deletions
diff --git a/tdecore/kiconeffect.cpp b/tdecore/kiconeffect.cpp
index ae33d744d..e865a1317 100644
--- a/tdecore/kiconeffect.cpp
+++ b/tdecore/kiconeffect.cpp
@@ -42,26 +42,26 @@ static bool tqt_has_xft=true;
extern bool tqt_use_xrender;
extern bool tqt_has_xft;
#endif
-class KIconEffectPrivate
+class TDEIconEffectPrivate
{
public:
TQString mKey[6][3];
TQColor mColor2[6][3];
};
-KIconEffect::KIconEffect()
+TDEIconEffect::TDEIconEffect()
{
- d = new KIconEffectPrivate;
+ d = new TDEIconEffectPrivate;
init();
}
-KIconEffect::~KIconEffect()
+TDEIconEffect::~TDEIconEffect()
{
delete d;
d = 0L;
}
-void KIconEffect::init()
+void TDEIconEffect::init()
{
TDEConfig *config = TDEGlobal::config();
@@ -137,14 +137,14 @@ void KIconEffect::init()
}
}
-bool KIconEffect::hasEffect(int group, int state) const
+bool TDEIconEffect::hasEffect(int group, int state) const
{
return mEffect[group][state] != NoEffect;
}
-TQString KIconEffect::fingerprint(int group, int state) const
+TQString TDEIconEffect::fingerprint(int group, int state) const
{
- if ( group >= KIcon::LastGroup ) return "";
+ if ( group >= TDEIcon::LastGroup ) return "";
TQString cached = d->mKey[group][state];
if (cached.isEmpty())
{
@@ -172,14 +172,14 @@ TQString KIconEffect::fingerprint(int group, int state) const
return cached;
}
-TQImage KIconEffect::apply(TQImage image, int group, int state) const
+TQImage TDEIconEffect::apply(TQImage image, int group, int state) const
{
- if (state >= KIcon::LastState)
+ if (state >= TDEIcon::LastState)
{
kdDebug(265) << "Illegal icon state: " << state << "\n";
return image;
}
- if (group >= KIcon::LastGroup)
+ if (group >= TDEIcon::LastGroup)
{
kdDebug(265) << "Illegal icon group: " << group << "\n";
return image;
@@ -188,12 +188,12 @@ TQImage KIconEffect::apply(TQImage image, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}
-TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const
+TQImage TDEIconEffect::apply(TQImage image, int effect, float value, const TQColor col, bool trans) const
{
return apply (image, effect, value, col, TDEGlobalSettings::baseColor(), trans);
}
-TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const
+TQImage TDEIconEffect::apply(TQImage image, int effect, float value, const TQColor col, const TQColor col2, bool trans) const
{
if (effect >= LastEffect )
{
@@ -229,14 +229,14 @@ TQImage KIconEffect::apply(TQImage image, int effect, float value, const TQColor
return image;
}
-TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const
+TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int group, int state) const
{
- if (state >= KIcon::LastState)
+ if (state >= TDEIcon::LastState)
{
kdDebug(265) << "Illegal icon state: " << state << "\n";
return pixmap;
}
- if (group >= KIcon::LastGroup)
+ if (group >= TDEIcon::LastGroup)
{
kdDebug(265) << "Illegal icon group: " << group << "\n";
return pixmap;
@@ -245,13 +245,13 @@ TQPixmap KIconEffect::apply(TQPixmap pixmap, int group, int state) const
mColor[group][state], d->mColor2[group][state], mTrans[group][state]);
}
-TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
+TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int effect, float value,
const TQColor col, bool trans) const
{
return apply (pixmap, effect, value, col, TDEGlobalSettings::baseColor(), trans);
}
-TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
+TQPixmap TDEIconEffect::apply(TQPixmap pixmap, int effect, float value,
const TQColor col, const TQColor col2, bool trans) const
{
TQPixmap result;
@@ -282,7 +282,7 @@ TQPixmap KIconEffect::apply(TQPixmap pixmap, int effect, float value,
// Taken from KImageEffect. We don't want to link tdecore to tdeui! As long
// as this code is not too big, it doesn't seem much of a problem to me.
-void KIconEffect::toGray(TQImage &img, float value)
+void TDEIconEffect::toGray(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -304,7 +304,7 @@ void KIconEffect::toGray(TQImage &img, float value)
}
}
-void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
+void TDEIconEffect::colorize(TQImage &img, const TQColor &col, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -345,7 +345,7 @@ void KIconEffect::colorize(TQImage &img, const TQColor &col, float value)
}
}
-void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
+void TDEIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *) img.bits()
: (unsigned int *) img.tqcolorTable();
@@ -395,7 +395,7 @@ void KIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor
}
}
-void KIconEffect::deSaturate(TQImage &img, float value)
+void TDEIconEffect::deSaturate(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -413,7 +413,7 @@ void KIconEffect::deSaturate(TQImage &img, float value)
}
}
-void KIconEffect::toGamma(TQImage &img, float value)
+void TDEIconEffect::toGamma(TQImage &img, float value)
{
int pixels = (img.depth() > 8) ? img.width()*img.height()
: img.numColors();
@@ -435,7 +435,7 @@ void KIconEffect::toGamma(TQImage &img, float value)
}
}
-void KIconEffect::semiTransparent(TQImage &img)
+void TDEIconEffect::semiTransparent(TQImage &img)
{
img.setAlphaBuffer(true);
@@ -509,7 +509,7 @@ void KIconEffect::semiTransparent(TQImage &img)
}
}
-void KIconEffect::semiTransparent(TQPixmap &pix)
+void TDEIconEffect::semiTransparent(TQPixmap &pix)
{
if ( tqt_use_xrender && tqt_has_xft )
{
@@ -540,7 +540,7 @@ void KIconEffect::semiTransparent(TQPixmap &pix)
pix.setMask(mask);
}
-TQImage KIconEffect::doublePixels(TQImage src) const
+TQImage TDEIconEffect::doublePixels(TQImage src) const
{
TQImage dst;
if (src.depth() == 1)
@@ -589,7 +589,7 @@ TQImage KIconEffect::doublePixels(TQImage src) const
return dst;
}
-void KIconEffect::overlay(TQImage &src, TQImage &overlay)
+void TDEIconEffect::overlay(TQImage &src, TQImage &overlay)
{
if (src.depth() != overlay.depth())
{
@@ -704,7 +704,7 @@ void KIconEffect::overlay(TQImage &src, TQImage &overlay)
}
void
-KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
+TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect)
{
if (!TDEGlobalSettings::visualActivate())
return;
@@ -772,7 +772,7 @@ KIconEffect::visualActivate(TQWidget * widget, TQRect rect)
}
void
-KIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
+TDEIconEffect::visualActivate(TQWidget * widget, TQRect rect, TQPixmap *pixmap)
{
if (!TDEGlobalSettings::visualActivate())
return;