summaryrefslogtreecommitdiffstats
path: root/kdefx
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-03 04:12:51 +0000
commit560378aaca1784ba19806a0414a32b20c744de39 (patch)
treece0dfd7c3febf2a1adc7603d1019a8be2083c415 /kdefx
parentd4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff)
downloadtdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz
tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kdefx')
-rw-r--r--kdefx/kcpuinfo.h2
-rw-r--r--kdefx/kdrawutil.cpp2
-rw-r--r--kdefx/kdrawutil.h8
-rw-r--r--kdefx/kimageeffect.cpp562
-rw-r--r--kdefx/kimageeffect.h4
-rw-r--r--kdefx/kpixmap.cpp14
-rw-r--r--kdefx/kpixmap.h10
-rw-r--r--kdefx/kstyle.cpp92
-rw-r--r--kdefx/kstyle.h14
9 files changed, 354 insertions, 354 deletions
diff --git a/kdefx/kcpuinfo.h b/kdefx/kcpuinfo.h
index ce39ded82..085b9c55a 100644
--- a/kdefx/kcpuinfo.h
+++ b/kdefx/kcpuinfo.h
@@ -40,7 +40,7 @@ class KDEFX_EXPORT KCPUInfo
{
public:
/**
- * This enum contains the list of architecture extensions you
+ * This enum tqcontains the list of architecture extensions you
* can query.
*/
enum Extensions {
diff --git a/kdefx/kdrawutil.cpp b/kdefx/kdrawutil.cpp
index 0fccb94f1..83ea81008 100644
--- a/kdefx/kdrawutil.cpp
+++ b/kdefx/kdrawutil.cpp
@@ -228,7 +228,7 @@ KDEFX_EXPORT void kColorBitmaps(TQPainter *p, const TQColorGroup &g, int x, int
int i;
for(i=0; i < 6; ++i){
if(bitmaps[i]){
- if(!bitmaps[i]->mask())
+ if(!bitmaps[i]->tqmask())
bitmaps[i]->setMask(*bitmaps[i]);
p->setPen(colors[i]);
p->drawPixmap(x, y, *bitmaps[i]);
diff --git a/kdefx/kdrawutil.h b/kdefx/kdrawutil.h
index 27be8ac58..033e0edf4 100644
--- a/kdefx/kdrawutil.h
+++ b/kdefx/kdrawutil.h
@@ -86,7 +86,7 @@ KDEFX_EXPORT void kDrawBeButton(TQPainter *p, int x, int y, int w, int h,
* @c \#include @c <kdrawutil.h>
*
* Draws a rounded oval button. This function doesn't fill the button.
- * See kRoundMaskRegion() for setting masks for fills.
+ * See kRoundMaskRegion() for setting tqmasks for fills.
*
* @param p The painter to use for drawing the button.
* @param r Specifies the rect in which to draw the button.
@@ -125,7 +125,7 @@ KDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h);
* @c \#include @c <kdrawutil.h>
*
* Paints the pixels covered by a round button of the given size with
- * Qt::color1. This function is useful in TQStyle::drawControlMask().
+ * Qt::color1. This function is useful in TQStyle::tqdrawControlMask().
*
* @param p The painter to use for drawing the button.
* @param x The X coordinate of the button.
@@ -133,7 +133,7 @@ KDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h);
* @param w The width of the button.
* @param h The height of the button.
* @param clear Whether to clear the rectangle specified by @p (x, y, w, h) to
- * Qt::color0 before drawing the mask.
+ * Qt::color0 before drawing the tqmask.
*/
KDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool clear=false);
@@ -145,7 +145,7 @@ KDEFX_EXPORT void kDrawRoundMask(TQPainter *p, int x, int y, int w, int h, bool
* the foreground colors. There's one bitmap for each color. If you want to skip
* a color, pass @a null for the corresponding bitmap.
*
- * @note The bitmaps will be self-masked automatically if not masked
+ * @note The bitmaps will be self-tqmasked automatically if not tqmasked
* prior to calling this routine.
*
* @param p The painter to use for drawing the bitmaps.
diff --git a/kdefx/kimageeffect.cpp b/kdefx/kimageeffect.cpp
index eee05b497..63d83eca5 100644
--- a/kdefx/kimageeffect.cpp
+++ b/kdefx/kimageeffect.cpp
@@ -84,9 +84,9 @@ inline const T& fxClamp( const T& x, const T& low, const T& high )
static inline unsigned int intensityValue(unsigned int color)
{
- return((unsigned int)((0.299*qRed(color) +
- 0.587*qGreen(color) +
- 0.1140000000000001*qBlue(color))));
+ return((unsigned int)((0.299*tqRed(color) +
+ 0.587*tqGreen(color) +
+ 0.1140000000000001*tqBlue(color))));
}
template<typename T>
@@ -164,7 +164,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
gl += gcdelta;
bl += bcdelta;
- rgb = qRgb( (rl>>16), (gl>>16), (bl>>16) );
+ rgb = tqRgb( (rl>>16), (gl>>16), (bl>>16) );
for( x = 0; x < size.width(); x++ ) {
*p = rgb;
@@ -188,7 +188,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
gl += gcdelta;
bl += bcdelta;
- *src++ = qRgb( (rl>>16), (gl>>16), (bl>>16));
+ *src++ = tqRgb( (rl>>16), (gl>>16), (bl>>16));
}
src = o_src;
@@ -253,7 +253,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
for (y = 0; y < size.height(); y++) {
unsigned int *scanline = (unsigned int *)image.scanLine(y);
for (x = 0; x < size.width(); x++) {
- scanline[x] = qRgb(xtable[0][x] + ytable[0][y],
+ scanline[x] = tqRgb(xtable[0][x] + ytable[0][y],
xtable[1][x] + ytable[1][y],
xtable[2][x] + ytable[2][y]);
}
@@ -310,12 +310,12 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
for (x = 0; x < w; x++, x2--) {
unsigned int rgb = 0;
if (eff == PyramidGradient) {
- rgb = qRgb(rcb-rSign*(xtable[0][x]+ytable[0][y]),
+ rgb = tqRgb(rcb-rSign*(xtable[0][x]+ytable[0][y]),
gcb-gSign*(xtable[1][x]+ytable[1][y]),
bcb-bSign*(xtable[2][x]+ytable[2][y]));
}
if (eff == RectangleGradient) {
- rgb = qRgb(rcb - rSign *
+ rgb = tqRgb(rcb - rSign *
QMAX(xtable[0][x], ytable[0][y]) * 2,
gcb - gSign *
QMAX(xtable[1][x], ytable[1][y]) * 2,
@@ -323,7 +323,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
QMAX(xtable[2][x], ytable[2][y]) * 2);
}
if (eff == PipeCrossGradient) {
- rgb = qRgb(rcb - rSign *
+ rgb = tqRgb(rcb - rSign *
QMIN(xtable[0][x], ytable[0][y]) * 2,
gcb - gSign *
QMIN(xtable[1][x], ytable[1][y]) * 2,
@@ -331,7 +331,7 @@ TQImage KImageEffect::gradient(const TQSize &size, const TQColor &ca,
QMIN(xtable[2][x], ytable[2][y]) * 2);
}
if (eff == EllipticGradient) {
- rgb = qRgb(rcb - rSign *
+ rgb = tqRgb(rcb - rSign *
(int)sqrt((xtable[0][x]*xtable[0][x] +
ytable[0][y]*ytable[0][y])*2.0),
gcb - gSign *
@@ -463,7 +463,7 @@ TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca,
dir = _xanti ? x : size.width() - 1 - x;
rat = 1 - exp( - (float)x * xbal );
- src[dir] = qRgb(rcb - (int) ( rDiff * rat ),
+ src[dir] = tqRgb(rcb - (int) ( rDiff * rat ),
gcb - (int) ( gDiff * rat ),
bcb - (int) ( bDiff * rat ));
}
@@ -516,7 +516,7 @@ TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca,
for (y = 0; y < h; y++) {
unsigned int *scanline = (unsigned int *)image.scanLine(y);
for (x = 0; x < w; x++) {
- scanline[x] = qRgb(rcb - (xtable[0][x] + ytable[0][y]),
+ scanline[x] = tqRgb(rcb - (xtable[0][x] + ytable[0][y]),
gcb - (xtable[1][x] + ytable[1][y]),
bcb - (xtable[2][x] + ytable[2][y]));
}
@@ -558,13 +558,13 @@ TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca,
for (x = 0; x < w; x++) {
if (eff == PyramidGradient)
{
- scanline[x] = qRgb(rcb-rSign*(xtable[0][x]+ytable[0][y]),
+ scanline[x] = tqRgb(rcb-rSign*(xtable[0][x]+ytable[0][y]),
gcb-gSign*(xtable[1][x]+ytable[1][y]),
bcb-bSign*(xtable[2][x]+ytable[2][y]));
}
else if (eff == RectangleGradient)
{
- scanline[x] = qRgb(rcb - rSign *
+ scanline[x] = tqRgb(rcb - rSign *
QMAX(xtable[0][x], ytable[0][y]) * 2,
gcb - gSign *
QMAX(xtable[1][x], ytable[1][y]) * 2,
@@ -573,7 +573,7 @@ TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca,
}
else if (eff == PipeCrossGradient)
{
- scanline[x] = qRgb(rcb - rSign *
+ scanline[x] = tqRgb(rcb - rSign *
QMIN(xtable[0][x], ytable[0][y]) * 2,
gcb - gSign *
QMIN(xtable[1][x], ytable[1][y]) * 2,
@@ -582,7 +582,7 @@ TQImage KImageEffect::unbalancedGradient(const TQSize &size, const TQColor &ca,
}
else if (eff == EllipticGradient)
{
- scanline[x] = qRgb(rcb - rSign *
+ scanline[x] = tqRgb(rcb - rSign *
(int)sqrt((xtable[0][x]*xtable[0][x] +
ytable[0][y]*ytable[0][y])*2.0),
gcb - gSign *
@@ -628,12 +628,12 @@ namespace {
struct KIE4Pack
{
- Q_UINT16 data[4];
+ TQ_UINT16 data[4];
};
struct KIE8Pack
{
- Q_UINT16 data[8];
+ TQ_UINT16 data[8];
};
}
@@ -675,7 +675,7 @@ TQImage& KImageEffect::intensity(TQImage &image, float percent)
if(haveMMX)
{
- Q_UINT16 p = Q_UINT16(256.0f*(percent));
+ TQ_UINT16 p = TQ_UINT16(256.0f*(percent));
KIE4Pack mult = {{p,p,p,0}};
__asm__ __volatile__(
@@ -685,7 +685,7 @@ TQImage& KImageEffect::intensity(TQImage &image, float percent)
unsigned int rem = pixels % 4;
pixels -= rem;
- Q_UINT32 *end = ( data + pixels );
+ TQ_UINT32 *end = ( data + pixels );
if (brighten)
{
@@ -815,26 +815,26 @@ TQImage& KImageEffect::intensity(TQImage &image, float percent)
if(brighten){ // same here
for(int i=0; i < pixels; ++i){
- int r = qRed(data[i]);
- int g = qGreen(data[i]);
- int b = qBlue(data[i]);
- int a = qAlpha(data[i]);
+ int r = tqRed(data[i]);
+ int g = tqGreen(data[i]);
+ int b = tqBlue(data[i]);
+ int a = tqAlpha(data[i]);
r = r + segTbl[r] > 255 ? 255 : r + segTbl[r];
g = g + segTbl[g] > 255 ? 255 : g + segTbl[g];
b = b + segTbl[b] > 255 ? 255 : b + segTbl[b];
- data[i] = qRgba(r, g, b,a);
+ data[i] = tqRgba(r, g, b,a);
}
}
else{
for(int i=0; i < pixels; ++i){
- int r = qRed(data[i]);
- int g = qGreen(data[i]);
- int b = qBlue(data[i]);
- int a = qAlpha(data[i]);
+ int r = tqRed(data[i]);
+ int g = tqGreen(data[i]);
+ int b = tqBlue(data[i]);
+ int a = tqAlpha(data[i]);
r = r - segTbl[r] < 0 ? 0 : r - segTbl[r];
g = g - segTbl[g] < 0 ? 0 : g - segTbl[g];
b = b - segTbl[b] < 0 ? 0 : b - segTbl[b];
- data[i] = qRgba(r, g, b, a);
+ data[i] = tqRgba(r, g, b, a);
}
}
delete [] segTbl;
@@ -883,23 +883,23 @@ TQImage& KImageEffect::channelIntensity(TQImage &image, float percent,
if(brighten){ // same here
if(channel == Red){ // and here ;-)
for(int i=0; i < pixels; ++i){
- int c = qRed(data[i]);
+ int c = tqRed(data[i]);
c = c + segTbl[c] > 255 ? 255 : c + segTbl[c];
- data[i] = qRgba(c, qGreen(data[i]), qBlue(data[i]), qAlpha(data[i]));
+ data[i] = tqRgba(c, tqGreen(data[i]), tqBlue(data[i]), tqAlpha(data[i]));
}
}
else if(channel == Green){
for(int i=0; i < pixels; ++i){
- int c = qGreen(data[i]);
+ int c = tqGreen(data[i]);
c = c + segTbl[c] > 255 ? 255 : c + segTbl[c];
- data[i] = qRgba(qRed(data[i]), c, qBlue(data[i]), qAlpha(data[i]));
+ data[i] = tqRgba(tqRed(data[i]), c, tqBlue(data[i]), tqAlpha(data[i]));
}
}
else{
for(int i=0; i < pixels; ++i){
- int c = qBlue(data[i]);
+ int c = tqBlue(data[i]);
c = c + segTbl[c] > 255 ? 255 : c + segTbl[c];
- data[i] = qRgba(qRed(data[i]), qGreen(data[i]), c, qAlpha(data[i]));
+ data[i] = tqRgba(tqRed(data[i]), tqGreen(data[i]), c, tqAlpha(data[i]));
}
}
@@ -907,23 +907,23 @@ TQImage& KImageEffect::channelIntensity(TQImage &image, float percent,
else{
if(channel == Red){
for(int i=0; i < pixels; ++i){
- int c = qRed(data[i]);
+ int c = tqRed(data[i]);
c = c - segTbl[c] < 0 ? 0 : c - segTbl[c];
- data[i] = qRgba(c, qGreen(data[i]), qBlue(data[i]), qAlpha(data[i]));
+ data[i] = tqRgba(c, tqGreen(data[i]), tqBlue(data[i]), tqAlpha(data[i]));
}
}
else if(channel == Green){
for(int i=0; i < pixels; ++i){
- int c = qGreen(data[i]);
+ int c = tqGreen(data[i]);
c = c - segTbl[c] < 0 ? 0 : c - segTbl[c];
- data[i] = qRgba(qRed(data[i]), c, qBlue(data[i]), qAlpha(data[i]));
+ data[i] = tqRgba(tqRed(data[i]), c, tqBlue(data[i]), tqAlpha(data[i]));
}
}
else{
for(int i=0; i < pixels; ++i){
- int c = qBlue(data[i]);
+ int c = tqBlue(data[i]);
c = c - segTbl[c] < 0 ? 0 : c - segTbl[c];
- data[i] = qRgba(qRed(data[i]), qGreen(data[i]), c, qAlpha(data[i]));
+ data[i] = tqRgba(tqRed(data[i]), tqGreen(data[i]), c, tqAlpha(data[i]));
}
}
}
@@ -982,22 +982,22 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
color1 = *data1;
if (type == Intensity || type == Contrast) {
- r = qRed(color1);
- g = qGreen(color1);
- b = qBlue(color1);
+ r = tqRed(color1);
+ g = tqGreen(color1);
+ b = tqBlue(color1);
if (channel != All) {
- mod = (channel == Red) ? qRed(color2) :
- (channel == Green) ? qGreen(color2) :
- (channel == Blue) ? qBlue(color2) :
- (channel == Gray) ? qGray(color2) : 0;
+ mod = (channel == Red) ? tqRed(color2) :
+ (channel == Green) ? tqGreen(color2) :
+ (channel == Blue) ? tqBlue(color2) :
+ (channel == Gray) ? tqGray(color2) : 0;
mod = mod*factor/50;
}
if (type == Intensity) {
if (channel == All) {
- r += r * factor/50 * qRed(color2)/256;
- g += g * factor/50 * qGreen(color2)/256;
- b += b * factor/50 * qBlue(color2)/256;
+ r += r * factor/50 * tqRed(color2)/256;
+ g += g * factor/50 * tqGreen(color2)/256;
+ b += b * factor/50 * tqBlue(color2)/256;
}
else {
r += r * mod/256;
@@ -1007,9 +1007,9 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
}
else { // Contrast
if (channel == All) {
- r += (r-128) * factor/50 * qRed(color2)/128;
- g += (g-128) * factor/50 * qGreen(color2)/128;
- b += (b-128) * factor/50 * qBlue(color2)/128;
+ r += (r-128) * factor/50 * tqRed(color2)/128;
+ g += (g-128) * factor/50 * tqGreen(color2)/128;
+ b += (b-128) * factor/50 * tqBlue(color2)/128;
}
else {
r += (r-128) * mod/128;
@@ -1021,16 +1021,16 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
if (r<0) r=0; if (r>255) r=255;
if (g<0) g=0; if (g>255) g=255;
if (b<0) b=0; if (b>255) b=255;
- a = qAlpha(*data1);
- *data1 = qRgba(r, g, b, a);
+ a = tqAlpha(*data1);
+ *data1 = tqRgba(r, g, b, a);
}
else if (type == Saturation || type == HueShift) {
clr.setRgb(color1);
clr.hsv(&h, &s, &v);
- mod = (channel == Red) ? qRed(color2) :
- (channel == Green) ? qGreen(color2) :
- (channel == Blue) ? qBlue(color2) :
- (channel == Gray) ? qGray(color2) : 0;
+ mod = (channel == Red) ? tqRed(color2) :
+ (channel == Green) ? tqGreen(color2) :
+ (channel == Blue) ? tqBlue(color2) :
+ (channel == Gray) ? tqGray(color2) : 0;
mod = mod*factor/50;
if (type == Saturation) {
@@ -1044,7 +1044,7 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
}
clr.setHsv(h, s, v);
- a = qAlpha(*data1);
+ a = tqAlpha(*data1);
*data1 = clr.rgb() | ((uint)(a & 0xff) << 24);
}
data1++; data2++; data2b++; x++;
@@ -1083,14 +1083,14 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity)
#ifdef USE_SSE2_INLINE_ASM
if ( KCPUInfo::haveExtension( KCPUInfo::IntelSSE2 ) && pixels > 16 ) {
- Q_UINT16 alpha = Q_UINT16( ( 1.0 - opacity ) * 256.0 );
+ TQ_UINT16 alpha = TQ_UINT16( ( 1.0 - opacity ) * 256.0 );
KIE8Pack packedalpha = { { alpha, alpha, alpha, 256,
alpha, alpha, alpha, 256 } };
- Q_UINT16 red = Q_UINT16( clr.red() * 256 * opacity );
- Q_UINT16 green = Q_UINT16( clr.green() * 256 * opacity );
- Q_UINT16 blue = Q_UINT16( clr.blue() * 256 * opacity );
+ TQ_UINT16 red = TQ_UINT16( clr.red() * 256 * opacity );
+ TQ_UINT16 green = TQ_UINT16( clr.green() * 256 * opacity );
+ TQ_UINT16 blue = TQ_UINT16( clr.blue() * 256 * opacity );
KIE8Pack packedcolor = { { blue, green, red, 0,
blue, green, red, 0 } };
@@ -1103,10 +1103,10 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity)
: : "r"(&packedalpha), "r"(&packedcolor),
"m"(packedcolor), "m"(packedalpha) );
- Q_UINT32 *data = reinterpret_cast<Q_UINT32*>( dst.bits() );
+ TQ_UINT32 *data = reinterpret_cast<TQ_UINT32*>( dst.bits() );
- // Check how many pixels we need to process to achieve 16 byte alignment
- int offset = (16 - (Q_UINT32( data ) & 0x0f)) / 4;
+ // Check how many pixels we need to process to achieve 16 byte tqalignment
+ int offset = (16 - (TQ_UINT32( data ) & 0x0f)) / 4;
// The main loop processes 8 pixels / iteration
int remainder = (pixels - offset) % 8;
@@ -1188,12 +1188,12 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity)
#ifdef USE_MMX_INLINE_ASM
if ( KCPUInfo::haveExtension( KCPUInfo::IntelMMX ) && pixels > 1 ) {
- Q_UINT16 alpha = Q_UINT16( ( 1.0 - opacity ) * 256.0 );
+ TQ_UINT16 alpha = TQ_UINT16( ( 1.0 - opacity ) * 256.0 );
KIE4Pack packedalpha = { { alpha, alpha, alpha, 256 } };
- Q_UINT16 red = Q_UINT16( clr.red() * 256 * opacity );
- Q_UINT16 green = Q_UINT16( clr.green() * 256 * opacity );
- Q_UINT16 blue = Q_UINT16( clr.blue() * 256 * opacity );
+ TQ_UINT16 red = TQ_UINT16( clr.red() * 256 * opacity );
+ TQ_UINT16 green = TQ_UINT16( clr.green() * 256 * opacity );
+ TQ_UINT16 blue = TQ_UINT16( clr.blue() * 256 * opacity );
KIE4Pack packedcolor = { { blue, green, red, 0 } };
@@ -1203,7 +1203,7 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity)
"movq (%1), %%mm5\n\t" // Set up color * alpha * 256 in MM5
: : "r"(&packedalpha), "r"(&packedcolor), "m"(packedcolor), "m"(packedalpha) );
- Q_UINT32 *data = reinterpret_cast<Q_UINT32*>( dst.bits() );
+ TQ_UINT32 *data = reinterpret_cast<TQ_UINT32*>( dst.bits() );
// The main loop processes 4 pixels / iteration
int remainder = pixels % 4;
@@ -1333,7 +1333,7 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity)
#ifdef USE_SSE2_INLINE_ASM
if ( KCPUInfo::haveExtension( KCPUInfo::IntelSSE2 ) && pixels > 16 ) {
- Q_UINT16 alpha = Q_UINT16( opacity * 256.0 );
+ TQ_UINT16 alpha = TQ_UINT16( opacity * 256.0 );
KIE8Pack packedalpha = { { alpha, alpha, alpha, 0,
alpha, alpha, alpha, 0 } };
@@ -1343,11 +1343,11 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity)
"movdqu (%0), %%xmm6\n\t" // Set up alpha * 256 in XMM6
: : "r"(&packedalpha), "m"(packedalpha) );
- Q_UINT32 *data1 = reinterpret_cast<Q_UINT32*>( src.bits() );
- Q_UINT32 *data2 = reinterpret_cast<Q_UINT32*>( dst.bits() );
+ TQ_UINT32 *data1 = reinterpret_cast<TQ_UINT32*>( src.bits() );
+ TQ_UINT32 *data2 = reinterpret_cast<TQ_UINT32*>( dst.bits() );
- // Check how many pixels we need to process to achieve 16 byte alignment
- int offset = (16 - (Q_UINT32( data2 ) & 0x0f)) / 4;
+ // Check how many pixels we need to process to achieve 16 byte tqalignment
+ int offset = (16 - (TQ_UINT32( data2 ) & 0x0f)) / 4;
// The main loop processes 4 pixels / iteration
int remainder = (pixels - offset) % 4;
@@ -1428,7 +1428,7 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity)
#ifdef USE_MMX_INLINE_ASM
if ( KCPUInfo::haveExtension( KCPUInfo::IntelMMX ) && pixels > 1 ) {
- Q_UINT16 alpha = Q_UINT16( opacity * 256.0 );
+ TQ_UINT16 alpha = TQ_UINT16( opacity * 256.0 );
KIE4Pack packedalpha = { { alpha, alpha, alpha, 0 } };
// Prepare the MM6 and MM7 registers for blending and unpacking
@@ -1437,8 +1437,8 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity)
"movq (%0), %%mm6\n\t" // Set up alpha * 256 in MM6
: : "r"(&packedalpha), "m"(packedalpha) );
- Q_UINT32 *data1 = reinterpret_cast<Q_UINT32*>( src.bits() );
- Q_UINT32 *data2 = reinterpret_cast<Q_UINT32*>( dst.bits() );
+ TQ_UINT32 *data1 = reinterpret_cast<TQ_UINT32*>( src.bits() );
+ TQ_UINT32 *data2 = reinterpret_cast<TQ_UINT32*>( dst.bits() );
// The main loop processes 2 pixels / iteration
int remainder = pixels % 2;
@@ -1602,17 +1602,17 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity,
for (x = xi; x < (int)xf ; x++) {
if (eff == HorizontalGradient) intensity += var;
ind = x + ind_base;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
+ r = tqRed (data[ind]) + (int)(intensity *
+ (r_bgnd - tqRed (data[ind])));
+ g = tqGreen(data[ind]) + (int)(intensity *
+ (g_bgnd - tqGreen(data[ind])));
+ b = tqBlue (data[ind]) + (int)(intensity *
+ (b_bgnd - tqBlue (data[ind])));
if (r > 255) r = 255; if (r < 0 ) r = 0;
if (g > 255) g = 255; if (g < 0 ) g = 0;
if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
+ a = tqAlpha(data[ind]);
+ data[ind] = tqRgba(r, g, b, a);
}
}
}
@@ -1627,17 +1627,17 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity,
for (y = 0; y < image_height ; y++) {
intensity = initial_intensity + tmp + yvar * y;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
+ r = tqRed (data[ind]) + (int)(intensity *
+ (r_bgnd - tqRed (data[ind])));
+ g = tqGreen(data[ind]) + (int)(intensity *
+ (g_bgnd - tqGreen(data[ind])));
+ b = tqBlue (data[ind]) + (int)(intensity *
+ (b_bgnd - tqBlue (data[ind])));
if (r > 255) r = 255; if (r < 0 ) r = 0;
if (g > 255) g = 255; if (g < 0 ) g = 0;
if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
+ a = tqAlpha(data[ind]);
+ data[ind] = tqRgba(r, g, b, a);
ind += image_width;
}
@@ -1662,31 +1662,31 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity,
//NW
ind = x + image_width * y ;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
+ r = tqRed (data[ind]) + (int)(intensity *
+ (r_bgnd - tqRed (data[ind])));
+ g = tqGreen(data[ind]) + (int)(intensity *
+ (g_bgnd - tqGreen(data[ind])));
+ b = tqBlue (data[ind]) + (int)(intensity *
+ (b_bgnd - tqBlue (data[ind])));
if (r > 255) r = 255; if (r < 0 ) r = 0;
if (g > 255) g = 255; if (g < 0 ) g = 0;
if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
+ a = tqAlpha(data[ind]);
+ data[ind] = tqRgba(r, g, b, a);
//NE
ind = image_width - x - 1 + image_width * y ;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
+ r = tqRed (data[ind]) + (int)(intensity *
+ (r_bgnd - tqRed (data[ind])));
+ g = tqGreen(data[ind]) + (int)(intensity *
+ (g_bgnd - tqGreen(data[ind])));
+ b = tqBlue (data[ind]) + (int)(intensity *
+ (b_bgnd - tqBlue (data[ind])));
if (r > 255) r = 255; if (r < 0 ) r = 0;
if (g > 255) g = 255; if (g < 0 ) g = 0;
if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
+ a = tqAlpha(data[ind]);
+ data[ind] = tqRgba(r, g, b, a);
}
}
@@ -1706,31 +1706,31 @@ TQImage& KImageEffect::blend(TQImage &image, float initial_intensity,
//SW
ind = x + image_width * (image_height - y -1) ;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
+ r = tqRed (data[ind]) + (int)(intensity *
+ (r_bgnd - tqRed (data[ind])));
+ g = tqGreen(data[ind]) + (int)(intensity *
+ (g_bgnd - tqGreen(data[ind])));
+ b = tqBlue (data[ind]) + (int)(intensity *
+ (b_bgnd - tqBlue (data[ind])));
if (r > 255) r = 255; if (r < 0 ) r = 0;
if (g > 255) g = 255; if (g < 0 ) g = 0;
if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
+ a = tqAlpha(data[ind]);
+ data[ind] = tqRgba(r, g, b, a);
//SE
ind = image_width-x-1 + image_width * (image_height - y - 1) ;
- r = qRed (data[ind]) + (int)(intensity *
- (r_bgnd - qRed (data[ind])));
- g = qGreen(data[ind]) + (int)(intensity *
- (g_bgnd - qGreen(data[ind])));
- b = qBlue (data[ind]) + (int)(intensity *
- (b_bgnd - qBlue (data[ind])));
+ r = tqRed (data[ind]) + (int)(intensity *
+ (r_bgnd - tqRed (data[ind])));
+ g = tqGreen(data[ind]) + (int)(intensity *
+ (g_bgnd - tqGreen(data[ind])));
+ b = tqBlue (data[ind]) + (int)(intensity *
+ (b_bgnd - tqBlue (data[ind])));
if (r > 255) r = 255; if (r < 0 ) r = 0;
if (g > 255) g = 255; if (g < 0 ) g = 0;
if (b > 255) b = 255; if (b < 0 ) b = 0;
- a = qAlpha(data[ind]);
- data[ind] = qRgba(r, g, b, a);
+ a = tqAlpha(data[ind]);
+ data[ind] = tqRgba(r, g, b, a);
}
}
}
@@ -1809,16 +1809,16 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2,
while(x < (int)x1) {
color3 = (colorTable3) ? colorTable3[data3b[ind3]] : data3[ind3];
- a = (channel == Red) ? qRed(color3) :
- (channel == Green) ? qGreen(color3) :
- (channel == Blue) ? qBlue(color3) : qGray(color3);
+ a = (channel == Red) ? tqRed(color3) :
+ (channel == Green) ? tqGreen(color3) :
+ (channel == Blue) ? tqBlue(color3) : tqGray(color3);
- r = (a*qRed(data1[ind1]) + (256-a)*qRed(data2[ind2]))/256;
- g = (a*qGreen(data1[ind1]) + (256-a)*qGreen(data2[ind2]))/256;
- b = (a*qBlue(data1[ind1]) + (256-a)*qBlue(data2[ind2]))/256;
+ r = (a*tqRed(data1[ind1]) + (256-a)*tqRed(data2[ind2]))/256;
+ g = (a*tqGreen(data1[ind1]) + (256-a)*tqGreen(data2[ind2]))/256;
+ b = (a*tqBlue(data1[ind1]) + (256-a)*tqBlue(data2[ind2]))/256;
- a = qAlpha(data1[ind1]);
- data1[ind1] = qRgba(r, g, b, a);
+ a = tqAlpha(data1[ind1]);
+ data1[ind1] = tqRgba(r, g, b, a);
ind1++; ind2++; ind3++; x++;
if ( (x%x2) ==0) ind2 -= x2;
@@ -1837,13 +1837,13 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2,
unsigned int KImageEffect::lHash(unsigned int c)
{
- unsigned char r = qRed(c), g = qGreen(c), b = qBlue(c), a = qAlpha(c);
+ unsigned char r = tqRed(c), g = tqGreen(c), b = tqBlue(c), a = tqAlpha(c);
unsigned char nr, ng, nb;
nr =(r >> 1) + (r >> 2); nr = nr > r ? 0 : nr;
ng =(g >> 1) + (g >> 2); ng = ng > g ? 0 : ng;
nb =(b >> 1) + (b >> 2); nb = nb > b ? 0 : nb;
- return qRgba(nr, ng, nb, a);
+ return tqRgba(nr, ng, nb, a);
}
@@ -1851,13 +1851,13 @@ unsigned int KImageEffect::lHash(unsigned int c)
unsigned int KImageEffect::uHash(unsigned int c)
{
- unsigned char r = qRed(c), g = qGreen(c), b = qBlue(c), a = qAlpha(c);
+ unsigned char r = tqRed(c), g = tqGreen(c), b = tqBlue(c), a = tqAlpha(c);
unsigned char nr, ng, nb;
nr = r + (r >> 3); nr = nr < r ? ~0 : nr;
ng = g + (g >> 3); ng = ng < g ? ~0 : ng;
nb = b + (b >> 3); nb = nb < b ? ~0 : nb;
- return qRgba(nr, ng, nb, a);
+ return tqRgba(nr, ng, nb, a);
}
@@ -1969,7 +1969,7 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca,
// pseudocolor
for (int i = 0; i < img.numColors(); i++) {
col = img.color(i);
- int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3;
+ int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3;
min = QMIN(min, mean);
max = QMAX(max, mean);
}
@@ -1978,7 +1978,7 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca,
for (int y=0; y < img.height(); y++)
for (int x=0; x < img.width(); x++) {
col = img.pixel(x, y);
- int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3;
+ int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3;
min = QMIN(min, mean);
max = QMAX(max, mean);
}
@@ -1994,21 +1994,21 @@ TQImage& KImageEffect::flatten(TQImage &img, const TQColor &ca,
if (img.numColors()) {
for (int i=0; i < img.numColors(); i++) {
col = img.color(i);
- int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3;
+ int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3;
int r = (int) (sr * (mean - min) + r1 + 0.5);
int g = (int) (sg * (mean - min) + g1 + 0.5);
int b = (int) (sb * (mean - min) + b1 + 0.5);
- img.setColor(i, qRgba(r, g, b, qAlpha(col)));
+ img.setColor(i, tqRgba(r, g, b, tqAlpha(col)));
}
} else {
for (int y=0; y < img.height(); y++)
for (int x=0; x < img.width(); x++) {
col = img.pixel(x, y);
- int mean = (qRed(col) + qGreen(col) + qBlue(col)) / 3;
+ int mean = (tqRed(col) + tqGreen(col) + tqBlue(col)) / 3;
int r = (int) (sr * (mean - min) + r1 + 0.5);
int g = (int) (sg * (mean - min) + g1 + 0.5);
int b = (int) (sb * (mean - min) + b1 + 0.5);
- img.setPixel(x, y, qRgba(r, g, b, qAlpha(col)));
+ img.setPixel(x, y, tqRgba(r, g, b, tqAlpha(col)));
}
}
@@ -2065,7 +2065,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color)
// pseudo color
for (int i=0; i<img.numColors(); i++) {
col = img.color(i);
- cr = qRed(col); cg = qGreen(col); cb = qBlue(col);
+ cr = tqRed(col); cg = tqGreen(col); cb = tqBlue(col);
if (cr > red)
r = cr - tbl[cr - red];
else
@@ -2078,7 +2078,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color)
b = cb - tbl[cb - blue];
else
b = cb + tbl[blue - cb];
- img.setColor(i, qRgba(r, g, b, qAlpha(col)));
+ img.setColor(i, tqRgba(r, g, b, tqAlpha(col)));
}
} else {
@@ -2087,7 +2087,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color)
QRgb *data = (QRgb *) img.scanLine(y);
for (int x=0; x<img.width(); x++) {
col = *data;
- cr = qRed(col); cg = qGreen(col); cb = qBlue(col);
+ cr = tqRed(col); cg = tqGreen(col); cb = tqBlue(col);
if (cr > red)
r = cr - tbl[cr - red];
else
@@ -2100,7 +2100,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color)
b = cb - tbl[cb - blue];
else
b = cb + tbl[blue - cb];
- *data++ = qRgba(r, g, b, qAlpha(col));
+ *data++ = tqRgba(r, g, b, tqAlpha(col));
}
}
}
@@ -2116,7 +2116,7 @@ TQImage& KImageEffect::fade(TQImage &img, float val, const TQColor &color)
// This code is adapted from code (C) Rik Hemsley <rik@kde.org>
//
-// The formula used (r + b + g) /3 is different from the qGray formula
+// The formula used (r + b + g) /3 is different from the tqGray formula
// used by Qt. This is because our formula is much much faster. If,
// however, it turns out that this is producing sub-optimal images,
// then it will have to change (kurt)
@@ -2149,12 +2149,12 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast)
{
for (int i = 0; i < img.numColors(); i++)
{
- register uint r = qRed(img.color(i));
- register uint g = qGreen(img.color(i));
- register uint b = qBlue(img.color(i));
+ register uint r = tqRed(img.color(i));
+ register uint g = tqGreen(img.color(i));
+ register uint b = tqBlue(img.color(i));
register uint gray = (((r + g) >> 1) + b) >> 1;
- img.setColor(i, qRgba(gray, gray, gray, qAlpha(img.color(i))));
+ img.setColor(i, tqRgba(gray, gray, gray, tqAlpha(img.color(i))));
}
}
}
@@ -2165,8 +2165,8 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast)
(unsigned int *)img.tqcolorTable();
int val, i;
for(i=0; i < pixels; ++i){
- val = qGray(data[i]);
- data[i] = qRgba(val, val, val, qAlpha(data[i]));
+ val = tqGray(data[i]);
+ data[i] = tqRgba(val, val, val, tqAlpha(data[i]));
}
}
return img;
@@ -2211,10 +2211,10 @@ TQImage& KImageEffect::contrast(TQImage &img, int c)
(unsigned int *)img.tqcolorTable();
int i, r, g, b;
for(i=0; i < pixels; ++i){
- r = qRed(data[i]);
- g = qGreen(data[i]);
- b = qBlue(data[i]);
- if(qGray(data[i]) <= 127){
+ r = tqRed(data[i]);
+ g = tqGreen(data[i]);
+ b = tqBlue(data[i]);
+ if(tqGray(data[i]) <= 127){
if(r - c > 0)
r -= c;
else
@@ -2242,7 +2242,7 @@ TQImage& KImageEffect::contrast(TQImage &img, int c)
else
b = 255;
}
- data[i] = qRgba(r, g, b, qAlpha(data[i]));
+ data[i] = tqRgba(r, g, b, tqAlpha(data[i]));
}
return(img);
}
@@ -2290,11 +2290,11 @@ TQImage& KImageEffect::dither(TQImage &img, const TQColor *palette, int size)
for ( i = 0; i < img.width(); i++ )
{
- rerr1[i] = rerr2[i] + qRed( *ip );
+ rerr1[i] = rerr2[i] + tqRed( *ip );
rerr2[i] = 0;
- gerr1[i] = gerr2[i] + qGreen( *ip );
+ gerr1[i] = gerr2[i] + tqGreen( *ip );
gerr2[i] = 0;
- berr1[i] = berr2[i] + qBlue( *ip );
+ berr1[i] = berr2[i] + tqBlue( *ip );
berr2[i] = 0;
ip++;
}
@@ -2492,7 +2492,7 @@ bool KImageEffect::blend(
--b; --i; --o;
do
{
- while ( !(a=qAlpha(*i)) && k>0 )
+ while ( !(a=tqAlpha(*i)) && k>0 )
{
i--;
// *o=0;
@@ -2501,9 +2501,9 @@ bool KImageEffect::blend(
k--;
};
// *o=0xFF;
- *o = qRgb(qRed(*b) + (((qRed(*i) - qRed(*b)) * a) >> 8),
- qGreen(*b) + (((qGreen(*i) - qGreen(*b)) * a) >> 8),
- qBlue(*b) + (((qBlue(*i) - qBlue(*b)) * a) >> 8));
+ *o = tqRgb(tqRed(*b) + (((tqRed(*i) - tqRed(*b)) * a) >> 8),
+ tqGreen(*b) + (((tqGreen(*i) - tqGreen(*b)) * a) >> 8),
+ tqBlue(*b) + (((tqBlue(*i) - tqBlue(*b)) * a) >> 8));
--i; --o; --b;
} while (k--);
}
@@ -2595,10 +2595,10 @@ void KImageEffect::blendOnLower(const TQImage &upper, const TQPoint &upperOffset
for (int x = 0; x < lr.width(); x++) {
QRgb *b = reinterpret_cast<QRgb*>(lower.scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(QRgb));
QRgb *d = reinterpret_cast<QRgb*>(upper.scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(QRgb));
- int a = qAlpha(*d);
- *b = qRgb(qRed(*b) - (((qRed(*b) - qRed(*d)) * a) >> 8),
- qGreen(*b) - (((qGreen(*b) - qGreen(*d)) * a) >> 8),
- qBlue(*b) - (((qBlue(*b) - qBlue(*d)) * a) >> 8));
+ int a = tqAlpha(*d);
+ *b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8),
+ tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8),
+ tqBlue(*b) - (((tqBlue(*b) - tqBlue(*d)) * a) >> 8));
}
}
}
@@ -2617,10 +2617,10 @@ void KImageEffect::blendOnLower(const TQImage &upper, const TQPoint &upperOffset
for (int x = 0; x < lr.width(); x++) {
QRgb *b = reinterpret_cast<QRgb*>(lower.scanLine(lr.y() + y)+ (lr.x() + x) * sizeof(QRgb));
QRgb *d = reinterpret_cast<QRgb*>(upper.scanLine(upperOffset.y() + y) + (upperOffset.x() + x) * sizeof(QRgb));
- int a = qRound(opacity * qAlpha(*d));
- *b = qRgb(qRed(*b) - (((qRed(*b) - qRed(*d)) * a) >> 8),
- qGreen(*b) - (((qGreen(*b) - qGreen(*d)) * a) >> 8),
- qBlue(*b) - (((qBlue(*b) - qBlue(*d)) * a) >> 8));
+ int a = tqRound(opacity * tqAlpha(*d));
+ *b = tqRgb(tqRed(*b) - (((tqRed(*b) - tqRed(*d)) * a) >> 8),
+ tqGreen(*b) - (((tqGreen(*b) - tqGreen(*d)) * a) >> 8),
+ tqBlue(*b) - (((tqBlue(*b) - tqBlue(*d)) * a) >> 8));
}
}
}
@@ -2940,10 +2940,10 @@ TQImage KImageEffect::despeckle(TQImage &src)
srcData = (unsigned int *)src.scanLine(y);
++j;
for(x=0; x < src.width(); ++x){
- red_channel[j] = qRed(srcData[x]);
- green_channel[j] = qGreen(srcData[x]);
- blue_channel[j] = qBlue(srcData[x]);
- alpha_channel[j] = qAlpha(srcData[x]);
+ red_channel[j] = tqRed(srcData[x]);
+ green_channel[j] = tqGreen(srcData[x]);
+ blue_channel[j] = tqBlue(srcData[x]);
+ alpha_channel[j] = tqAlpha(srcData[x]);
++j;
}
++j;
@@ -2958,10 +2958,10 @@ TQImage KImageEffect::despeckle(TQImage &src)
++j;
for(x=0; x < src.width(); ++x){
pixel = *(cTable+srcData[x]);
- red_channel[j] = qRed(pixel);
- green_channel[j] = qGreen(pixel);
- blue_channel[j] = qBlue(pixel);
- alpha_channel[j] = qAlpha(pixel);
+ red_channel[j] = tqRed(pixel);
+ green_channel[j] = tqGreen(pixel);
+ blue_channel[j] = tqBlue(pixel);
+ alpha_channel[j] = tqAlpha(pixel);
++j;
}
++j;
@@ -3000,7 +3000,7 @@ TQImage KImageEffect::despeckle(TQImage &src)
++j;
for (x=0; x < dest.width(); ++x)
{
- destData[x] = qRgba(red_channel[j], green_channel[j],
+ destData[x] = tqRgba(red_channel[j], green_channel[j],
blue_channel[j], alpha_channel[j]);
++j;
}
@@ -3121,10 +3121,10 @@ TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type)
srcData = (unsigned int *)src.scanLine(y);
destData = (unsigned int *)dest.scanLine(y);
for(x=0; x < src.width(); ++x){
- destData[x] = qRgba(generateNoise(qRed(srcData[x]), noise_type),
- generateNoise(qGreen(srcData[x]), noise_type),
- generateNoise(qBlue(srcData[x]), noise_type),
- qAlpha(srcData[x]));
+ destData[x] = tqRgba(generateNoise(tqRed(srcData[x]), noise_type),
+ generateNoise(tqGreen(srcData[x]), noise_type),
+ generateNoise(tqBlue(srcData[x]), noise_type),
+ tqAlpha(srcData[x]));
}
}
}
@@ -3137,10 +3137,10 @@ TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type)
destData = (unsigned int *)dest.scanLine(y);
for(x=0; x < src.width(); ++x){
pixel = *(cTable+srcData[x]);
- destData[x] = qRgba(generateNoise(qRed(pixel), noise_type),
- generateNoise(qGreen(pixel), noise_type),
- generateNoise(qBlue(pixel), noise_type),
- qAlpha(pixel));
+ destData[x] = tqRgba(generateNoise(tqRed(pixel), noise_type),
+ generateNoise(tqGreen(pixel), noise_type),
+ generateNoise(tqBlue(pixel), noise_type),
+ tqAlpha(pixel));
}
}
@@ -3233,10 +3233,10 @@ unsigned int KImageEffect::interpolateColor(TQImage *image, double x_offset,
alpha = 1.0-x_offset;
beta = 1.0-y_offset;
- return(qRgba((unsigned char)(beta*(alpha*qRed(p)+x_offset*qRed(q))+y_offset*(alpha*qRed(r)+x_offset*qRed(s))),
- (unsigned char)(beta*(alpha*qGreen(p)+x_offset*qGreen(q))+y_offset*(alpha*qGreen(r)+x_offset*qGreen(s))),
- (unsigned char)(beta*(alpha*qBlue(p)+x_offset*qBlue(q))+y_offset*(alpha*qBlue(r)+x_offset*qBlue(s))),
- (unsigned char)(beta*(alpha*qAlpha(p)+x_offset*qAlpha(q))+y_offset*(alpha*qAlpha(r)+x_offset*qAlpha(s)))));
+ return(tqRgba((unsigned char)(beta*(alpha*tqRed(p)+x_offset*tqRed(q))+y_offset*(alpha*tqRed(r)+x_offset*tqRed(s))),
+ (unsigned char)(beta*(alpha*tqGreen(p)+x_offset*tqGreen(q))+y_offset*(alpha*tqGreen(r)+x_offset*tqGreen(s))),
+ (unsigned char)(beta*(alpha*tqBlue(p)+x_offset*tqBlue(q))+y_offset*(alpha*tqBlue(r)+x_offset*tqBlue(s))),
+ (unsigned char)(beta*(alpha*tqAlpha(p)+x_offset*tqAlpha(q))+y_offset*(alpha*tqAlpha(r)+x_offset*tqAlpha(s)))));
}
TQImage KImageEffect::implode(TQImage &src, double factor,
@@ -3434,10 +3434,10 @@ void KImageEffect::solarize(TQImage &img, double factor)
count = img.width()*img.height();
}
for(i=0; i < count; ++i){
- data[i] = qRgba(qRed(data[i]) > threshold ? MaxRGB-qRed(data[i]) : qRed(data[i]),
- qGreen(data[i]) > threshold ? MaxRGB-qGreen(data[i]) : qGreen(data[i]),
- qBlue(data[i]) > threshold ? MaxRGB-qBlue(data[i]) : qBlue(data[i]),
- qAlpha(data[i]));
+ data[i] = tqRgba(tqRed(data[i]) > threshold ? MaxRGB-tqRed(data[i]) : tqRed(data[i]),
+ tqGreen(data[i]) > threshold ? MaxRGB-tqGreen(data[i]) : tqGreen(data[i]),
+ tqBlue(data[i]) > threshold ? MaxRGB-tqBlue(data[i]) : tqBlue(data[i]),
+ tqAlpha(data[i]));
}
}
@@ -3694,7 +3694,7 @@ void KImageEffect::normalize(TQImage &image)
{
struct double_packet high, low, intensity, *histogram;
struct short_packet *normalize_map;
- Q_INT64 number_pixels;
+ TQ_INT64 number_pixels;
int x, y;
unsigned int *p, *q;
register long i;
@@ -3725,10 +3725,10 @@ void KImageEffect::normalize(TQImage &image)
for(y=0; y < image.height(); ++y){
p = (unsigned int *)image.scanLine(y);
for(x=0; x < image.width(); ++x){
- histogram[(unsigned char)(qRed(*p))].red++;
- histogram[(unsigned char)(qGreen(*p))].green++;
- histogram[(unsigned char)(qBlue(*p))].blue++;
- histogram[(unsigned char)(qAlpha(*p))].alpha++;
+ histogram[(unsigned char)(tqRed(*p))].red++;
+ histogram[(unsigned char)(tqGreen(*p))].green++;
+ histogram[(unsigned char)(tqBlue(*p))].blue++;
+ histogram[(unsigned char)(tqAlpha(*p))].alpha++;
p++;
}
}
@@ -3736,7 +3736,7 @@ void KImageEffect::normalize(TQImage &image)
/*
Find the histogram boundaries by locating the 0.1 percent levels.
*/
- number_pixels = (Q_INT64)image.width()*image.height();
+ number_pixels = (TQ_INT64)image.width()*image.height();
threshold_intensity = number_pixels/1000;
/* red */
@@ -3879,22 +3879,22 @@ void KImageEffect::normalize(TQImage &image)
q = (unsigned int *)image.scanLine(y);
for(x=0; x < image.width(); ++x){
if(low.red != high.red)
- r = (normalize_map[(unsigned short)(qRed(q[x]))].red)/257;
+ r = (normalize_map[(unsigned short)(tqRed(q[x]))].red)/257;
else
- r = qRed(q[x]);
+ r = tqRed(q[x]);
if(low.green != high.green)
- g = (normalize_map[(unsigned short)(qGreen(q[x]))].green)/257;
+ g = (normalize_map[(unsigned short)(tqGreen(q[x]))].green)/257;
else
- g = qGreen(q[x]);
+ g = tqGreen(q[x]);
if(low.blue != high.blue)
- b = (normalize_map[(unsigned short)(qBlue(q[x]))].blue)/257;
+ b = (normalize_map[(unsigned short)(tqBlue(q[x]))].blue)/257;
else
- b = qBlue(q[x]);
+ b = tqBlue(q[x]);
if(low.alpha != high.alpha)
- a = (normalize_map[(unsigned short)(qAlpha(q[x]))].alpha)/257;
+ a = (normalize_map[(unsigned short)(tqAlpha(q[x]))].alpha)/257;
else
- a = qAlpha(q[x]);
- q[x] = qRgba(r, g, b, a);
+ a = tqAlpha(q[x]);
+ q[x] = tqRgba(r, g, b, a);
}
}
liberateMemory(&normalize_map);
@@ -3933,10 +3933,10 @@ void KImageEffect::equalize(TQImage &image)
for(y=0; y < image.height(); ++y){
p = (unsigned int *)image.scanLine(y);
for(x=0; x < image.width(); ++x){
- histogram[(unsigned char)(qRed(*p))].red++;
- histogram[(unsigned char)(qGreen(*p))].green++;
- histogram[(unsigned char)(qBlue(*p))].blue++;
- histogram[(unsigned char)(qAlpha(*p))].alpha++;
+ histogram[(unsigned char)(tqRed(*p))].red++;
+ histogram[(unsigned char)(tqGreen(*p))].green++;
+ histogram[(unsigned char)(tqBlue(*p))].blue++;
+ histogram[(unsigned char)(tqAlpha(*p))].alpha++;
p++;
}
}
@@ -3978,22 +3978,22 @@ void KImageEffect::equalize(TQImage &image)
q = (unsigned int *)image.scanLine(y);
for(x=0; x < image.width(); ++x){
if(low.red != high.red)
- r = (equalize_map[(unsigned short)(qRed(q[x]))].red/257);
+ r = (equalize_map[(unsigned short)(tqRed(q[x]))].red/257);
else
- r = qRed(q[x]);
+ r = tqRed(q[x]);
if(low.green != high.green)
- g = (equalize_map[(unsigned short)(qGreen(q[x]))].green/257);
+ g = (equalize_map[(unsigned short)(tqGreen(q[x]))].green/257);
else
- g = qGreen(q[x]);
+ g = tqGreen(q[x]);
if(low.blue != high.blue)
- b = (equalize_map[(unsigned short)(qBlue(q[x]))].blue/257);
+ b = (equalize_map[(unsigned short)(tqBlue(q[x]))].blue/257);
else
- b = qBlue(q[x]);
+ b = tqBlue(q[x]);
if(low.alpha != high.alpha)
- a = (equalize_map[(unsigned short)(qAlpha(q[x]))].alpha/257);
+ a = (equalize_map[(unsigned short)(tqAlpha(q[x]))].alpha/257);
else
- a = qAlpha(q[x]);
- q[x] = qRgba(r, g, b, a);
+ a = tqAlpha(q[x]);
+ q[x] = tqRgba(r, g, b, a);
}
}
liberateMemory(&equalize_map);
@@ -4102,10 +4102,10 @@ void KImageEffect::blurScanLine(double *kernel, int width,
q = src;
for(i=0; i < columns; ++i){
if((i >= (x-width/2)) && (i <= (x+width/2))){
- red += (*p)*(qRed(*q)*257);
- green += (*p)*(qGreen(*q)*257);
- blue += (*p)*(qBlue(*q)*257);
- alpha += (*p)*(qAlpha(*q)*257);
+ red += (*p)*(tqRed(*q)*257);
+ green += (*p)*(tqGreen(*q)*257);
+ blue += (*p)*(tqBlue(*q)*257);
+ alpha += (*p)*(tqAlpha(*q)*257);
}
if(((i+width/2-x) >= 0) && ((i+width/2-x) < width))
scale+=kernel[i+width/2-x];
@@ -4123,7 +4123,7 @@ void KImageEffect::blurScanLine(double *kernel, int width,
blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue;
alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha;
- dest[x] = qRgba((unsigned char)(red/257UL),
+ dest[x] = tqRgba((unsigned char)(red/257UL),
(unsigned char)(green/257UL),
(unsigned char)(blue/257UL),
(unsigned char)(alpha/257UL));
@@ -4137,10 +4137,10 @@ void KImageEffect::blurScanLine(double *kernel, int width,
p = kernel+width/2-x;
q = src;
for(i=width/2-x; i < width; ++i){
- red += (*p)*(qRed(*q)*257);
- green += (*p)*(qGreen(*q)*257);
- blue += (*p)*(qBlue(*q)*257);
- alpha += (*p)*(qAlpha(*q)*257);
+ red += (*p)*(tqRed(*q)*257);
+ green += (*p)*(tqGreen(*q)*257);
+ blue += (*p)*(tqBlue(*q)*257);
+ alpha += (*p)*(tqAlpha(*q)*257);
scale += (*p);
p++;
q++;
@@ -4157,7 +4157,7 @@ void KImageEffect::blurScanLine(double *kernel, int width,
blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue;
alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha;
- dest[x] = qRgba((unsigned char)(red/257UL),
+ dest[x] = tqRgba((unsigned char)(red/257UL),
(unsigned char)(green/257UL),
(unsigned char)(blue/257UL),
(unsigned char)(alpha/257UL));
@@ -4168,10 +4168,10 @@ void KImageEffect::blurScanLine(double *kernel, int width,
p = kernel;
q = src+(x-width/2);
for (i=0; i < (long) width; ++i){
- red += (*p)*(qRed(*q)*257);
- green += (*p)*(qGreen(*q)*257);
- blue += (*p)*(qBlue(*q)*257);
- alpha += (*p)*(qAlpha(*q)*257);
+ red += (*p)*(tqRed(*q)*257);
+ green += (*p)*(tqGreen(*q)*257);
+ blue += (*p)*(tqBlue(*q)*257);
+ alpha += (*p)*(tqAlpha(*q)*257);
p++;
q++;
}
@@ -4185,7 +4185,7 @@ void KImageEffect::blurScanLine(double *kernel, int width,
blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue;
alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha;
- dest[x] = qRgba((unsigned char)(red/257UL),
+ dest[x] = tqRgba((unsigned char)(red/257UL),
(unsigned char)(green/257UL),
(unsigned char)(blue/257UL),
(unsigned char)(alpha/257UL));
@@ -4197,10 +4197,10 @@ void KImageEffect::blurScanLine(double *kernel, int width,
p = kernel;
q = src+(x-width/2);
for(i=0; i < columns-x+width/2; ++i){
- red += (*p)*(qRed(*q)*257);
- green += (*p)*(qGreen(*q)*257);
- blue += (*p)*(qBlue(*q)*257);
- alpha += (*p)*(qAlpha(*q)*257);
+ red += (*p)*(tqRed(*q)*257);
+ green += (*p)*(tqGreen(*q)*257);
+ blue += (*p)*(tqBlue(*q)*257);
+ alpha += (*p)*(tqAlpha(*q)*257);
scale += (*p);
p++;
q++;
@@ -4216,7 +4216,7 @@ void KImageEffect::blurScanLine(double *kernel, int width,
blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue;
alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha;
- dest[x] = qRgba((unsigned char)(red/257UL),
+ dest[x] = tqRgba((unsigned char)(red/257UL),
(unsigned char)(green/257UL),
(unsigned char)(blue/257UL),
(unsigned char)(alpha/257UL));
@@ -4381,10 +4381,10 @@ bool KImageEffect::convolveImage(TQImage *image, TQImage *dest,
for(mcx=0; mcx < width; ++mcx, ++sx){
mx = sx < 0 ? 0 : sx > image->width()-1 ?
image->width()-1 : sx;
- red += (*k)*(qRed(jumpTable[my][mx])*257);
- green += (*k)*(qGreen(jumpTable[my][mx])*257);
- blue += (*k)*(qBlue(jumpTable[my][mx])*257);
- alpha += (*k)*(qAlpha(jumpTable[my][mx])*257);
+ red += (*k)*(tqRed(jumpTable[my][mx])*257);
+ green += (*k)*(tqGreen(jumpTable[my][mx])*257);
+ blue += (*k)*(tqBlue(jumpTable[my][mx])*257);
+ alpha += (*k)*(tqAlpha(jumpTable[my][mx])*257);
++k;
}
}
@@ -4394,7 +4394,7 @@ bool KImageEffect::convolveImage(TQImage *image, TQImage *dest,
blue = blue < 0 ? 0 : blue > 65535 ? 65535 : blue+0.5;
alpha = alpha < 0 ? 0 : alpha > 65535 ? 65535 : alpha+0.5;
- *q++ = qRgba((unsigned char)(red/257UL),
+ *q++ = tqRgba((unsigned char)(red/257UL),
(unsigned char)(green/257UL),
(unsigned char)(blue/257UL),
(unsigned char)(alpha/257UL));
@@ -4528,16 +4528,16 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth,
}
}
if(!color_shading){
- *q = qRgba((unsigned char)(shade),
+ *q = tqRgba((unsigned char)(shade),
(unsigned char)(shade),
(unsigned char)(shade),
- qAlpha(*s1));
+ tqAlpha(*s1));
}
else{
- *q = qRgba((unsigned char)((shade*qRed(*s1))/(MaxRGB+1)),
- (unsigned char)((shade*qGreen(*s1))/(MaxRGB+1)),
- (unsigned char)((shade*qBlue(*s1))/(MaxRGB+1)),
- qAlpha(*s1));
+ *q = tqRgba((unsigned char)((shade*tqRed(*s1))/(MaxRGB+1)),
+ (unsigned char)((shade*tqGreen(*s1))/(MaxRGB+1)),
+ (unsigned char)((shade*tqBlue(*s1))/(MaxRGB+1)),
+ tqAlpha(*s1));
}
++s0;
++s1;
@@ -4585,16 +4585,16 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth,
}
}
if(!color_shading){
- *q = qRgba((unsigned char)(shade),
+ *q = tqRgba((unsigned char)(shade),
(unsigned char)(shade),
(unsigned char)(shade),
- qAlpha(*(cTable+(*s1))));
+ tqAlpha(*(cTable+(*s1))));
}
else{
- *q = qRgba((unsigned char)((shade*qRed(*(cTable+(*s1))))/(MaxRGB+1)),
- (unsigned char)((shade*qGreen(*(cTable+(*s1))))/(MaxRGB+1)),
- (unsigned char)((shade*qBlue(*(cTable+(*s1))))/(MaxRGB+1)),
- qAlpha(*s1));
+ *q = tqRgba((unsigned char)((shade*tqRed(*(cTable+(*s1))))/(MaxRGB+1)),
+ (unsigned char)((shade*tqGreen(*(cTable+(*s1))))/(MaxRGB+1)),
+ (unsigned char)((shade*tqBlue(*(cTable+(*s1))))/(MaxRGB+1)),
+ tqAlpha(*s1));
}
++s0;
++s1;
@@ -4643,7 +4643,7 @@ void KImageEffect::contrastHSV(TQImage &img, bool sharpen)
brightness=0.0;
v = (int)(brightness*255);
c.setHsv(h, s, v);
- data[i] = qRgba(c.red(), c.green(), c.blue(), qAlpha(data[i]));
+ data[i] = tqRgba(c.red(), c.green(), c.blue(), tqAlpha(data[i]));
}
}
@@ -4726,7 +4726,7 @@ static void bumpmap_convert_row( uint *row,
unsigned int idx = (unsigned int)(intensityValue( *row ) + 0.5);
*p++ = lut[(unsigned int) ( waterlevel +
( ( idx -
- waterlevel) * qBlue( *row )) / 255.0 )];
+ waterlevel) * tqBlue( *row )) / 255.0 )];
} else {
unsigned int idx = (unsigned int)(intensityValue( *row ) + 0.5);
*p++ = lut[idx];
@@ -4807,19 +4807,19 @@ static void bumpmap_row( uint *src,
* also change
*/
if (compensate) {
- int red = (int)((qRed( *src ) * shade) / (params->compensation * 255));
- int green = (int)((qGreen( *src ) * shade) / (params->compensation * 255));
- int blue = (int)((qBlue( *src ) * shade) / (params->compensation * 255));
- int alpha = (int)((qAlpha( *src ) * shade) / (params->compensation * 255));
+ int red = (int)((tqRed( *src ) * shade) / (params->compensation * 255));
+ int green = (int)((tqGreen( *src ) * shade) / (params->compensation * 255));
+ int blue = (int)((tqBlue( *src ) * shade) / (params->compensation * 255));
+ int alpha = (int)((tqAlpha( *src ) * shade) / (params->compensation * 255));
++src;
- *dest++ = qRgba( red, green, blue, alpha );
+ *dest++ = tqRgba( red, green, blue, alpha );
} else {
- int red = qRed( *src ) * shade / 255;
- int green = qGreen( *src ) * shade / 255;
- int blue = qBlue( *src ) * shade / 255;
- int alpha = qAlpha( *src ) * shade / 255;
+ int red = tqRed( *src ) * shade / 255;
+ int green = tqGreen( *src ) * shade / 255;
+ int blue = tqBlue( *src ) * shade / 255;
+ int alpha = tqAlpha( *src ) * shade / 255;
++src;
- *dest++ = qRgba( red, green, blue, alpha );
+ *dest++ = tqRgba( red, green, blue, alpha );
}
/* Next pixel */
diff --git a/kdefx/kimageeffect.h b/kdefx/kimageeffect.h
index 155df71b1..b6b8d4f83 100644
--- a/kdefx/kimageeffect.h
+++ b/kdefx/kimageeffect.h
@@ -640,7 +640,7 @@ public:
/**
* Detects edges in an image using pixel neighborhoods and an edge
- * detection mask.
+ * detection tqmask.
*
* @param src The TQImage to process.
* @param radius The radius of the gaussian not counting the
@@ -783,7 +783,7 @@ private:
static unsigned int uHash(unsigned int c);
/**
- * Helper function to find the nearest color to the RBG triplet
+ * Helper function to tqfind the nearest color to the RBG triplet
*/
static int nearestColor( int r, int g, int b, const TQColor *pal, int size );
diff --git a/kdefx/kpixmap.cpp b/kdefx/kpixmap.cpp
index eeccb6213..698f986af 100644
--- a/kdefx/kpixmap.cpp
+++ b/kdefx/kpixmap.cpp
@@ -56,7 +56,7 @@ static bool kdither_32_to_8( const TQImage *src, TQImage *dst )
for ( gc=0; gc<=MAX_G; gc++ )
for ( bc=0; bc<=MAX_B; bc++ ) {
dst->setColor( INDEXOF(rc,gc,bc),
- qRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) );
+ tqRgb( rc*255/MAX_R, gc*255/MAX_G, bc*255/MAX_B ) );
}
int sw = src->width();
@@ -259,7 +259,7 @@ bool KPixmap::convertFromImage( const TQImage &img, int conversion_flags )
return TQPixmap::convertFromImage( img, TQPixmap::Auto );
}
- TQBitmap mask;
+ TQBitmap tqmask;
bool isMask = false;
TQImage image = img.convertDepth(32);
@@ -268,13 +268,13 @@ bool KPixmap::convertFromImage( const TQImage &img, int conversion_flags )
if( img.hasAlphaBuffer() ) {
image.setAlphaBuffer( true );
tImage.setAlphaBuffer( true );
- isMask = mask.convertFromImage( img.createAlphaMask() );
+ isMask = tqmask.convertFromImage( img.createAlphaMask() );
}
kdither_32_to_8( &image, &tImage );
if( TQPixmap::convertFromImage( tImage ) ) {
- if ( isMask ) TQPixmap::setMask( mask );
+ if ( isMask ) TQPixmap::setMask( tqmask );
return true;
} else
return false;
@@ -367,9 +367,9 @@ bool KPixmap::checkColorTable( const TQImage &image )
for ( i=0; i<ncols; i++ ) {
for ( j=0; j<40; j++ ) {
- if ( kpixmap_iconPalette[j].red() == qRed( ctable[i] ) &&
- kpixmap_iconPalette[j].green() == qGreen( ctable[i] ) &&
- kpixmap_iconPalette[j].blue() == qBlue( ctable[i] ) ) {
+ if ( kpixmap_iconPalette[j].red() == tqRed( ctable[i] ) &&
+ kpixmap_iconPalette[j].green() == tqGreen( ctable[i] ) &&
+ kpixmap_iconPalette[j].blue() == tqBlue( ctable[i] ) ) {
break;
}
}
diff --git a/kdefx/kpixmap.h b/kdefx/kpixmap.h
index 8b76e87af..cf7022571 100644
--- a/kdefx/kpixmap.h
+++ b/kdefx/kpixmap.h
@@ -102,16 +102,16 @@ public:
*
* Color/Mono preference
*
- * @li WebColor - If the image has depth 1 and contains
+ * @li WebColor - If the image has depth 1 and tqcontains
* only black and white pixels then the pixmap becomes monochrome. If
* the pixmap has a depth of 8 bits per pixel then the Netscape
* palette is used for the pixmap color table.
- * @li LowColor - If the image has depth 1 and contains only black and
+ * @li LowColor - If the image has depth 1 and tqcontains only black and
* white pixels then the pixmap becomes monochrome. If the pixmap has a
* depth of 8 bits per pixel and the image does not posess a color table
* that matches the Icon palette a 3x3x3 color cube is used for the
* pixmap color table.
- * @li AutoColor (default) - If the image has depth 1 and contains
+ * @li AutoColor (default) - If the image has depth 1 and tqcontains
* only black and white pixels, then the pixmap becomes
* monochrome.
* @li ColorOnly - The pixmap is dithered/converted to the native
@@ -145,7 +145,7 @@ public:
* options.
*
* @param img the image to convert
- * @param conversion_flags bitmask, described above
+ * @param conversion_flags bittqmask, described above
* @return @p true if successful.
**/
bool convertFromImage( const TQImage &img, int conversion_flags );
@@ -173,7 +173,7 @@ public:
*
* @param fileName the name of the file to load the image from
* @param format the format for the image
- * @param conversion_flags a bitmask, as described in
+ * @param conversion_flags a bittqmask, as described in
* convertFromImage()
* @return @p true if successful, or false if the pixmap
* could not be loaded.
diff --git a/kdefx/kstyle.cpp b/kdefx/kstyle.cpp
index 6ebabf681..fbff928a8 100644
--- a/kdefx/kstyle.cpp
+++ b/kdefx/kstyle.cpp
@@ -117,14 +117,14 @@ namespace
static bool useDropShadow(TQWidget* w)
{
- return w && w->metaObject() &&
- w->metaObject()->findProperty("KStyleMenuDropShadow") != -1;
+ return w && w->tqmetaObject() &&
+ w->tqmetaObject()->tqfindProperty("KStyleMenuDropShadow") != -1;
}
}
namespace
{
-class TransparencyHandler : public QObject
+class TransparencyHandler : public TQObject
{
public:
TransparencyHandler(KStyle* style, TransparencyEngine tEngine,
@@ -257,8 +257,8 @@ void KStyle::polish( TQWidget* widget )
if ( d->useFilledFrameWorkaround )
{
if ( TQFrame *frame = tqqt_cast< TQFrame* >( widget ) ) {
- TQFrame::Shape shape = frame->frameShape();
- if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
+ TQFrame::Shape tqshape = frame->frameShape();
+ if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel)
widget->installEventFilter(this);
}
}
@@ -278,8 +278,8 @@ void KStyle::unPolish( TQWidget* widget )
if ( d->useFilledFrameWorkaround )
{
if ( TQFrame *frame = tqqt_cast< TQFrame* >( widget ) ) {
- TQFrame::Shape shape = frame->frameShape();
- if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
+ TQFrame::Shape tqshape = frame->frameShape();
+ if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel)
widget->removeEventFilter(this);
}
}
@@ -365,7 +365,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
else
pix.resize( w-2, h-2 );
- TQString title = wid->parentWidget()->caption();
+ TQString title = wid->tqparentWidget()->caption();
TQPainter p2;
p2.begin(&pix);
p2.fillRect(pix.rect(), cg.brush(TQColorGroup::Highlight));
@@ -547,7 +547,7 @@ void KStyle::drawPrimitive( ControlElement pe,
// What should "widget" be in actuality? How should I get it? From where?
// Almost certainly it should not be null!
TQWidget *widget = 0;
- drawControl(pe, p, widget, r, cg, flags, opt);
+ tqdrawControl(pe, p, widget, r, cg, flags, opt);
}
// #endif // USE_QT4
@@ -570,7 +570,7 @@ void KStyle::drawPrimitive( PrimitiveElement pe,
if (p && p->device()->devType() == TQInternal::Widget) {
widget = static_cast<TQWidget*>(p->device());
- parent = widget->parentWidget();
+ parent = widget->tqparentWidget();
} else
return; // Don't paint on non-widgets
@@ -647,7 +647,7 @@ void KStyle::drawPrimitive( PrimitiveElement pe,
-void KStyle::drawControl( ControlElement element,
+void KStyle::tqdrawControl( ControlElement element,
TQPainter* p,
const TQWidget* widget,
const TQRect &r,
@@ -661,7 +661,7 @@ void KStyle::drawControl( ControlElement element,
// ------------------------------------------------------------------------
case CE_TabBarTab: {
const TQTabBar* tb = (const TQTabBar*) widget;
- TQTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = tb->tqshape();
bool selected = flags & Style_Selected;
int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right();
@@ -945,7 +945,7 @@ void KStyle::drawControl( ControlElement element,
}
default:
- TQCommonStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ TQCommonStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
}
}
@@ -972,7 +972,7 @@ TQRect KStyle::subRect(SubRect r, const TQWidget* widget) const
}
-int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const
+int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const
{
switch(m)
{
@@ -987,13 +987,13 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const
TQWidget* parent = 0;
// Check that we are not a normal toolbar or a hidden dockwidget,
// in which case we need to adjust the height for font size
- if (widget && (parent = widget->parentWidget() )
+ if (widget && (parent = widget->tqparentWidget() )
&& !parent->inherits("QToolBar")
&& !parent->inherits("QMainWindow")
&& widget->inherits("QDockWindowHandle") )
return widget->fontMetrics().lineSpacing();
else
- return TQCommonStyle::pixelMetric(m, widget);
+ return TQCommonStyle::tqpixelMetric(m, widget);
}
// TABS
@@ -1003,8 +1003,8 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const
case PM_TabBarTabVSpace: {
const TQTabBar * tb = (const TQTabBar *) widget;
- if ( tb->shape() == TQTabBar::RoundedAbove ||
- tb->shape() == TQTabBar::RoundedBelow )
+ if ( tb->tqshape() == TQTabBar::RoundedAbove ||
+ tb->tqshape() == TQTabBar::RoundedBelow )
return 10;
else
return 4;
@@ -1012,7 +1012,7 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const
case PM_TabBarTabOverlap: {
const TQTabBar* tb = (const TQTabBar*)widget;
- TQTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = tb->tqshape();
if ( (tbs == TQTabBar::RoundedAbove) ||
(tbs == TQTabBar::RoundedBelow) )
@@ -1077,14 +1077,14 @@ int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const
return 0;
case PM_PopupMenuScrollerHeight:
- return pixelMetric( PM_ScrollBarExtent, 0);
+ return tqpixelMetric( PM_ScrollBarExtent, 0);
default:
- return TQCommonStyle::pixelMetric( m, widget );
+ return TQCommonStyle::tqpixelMetric( m, widget );
}
}
-//Helper to find the next sibling that's not hidden
+//Helper to tqfind the next sibling that's not hidden
static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
{
TQListViewItem* sibling = item;
@@ -1097,7 +1097,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
return sibling;
}
-void KStyle::drawComplexControl( ComplexControl control,
+void KStyle::tqdrawComplexControl( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect &r,
@@ -1201,10 +1201,10 @@ void KStyle::drawComplexControl( ComplexControl control,
TQPainter p2;
p2.begin(&pix);
- if ( slider->parentWidget() &&
- slider->parentWidget()->backgroundPixmap() &&
- !slider->parentWidget()->backgroundPixmap()->isNull() ) {
- TQPixmap pixmap = *(slider->parentWidget()->backgroundPixmap());
+ if ( slider->tqparentWidget() &&
+ slider->tqparentWidget()->backgroundPixmap() &&
+ !slider->tqparentWidget()->backgroundPixmap()->isNull() ) {
+ TQPixmap pixmap = *(slider->tqparentWidget()->backgroundPixmap());
p2.drawTiledPixmap(r, pixmap, slider->pos());
} else
pix.fill(cg.background());
@@ -1220,7 +1220,7 @@ void KStyle::drawComplexControl( ComplexControl control,
// Draw the tickmarks
if (controls & SC_SliderTickmarks)
- TQCommonStyle::drawComplexControl(control, &p2, widget,
+ TQCommonStyle::tqdrawComplexControl(control, &p2, widget,
r, cg, flags, SC_SliderTickmarks, active, opt);
// Draw the slider handle
@@ -1246,7 +1246,7 @@ void KStyle::drawComplexControl( ComplexControl control,
// Paint the icon and text.
if ( controls & SC_ListView )
- TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
// If we're have a branch or are expanded...
if ( controls & (SC_ListViewBranch | SC_ListViewExpand) )
@@ -1386,7 +1386,7 @@ void KStyle::drawComplexControl( ComplexControl control,
}
default:
- TQCommonStyle::drawComplexControl( control, p, widget, r, cg,
+ TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg,
flags, controls, active, opt );
break;
}
@@ -1425,7 +1425,7 @@ TQRect KStyle::querySubControlMetrics( ComplexControl control,
const TQScrollBar *sb = (const TQScrollBar*)widget;
bool horizontal = sb->orientation() == Qt::Horizontal;
int sliderstart = sb->sliderStart();
- int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
+ int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget);
int maxlen = (horizontal ? sb->width() : sb->height())
- (sbextent * (threeButtonScrollBar ? 3 : 2));
int sliderlen;
@@ -1436,7 +1436,7 @@ TQRect KStyle::querySubControlMetrics( ComplexControl control,
uint range = sb->maxValue() - sb->minValue();
sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep());
- int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -1826,7 +1826,7 @@ TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap,
}
-int KStyle::styleHint( StyleHint sh, const TQWidget* w,
+int KStyle::tqstyleHint( StyleHint sh, const TQWidget* w,
const TQStyleOption &opt, QStyleHintReturn* shr) const
{
switch (sh)
@@ -1841,7 +1841,7 @@ int KStyle::styleHint( StyleHint sh, const TQWidget* w,
return d->menuAltKeyNavigation ? 1 : 0;
case SH_PopupMenu_SubMenuPopupDelay:
- if ( styleHint( SH_PopupMenu_SloppySubMenus, w ) )
+ if ( tqstyleHint( SH_PopupMenu_SloppySubMenus, w ) )
return QMIN( 100, d->popupMenuDelay );
else
return d->popupMenuDelay;
@@ -1877,7 +1877,7 @@ int KStyle::styleHint( StyleHint sh, const TQWidget* w,
}
default:
- return TQCommonStyle::styleHint(sh, w, opt, shr);
+ return TQCommonStyle::tqstyleHint(sh, w, opt, shr);
}
}
@@ -1890,7 +1890,7 @@ bool KStyle::eventFilter( TQObject* object, TQEvent* event )
// ensure that the filled frame contents are properly painted.
// We essentially modify the paintEvent's rect to include the
// panel border, which also paints the widget's interior.
- // This is nasty, but I see no other way to properly repaint
+ // This is nasty, but I see no other way to properly tqrepaint
// filled frames in all QMenuBars and QToolBars.
// -- Karol.
TQFrame *frame = 0;
@@ -2082,7 +2082,7 @@ void TransparencyHandler::createShadowWindows(const TQWidget* p)
void TransparencyHandler::removeShadowWindows(const TQWidget* p)
{
#ifdef Q_WS_X11
- ShadowMap::iterator it = shadowMap().find(p);
+ ShadowMap::iterator it = shadowMap().tqfind(p);
if (it != shadowMap().end())
{
ShadowElements se = it.data();
@@ -2128,24 +2128,24 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event )
case XRender:
#endif
case SoftwareBlend:
- blendToPixmap(p->colorGroup(), p);
+ blendToPixmap(p->tqcolorGroup(), p);
break;
case SoftwareTint:
default:
- blendToColor(p->colorGroup().button());
+ blendToColor(p->tqcolorGroup().button());
};
p->setErasePixmap(pix);
}
// Handle drop shadow
- // * FIXME : !shadowMap().contains(p) is a workaround for leftover
+ // * FIXME : !shadowMap().tqcontains(p) is a workaround for leftover
// * shadows after duplicate show events.
// * TODO : determine real cause for duplicate events
// * till 20021005
if ((dropShadow || useDropShadow(p))
- && p->width() > 16 && p->height() > 16 && !shadowMap().contains( p ))
+ && p->width() > 16 && p->height() > 16 && !shadowMap().tqcontains( p ))
createShadowWindows(p);
}
else if (et == TQEvent::Resize && p->isShown() && p->isTopLevel())
@@ -2221,10 +2221,10 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p)
// Allow styles to define the blend pixmap - allows for some interesting effects.
if (::qt_cast<TQPopupMenu*>(p))
- kstyle->renderMenuBlendPixmap( renderPix, p->colorGroup(),
+ kstyle->renderMenuBlendPixmap( renderPix, p->tqcolorGroup(),
::qt_cast<TQPopupMenu*>(p) );
else
- renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior
+ renderPix.fill(p->tqcolorGroup().button()); // Just tint as the default behavior
Display* dpy = qt_xdisplay();
Pixmap alphaPixmap;
@@ -2248,9 +2248,9 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p)
XRenderFillRectangle(dpy, PictOpSrc, alphaPicture, &clr, 0, 0, 1, 1);
XRenderComposite(dpy, PictOpOver,
- renderPix.x11RenderHandle(), alphaPicture, pix.x11RenderHandle(), // src, mask, dst
+ renderPix.x11RenderHandle(), alphaPicture, pix.x11RenderHandle(), // src, tqmask, dst
0, 0, // srcx, srcy
- 0, 0, // maskx, masky
+ 0, 0, // tqmaskx, tqmasky
0, 0, // dstx, dsty
pix.width(), pix.height());
@@ -2271,6 +2271,6 @@ void kde_kstyle_set_scrollbar_type_windows( void* style )
}
// vim: set noet ts=4 sw=4:
-// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
+// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off;
#include "kstyle.moc"
diff --git a/kdefx/kstyle.h b/kdefx/kstyle.h
index 1e8b0df2c..618074c4e 100644
--- a/kdefx/kstyle.h
+++ b/kdefx/kstyle.h
@@ -70,7 +70,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
* internal menu transparency engine.
*
* @li FilledFrameWorkaround - Enable this flag to facilitate
- * proper repaints of QMenuBars and QToolBars when the style chooses
+ * proper tqrepaints of QMenuBars and QToolBars when the style chooses
* to paint the interior of a TQFrame. The style primitives in question
* are PE_PanelMenuBar and PE_PanelDockWindow. The HighColor style uses
* this workaround to enable painting of gradients in menubars and
@@ -171,7 +171,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
* This virtual function defines the pixmap used to blend between the popup
* menu and the background to create different menu transparency effects.
* For example, you can fill the pixmap "pix" with a gradient based on the
- * popup's colorGroup, a texture, or some other fancy painting routine.
+ * popup's tqcolorGroup, a texture, or some other fancy painting routine.
* KStyle will then internally blend this pixmap with a snapshot of the
* background behind the popupMenu to create the illusion of transparency.
*
@@ -243,7 +243,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
*
* @see KStyle::KStylePrimitive
* @see TQStyle::drawPrimitive
- * @see TQStyle::drawComplexControl
+ * @see TQStyle::tqdrawComplexControl
*/
virtual void drawKStylePrimitive( KStylePrimitive kpe,
TQPainter* p,
@@ -292,7 +292,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
// #endif // USE_QT4
- void drawControl( ControlElement element,
+ void tqdrawControl( ControlElement element,
TQPainter* p,
const TQWidget* widget,
const TQRect &r,
@@ -300,7 +300,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
- void drawComplexControl( ComplexControl control,
+ void tqdrawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget* widget,
const TQRect &r,
@@ -320,7 +320,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
SubControl sc,
const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
- int pixelMetric( PixelMetric m,
+ int tqpixelMetric( PixelMetric m,
const TQWidget* widget = 0 ) const;
TQRect subRect( SubRect r,
@@ -330,7 +330,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
const TQWidget* widget = 0,
const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
- int styleHint( StyleHint sh,
+ int tqstyleHint( StyleHint sh,
const TQWidget* w = 0,
const TQStyleOption &opt = TQStyleOption::TQSO_Default,
QStyleHintReturn* shr = 0 ) const;