Additional TQt conversions

git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1158881 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
v3.5.13-sru
tpearson 15 years ago
parent 8f14fb0418
commit 6d1c49c8bd

@ -1329,7 +1329,7 @@ static void fillQtObjects( QCStringList& l, TQObject* o, TQCString path )
path += '/'; path += '/';
int unnamed = 0; int unnamed = 0;
const TQObjectList *list = o ? o->children() : TQObject::objectTrees(); const TQObjectList *list = o ? o->tqchildren() : TQObject::objectTrees();
if ( list ) { if ( list ) {
TQObjectListIt it( *list ); TQObjectListIt it( *list );
TQObject *obj; TQObject *obj;
@ -1343,7 +1343,7 @@ static void fillQtObjects( QCStringList& l, TQObject* o, TQCString path )
} }
TQCString fn = path + n; TQCString fn = path + n;
l.append( fn ); l.append( fn );
if ( obj->children() ) if ( obj->tqchildren() )
fillQtObjects( l, obj, fn ); fillQtObjects( l, obj, fn );
} }
} }
@ -1366,7 +1366,7 @@ static void fillQtObjectsEx( TQValueList<O>& l, TQObject* o, TQCString path )
path += '/'; path += '/';
int unnamed = 0; int unnamed = 0;
const TQObjectList *list = o ? o->children() : TQObject::objectTrees(); const TQObjectList *list = o ? o->tqchildren() : TQObject::objectTrees();
if ( list ) { if ( list ) {
TQObjectListIt it( *list ); TQObjectListIt it( *list );
TQObject *obj; TQObject *obj;
@ -1380,7 +1380,7 @@ static void fillQtObjectsEx( TQValueList<O>& l, TQObject* o, TQCString path )
} }
TQCString fn = path + n; TQCString fn = path + n;
l.append( O( fn, obj ) ); l.append( O( fn, obj ) );
if ( obj->children() ) if ( obj->tqchildren() )
fillQtObjectsEx( l, obj, fn ); fillQtObjectsEx( l, obj, fn );
} }
} }
@ -1471,7 +1471,7 @@ static bool receiveQtObject( const TQCString &objId, const TQCString &fun, const
TQStrList lst = o->metaObject()->slotNames( true ); TQStrList lst = o->metaObject()->slotNames( true );
int i = 0; int i = 0;
for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) { for ( TQPtrListIterator<char> it( lst ); it.current(); ++it ) {
if ( o->metaObject()->slot( i++, true )->access != QMetaData::Public ) if ( o->metaObject()->slot( i++, true )->tqaccess != QMetaData::Public )
continue; continue;
TQCString slot = it.current(); TQCString slot = it.current();
if ( slot.contains( "()" ) ) { if ( slot.contains( "()" ) ) {

@ -664,7 +664,7 @@ TQImage& KImageEffect::intensity(TQImage &image, float percent)
int pixels = image.depth() > 8 ? image.width()*image.height() : int pixels = image.depth() > 8 ? image.width()*image.height() :
image.numColors(); image.numColors();
unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() : unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() :
(unsigned int *)image.colorTable(); (unsigned int *)image.tqcolorTable();
bool brighten = (percent >= 0); bool brighten = (percent >= 0);
if(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() : int pixels = image.depth() > 8 ? image.width()*image.height() :
image.numColors(); image.numColors();
unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() : unsigned int *data = image.depth() > 8 ? (unsigned int *)image.bits() :
(unsigned int *)image.colorTable(); (unsigned int *)image.tqcolorTable();
bool brighten = (percent >= 0); bool brighten = (percent >= 0);
if(percent < 0) if(percent < 0)
percent = -percent; percent = -percent;
@ -958,7 +958,7 @@ TQImage& KImageEffect::modulate(TQImage &image, TQImage &modImage, bool reverse,
if (modImage.depth()<8) modImage = modImage.convertDepth(8); if (modImage.depth()<8) modImage = modImage.convertDepth(8);
unsigned int *colorTable2 = (modImage.depth()==8) ? unsigned int *colorTable2 = (modImage.depth()==8) ?
modImage.colorTable():0; modImage.tqcolorTable():0;
unsigned int *data1, *data2; unsigned int *data1, *data2;
unsigned char *data2b; unsigned char *data2b;
unsigned int color1, color2; unsigned int color1, color2;
@ -1788,7 +1788,7 @@ TQImage& KImageEffect::blend(TQImage &image1, TQImage &image2,
if (blendImage.depth()<8) blendImage = blendImage.convertDepth(8); if (blendImage.depth()<8) blendImage = blendImage.convertDepth(8);
unsigned int *colorTable3 = (blendImage.depth()==8) ? unsigned int *colorTable3 = (blendImage.depth()==8) ?
blendImage.colorTable():0; blendImage.tqcolorTable():0;
unsigned int *data1 = (unsigned int *)image1.bits(); unsigned int *data1 = (unsigned int *)image1.bits();
unsigned int *data2 = (unsigned int *)image2.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() : int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors(); img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() : unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
(unsigned int *)img.colorTable(); (unsigned int *)img.tqcolorTable();
int val, i; int val, i;
for(i=0; i < pixels; ++i){ for(i=0; i < pixels; ++i){
val = qGray(data[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() : int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors(); img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() : unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
(unsigned int *)img.colorTable(); (unsigned int *)img.tqcolorTable();
int h, s, v, i; int h, s, v, i;
TQColor clr; // keep constructor out of loop (mosfet) TQColor clr; // keep constructor out of loop (mosfet)
for(i=0; i < pixels; ++i){ 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() : int pixels = img.depth() > 8 ? img.width()*img.height() :
img.numColors(); img.numColors();
unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() : unsigned int *data = img.depth() > 8 ? (unsigned int *)img.bits() :
(unsigned int *)img.colorTable(); (unsigned int *)img.tqcolorTable();
int i, r, g, b; int i, r, g, b;
for(i=0; i < pixels; ++i){ for(i=0; i < pixels; ++i){
r = qRed(data[i]); r = qRed(data[i]);
@ -2779,7 +2779,7 @@ TQImage KImageEffect::sample(TQImage &src, int w, int h)
} }
else if(depth == 1) { else if(depth == 1) {
int r = src.bitOrder() == TQImage::LittleEndian; 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){ for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y); unsigned char *destData = dest.scanLine(y);
unsigned char *srcData = src.scanLine(y_offset[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 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){ for(int y=0; y < h; ++y){
unsigned char *destData = dest.scanLine(y); unsigned char *destData = dest.scanLine(y);
unsigned char *srcData = src.scanLine(y_offset[y]); unsigned char *srcData = src.scanLine(y_offset[y]);
@ -2817,10 +2817,10 @@ void KImageEffect::threshold(TQImage &img, unsigned int threshold)
} }
else{ // PsudeoClass else{ // PsudeoClass
count = img.numColors(); count = img.numColors();
data = (unsigned int *)img.colorTable(); data = (unsigned int *)img.tqcolorTable();
} }
for(i=0; i < count; ++i) 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, void KImageEffect::hull(const int x_offset, const int y_offset,
@ -2951,7 +2951,7 @@ TQImage KImageEffect::despeckle(TQImage &src)
} }
else{ // PsudeoClass source image else{ // PsudeoClass source image
unsigned char *srcData; unsigned char *srcData;
unsigned int *cTable = src.colorTable(); unsigned int *cTable = src.tqcolorTable();
unsigned int pixel; unsigned int pixel;
for(y=0; y < src.height(); ++y){ for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y); srcData = (unsigned char *)src.scanLine(y);
@ -3130,7 +3130,7 @@ TQImage KImageEffect::addNoise(TQImage &src, NoiseType noise_type)
} }
else{ // PsudeoClass source image else{ // PsudeoClass source image
unsigned char *srcData; unsigned char *srcData;
unsigned int *cTable = src.colorTable(); unsigned int *cTable = src.tqcolorTable();
unsigned int pixel; unsigned int pixel;
for(y=0; y < src.height(); ++y){ for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y); srcData = (unsigned char *)src.scanLine(y);
@ -3192,7 +3192,7 @@ unsigned int KImageEffect::interpolateColor(TQImage *image, double x_offset,
} }
} }
else{ 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))) { if((x >= 0) && (y >= 0) && (x < (image->width()-1)) && (y < (image->height()-1))) {
unsigned char *t; unsigned char *t;
t = (unsigned char *)image->scanLine(y); t = (unsigned char *)image->scanLine(y);
@ -3292,7 +3292,7 @@ TQImage KImageEffect::implode(TQImage &src, double factor,
else{ // PsudeoClass source image else{ // PsudeoClass source image
unsigned char *srcData; unsigned char *srcData;
unsigned char idx; unsigned char idx;
unsigned int *cTable = src.colorTable(); unsigned int *cTable = src.tqcolorTable();
for(y=0; y < src.height(); ++y){ for(y=0; y < src.height(); ++y){
srcData = (unsigned char *)src.scanLine(y); srcData = (unsigned char *)src.scanLine(y);
destData = (unsigned int *)dest.scanLine(y); destData = (unsigned int *)dest.scanLine(y);
@ -3368,8 +3368,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate90: case Rotate90:
dest.create(img.height(), img.width(), img.depth()); dest.create(img.height(), img.width(), img.depth());
dest.setNumColors(img.numColors()); dest.setNumColors(img.numColors());
srcTable = (unsigned int *)img.colorTable(); srcTable = (unsigned int *)img.tqcolorTable();
destTable = (unsigned int *)dest.colorTable(); destTable = (unsigned int *)dest.tqcolorTable();
for(x=0; x < img.numColors(); ++x) for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x]; destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){ for(y=0; y < img.height(); ++y){
@ -3383,8 +3383,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate180: case Rotate180:
dest.create(img.width(), img.height(), img.depth()); dest.create(img.width(), img.height(), img.depth());
dest.setNumColors(img.numColors()); dest.setNumColors(img.numColors());
srcTable = (unsigned int *)img.colorTable(); srcTable = (unsigned int *)img.tqcolorTable();
destTable = (unsigned int *)dest.colorTable(); destTable = (unsigned int *)dest.tqcolorTable();
for(x=0; x < img.numColors(); ++x) for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x]; destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){ for(y=0; y < img.height(); ++y){
@ -3397,8 +3397,8 @@ TQImage KImageEffect::rotate(TQImage &img, RotateDirection r)
case Rotate270: case Rotate270:
dest.create(img.height(), img.width(), img.depth()); dest.create(img.height(), img.width(), img.depth());
dest.setNumColors(img.numColors()); dest.setNumColors(img.numColors());
srcTable = (unsigned int *)img.colorTable(); srcTable = (unsigned int *)img.tqcolorTable();
destTable = (unsigned int *)dest.colorTable(); destTable = (unsigned int *)dest.tqcolorTable();
for(x=0; x < img.numColors(); ++x) for(x=0; x < img.numColors(); ++x)
destTable[x] = srcTable[x]; destTable[x] = srcTable[x];
for(y=0; y < img.height(); ++y){ 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); threshold = (int)(factor*(MaxRGB+1)/100.0);
if(img.depth() < 32){ if(img.depth() < 32){
data = (unsigned int *)img.colorTable(); data = (unsigned int *)img.tqcolorTable();
count = img.numColors(); count = img.numColors();
} }
else{ else{
@ -3541,7 +3541,7 @@ TQImage KImageEffect::swirl(TQImage &src, double degrees,
} }
else{ // PsudeoClass source image else{ // PsudeoClass source image
unsigned char *p; unsigned char *p;
unsigned int *cTable = (unsigned int *)src.colorTable(); unsigned int *cTable = (unsigned int *)src.tqcolorTable();
for(y=0; y < src.height(); y++){ for(y=0; y < src.height(); y++){
p = (unsigned char *)src.scanLine(y); p = (unsigned char *)src.scanLine(y);
q = (unsigned int *)dest.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 else{ // PsudeoClass source image
unsigned char *p, *s0, *s1, *s2; unsigned char *p, *s0, *s1, *s2;
int scanLineIdx; int scanLineIdx;
unsigned int *cTable = (unsigned int *)src.colorTable(); unsigned int *cTable = (unsigned int *)src.tqcolorTable();
for(y=0; y < src.height(); ++y){ for(y=0; y < src.height(); ++y){
scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3); scanLineIdx = QMIN(QMAX(y-1,0),src.height()-3);
p = (unsigned char *)src.scanLine(scanLineIdx); p = (unsigned char *)src.scanLine(scanLineIdx);
@ -4628,7 +4628,7 @@ void KImageEffect::contrastHSV(TQImage &img, bool sharpen)
} }
else{ else{
count = img.numColors(); count = img.numColors();
data = (unsigned int *)img.colorTable(); data = (unsigned int *)img.tqcolorTable();
} }
for(i=0; i < count; ++i){ for(i=0; i < count; ++i){
c.setRgb(data[i]); c.setRgb(data[i]);

@ -296,23 +296,23 @@ bool KPixmap::checkColorTable( const TQImage &image )
kpixmap_iconPalette = new QColor[40]; kpixmap_iconPalette = new QColor[40];
// Standard palette // Standard palette
kpixmap_iconPalette[i++] = red; kpixmap_iconPalette[i++] = tqred;
kpixmap_iconPalette[i++] = green; kpixmap_iconPalette[i++] = tqgreen;
kpixmap_iconPalette[i++] = blue; kpixmap_iconPalette[i++] = tqblue;
kpixmap_iconPalette[i++] = cyan; kpixmap_iconPalette[i++] = tqcyan;
kpixmap_iconPalette[i++] = magenta; kpixmap_iconPalette[i++] = tqmagenta;
kpixmap_iconPalette[i++] = yellow; kpixmap_iconPalette[i++] = tqyellow;
kpixmap_iconPalette[i++] = darkRed; kpixmap_iconPalette[i++] = tqdarkRed;
kpixmap_iconPalette[i++] = darkGreen; kpixmap_iconPalette[i++] = tqdarkGreen;
kpixmap_iconPalette[i++] = darkBlue; kpixmap_iconPalette[i++] = tqdarkBlue;
kpixmap_iconPalette[i++] = darkCyan; kpixmap_iconPalette[i++] = tqdarkCyan;
kpixmap_iconPalette[i++] = darkMagenta; kpixmap_iconPalette[i++] = tqdarkMagenta;
kpixmap_iconPalette[i++] = darkYellow; kpixmap_iconPalette[i++] = tqdarkYellow;
kpixmap_iconPalette[i++] = white; kpixmap_iconPalette[i++] = tqwhite;
kpixmap_iconPalette[i++] = lightGray; kpixmap_iconPalette[i++] = tqlightGray;
kpixmap_iconPalette[i++] = gray; kpixmap_iconPalette[i++] = tqgray;
kpixmap_iconPalette[i++] = darkGray; kpixmap_iconPalette[i++] = tqdarkGray;
kpixmap_iconPalette[i++] = black; kpixmap_iconPalette[i++] = tqblack;
// Pastels // Pastels
kpixmap_iconPalette[i++] = TQColor( 255, 192, 192 ); 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 ncols = image.numColors();
int j; int j;

@ -250,7 +250,7 @@ void KStyle::polish( TQWidget* widget )
{ {
if ( d->useFilledFrameWorkaround ) if ( d->useFilledFrameWorkaround )
{ {
if ( TQFrame *frame = ::qt_cast< TQFrame* >( widget ) ) { if ( TQFrame *frame = tqqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape(); TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->installEventFilter(this); widget->installEventFilter(this);
@ -263,7 +263,7 @@ void KStyle::unPolish( TQWidget* widget )
{ {
if ( d->useFilledFrameWorkaround ) if ( d->useFilledFrameWorkaround )
{ {
if ( TQFrame *frame = ::qt_cast< TQFrame* >( widget ) ) { if ( TQFrame *frame = tqqt_cast< TQFrame* >( widget ) ) {
TQFrame::Shape shape = frame->frameShape(); TQFrame::Shape shape = frame->frameShape();
if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel)
widget->removeEventFilter(this); widget->removeEventFilter(this);
@ -355,7 +355,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
p2.fillRect(pix.rect(), cg.brush(TQColorGroup::Highlight)); p2.fillRect(pix.rect(), cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText()); p2.setPen(cg.highlightedText());
p2.setFont(fnt); p2.setFont(fnt);
p2.drawText(pix.rect(), AlignCenter, title); p2.drawText(pix.rect(), TQAlignCenter, title);
p2.end(); p2.end();
// Draw a sunken bevel // Draw a sunken bevel
@ -419,7 +419,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
int i; int i;
for( i=0; i < 64; i++ ) for( i=0; i < 64; i++ )
a.setPoint( i, 0, i*2+1 ); a.setPoint( i, 0, i*2+1 );
p2.setPen( color1 ); p2.setPen( tqcolor1 );
p2.drawPoints( a ); p2.drawPoints( a );
p2.end(); p2.end();
TQApplication::flushX(); TQApplication::flushX();
@ -428,7 +428,7 @@ void KStyle::drawKStylePrimitive( KStylePrimitive kpe,
p2.begin( d->horizontalLine ); p2.begin( d->horizontalLine );
for( i=0; i < 64; i++ ) for( i=0; i < 64; i++ )
a.setPoint( i, i*2+1, 0 ); a.setPoint( i, i*2+1, 0 );
p2.setPen( color1 ); p2.setPen( tqcolor1 );
p2.drawPoints( a ); p2.drawPoints( a );
p2.end(); p2.end();
TQApplication::flushX(); TQApplication::flushX();
@ -597,7 +597,7 @@ void KStyle::drawPrimitive( PrimitiveElement pe,
p->save(); p->save();
p->setRasterOp( Qt::CopyROP ); p->setRasterOp( Qt::CopyROP );
p->setPen( TQPen( cg.highlight().dark( 160 ), 1 ) ); p->setPen( TQPen( cg.highlight().dark( 160 ), 1 ) );
p->setBrush( NoBrush ); p->setBrush( TQNoBrush );
p->drawRect( p->drawRect(
rect.x() + point.x(), rect.x() + point.x(),
rect.y() + point.y(), rect.y() + point.y(),
@ -730,7 +730,7 @@ void KStyle::drawControl( ControlElement element,
p->setPen (selected ? cg.background() : cg.mid()); p->setPen (selected ? cg.background() : cg.mid());
p->setBrush(selected ? cg.background() : cg.mid()); p->setBrush(selected ? cg.background() : cg.mid());
p->drawPolygon(a); p->drawPolygon(a);
p->setBrush(NoBrush); p->setBrush(TQNoBrush);
if (!selected) { if (!selected) {
p->translate(0,-1); p->translate(0,-1);
p->setPen(cg.light()); p->setPen(cg.light());
@ -773,7 +773,7 @@ void KStyle::drawControl( ControlElement element,
p->setPen (selected ? cg.background() : cg.mid()); p->setPen (selected ? cg.background() : cg.mid());
p->setBrush(selected ? cg.background() : cg.mid()); p->setBrush(selected ? cg.background() : cg.mid());
p->drawPolygon(a); p->drawPolygon(a);
p->setBrush(NoBrush); p->setBrush(TQNoBrush);
if (!selected) { if (!selected) {
p->translate(0,1); p->translate(0,1);
p->setPen(cg.dark()); p->setPen(cg.dark());
@ -800,7 +800,7 @@ void KStyle::drawControl( ControlElement element,
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
case CE_ProgressBarGroove: { case CE_ProgressBarGroove: {
TQRect fr = subRect(SR_ProgressBarGroove, widget); 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; break;
} }
@ -895,15 +895,15 @@ void KStyle::drawControl( ControlElement element,
p->save(); p->save();
p->setPen(pb->isEnabled() ? (reverse ? cg.text() : cg.highlightedText()) : cg.text()); 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->setClipRect(crect);
p->setPen(reverse ? cg.highlightedText() : cg.text()); p->setPen(reverse ? cg.highlightedText() : cg.text());
p->drawText(r, AlignCenter, pb->progressString()); p->drawText(r, TQAlignCenter, pb->progressString());
p->restore(); p->restore();
} else { } else {
p->setPen(cg.text()); p->setPen(cg.text());
p->drawText(r, AlignCenter, pb->progressString()); p->drawText(r, TQAlignCenter, pb->progressString());
} }
break; break;
@ -1860,14 +1860,14 @@ bool KStyle::eventFilter( TQObject* object, TQEvent* event )
// -- Karol. // -- Karol.
TQFrame *frame = 0; TQFrame *frame = 0;
if ( event->type() == TQEvent::Paint if ( event->type() == TQEvent::Paint
&& (frame = ::qt_cast<TQFrame*>(object)) ) && (frame = tqqt_cast<TQFrame*>(object)) )
{ {
if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel) if (frame->frameShape() != TQFrame::ToolBarPanel && frame->frameShape() != TQFrame::MenuBarPanel)
return false; return false;
bool horizontal = true; bool horizontal = true;
TQPaintEvent* pe = (TQPaintEvent*)event; TQPaintEvent* pe = (TQPaintEvent*)event;
TQToolBar *toolbar = ::qt_cast< TQToolBar *>( frame ); TQToolBar *toolbar = tqqt_cast< TQToolBar *>( frame );
TQRect r = pe->rect(); TQRect r = pe->rect();
if (toolbar && toolbar->orientation() == Qt::Vertical) if (toolbar && toolbar->orientation() == Qt::Vertical)

@ -251,7 +251,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
const TQRect &r, const TQRect &r,
const TQColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
enum KStylePixelMetric { enum KStylePixelMetric {
@ -279,7 +279,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
const TQRect &r, const TQRect &r,
const TQColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
void drawControl( ControlElement element, void drawControl( ControlElement element,
TQPainter* p, TQPainter* p,
@ -287,7 +287,7 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
const TQRect &r, const TQRect &r,
const TQColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
void drawComplexControl( ComplexControl control, void drawComplexControl( ComplexControl control,
TQPainter *p, TQPainter *p,
@ -297,17 +297,17 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
SFlags flags = Style_Default, SFlags flags = Style_Default,
SCFlags controls = SC_All, SCFlags controls = SC_All,
SCFlags active = SC_None, SCFlags active = SC_None,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
SubControl querySubControl( ComplexControl control, SubControl querySubControl( ComplexControl control,
const TQWidget* widget, const TQWidget* widget,
const TQPoint &pos, const TQPoint &pos,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
TQRect querySubControlMetrics( ComplexControl control, TQRect querySubControlMetrics( ComplexControl control,
const TQWidget* widget, const TQWidget* widget,
SubControl sc, SubControl sc,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
int pixelMetric( PixelMetric m, int pixelMetric( PixelMetric m,
const TQWidget* widget = 0 ) const; const TQWidget* widget = 0 ) const;
@ -317,11 +317,11 @@ class KDEFX_EXPORT KStyle: public QCommonStyle
TQPixmap stylePixmap( StylePixmap stylepixmap, TQPixmap stylePixmap( StylePixmap stylepixmap,
const TQWidget* widget = 0, const TQWidget* widget = 0,
const TQStyleOption& = TQStyleOption::Default ) const; const TQStyleOption& = TQStyleOption::TQSO_Default ) const;
int styleHint( StyleHint sh, int styleHint( StyleHint sh,
const TQWidget* w = 0, const TQWidget* w = 0,
const TQStyleOption &opt = TQStyleOption::Default, const TQStyleOption &opt = TQStyleOption::TQSO_Default,
QStyleHintReturn* shr = 0 ) const; QStyleHintReturn* shr = 0 ) const;
protected: protected:

Loading…
Cancel
Save