summaryrefslogtreecommitdiffstats
path: root/kdefx
diff options
context:
space:
mode:
Diffstat (limited to 'kdefx')
-rw-r--r--kdefx/kimageeffect.cpp50
-rw-r--r--kdefx/kpixmap.cpp36
-rw-r--r--kdefx/kstyle.cpp28
-rw-r--r--kdefx/kstyle.h16
4 files changed, 65 insertions, 65 deletions
diff --git a/kdefx/kimageeffect.cpp b/kdefx/kimageeffect.cpp
index ca72e37c1..5954c5d76 100644
--- a/kdefx/kimageeffect.cpp
+++ b/kdefx/kimageeffect.cpp
@@ -664,7 +664,7 @@ TQImage& KImageEffect::intensity(TQImage &image, float percent)
int pixels = image.depth() > 8 ? image.width()*image.height() :
image.numColors();
unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() :
- (unsigned int *)image.colorTable();
+ (unsigned int *)image.tqcolorTable();
bool brighten = (percent >= 0);
if(percent < 0)
@@ -858,7 +858,7 @@ TQImage& KImageEffect::channelIntensity(TQImage &image, float percent,
int pixels = image.depth() > 8 ? image.width()*image.height() :
image.numColors();
unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() :
- (unsigned int *)image.colorTable();
+ (unsigned int *)image.tqcolorTable();
bool brighten = (percent >= 0);
if(percent < 0)
percent = -percent;
@@ -958,7 +958,7 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
if (modImage.depth()<8) modImage = modImage.convertDepth(8);
unsigned int *colorTable2 = (modImage.depth()==8) ?
- modImage.colorTable():0;
+ modImage.tqcolorTable():0;
unsigned int *data1, *data2;
unsigned char *data2b;
unsigned int color1, color2;
@@ -1788,7 +1788,7 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2,
if (blendImage.depth()<8) blendImage = blendImage.convertDepth(8);
unsigned int *colorTable3 = (blendImage.depth()==8) ?
- blendImage.colorTable():0;
+ blendImage.tqcolorTable():0;
unsigned int *data1 = (unsigned int *)image1.bits();
unsigned int *data2 = (unsigned int *)image2.bits();
@@ -2162,7 +2162,7 @@ TQImage& KImageEffect::toGray(TQImage &img, bool fast)
int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.colorTable();
+ (unsigned int *)img.tqcolorTable();
int val, i;
for(i=0; i < pixels; ++i){
val = qGray(data[i]);
@@ -2183,7 +2183,7 @@ TQImage& KImageEffect::desaturate(TQImage &img, float desat)
int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.colorTable();
+ (unsigned int *)img.tqcolorTable();
int h, s, v, i;
TQColor clr; // keep constructor out of loop (mosfet)
for(i=0; i < pixels; ++i){
@@ -2208,7 +2208,7 @@ TQImage& KImageEffect::contrast(TQImage &img, int c)
int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
- (unsigned int *)img.colorTable();
+ (unsigned int *)img.tqcolorTable();
int i, r, g, b;
for(i=0; i < pixels; ++i){
r = qRed(data[i]);
@@ -2779,7 +2779,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h)
}
else if(depth == 1) {
int r = src.bitOrder() == TQImage::LittleEndian;
- memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(QRgb));
+ memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(QRgb));
for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y);
unsigned char *srcData = src.scanLine(y_offset[y]);
@@ -2794,7 +2794,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h)
}
}
else{ // PseudoClass source image
- memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(QRgb));
+ memcpy(dest.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(QRgb));
for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y);
unsigned char *srcData = src.scanLine(y_offset[y]);
@@ -2817,10 +2817,10 @@ void KImageEffect::threshold(TQImage &img, unsigned int threshold)
}
else{ // PsudeoClass
count = img.numColors();
- data = (unsigned int *)img.colorTable();
+ data = (unsigned int *)img.tqcolorTable();
}
for(i=0; i < count; ++i)
- data[i] = intensityValue(data[i]) < threshold ? Qt::black.rgb() : Qt::white.rgb();
+ data[i] = intensityValue(data[i]) < threshold ? QColor(tqblack).rgb() : QColor(tqwhite).rgb();
}
void KImageEffect::hull(const int x_offset, const int y_offset,
@@ -2951,7 +2951,7 @@ TQImage KImageEffect::despeckle(TQImage &src)
}
else{ // PsudeoClass source image
unsigned char *srcData;
- unsigned int *cTable = src.colorTable();
+ unsigned int *cTable = src.tqcolorTable();
unsigned int pixel;
for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y);
@@ -3130,7 +3130,7 @@ TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type)
}
else{ // PsudeoClass source image
unsigned char *srcData;
- unsigned int *cTable = src.colorTable();
+ unsigned int *cTable = src.tqcolorTable();
unsigned int pixel;
for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y);
@@ -3192,7 +3192,7 @@ unsigned int KImageEffect::interpolateColor(TQImage *image, double x_offset,
}
}
else{
- unsigned int *colorTable = (unsigned int *)image->colorTable();
+ unsigned int *colorTable = (unsigned int *)image->tqcolorTable();
if((x >= 0) && (y >= 0) && (x < (image->width()-1)) && (y < (image->height()-1))) {
unsigned char *t;
t = (unsigned char *)image->scanLine(y);
@@ -3292,7 +3292,7 @@ TQImage KImageEffect::implode(TQImage &src, double factor,
else{ // PsudeoClass source image
unsigned char *srcData;
unsigned char idx;
- unsigned int *cTable = src.colorTable();
+ unsigned int *cTable = src.tqcolorTable();
for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y);
destData = (unsigned int *)dest.scanLine(y);
@@ -3368,8 +3368,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate90:
dest.create(img.height(), img.width(), img.depth());
dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.colorTable();
- destTable = (unsigned int *)dest.colorTable();
+ srcTable = (unsigned int *)img.tqcolorTable();
+ destTable = (unsigned int *)dest.tqcolorTable();
for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){
@@ -3383,8 +3383,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate180:
dest.create(img.width(), img.height(), img.depth());
dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.colorTable();
- destTable = (unsigned int *)dest.colorTable();
+ srcTable = (unsigned int *)img.tqcolorTable();
+ destTable = (unsigned int *)dest.tqcolorTable();
for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){
@@ -3397,8 +3397,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate270:
dest.create(img.height(), img.width(), img.depth());
dest.setNumColors(img.numColors());
- srcTable = (unsigned int *)img.colorTable();
- destTable = (unsigned int *)dest.colorTable();
+ srcTable = (unsigned int *)img.tqcolorTable();
+ destTable = (unsigned int *)dest.tqcolorTable();
for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){
@@ -3426,7 +3426,7 @@ void KImageEffect::solarize(TQImage &img, double factor)
threshold = (int)(factor*(MaxRGB+1)/100.0);
if(img.depth() < 32){
- data = (unsigned int *)img.colorTable();
+ data = (unsigned int *)img.tqcolorTable();
count = img.numColors();
}
else{
@@ -3541,7 +3541,7 @@ TQImage KImageEffect::swirl(TQImage &src, double degrees,
}
else{ // PsudeoClass source image
unsigned char *p;
- unsigned int *cTable = (unsigned int *)src.colorTable();
+ unsigned int *cTable = (unsigned int *)src.tqcolorTable();
for(y=0; y < src.height(); y++){
p = (unsigned char *)src.scanLine(y);
q = (unsigned int *)dest.scanLine(y);
@@ -4550,7 +4550,7 @@ TQImage KImageEffect::shade(TQImage &src, bool color_shading, double azimuth,
else{ // PsudeoClass source image
unsigned char *p, *s0, *s1, *s2;
int scanLineIdx;
- unsigned int *cTable = (unsigned int *)src.colorTable();
+ unsigned int *cTable = (unsigned int *)src.tqcolorTable();
for(y=0; y < src.height(); ++y){
scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3);
p = (unsigned char *)src.scanLine(scanLineIdx);
@@ -4628,7 +4628,7 @@ void KImageEffect::contrastHSV(TQImage &img, bool sharpen)
}
else{
count = img.numColors();
- data = (unsigned int *)img.colorTable();
+ data = (unsigned int *)img.tqcolorTable();
}
for(i=0; i < count; ++i){
c.setRgb(data[i]);
diff --git a/kdefx/kpixmap.cpp b/kdefx/kpixmap.cpp
index ac8cd6d4e..eeccb6213 100644
--- a/kdefx/kpixmap.cpp
+++ b/kdefx/kpixmap.cpp
@@ -296,23 +296,23 @@ bool KPixmap::checkColorTable( const TQImage &image )
kpixmap_iconPalette = new QColor[40];
// Standard palette
- kpixmap_iconPalette[i++] = red;
- kpixmap_iconPalette[i++] = green;
- kpixmap_iconPalette[i++] = blue;
- kpixmap_iconPalette[i++] = cyan;
- kpixmap_iconPalette[i++] = magenta;
- kpixmap_iconPalette[i++] = yellow;
- kpixmap_iconPalette[i++] = darkRed;
- kpixmap_iconPalette[i++] = darkGreen;
- kpixmap_iconPalette[i++] = darkBlue;
- kpixmap_iconPalette[i++] = darkCyan;
- kpixmap_iconPalette[i++] = darkMagenta;
- kpixmap_iconPalette[i++] = darkYellow;
- kpixmap_iconPalette[i++] = white;
- kpixmap_iconPalette[i++] = lightGray;
- kpixmap_iconPalette[i++] = gray;
- kpixmap_iconPalette[i++] = darkGray;
- kpixmap_iconPalette[i++] = black;
+ kpixmap_iconPalette[i++] = tqred;
+ kpixmap_iconPalette[i++] = tqgreen;
+ kpixmap_iconPalette[i++] = tqblue;
+ kpixmap_iconPalette[i++] = tqcyan;
+ kpixmap_iconPalette[i++] = tqmagenta;
+ kpixmap_iconPalette[i++] = tqyellow;
+ kpixmap_iconPalette[i++] = tqdarkRed;
+ kpixmap_iconPalette[i++] = tqdarkGreen;
+ kpixmap_iconPalette[i++] = tqdarkBlue;
+ kpixmap_iconPalette[i++] = tqdarkCyan;
+ kpixmap_iconPalette[i++] = tqdarkMagenta;
+ kpixmap_iconPalette[i++] = tqdarkYellow;
+ kpixmap_iconPalette[i++] = tqwhite;
+ kpixmap_iconPalette[i++] = tqlightGray;
+ kpixmap_iconPalette[i++] = tqgray;
+ kpixmap_iconPalette[i++] = tqdarkGray;
+ kpixmap_iconPalette[i++] = tqblack;
// Pastels
kpixmap_iconPalette[i++] = TQColor( 255, 192, 192 );
@@ -357,7 +357,7 @@ bool KPixmap::checkColorTable( const TQImage &image )
}
- QRgb* ctable = image.colorTable();
+ QRgb* ctable = image.tqcolorTable();
int ncols = image.numColors();
int j;
diff --git a/kdefx/kstyle.cpp b/kdefx/kstyle.cpp
index 526d0e467..d22a6d795 100644
--- a/kdefx/kstyle.cpp
+++ b/kdefx/kstyle.cpp
@@ -250,7 +250,7 @@ void KStyle::polish( TQWidget* widget )
{
if ( d->useFilledFrameWorkaround )
{
- if ( TQFrame *frame = ::qt_cast< TQFrame* >( widget ) ) {
+ if ( TQFrame *frame = tqqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->installEventFilter(this);
@@ -263,7 +263,7 @@ void KStyle::unPolish( TQWidget* widget )
{
if ( d->useFilledFrameWorkaround )
{
- if ( TQFrame *frame = ::qt_cast< TQFrame* >( widget ) ) {
+ if ( TQFrame *frame = tqqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->removeEventFilter(this);
@@ -355,7 +355,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
p2.fillRect(pix.rect(), cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.setFont(fnt);
- p2.drawText(pix.rect(), AlignCenter, title);
+ p2.drawText(pix.rect(), TQAlignCenter, title);
p2.end();
// Draw a sunken bevel
@@ -419,7 +419,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
int i;
for( i=0; i < 64; i++ )
a.setPoint( i, 0, i*2+1 );
- p2.setPen( color1 );
+ p2.setPen( tqcolor1 );
p2.drawPoints( a );
p2.end();
TQApplication::flushX();
@@ -428,7 +428,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
p2.begin( d->horizontalLine );
for( i=0; i < 64; i++ )
a.setPoint( i, i*2+1, 0 );
- p2.setPen( color1 );
+ p2.setPen( tqcolor1 );
p2.drawPoints( a );
p2.end();
TQApplication::flushX();
@@ -597,7 +597,7 @@ void KStyle::drawPrimitive( PrimitiveElement pe,
p->save();
p->setRasterOp( Qt::CopyROP );
p->setPen( TQPen( cg.highlight().dark( 160 ), 1 ) );
- p->setBrush( NoBrush );
+ p->setBrush( TQNoBrush );
p->drawRect(
rect.x() + point.x(),
rect.y() + point.y(),
@@ -730,7 +730,7 @@ void KStyle::drawControl( ControlElement element,
p->setPen (selected ? cg.background() : cg.mid());
p->setBrush(selected ? cg.background() : cg.mid());
p->drawPolygon(a);
- p->setBrush(NoBrush);
+ p->setBrush(TQNoBrush);
if (!selected) {
p->translate(0,-1);
p->setPen(cg.light());
@@ -773,7 +773,7 @@ void KStyle::drawControl( ControlElement element,
p->setPen (selected ? cg.background() : cg.mid());
p->setBrush(selected ? cg.background() : cg.mid());
p->drawPolygon(a);
- p->setBrush(NoBrush);
+ p->setBrush(TQNoBrush);
if (!selected) {
p->translate(0,1);
p->setPen(cg.dark());
@@ -800,7 +800,7 @@ void KStyle::drawControl( ControlElement element,
// ------------------------------------------------------------------------
case CE_ProgressBarGroove: {
TQRect fr = subRect(SR_ProgressBarGroove, widget);
- drawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, TQStyleOption::Default);
+ drawPrimitive(PE_Panel, p, fr, cg, Style_Sunken, TQStyleOption::TQSO_Default);
break;
}
@@ -895,15 +895,15 @@ void KStyle::drawControl( ControlElement element,
p->save();
p->setPen(pb->isEnabled() ? (reverse ? cg.text() : cg.highlightedText()) : cg.text());
- p->drawText(r, AlignCenter, pb->progressString());
+ p->drawText(r, TQAlignCenter, pb->progressString());
p->setClipRect(crect);
p->setPen(reverse ? cg.highlightedText() : cg.text());
- p->drawText(r, AlignCenter, pb->progressString());
+ p->drawText(r, TQAlignCenter, pb->progressString());
p->restore();
} else {
p->setPen(cg.text());
- p->drawText(r, AlignCenter, pb->progressString());
+ p->drawText(r, TQAlignCenter, pb->progressString());
}
break;
@@ -1860,14 +1860,14 @@ bool KStyle::eventFilter( TQObject* object, TQEvent* event )
// -- Karol.
TQFrame *frame = 0;
if ( event->type() == TQEvent::Paint
- && (frame = ::qt_cast<TQFrame*>(object)) )
+ && (frame = tqqt_cast<TQFrame*>(object)) )
{
if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel)
return false;
bool horizontal = true;
TQPaintEvent* pe = (TQPaintEvent*)event;
- TQToolBar *toolbar = ::qt_cast< TQToolBar *>( frame );
+ TQToolBar *toolbar = tqqt_cast< TQToolBar *>( frame );
TQRect r = pe->rect();
if (toolbar && toolbar->orientation() == Qt::Vertical)
diff --git a/kdefx/kstyle.h b/kdefx/kstyle.h
index fc332bd50..87b5d299e 100644
--- a/kdefx/kstyle.h
+++ b/kdefx/kstyle.h
@@ -251,7 +251,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
- const TQStyleOption& = TQStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
enum KStylePixelMetric {
@@ -279,7 +279,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
- const TQStyleOption& = TQStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
void drawControl( ControlElement element,
TQPainter* p,
@@ -287,7 +287,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
const TQRect &r,
const TQColorGroup &cg,
SFlags flags = Style_Default,
- const TQStyleOption& = TQStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
void drawComplexControl( ComplexControl control,
TQPainter *p,
@@ -297,17 +297,17 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
SFlags flags = Style_Default,
SCFlags controls = SC_All,
SCFlags active = SC_None,
- const TQStyleOption& = TQStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
SubControl querySubControl( ComplexControl control,
const TQWidget* widget,
const TQPoint &pos,
- const TQStyleOption& = TQStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
TQRect querySubControlMetrics( ComplexControl control,
const TQWidget* widget,
SubControl sc,
- const TQStyleOption& = TQStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
int pixelMetric( PixelMetric m,
const TQWidget* widget = 0 ) const;
@@ -317,11 +317,11 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
TQPixmap stylePixmap( StylePixmap stylepixmap,
const TQWidget* widget = 0,
- const TQStyleOption& = TQStyleOption::Default ) const;
+ const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
int styleHint( StyleHint sh,
const TQWidget* w = 0,
- const TQStyleOption &opt = TQStyleOption::Default,
+ const TQStyleOption &opt = TQStyleOption::TQSO_Default,
QStyleHintReturn* shr = 0 ) const;
protected: