Replace various strings '#define'd in tqtinterface

Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
pull/238/head
Michele Calgaro 6 months ago
parent c8ece3630d
commit 57e0ed6634
Signed by: MicheleC
GPG Key ID: 2A75B7CA8ADED5CF

@ -333,7 +333,7 @@ static void kDebugBackend( unsigned short nLevel, unsigned int nArea, const char
break; break;
} }
TQFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") ); TQFile aOutputFile( kDebug_data->config->readPathEntry(aKey, "kdebug.dbg") );
aOutputFile.open( (TQIODevice_OpenModeFlag)((int)IO_WriteOnly | (int)IO_Append | (int)IO_Raw) ); aOutputFile.open( IO_WriteOnly | IO_Append | IO_Raw );
aOutputFile.writeBlock( buf, strlen( buf ) ); aOutputFile.writeBlock( buf, strlen( buf ) );
aOutputFile.close(); aOutputFile.close();
break; break;

@ -287,7 +287,7 @@ void TDEIconEffect::toGray(TQImage &img, float value)
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.tqcolorTable(); : (unsigned int *) img.colorTable();
int rval, gval, bval, val, alpha, i; int rval, gval, bval, val, alpha, i;
for (i=0; i<pixels; i++) for (i=0; i<pixels; i++)
{ {
@ -309,7 +309,7 @@ void TDEIconEffect::colorize(TQImage &img, const TQColor &col, float value)
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.tqcolorTable(); : (unsigned int *) img.colorTable();
int rval, gval, bval, val, alpha, i; int rval, gval, bval, val, alpha, i;
float rcol = col.red(), gcol = col.green(), bcol = col.blue(); float rcol = col.red(), gcol = col.green(), bcol = col.blue();
for (i=0; i<pixels; i++) for (i=0; i<pixels; i++)
@ -348,7 +348,7 @@ void TDEIconEffect::colorize(TQImage &img, const TQColor &col, float value)
void TDEIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) { void TDEIconEffect::toMonochrome(TQImage &img, const TQColor &black, const TQColor &white, float value) {
int pixels = (img.depth() > 8) ? img.width()*img.height() : img.numColors(); int pixels = (img.depth() > 8) ? img.width()*img.height() : 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.tqcolorTable(); : (unsigned int *) img.colorTable();
int rval, gval, bval, alpha, i; int rval, gval, bval, alpha, i;
int rw = white.red(), gw = white.green(), bw = white.blue(); int rw = white.red(), gw = white.green(), bw = white.blue();
int rb = black.red(), gb = black.green(), bb = black.blue(); int rb = black.red(), gb = black.green(), bb = black.blue();
@ -400,7 +400,7 @@ void TDEIconEffect::deSaturate(TQImage &img, float value)
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.tqcolorTable(); : (unsigned int *) img.colorTable();
TQColor color; TQColor color;
int h, s, v, i; int h, s, v, i;
for (i=0; i<pixels; i++) for (i=0; i<pixels; i++)
@ -418,7 +418,7 @@ void TDEIconEffect::toGamma(TQImage &img, float value)
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.tqcolorTable(); : (unsigned int *) img.colorTable();
TQColor color; TQColor color;
int i, rval, gval, bval; int i, rval, gval, bval;
float gamma; float gamma;

@ -1048,7 +1048,7 @@ void TDEApplication::init(bool GUIenabled)
// kdialog itself. // kdialog itself.
// * Don't warn if we run with a read-only $HOME // * Don't warn if we run with a read-only $HOME
TQCString readOnly = getenv("TDE_HOME_READONLY"); TQCString readOnly = getenv("TDE_HOME_READONLY");
if (readOnly.isEmpty() && (tqstrcmp(name(), "kdialog") != 0)) if (readOnly.isEmpty() && (qstrcmp(name(), "kdialog") != 0))
{ {
TDEConfigGroupSaver saver(config, "KDE Action Restrictions"); TDEConfigGroupSaver saver(config, "KDE Action Restrictions");
if (config->readBoolEntry("warn_unwritable_config",true)) if (config->readBoolEntry("warn_unwritable_config",true))

@ -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.tqcolorTable(); (unsigned int *)image.colorTable();
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.tqcolorTable(); (unsigned int *)image.colorTable();
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.tqcolorTable():0; modImage.colorTable():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.tqcolorTable():0; blendImage.colorTable():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.tqcolorTable(); (unsigned int *)img.colorTable();
int val, i; int val, i;
for(i=0; i < pixels; ++i){ for(i=0; i < pixels; ++i){
val = tqGray(data[i]); val = tqGray(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.tqcolorTable(); (unsigned int *)img.colorTable();
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.tqcolorTable(); (unsigned int *)img.colorTable();
int i, r, g, b; int i, r, g, b;
for(i=0; i < pixels; ++i){ for(i=0; i < pixels; ++i){
r = tqRed(data[i]); r = tqRed(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.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(TQRgb)); memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(TQRgb));
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.tqcolorTable(), src.tqcolorTable(), src.numColors()*sizeof(TQRgb)); memcpy(dest.colorTable(), src.colorTable(), src.numColors()*sizeof(TQRgb));
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,7 +2817,7 @@ void KImageEffect::threshold(TQImage &img, unsigned int threshold)
} }
else{ // PsudeoClass else{ // PsudeoClass
count = img.numColors(); count = img.numColors();
data = (unsigned int *)img.tqcolorTable(); data = (unsigned int *)img.colorTable();
} }
for(i=0; i < count; ++i) for(i=0; i < count; ++i)
data[i] = intensityValue(data[i]) < threshold ? TQColor(TQt::black).rgb() : TQColor(TQt::white).rgb(); data[i] = intensityValue(data[i]) < threshold ? TQColor(TQt::black).rgb() : TQColor(TQt::white).rgb();
@ -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.tqcolorTable(); unsigned int *cTable = src.colorTable();
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.tqcolorTable(); unsigned int *cTable = src.colorTable();
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->tqcolorTable(); unsigned int *colorTable = (unsigned int *)image->colorTable();
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.tqcolorTable(); unsigned int *cTable = src.colorTable();
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.tqcolorTable(); srcTable = (unsigned int *)img.colorTable();
destTable = (unsigned int *)dest.tqcolorTable(); destTable = (unsigned int *)dest.colorTable();
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.tqcolorTable(); srcTable = (unsigned int *)img.colorTable();
destTable = (unsigned int *)dest.tqcolorTable(); destTable = (unsigned int *)dest.colorTable();
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.tqcolorTable(); srcTable = (unsigned int *)img.colorTable();
destTable = (unsigned int *)dest.tqcolorTable(); destTable = (unsigned int *)dest.colorTable();
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.tqcolorTable(); data = (unsigned int *)img.colorTable();
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.tqcolorTable(); unsigned int *cTable = (unsigned int *)src.colorTable();
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);
@ -4554,7 +4554,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.tqcolorTable(); unsigned int *cTable = (unsigned int *)src.colorTable();
for(y=0; y < src.height(); ++y){ for(y=0; y < src.height(); ++y){
scanLineIdx = TQMIN(TQMAX(y-1,0),src.height()-3); scanLineIdx = TQMIN(TQMAX(y-1,0),src.height()-3);
p = (unsigned char *)src.scanLine(scanLineIdx); p = (unsigned char *)src.scanLine(scanLineIdx);
@ -4632,7 +4632,7 @@ void KImageEffect::contrastHSV(TQImage &img, bool sharpen)
} }
else{ else{
count = img.numColors(); count = img.numColors();
data = (unsigned int *)img.tqcolorTable(); data = (unsigned int *)img.colorTable();
} }
for(i=0; i < count; ++i){ for(i=0; i < count; ++i){
c.setRgb(data[i]); c.setRgb(data[i]);

@ -357,7 +357,7 @@ bool KPixmap::checkColorTable( const TQImage &image )
} }
TQRgb* ctable = image.tqcolorTable(); TQRgb* ctable = image.colorTable();
int ncols = image.numColors(); int ncols = image.numColors();
int j; int j;

@ -853,7 +853,7 @@ void TDEStyle::drawControl( TQ_ControlElement element,
// ------------------------------------------------------------------------ // ------------------------------------------------------------------------
case CE_ProgressBarGroove: { case CE_ProgressBarGroove: {
TQRect fr = subRect(SR_ProgressBarGroove, ceData, elementFlags, widget); TQRect fr = subRect(SR_ProgressBarGroove, ceData, elementFlags, widget);
drawPrimitive(PE_Panel, p, ceData, elementFlags, fr, cg, Style_Sunken, TQStyleOption::SO_Default); drawPrimitive(PE_Panel, p, ceData, elementFlags, fr, cg, Style_Sunken, TQStyleOption::Default);
break; break;
} }

@ -245,7 +245,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
const TQRect &r, const TQRect &r,
const TQColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::SO_Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
/** /**
* This function is identical to Qt's TQStyle::tqdrawPrimitive(), except that * This function is identical to Qt's TQStyle::tqdrawPrimitive(), except that
@ -263,7 +263,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
const TQRect &r, const TQRect &r,
const TQColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::SO_Default, const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const; const TQWidget* widget = 0 ) const;
@ -294,7 +294,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
const TQRect &r, const TQRect &r,
const TQColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::SO_Default ) const; const TQStyleOption& = TQStyleOption::Default ) const;
void drawControl( TQ_ControlElement element, void drawControl( TQ_ControlElement element,
TQPainter* p, TQPainter* p,
@ -303,7 +303,7 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
const TQRect &r, const TQRect &r,
const TQColorGroup &cg, const TQColorGroup &cg,
SFlags flags = Style_Default, SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::SO_Default, const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const; const TQWidget* widget = 0 ) const;
void drawComplexControl( TQ_ComplexControl control, void drawComplexControl( TQ_ComplexControl control,
@ -315,21 +315,21 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
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::SO_Default, const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const; const TQWidget* widget = 0 ) const;
SubControl querySubControl( TQ_ComplexControl control, SubControl querySubControl( TQ_ComplexControl control,
const TQStyleControlElementData &ceData, const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
const TQPoint &pos, const TQPoint &pos,
const TQStyleOption& = TQStyleOption::SO_Default, const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const; const TQWidget* widget = 0 ) const;
TQRect querySubControlMetrics( TQ_ComplexControl control, TQRect querySubControlMetrics( TQ_ComplexControl control,
const TQStyleControlElementData &ceData, const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
SubControl sc, SubControl sc,
const TQStyleOption& = TQStyleOption::SO_Default, const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const; const TQWidget* widget = 0 ) const;
int pixelMetric( PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, int pixelMetric( PixelMetric m, const TQStyleControlElementData &ceData, ControlElementFlags elementFlags,
@ -341,12 +341,12 @@ class TDEFX_EXPORT TDEStyle: public TQCommonStyle
TQPixmap stylePixmap( StylePixmap stylepixmap, TQPixmap stylePixmap( StylePixmap stylepixmap,
const TQStyleControlElementData &ceData, const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
const TQStyleOption& = TQStyleOption::SO_Default, const TQStyleOption& = TQStyleOption::Default,
const TQWidget* widget = 0 ) const; const TQWidget* widget = 0 ) const;
int styleHint( StyleHint sh, const TQStyleControlElementData &ceData, int styleHint( StyleHint sh, const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
const TQStyleOption &opt = TQStyleOption::SO_Default, const TQStyleOption &opt = TQStyleOption::Default,
TQStyleHintReturn* shr = 0, TQStyleHintReturn* shr = 0,
const TQWidget* w = 0 ) const; const TQWidget* w = 0 ) const;

@ -246,7 +246,7 @@ bool DockContainer::eventFilter( TQObject *obj, TQEvent *event )
switch ( event->type() ){ switch ( event->type() ){
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
{ {
KDockWidget * w=m_revMap[tqt_dynamic_cast<KMultiTabBarTab*>(obj)->id()]; KDockWidget * w=m_revMap[dynamic_cast<KMultiTabBarTab*>(obj)->id()];
if (!w) { if (!w) {
kdDebug()<<"NoWidget"<<endl; kdDebug()<<"NoWidget"<<endl;
break; break;
@ -307,7 +307,7 @@ void DockContainer::showWidget(KDockWidget *w) {
void DockContainer::changeOverlapMode() void DockContainer::changeOverlapMode()
{ {
const KDockButton_Private *btn=tqt_dynamic_cast<const KDockButton_Private*>(sender()); const KDockButton_Private *btn=dynamic_cast<const KDockButton_Private*>(sender());
kdDebug(760)<<"DockContainer::changeOverlapMode: button=="<<btn<<endl; kdDebug(760)<<"DockContainer::changeOverlapMode: button=="<<btn<<endl;
@ -612,7 +612,7 @@ void DockContainer::toggle() {
if (m_tb->isTabRaised(oldtab)) { if (m_tb->isTabRaised(oldtab)) {
m_tb->setTab(oldtab,false); m_tb->setTab(oldtab,false);
tabClicked(oldtab); tabClicked(oldtab);
// KMDI::MainWindow *mainFrm = tqt_dynamic_cast<KMDI::MainWindow*>(m_mainWin); // KMDI::MainWindow *mainFrm = dynamic_cast<KMDI::MainWindow*>(m_mainWin);
// if (mainFrm && mainFrm->activeWindow() ) // TODO // if (mainFrm && mainFrm->activeWindow() ) // TODO
// mainFrm->activeWindow()->setFocus(); // mainFrm->activeWindow()->setFocus();

@ -146,7 +146,7 @@ void GUIClient::addToolView(KMDI::ToolViewAccessor* mtva)
cfg->setGroup( _grp ); cfg->setGroup( _grp );
TDEAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()), TDEAction *a=new ToggleToolViewAction(i18n("Show %1").arg(mtva->wrappedWidget()->caption()),
/*TQString::null*/sc,tqt_dynamic_cast<KDockWidget*>(mtva->wrapperWidget()), /*TQString::null*/sc,dynamic_cast<KDockWidget*>(mtva->wrapperWidget()),
m_mdiMainFrm,actionCollection(), aname.latin1() ); m_mdiMainFrm,actionCollection(), aname.latin1() );
((ToggleToolViewAction*)a)->setCheckedState(TQString(i18n("Hide %1").arg(mtva->wrappedWidget()->caption()))); ((ToggleToolViewAction*)a)->setCheckedState(TQString(i18n("Hide %1").arg(mtva->wrappedWidget()->caption())));

@ -327,7 +327,7 @@ void MainWindow::setToolViewStyle(int flag)
bool toolviewExists = false; bool toolviewExists = false;
TQMap<TQWidget*,KMDI::ToolViewAccessor*>::Iterator it; TQMap<TQWidget*,KMDI::ToolViewAccessor*>::Iterator it;
for (it = m_toolViews->begin(); it != m_toolViews->end(); ++it) { for (it = m_toolViews->begin(); it != m_toolViews->end(); ++it) {
KDockWidget *dockWidget = tqt_dynamic_cast<KDockWidget*>(it.data()->wrapperWidget()); KDockWidget *dockWidget = dynamic_cast<KDockWidget*>(it.data()->wrapperWidget());
if (dockWidget) { if (dockWidget) {
if (flag == KMDI::IconOnly) if (flag == KMDI::IconOnly)
{ {
@ -373,7 +373,7 @@ void MainWindow::dockToolViewsIntoContainers(TQPtrList<KDockWidget>& widgetsToRe
void MainWindow::findToolViewsDockedToMain(TQPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw) { void MainWindow::findToolViewsDockedToMain(TQPtrList<KDockWidget>* list,KDockWidget::DockPosition dprtmw) {
KDockWidget *mainDock=getMainDockWidget(); KDockWidget *mainDock=getMainDockWidget();
if (mainDock->parentDockTabGroup()) { if (mainDock->parentDockTabGroup()) {
mainDock=tqt_dynamic_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent()); mainDock=dynamic_cast<KDockWidget*>(mainDock->parentDockTabGroup()->parent());
// FIXME: will likely crash below due to unchecked cast // FIXME: will likely crash below due to unchecked cast
} }
@ -384,7 +384,7 @@ void MainWindow::findToolViewsDockedToMain(TQPtrList<KDockWidget>* list,KDockWid
} }
if (widget) { if (widget) {
KDockTabGroup *tg=tqt_dynamic_cast<KDockTabGroup*>(widget-> KDockTabGroup *tg=dynamic_cast<KDockTabGroup*>(widget->
getWidget()); getWidget());
if (tg) { if (tg) {
kdDebug(760)<<"KDockTabGroup found"<<endl; kdDebug(760)<<"KDockTabGroup found"<<endl;

@ -37,7 +37,7 @@ ToolViewAccessor::ToolViewAccessor( KMDI::MainWindow *parent, TQWidget *widgetTo
mdiMainFrm=parent; mdiMainFrm=parent;
d=new KMDIPrivate::ToolViewAccessorPrivate(); d=new KMDIPrivate::ToolViewAccessorPrivate();
if (widgetToWrap->inherits("KDockWidget")) { if (widgetToWrap->inherits("KDockWidget")) {
d->widgetContainer=tqt_dynamic_cast<KDockWidget*>(widgetToWrap); d->widgetContainer=dynamic_cast<KDockWidget*>(widgetToWrap);
d->widget=d->widgetContainer->getWidget(); d->widget=d->widgetContainer->getWidget();
} else { } else {
d->widget=widgetToWrap; d->widget=widgetToWrap;

@ -252,7 +252,7 @@ bool KMdiDockContainer::eventFilter( TQObject *obj, TQEvent *event )
{ {
case TQEvent::MouseButtonPress: case TQEvent::MouseButtonPress:
{ {
KMultiTabBarTab* kmtbTab = tqt_dynamic_cast<KMultiTabBarTab*>( obj ); KMultiTabBarTab* kmtbTab = dynamic_cast<KMultiTabBarTab*>( obj );
if ( !kmtbTab ) if ( !kmtbTab )
{ {
kdDebug(760) << k_funcinfo << "Got a mouse button press but we have no tab" << endl; kdDebug(760) << k_funcinfo << "Got a mouse button press but we have no tab" << endl;
@ -332,7 +332,7 @@ void KMdiDockContainer::showWidget( KDockWidget *w )
void KMdiDockContainer::changeOverlapMode() void KMdiDockContainer::changeOverlapMode()
{ {
const KDockButton_Private * btn = tqt_dynamic_cast<const KDockButton_Private*>( sender() ); const KDockButton_Private * btn = dynamic_cast<const KDockButton_Private*>( sender() );
if ( !btn ) if ( !btn )
return ; return ;
@ -794,7 +794,7 @@ void KMdiDockContainer::toggle()
kdDebug( 760 ) << k_funcinfo << "lowering tab" << endl; kdDebug( 760 ) << k_funcinfo << "lowering tab" << endl;
m_tb->setTab( oldtab, false ); m_tb->setTab( oldtab, false );
tabClicked( oldtab ); tabClicked( oldtab );
KMdiMainFrm *mainFrm = tqt_dynamic_cast<KMdiMainFrm*>( m_mainWin ); KMdiMainFrm *mainFrm = dynamic_cast<KMdiMainFrm*>( m_mainWin );
if ( mainFrm && mainFrm->activeWindow() ) if ( mainFrm && mainFrm->activeWindow() )
mainFrm->activeWindow()->setFocus(); mainFrm->activeWindow()->setFocus();
} }

@ -258,7 +258,7 @@ void KMDIGUIClient::addToolView( KMdiToolViewAccessor* mtva )
sc = TDEShortcut( cfg->readEntry( aname, "" ) ); sc = TDEShortcut( cfg->readEntry( aname, "" ) );
cfg->setGroup( _grp ); cfg->setGroup( _grp );
TDEAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ), TDEAction *a = new ToggleToolViewAction( i18n( "Show %1" ).arg( mtva->wrappedWidget() ->caption() ),
/*TQString::null*/sc, tqt_dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ), /*TQString::null*/sc, dynamic_cast<KDockWidget*>( mtva->wrapperWidget() ),
m_mdiMainFrm, actionCollection(), aname.latin1() ); m_mdiMainFrm, actionCollection(), aname.latin1() );
#if KDE_IS_VERSION(3,2,90) #if KDE_IS_VERSION(3,2,90)

@ -1777,7 +1777,7 @@ void KMdiMainFrm::setToolviewStyle( int flag )
TQMap<TQWidget*, KMdiToolViewAccessor*>::Iterator it; TQMap<TQWidget*, KMdiToolViewAccessor*>::Iterator it;
for ( it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it ) for ( it = m_pToolViews->begin(); it != m_pToolViews->end(); ++it )
{ {
KDockWidget *dockWidget = tqt_dynamic_cast<KDockWidget*>( it.data()->wrapperWidget() ); KDockWidget *dockWidget = dynamic_cast<KDockWidget*>( it.data()->wrapperWidget() );
if ( dockWidget ) if ( dockWidget )
{ {
switch ( flag ) switch ( flag )
@ -1886,7 +1886,7 @@ void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDock
KDockWidget* mainDock = getMainDockWidget(); KDockWidget* mainDock = getMainDockWidget();
if ( mainDock->parentDockTabGroup() ) if ( mainDock->parentDockTabGroup() )
{ {
mainDock = tqt_dynamic_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() ); mainDock = dynamic_cast<KDockWidget*>( mainDock->parentDockTabGroup()->parent() );
// FIXME: will likely crash below due to unchecked cast // FIXME: will likely crash below due to unchecked cast
} }
@ -1903,7 +1903,7 @@ void KMdiMainFrm::findToolViewsDockedToMain( TQPtrList<KDockWidget>* list, KDock
if ( widget ) if ( widget )
{ {
KDockTabGroup* tg = tqt_dynamic_cast<KDockTabGroup*>( widget->getWidget() ); KDockTabGroup* tg = dynamic_cast<KDockTabGroup*>( widget->getWidget() );
if ( tg ) if ( tg )
{ {
kdDebug(760) << k_funcinfo << "KDockTabGroup found" << endl; kdDebug(760) << k_funcinfo << "KDockTabGroup found" << endl;
@ -2118,7 +2118,7 @@ void KMdiMainFrm::finishIDEAlMode( bool full )
TQStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container ) TQStringList KMdiMainFrm::prepareIdealToTabs( KDockWidget* container )
{ {
KDockContainer * pDW = tqt_dynamic_cast<KDockContainer*>( container->getWidget() ); KDockContainer * pDW = dynamic_cast<KDockContainer*>( container->getWidget() );
TQStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets(); TQStringList widgetNames = ( ( KMdiDockContainer* ) pDW ) ->containedWidgets();
for ( TQStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it ) for ( TQStringList::iterator it = widgetNames.begin();it != widgetNames.end();++it )
{ {

@ -36,7 +36,7 @@ KMdiToolViewAccessor::KMdiToolViewAccessor( KMdiMainFrm *parent, TQWidget *widge
d = new KMdiToolViewAccessorPrivate(); d = new KMdiToolViewAccessorPrivate();
if ( widgetToWrap->inherits( "KDockWidget" ) ) if ( widgetToWrap->inherits( "KDockWidget" ) )
{ {
d->widgetContainer = tqt_dynamic_cast<KDockWidget*>( widgetToWrap ); d->widgetContainer = dynamic_cast<KDockWidget*>( widgetToWrap );
d->widget = d->widgetContainer->getWidget(); d->widget = d->widgetContainer->getWidget();
} }
else else

@ -66,7 +66,7 @@ namespace KParts
T::staticMetaObject()->className(), T::staticMetaObject()->className(),
args ); args );
T *result = tqt_dynamic_cast<T *>( object ); T *result = dynamic_cast<T *>( object );
if ( !result ) if ( !result )
delete object; delete object;
return result; return result;
@ -104,7 +104,7 @@ namespace KParts
T::staticMetaObject()->className(), T::staticMetaObject()->className(),
args ); args );
T *result = tqt_dynamic_cast<T *>( object ); T *result = dynamic_cast<T *>( object );
if ( !result ) if ( !result )
delete object; delete object;
return result; return result;
@ -178,7 +178,7 @@ namespace KParts
*error = ErrNoFactory; *error = ErrNoFactory;
return 0; return 0;
} }
KParts::Factory *partFactory = tqt_dynamic_cast<KParts::Factory *>( factory ); KParts::Factory *partFactory = dynamic_cast<KParts::Factory *>( factory );
if ( !partFactory ) if ( !partFactory )
{ {
library->unload(); library->unload();

@ -63,7 +63,7 @@ const TDEInstance *Factory::partInstanceFromLibrary( const TQCString &libraryNam
KLibFactory *factory = library->factory(); KLibFactory *factory = library->factory();
if ( !factory ) if ( !factory )
return 0; return 0;
KParts::Factory *pfactory = tqt_dynamic_cast<KParts::Factory *>( factory ); KParts::Factory *pfactory = dynamic_cast<KParts::Factory *>( factory );
if ( !pfactory ) if ( !pfactory )
return 0; return 0;
return pfactory->partInstance(); return pfactory->partInstance();

@ -111,7 +111,7 @@ namespace KParts
if ( part && !qstrcmp( className, "KParts::ReadOnlyPart" ) ) if ( part && !qstrcmp( className, "KParts::ReadOnlyPart" ) )
{ {
KParts::ReadWritePart *rwp = tqt_dynamic_cast<KParts::ReadWritePart *>( part ); KParts::ReadWritePart *rwp = dynamic_cast<KParts::ReadWritePart *>( part );
if ( rwp ) if ( rwp )
rwp->setReadWrite( false ); rwp->setReadWrite( false );
} }
@ -137,11 +137,11 @@ namespace KParts
args ); args );
// (this cast is guaranteed to work...) // (this cast is guaranteed to work...)
KParts::Part *part = tqt_dynamic_cast<KParts::Part *>( object ); KParts::Part *part = dynamic_cast<KParts::Part *>( object );
if ( part && !qstrcmp( className, "KParts::ReadOnlyPart" ) ) if ( part && !qstrcmp( className, "KParts::ReadOnlyPart" ) )
{ {
KParts::ReadWritePart *rwp = tqt_dynamic_cast<KParts::ReadWritePart *>( part ); KParts::ReadWritePart *rwp = dynamic_cast<KParts::ReadWritePart *>( part );
if ( rwp ) if ( rwp )
rwp->setReadWrite( false ); rwp->setReadWrite( false );
} }

@ -135,7 +135,7 @@ KStatusBar * StatusBarExtension::statusBar() const
{ {
if ( !m_statusBar ) { if ( !m_statusBar ) {
TQWidget* w = static_cast<KParts::ReadOnlyPart*>(parent())->widget(); TQWidget* w = static_cast<KParts::ReadOnlyPart*>(parent())->widget();
TDEMainWindow* mw = tqt_dynamic_cast<TDEMainWindow *>( w->topLevelWidget() ); TDEMainWindow* mw = dynamic_cast<TDEMainWindow *>( w->topLevelWidget() );
if ( mw ) if ( mw )
m_statusBar = mw->statusBar(); m_statusBar = mw->statusBar();
} }

@ -261,7 +261,7 @@ void KComboBox::setLineEdit( TQLineEdit *edit )
} }
TQComboBox::setLineEdit( edit ); TQComboBox::setLineEdit( edit );
d->klineEdit = tqt_dynamic_cast<KLineEdit*>( edit ); d->klineEdit = dynamic_cast<KLineEdit*>( edit );
setDelegate( d->klineEdit ); setDelegate( d->klineEdit );
// Connect the returnPressed signal for both Q[K]LineEdits' // Connect the returnPressed signal for both Q[K]LineEdits'

@ -308,7 +308,7 @@ TQWidget* KCursorPrivateAutoHideEventFilter::actualWidget() const
TQWidget* w = m_widget; TQWidget* w = m_widget;
// Is w a scrollview ? Call setCursor on the viewport in that case. // Is w a scrollview ? Call setCursor on the viewport in that case.
TQScrollView * sv = tqt_dynamic_cast<TQScrollView *>( w ); TQScrollView * sv = dynamic_cast<TQScrollView *>( w );
if ( sv ) if ( sv )
w = sv->viewport(); w = sv->viewport();

@ -535,7 +535,7 @@ void KDockWidget::setPixmap(const TQPixmap& pixmap) {
dtg->changeTab(this,pixmap,dtg->tabLabel(this)); dtg->changeTab(this,pixmap,dtg->tabLabel(this));
TQWidget *contWid=parentDockContainer(); TQWidget *contWid=parentDockContainer();
if (contWid) { if (contWid) {
KDockContainer *x = tqt_dynamic_cast<KDockContainer*>(contWid); KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) { if (x) {
x->setPixmap(this,pixmap); x->setPixmap(this,pixmap);
} }
@ -556,7 +556,7 @@ KDockWidget::~KDockWidget()
} }
if (latestKDockContainer()) { if (latestKDockContainer()) {
KDockContainer *x = tqt_dynamic_cast<KDockContainer*>(latestKDockContainer()); KDockContainer *x = dynamic_cast<KDockContainer*>(latestKDockContainer());
if (x) { if (x) {
x->removeWidget(this); x->removeWidget(this);
} }
@ -719,7 +719,7 @@ void KDockWidget::setLatestKDockContainer(TQWidget* container)
{ {
if (container) if (container)
{ {
if (tqt_dynamic_cast<KDockContainer*>(container)) if (dynamic_cast<KDockContainer*>(container))
d->container=container; d->container=container;
else else
d->container=0; d->container=0;
@ -729,7 +729,7 @@ void KDockWidget::setLatestKDockContainer(TQWidget* container)
TQWidget* KDockWidget::latestKDockContainer() TQWidget* KDockWidget::latestKDockContainer()
{ {
if (!(d->container)) return 0; if (!(d->container)) return 0;
if (tqt_dynamic_cast<KDockContainer*>(d->container.operator->())) return d->container; if (dynamic_cast<KDockContainer*>(d->container.operator->())) return d->container;
return 0; return 0;
} }
@ -782,7 +782,7 @@ void KDockWidget::updateHeader()
header->hide(); header->hide();
} else { } else {
header->setTopLevel( false ); header->setTopLevel( false );
if (widget && tqt_dynamic_cast<KDockContainer*>(widget)) if (widget && dynamic_cast<KDockContainer*>(widget))
header->hide(); header->hide();
else else
header->show(); header->show();
@ -999,7 +999,7 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
* dock tab group, and our parent isn't a KDockContainer, and we have no explicit * dock tab group, and our parent isn't a KDockContainer, and we have no explicit
* parent dock container...we can't do much yet */ * parent dock container...we can't do much yet */
if ( parent() && !parent()->inherits("KDockSplitter") && !parentDockTabGroup() && if ( parent() && !parent()->inherits("KDockSplitter") && !parentDockTabGroup() &&
!(tqt_dynamic_cast<KDockContainer*>(parent())) && !parentDockContainer()){ !(dynamic_cast<KDockContainer*>(parent())) && !parentDockContainer()){
// kdDebug(282)<<"KDockWidget::manualDock(): success = false (3)"<<endl; // kdDebug(282)<<"KDockWidget::manualDock(): success = false (3)"<<endl;
// kdDebug(282)<<parent()->name()<<endl; // kdDebug(282)<<parent()->name()<<endl;
success = false; success = false;
@ -1064,11 +1064,11 @@ KDockWidget* KDockWidget::manualDock( KDockWidget* target, DockPosition dockPos,
if (!contWid) contWid=target->widget; if (!contWid) contWid=target->widget;
if (contWid) if (contWid)
{ {
KDockContainer *cont=tqt_dynamic_cast<KDockContainer*>(contWid); KDockContainer *cont=dynamic_cast<KDockContainer*>(contWid);
if (cont) if (cont)
{ {
if (latestKDockContainer() && (latestKDockContainer()!=contWid)) { if (latestKDockContainer() && (latestKDockContainer()!=contWid)) {
KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(latestKDockContainer()); KDockContainer* dc = dynamic_cast<KDockContainer*>(latestKDockContainer());
if (dc) { if (dc) {
dc->removeWidget(this); dc->removeWidget(this);
} }
@ -1227,7 +1227,7 @@ TQWidget *KDockWidget::parentDockContainer() const
{ {
if (!parent()) return 0L; if (!parent()) return 0L;
TQWidget* candidate = parentWidget()->parentWidget(); TQWidget* candidate = parentWidget()->parentWidget();
if (candidate && tqt_dynamic_cast<KDockContainer*>(candidate)) return candidate; if (candidate && dynamic_cast<KDockContainer*>(candidate)) return candidate;
return 0L; return 0L;
} }
@ -1382,7 +1382,7 @@ void KDockWidget::undock()
{ {
// kdDebug(282)<<"undocked from dockcontainer"<<endl; // kdDebug(282)<<"undocked from dockcontainer"<<endl;
undockedFromContainer=true; undockedFromContainer=true;
KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(d->container.operator->()); KDockContainer* dc = dynamic_cast<KDockContainer*>(d->container.operator->());
if (dc) { if (dc) {
dc->undockWidget(this); dc->undockWidget(this);
setFormerBrotherDockWidget(dc->parentDockWidget()); setFormerBrotherDockWidget(dc->parentDockWidget());
@ -1462,7 +1462,7 @@ void KDockWidget::setWidget( TQWidget* mw )
layout = new TQVBoxLayout( this ); layout = new TQVBoxLayout( this );
layout->setResizeMode( TQLayout::Minimum ); layout->setResizeMode( TQLayout::Minimum );
KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(widget); KDockContainer* dc = dynamic_cast<KDockContainer*>(widget);
if (dc) if (dc)
{ {
d->isContainer=true; d->isContainer=true;
@ -1538,7 +1538,7 @@ void KDockWidget::makeDockVisible()
} }
if (parentDockContainer()) { if (parentDockContainer()) {
TQWidget *contWid=parentDockContainer(); TQWidget *contWid=parentDockContainer();
KDockContainer *x = tqt_dynamic_cast<KDockContainer*>(contWid); KDockContainer *x = dynamic_cast<KDockContainer*>(contWid);
if (x) { if (x) {
x->showWidget(this); x->showWidget(this);
} }
@ -1862,7 +1862,7 @@ KDockWidget* KDockManager::findDockWidgetAt( const TQPoint& pos )
} }
if ( tqt_find_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L; if ( tqt_find_obj_child( TQT_TQOBJECT(w), "KDockSplitter", "_dock_split_" ) ) return 0L;
if ( tqt_find_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L; if ( tqt_find_obj_child( TQT_TQOBJECT(w), "KDockTabGroup", "_dock_tab" ) ) return 0L;
if (tqt_dynamic_cast<KDockContainer*>(w)) return 0L; if (dynamic_cast<KDockContainer*>(w)) return 0L;
if (!childDockWidgetList) return 0L; if (!childDockWidgetList) return 0L;
if ( childDockWidgetList->find(w) != -1 ) return 0L; if ( childDockWidgetList->find(w) != -1 ) return 0L;
@ -2221,7 +2221,7 @@ void KDockManager::writeConfig(TQDomElement &base)
for (TQObjectListIt it(d->containerDocks);it.current();++it) for (TQObjectListIt it(d->containerDocks);it.current();++it)
{ {
KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget); KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) { if (dc) {
dc->prepareSave(nList); dc->prepareSave(nList);
} }
@ -2241,7 +2241,7 @@ void KDockManager::writeConfig(TQDomElement &base)
TQDomElement groupEl; TQDomElement groupEl;
if (obj->d->isContainer) { if (obj->d->isContainer) {
KDockContainer* x = tqt_dynamic_cast<KDockContainer*>(obj->widget); KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget);
if (x) { if (x) {
groupEl=doc.createElement("dockContainer"); groupEl=doc.createElement("dockContainer");
x->save(groupEl); x->save(groupEl);
@ -2379,7 +2379,7 @@ void KDockManager::readConfig(TQDomElement &base)
if (!(cont->d->isContainer)) { if (!(cont->d->isContainer)) {
kdDebug(282)<<"restoration of dockContainer is only supported for already existing dock containers"<<endl; kdDebug(282)<<"restoration of dockContainer is only supported for already existing dock containers"<<endl;
} else { } else {
KDockContainer *dc=tqt_dynamic_cast<KDockContainer*>(cont->getWidget()); KDockContainer *dc=dynamic_cast<KDockContainer*>(cont->getWidget());
if (!dc) kdDebug(282)<<"Error while trying to handle dockcontainer configuration restoration"<<endl; if (!dc) kdDebug(282)<<"Error while trying to handle dockcontainer configuration restoration"<<endl;
else { else {
dc->load(childEl); dc->load(childEl);
@ -2555,7 +2555,7 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group )
// kdDebug(282)<<TQString("list size: %1").arg(nList.count())<<endl; // kdDebug(282)<<TQString("list size: %1").arg(nList.count())<<endl;
for (TQObjectListIt it(d->containerDocks);it.current();++it) for (TQObjectListIt it(d->containerDocks);it.current();++it)
{ {
KDockContainer* dc = tqt_dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget); KDockContainer* dc = dynamic_cast<KDockContainer*>(((KDockWidget*)it.current())->widget);
if (dc) { if (dc) {
dc->prepareSave(nList); dc->prepareSave(nList);
} }
@ -2571,7 +2571,7 @@ void KDockManager::writeConfig( TDEConfig* c, TQString group )
obj->header->saveConfig( c ); obj->header->saveConfig( c );
} }
if (obj->d->isContainer) { if (obj->d->isContainer) {
KDockContainer* x = tqt_dynamic_cast<KDockContainer*>(obj->widget); KDockContainer* x = dynamic_cast<KDockContainer*>(obj->widget);
if (x) { if (x) {
x->save(c,group); x->save(c,group);
} }
@ -2734,7 +2734,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group )
} }
if (obj && obj->d->isContainer) { if (obj && obj->d->isContainer) {
tqt_dynamic_cast<KDockContainer*>(obj->widget)->load(c,group); dynamic_cast<KDockContainer*>(obj->widget)->load(c,group);
removeFromAutoCreateList(obj); removeFromAutoCreateList(obj);
} }
if ( obj && obj->header){ if ( obj && obj->header){
@ -2774,7 +2774,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group )
KDockWidget* d2 = getDockWidgetFromName( list.current() ); KDockWidget* d2 = getDockWidgetFromName( list.current() );
tabDockGroup = d2->manualDock( d1, KDockWidget::DockCenter ); tabDockGroup = d2->manualDock( d1, KDockWidget::DockCenter );
if ( tabDockGroup ){ if ( tabDockGroup ){
KDockTabGroup* tab = tqt_dynamic_cast<KDockTabGroup*>(tabDockGroup->widget); KDockTabGroup* tab = dynamic_cast<KDockTabGroup*>(tabDockGroup->widget);
list.next(); list.next();
while ( list.current() && tabDockGroup ){ while ( list.current() && tabDockGroup ){
KDockWidget* tabDock = getDockWidgetFromName( list.current() ); KDockWidget* tabDock = getDockWidgetFromName( list.current() );
@ -2791,7 +2791,7 @@ void KDockManager::readConfig( TDEConfig* c, TQString group )
obj = tabDockGroup; obj = tabDockGroup;
} }
if (obj && obj->d->isContainer) tqt_dynamic_cast<KDockContainer*>(obj->widget)->load(c,group); if (obj && obj->d->isContainer) dynamic_cast<KDockContainer*>(obj->widget)->load(c,group);
if ( obj && obj->header){ if ( obj && obj->header){
obj->header->loadConfig( c ); obj->header->loadConfig( c );
} }
@ -3123,7 +3123,7 @@ void KDockArea::resizeEvent(TQResizeEvent *rsize)
// TQPtrList<TQObject> list(children()); // TQPtrList<TQObject> list(children());
// TQObject *obj=((TQPtrList<TQObject*>)children())->at(i); // TQObject *obj=((TQPtrList<TQObject*>)children())->at(i);
TQObject *obj=children()->getFirst(); TQObject *obj=children()->getFirst();
if (split = tqt_dynamic_cast<KDockSplitter*>(obj)) if (split = dynamic_cast<KDockSplitter*>(obj))
{ {
split->setGeometry( TQRect(TQPoint(0,0), size() )); split->setGeometry( TQRect(TQPoint(0,0), size() ));
// break; // break;

@ -274,7 +274,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
// However, this works surprising well! // However, this works surprising well!
if (m_orientation == TQt::Horizontal) { if (m_orientation == TQt::Horizontal) {
if (ev->oldSize().height() != ev->size().height()) { if (ev->oldSize().height() != ev->size().height()) {
if( (c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) { if( (c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) {
// dockwidget is on the bottom. move xpos so that the size from child1 stays // dockwidget is on the bottom. move xpos so that the size from child1 stays
xpos = (int)ceil(((double)factor) * checkValue(height() - child1->height() - 4) / height()); xpos = (int)ceil(((double)factor) * checkValue(height() - child1->height() - 4) / height());
} else { } else {
@ -286,7 +286,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
} }
} else { } else {
if (ev->oldSize().width() != width()) { if (ev->oldSize().width() != width()) {
if( (c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) { if( (c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) {
xpos = (int)ceil(((double)factor) * checkValue(width() - child1->width() - 4) / width()); xpos = (int)ceil(((double)factor) * checkValue(width() - child1->width() - 4) / width());
} else { } else {
// xpos should not change // xpos should not change
@ -332,11 +332,11 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
kdDebug(282) << "Splitter visibility : " << divider->isVisible() << endl;; kdDebug(282) << "Splitter visibility : " << divider->isVisible() << endl;;
kdDebug(282) << "Splitter procentual pos: " << xpos << endl; kdDebug(282) << "Splitter procentual pos: " << xpos << endl;
if (c0->getWidget()) { if (c0->getWidget()) {
dc=tqt_dynamic_cast<KDockContainer*>(c0->getWidget()); dc=dynamic_cast<KDockContainer*>(c0->getWidget());
kdDebug(282) << "Child 0 KDockContainer?: " << dc << endl; kdDebug(282) << "Child 0 KDockContainer?: " << dc << endl;
} }
if (c1->getWidget()) { if (c1->getWidget()) {
dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()); dc=dynamic_cast<KDockContainer*>(c1->getWidget());
kdDebug(282) << "Child 1 KDockContainer?: " << dc << endl; kdDebug(282) << "Child 1 KDockContainer?: " << dc << endl;
} }
kdDebug(282) << "Child0 : " << child0 << endl; kdDebug(282) << "Child0 : " << child0 << endl;
@ -348,7 +348,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
// //
if( ( (m_orientation==TQt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) || if( ( (m_orientation==TQt::Vertical) &&((fixedWidth0==-1) && (fixedWidth1==-1)) ) ||
( (m_orientation==TQt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) { ( (m_orientation==TQt::Horizontal) &&((fixedHeight0==-1) && (fixedHeight1==-1)) ) ) {
if ((c0->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c0->getWidget())) if ((c0->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c0->getWidget()))
&& (dc->isOverlapMode())) { && (dc->isOverlapMode())) {
// child0 ist a KDockContainer // child0 ist a KDockContainer
int position; int position;
@ -367,7 +367,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
divider->setGeometry(position, 0, 4, height()); divider->setGeometry(position, 0, 4, height());
} }
} else { } else {
if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget())) if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))
&& (dc->isOverlapMode())) { && (dc->isOverlapMode())) {
// child1 ist a KDockContainer // child1 ist a KDockContainer
int position; int position;
@ -403,7 +403,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
int diff = 0; int diff = 0;
if (m_orientation == TQt::Horizontal) { if (m_orientation == TQt::Horizontal) {
if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) { if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) {
// bottom is dockcontainer // bottom is dockcontainer
if( divider->isVisible() ) { if( divider->isVisible() ) {
child0->setGeometry(0, 0, width(), position); child0->setGeometry(0, 0, width(), position);
@ -419,7 +419,7 @@ void KDockSplitter::resizeEvent(TQResizeEvent *ev)
} }
divider->setGeometry(0, position, width(), 4); divider->setGeometry(0, position, width(), 4);
} else { } else {
if ((c1->getWidget()) && (dc=tqt_dynamic_cast<KDockContainer*>(c1->getWidget()))) { if ((c1->getWidget()) && (dc=dynamic_cast<KDockContainer*>(c1->getWidget()))) {
// right is dockcontainer // right is dockcontainer
if( divider->isVisible() ) { if( divider->isVisible() ) {
child0->setGeometry(0, 0, position, height()); child0->setGeometry(0, 0, position, height());

@ -418,7 +418,7 @@ void KEditListBox::virtual_hook( int, void* )
KEditListBox::CustomEditor::CustomEditor( KComboBox *combo ) KEditListBox::CustomEditor::CustomEditor( KComboBox *combo )
{ {
m_representationWidget = combo; m_representationWidget = combo;
m_lineEdit = tqt_dynamic_cast<KLineEdit*>( combo->lineEdit() ); m_lineEdit = dynamic_cast<KLineEdit*>( combo->lineEdit() );
assert( m_lineEdit ); assert( m_lineEdit );
} }

@ -664,7 +664,7 @@ void KPixmapIO::convertToXImage(const TQImage &img)
{ {
uchar *src; uchar *src;
TQ_INT32 val, *dst; TQ_INT32 val, *dst;
TQRgb pixel, *clut = img.tqcolorTable(); TQRgb pixel, *clut = img.colorTable();
for (y=0; y<height; y++) for (y=0; y<height; y++)
{ {
src = const_cast<TQImage&>(img).scanLine(y); src = const_cast<TQImage&>(img).scanLine(y);
@ -721,7 +721,7 @@ void KPixmapIO::convertToXImage(const TQImage &img)
{ {
uchar *src; uchar *src;
TQ_INT32 val, *dst; TQ_INT32 val, *dst;
TQRgb pixel, *clut = img.tqcolorTable(); TQRgb pixel, *clut = img.colorTable();
for (y=0; y<height; y++) for (y=0; y<height; y++)
{ {
src = const_cast<TQImage&>(img).scanLine(y); src = const_cast<TQImage&>(img).scanLine(y);
@ -780,7 +780,7 @@ void KPixmapIO::convertToXImage(const TQImage &img)
{ {
uchar *src, *dst; uchar *src, *dst;
int w1 = width/4; int w1 = width/4;
TQRgb *clut = img.tqcolorTable(), d1, d2, d3, d4; TQRgb *clut = img.colorTable(), d1, d2, d3, d4;
for (y=0; y<height; y++) for (y=0; y<height; y++)
{ {
src = const_cast<TQImage&>(img).scanLine(y); src = const_cast<TQImage&>(img).scanLine(y);
@ -841,7 +841,7 @@ void KPixmapIO::convertToXImage(const TQImage &img)
{ {
uchar *src, *dst; uchar *src, *dst;
int w1 = width/4; int w1 = width/4;
TQRgb *clut = img.tqcolorTable(), d1, d2, d3, d4; TQRgb *clut = img.colorTable(), d1, d2, d3, d4;
for (y=0; y<height; y++) for (y=0; y<height; y++)
{ {
src = const_cast<TQImage&>(img).scanLine(y); src = const_cast<TQImage&>(img).scanLine(y);
@ -878,7 +878,7 @@ void KPixmapIO::convertToXImage(const TQImage &img)
} else } else
{ {
uchar *src; uchar *src;
TQRgb *dst, *clut = img.tqcolorTable(); TQRgb *dst, *clut = img.colorTable();
for (y=0; y<height; y++) for (y=0; y<height; y++)
{ {
src = const_cast<TQImage&>(img).scanLine(y); src = const_cast<TQImage&>(img).scanLine(y);

@ -552,7 +552,7 @@ void KXMLGUIFactory::configureAction( TDEAction *action, const TQDomAttr &attrib
int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSettings ) int KXMLGUIFactory::configureShortcuts(bool bAllowLetterShortcuts , bool bSaveSettings )
{ {
KKeyDialog dlg( bAllowLetterShortcuts, tqt_dynamic_cast<TQWidget*>(parent()) ); KKeyDialog dlg( bAllowLetterShortcuts, dynamic_cast<TQWidget*>(parent()) );
TQPtrListIterator<KXMLGUIClient> it( d->m_clients ); TQPtrListIterator<KXMLGUIClient> it( d->m_clients );
KXMLGUIClient *client; KXMLGUIClient *client;
while( (client=it.current()) !=0 ) while( (client=it.current()) !=0 )

@ -479,7 +479,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// L0683: Set focus on saved focus widget // L0683: Set focus on saved focus widget
if ( focusCurrent ) { if ( focusCurrent ) {
focusCurrent->setFocus(); focusCurrent->setFocus();
if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( focusCurrent )) if( QXEmbed* emb = dynamic_cast< QXEmbed* >( focusCurrent ))
emb->updateEmbeddedFocus( true ); emb->updateEmbeddedFocus( true );
} }
else if ( !w->topLevelWidget()->focusWidget() ) else if ( !w->topLevelWidget()->focusWidget() )
@ -513,7 +513,7 @@ static int qxembed_x11_event_filter( XEvent* e)
// We first record what the focus widget was // We first record what the focus widget was
// and clear the Qt focus. // and clear the Qt focus.
if ( w->topLevelWidget()->focusWidget() ) { if ( w->topLevelWidget()->focusWidget() ) {
if( QXEmbed* emb = tqt_dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget())) if( QXEmbed* emb = dynamic_cast< QXEmbed* >( w->topLevelWidget()->focusWidget()))
emb->updateEmbeddedFocus( false ); emb->updateEmbeddedFocus( false );
focusMap->insert( w->topLevelWidget(), focusMap->insert( w->topLevelWidget(),
new TQGuardedPtr<TQWidget>(w->topLevelWidget()->focusWidget() ) ); new TQGuardedPtr<TQWidget>(w->topLevelWidget()->focusWidget() ) );

@ -256,7 +256,7 @@ void TDEAction::initPrivate( const TQString& text, const TDEShortcut& cut,
{ {
d->m_cutDefault = cut; d->m_cutDefault = cut;
m_parentCollection = tqt_dynamic_cast<TDEActionCollection *>( parent() ); m_parentCollection = dynamic_cast<TDEActionCollection *>( parent() );
kdDebug(129) << "TDEAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl; kdDebug(129) << "TDEAction::initPrivate(): this = " << this << " name = \"" << name() << "\" cut = " << cut.toStringInternal() << " m_parentCollection = " << m_parentCollection << endl;
if ( m_parentCollection ) if ( m_parentCollection )
m_parentCollection->insert( this ); m_parentCollection->insert( this );
@ -822,7 +822,7 @@ void TDEAction::plugMainWindowAccel( TQWidget *w )
while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store
tl = n; tl = n;
TDEMainWindow * mw = tqt_dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow TDEMainWindow * mw = dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow
if (mw) if (mw)
plugAccel( mw->accel() ); plugAccel( mw->accel() );
else else
@ -1057,12 +1057,12 @@ TQWidget* TDEAction::container( int index ) const
TDEToolBar* TDEAction::toolBar( int index ) const TDEToolBar* TDEAction::toolBar( int index ) const
{ {
return tqt_dynamic_cast<TDEToolBar *>( d->m_containers[ index ].m_container ); return dynamic_cast<TDEToolBar *>( d->m_containers[ index ].m_container );
} }
TQPopupMenu* TDEAction::popupMenu( int index ) const TQPopupMenu* TDEAction::popupMenu( int index ) const
{ {
return tqt_dynamic_cast<TQPopupMenu *>( d->m_containers[ index ].m_container ); return dynamic_cast<TQPopupMenu *>( d->m_containers[ index ].m_container );
} }
TQWidget* TDEAction::representative( int index ) const TQWidget* TDEAction::representative( int index ) const
@ -1126,14 +1126,14 @@ void TDEAction::slotPopupActivated()
{ {
if( ::tqqt_cast<TQSignal *>(sender())) if( ::tqqt_cast<TQSignal *>(sender()))
{ {
int id = tqt_dynamic_cast<const TQSignal *>(sender())->value().toInt(); int id = dynamic_cast<const TQSignal *>(sender())->value().toInt();
int pos = findContainer(id); int pos = findContainer(id);
if(pos != -1) if(pos != -1)
{ {
TQPopupMenu* qpm = tqt_dynamic_cast<TQPopupMenu *>( container(pos) ); TQPopupMenu* qpm = dynamic_cast<TQPopupMenu *>( container(pos) );
if(qpm) if(qpm)
{ {
TDEPopupMenu* kpm = tqt_dynamic_cast<TDEPopupMenu *>( qpm ); TDEPopupMenu* kpm = dynamic_cast<TDEPopupMenu *>( qpm );
TQt::ButtonState state; TQt::ButtonState state;
if ( kpm ) // TDEPopupMenu? Nice, it stores the state. if ( kpm ) // TDEPopupMenu? Nice, it stores the state.
state = kpm->state(); state = kpm->state();

@ -2028,7 +2028,7 @@ int TDEToggleToolBarAction::plug( TQWidget* w, int index )
while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store while ( !tl->isDialog() && ( n = tl->parentWidget() ) ) // lookup parent and store
tl = n; tl = n;
TDEMainWindow * mw = tqt_dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow TDEMainWindow * mw = dynamic_cast<TDEMainWindow *>(tl); // try to see if it's a tdemainwindow
if ( mw ) if ( mw )
m_toolBar = mw->toolBar( m_toolBarName ); m_toolBar = mw->toolBar( m_toolBarName );

@ -110,7 +110,7 @@ TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name,
kdWarning(129) << "TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis kdWarning(129) << "TDEActionCollection::TDEActionCollection( TQObject *parent, const char *name, TDEInstance *instance )" << endl; //ellis
kdDebug(129) << kdBacktrace() << endl; kdDebug(129) << kdBacktrace() << endl;
d = new TDEActionCollectionPrivate; d = new TDEActionCollectionPrivate;
TQWidget* w = tqt_dynamic_cast<TQWidget*>( parent ); TQWidget* w = dynamic_cast<TQWidget*>( parent );
if( w ) if( w )
setWidget( w ); setWidget( w );
//d->m_bOneTDEAccelOnly = (d->m_tdeaccelList.count() > 0); //d->m_bOneTDEAccelOnly = (d->m_tdeaccelList.count() > 0);

@ -470,7 +470,7 @@ TDEListViewSearchLine *TDEListViewSearchLineWidget::searchLine() const
void TDEListViewSearchLineWidget::positionInToolBar() void TDEListViewSearchLineWidget::positionInToolBar()
{ {
TDEToolBar *toolBar = tqt_dynamic_cast<TDEToolBar *>(parent()); TDEToolBar *toolBar = dynamic_cast<TDEToolBar *>(parent());
if(toolBar) { if(toolBar) {

@ -195,7 +195,7 @@ TQSizePolicy TDEToolBarSeparator::sizePolicy() const
TDEToolBar::TDEToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig ) TDEToolBar::TDEToolBar( TQWidget *parent, const char *name, bool honorStyle, bool readConfig )
: TQToolBar( TQString::fromLatin1( name ), : TQToolBar( TQString::fromLatin1( name ),
tqt_dynamic_cast<TQMainWindow*>(parent), dynamic_cast<TQMainWindow*>(parent),
parent, false, parent, false,
name ? name : "mainToolBar") name ? name : "mainToolBar")
{ {
@ -432,7 +432,7 @@ KAnimWidget *TDEToolBar::animatedWidget( int id )
Id2WidgetMap::Iterator it = id2widget.find( id ); Id2WidgetMap::Iterator it = id2widget.find( id );
if ( it == id2widget.end() ) if ( it == id2widget.end() )
return 0; return 0;
KAnimWidget *aw = tqt_dynamic_cast<KAnimWidget *>(*it); KAnimWidget *aw = dynamic_cast<KAnimWidget *>(*it);
if ( aw ) if ( aw )
return aw; return aw;
TQObjectList *l = queryList( "KAnimWidget" ); TQObjectList *l = queryList( "KAnimWidget" );
@ -442,7 +442,7 @@ KAnimWidget *TDEToolBar::animatedWidget( int id )
} }
for ( TQObject *o = l->first(); o; o = l->next() ) { for ( TQObject *o = l->first(); o; o = l->next() ) {
KAnimWidget *aw = tqt_dynamic_cast<KAnimWidget *>(o); KAnimWidget *aw = dynamic_cast<KAnimWidget *>(o);
if ( aw ) if ( aw )
{ {
delete l; delete l;
@ -615,7 +615,7 @@ KComboBox * TDEToolBar::getCombo(int id)
Id2WidgetMap::Iterator it = id2widget.find( id ); Id2WidgetMap::Iterator it = id2widget.find( id );
if ( it == id2widget.end() ) if ( it == id2widget.end() )
return 0; return 0;
return tqt_dynamic_cast<KComboBox *>( *it ); return dynamic_cast<KComboBox *>( *it );
} }
@ -624,7 +624,7 @@ KLineEdit * TDEToolBar::getLined (int id)
Id2WidgetMap::Iterator it = id2widget.find( id ); Id2WidgetMap::Iterator it = id2widget.find( id );
if ( it == id2widget.end() ) if ( it == id2widget.end() )
return 0; return 0;
return tqt_dynamic_cast<KLineEdit *>( *it ); return dynamic_cast<KLineEdit *>( *it );
} }
@ -633,7 +633,7 @@ TDEToolBarButton * TDEToolBar::getButton (int id)
Id2WidgetMap::Iterator it = id2widget.find( id ); Id2WidgetMap::Iterator it = id2widget.find( id );
if ( it == id2widget.end() ) if ( it == id2widget.end() )
return 0; return 0;
return tqt_dynamic_cast<TDEToolBarButton *>( *it ); return dynamic_cast<TDEToolBarButton *>( *it );
} }
@ -947,7 +947,7 @@ void TDEToolBar::setFlat (bool flag)
else else
mainWindow()->moveDockWindow( this, DockTop ); mainWindow()->moveDockWindow( this, DockTop );
// And remember to save the new look later // And remember to save the new look later
TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow());
if ( kmw ) if ( kmw )
kmw->setSettingsDirty(); kmw->setSettingsDirty();
} }
@ -1093,7 +1093,7 @@ void TDEToolBar::saveSettings(TDEConfig *config, const TQString &_configGroup)
// reappear at the same position the next time. // reappear at the same position the next time.
// The whole set of indexes has to be saved. // The whole set of indexes has to be saved.
//kdDebug(220) << name() << " writing index " << index << endl; //kdDebug(220) << name() << " writing index " << index << endl;
TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow());
// don't save if there's only one toolbar // don't save if there's only one toolbar
// Don't use kmw->toolBarIterator() because you might // Don't use kmw->toolBarIterator() because you might
@ -1204,7 +1204,7 @@ void TDEToolBar::mousePressEvent ( TQMouseEvent *m )
else else
return; // assume this was an action handled elsewhere, no need for setSettingsDirty() return; // assume this was an action handled elsewhere, no need for setSettingsDirty()
} }
TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mw); TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mw);
if ( kmw ) if ( kmw )
kmw->setSettingsDirty(); kmw->setSettingsDirty();
} }
@ -1238,17 +1238,17 @@ void TDEToolBar::rebuildLayout()
for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) { for ( TQWidget *w = widgets.first(); w; w = widgets.next() ) {
if ( w == rightAligned ) if ( w == rightAligned )
continue; continue;
TDEToolBarSeparator *ktbs = tqt_dynamic_cast<TDEToolBarSeparator *>(w); TDEToolBarSeparator *ktbs = dynamic_cast<TDEToolBarSeparator *>(w);
if ( ktbs && !ktbs->showLine() ) { if ( ktbs && !ktbs->showLine() ) {
l->addSpacing( orientation() == TQt::Vertical ? w->sizeHint().height() : w->sizeHint().width() ); l->addSpacing( orientation() == TQt::Vertical ? w->sizeHint().height() : w->sizeHint().width() );
w->hide(); w->hide();
continue; continue;
} }
if ( tqt_dynamic_cast<TQPopupMenu *>(w) ) // w is a QPopupMenu? if ( dynamic_cast<TQPopupMenu *>(w) ) // w is a QPopupMenu?
continue; continue;
l->addWidget( w ); l->addWidget( w );
w->show(); w->show();
if ((orientation() == TQt::Horizontal) && tqt_dynamic_cast<TQLineEdit *>(w)) // w is TQLineEdit ? if ((orientation() == TQt::Horizontal) && dynamic_cast<TQLineEdit *>(w)) // w is TQLineEdit ?
l->addSpacing(2); // A little bit extra spacing behind it. l->addSpacing(2); // A little bit extra spacing behind it.
} }
if ( rightAligned ) { if ( rightAligned ) {
@ -1270,14 +1270,14 @@ void TDEToolBar::rebuildLayout()
void TDEToolBar::childEvent( TQChildEvent *e ) void TDEToolBar::childEvent( TQChildEvent *e )
{ {
if ( e->child()->isWidgetType() ) { if ( e->child()->isWidgetType() ) {
TQWidget * w = tqt_dynamic_cast<TQWidget *>(e->child()); TQWidget * w = dynamic_cast<TQWidget *>(e->child());
if (!w || !(::qstrcmp( "qt_dockwidget_internal", w->name()))) if (!w || !(::qstrcmp( "qt_dockwidget_internal", w->name())))
{ {
TQToolBar::childEvent( e ); TQToolBar::childEvent( e );
return; return;
} }
if ( e->type() == TQEvent::ChildInserted ) { if ( e->type() == TQEvent::ChildInserted ) {
if ( !tqt_dynamic_cast<TQPopupMenu *>(w)) { // e->child() is not a QPopupMenu if ( !dynamic_cast<TQPopupMenu *>(w)) { // e->child() is not a QPopupMenu
// prevent items that have been explicitly inserted by insert*() from // prevent items that have been explicitly inserted by insert*() from
// being inserted again // being inserted again
if ( !widget2id.contains( w ) ) if ( !widget2id.contains( w ) )
@ -1367,7 +1367,7 @@ TQSize TDEToolBar::sizeHint() const
minSize = minSize.expandedTo(TQSize(0, sh.height())); minSize = minSize.expandedTo(TQSize(0, sh.height()));
minSize += TQSize(sh.width()+1, 0); minSize += TQSize(sh.width()+1, 0);
if (tqt_dynamic_cast<TQLineEdit *>(w)) // w is a TQLineEdit ? if (dynamic_cast<TQLineEdit *>(w)) // w is a TQLineEdit ?
minSize += TQSize(2, 0); // A little bit extra spacing behind it. minSize += TQSize(2, 0); // A little bit extra spacing behind it.
} }
@ -1478,7 +1478,7 @@ void TDEToolBar::slotAppearanceChanged()
applyAppearanceSettings(TDEGlobal::config(), TQString::null, true /* lose local settings */ ); applyAppearanceSettings(TDEGlobal::config(), TQString::null, true /* lose local settings */ );
// And remember to save the new look later // And remember to save the new look later
TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow());
if ( kmw ) if ( kmw )
kmw->setSettingsDirty(); kmw->setSettingsDirty();
} }
@ -1750,7 +1750,7 @@ void TDEToolBar::toolBarPosChanged( TQToolBar *tb )
if ( d->oldPos == DockMinimized ) if ( d->oldPos == DockMinimized )
rebuildLayout(); rebuildLayout();
d->oldPos = (TQMainWindow::ToolBarDock)barPos(); d->oldPos = (TQMainWindow::ToolBarDock)barPos();
TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow());
if ( kmw ) if ( kmw )
kmw->setSettingsDirty(); kmw->setSettingsDirty();
} }
@ -2139,7 +2139,7 @@ void TDEToolBar::slotContextAboutToShow()
// and ToolBarHandler::setupActions() deletes it, so better not keep it around. // and ToolBarHandler::setupActions() deletes it, so better not keep it around.
// So we currently plug/unplug the last two actions of the menu. // So we currently plug/unplug the last two actions of the menu.
// Another way would be to keep around the actions and plug them all into a (new each time) popupmenu. // Another way would be to keep around the actions and plug them all into a (new each time) popupmenu.
TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow());
if ( kmw ) { if ( kmw ) {
kmw->setupToolbarMenuActions(); kmw->setupToolbarMenuActions();
// Only allow hiding a toolbar if the action is also plugged somewhere else (e.g. menubar) // Only allow hiding a toolbar if the action is also plugged somewhere else (e.g. menubar)
@ -2219,7 +2219,7 @@ void TDEToolBar::slotContextAboutToHide()
{ {
// We have to unplug whatever slotContextAboutToShow plugged into the menu. // We have to unplug whatever slotContextAboutToShow plugged into the menu.
// Unplug the toolbar menu action // Unplug the toolbar menu action
TDEMainWindow *kmw = tqt_dynamic_cast<TDEMainWindow *>(mainWindow()); TDEMainWindow *kmw = dynamic_cast<TDEMainWindow *>(mainWindow());
if ( kmw && kmw->toolBarMenuAction() ) if ( kmw && kmw->toolBarMenuAction() )
if ( kmw->toolBarMenuAction()->containerCount() > 1 ) if ( kmw->toolBarMenuAction()->containerCount() > 1 )
kmw->toolBarMenuAction()->unplug(context); kmw->toolBarMenuAction()->unplug(context);

@ -123,7 +123,7 @@ TDEToolBarButton::TDEToolBarButton( const TQString& _icon, int _id,
TQToolButton::setTextLabel(_txt); TQToolButton::setTextLabel(_txt);
d->m_instance = _instance; d->m_instance = _instance;
d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_parent); d->m_parent = dynamic_cast<TDEToolBar*>(_parent);
if (d->m_parent) { if (d->m_parent) {
connect(d->m_parent, TQT_SIGNAL( modechange() ), connect(d->m_parent, TQT_SIGNAL( modechange() ),
this, TQT_SLOT( modeChange() )); this, TQT_SLOT( modeChange() ));
@ -156,7 +156,7 @@ TDEToolBarButton::TDEToolBarButton( const TQPixmap& pixmap, int _id,
d->m_id = _id; d->m_id = _id;
TQToolButton::setTextLabel(txt); TQToolButton::setTextLabel(txt);
d->m_parent = tqt_dynamic_cast<TDEToolBar*>(_parent); d->m_parent = dynamic_cast<TDEToolBar*>(_parent);
if (d->m_parent) { if (d->m_parent) {
connect(d->m_parent, TQT_SIGNAL( modechange() ), connect(d->m_parent, TQT_SIGNAL( modechange() ),
this, TQT_SLOT( modeChange() )); this, TQT_SLOT( modeChange() ));

@ -51,7 +51,7 @@ namespace
TQPtrListIterator<TQDockWindow> dockWindowIt( dockWindows ); TQPtrListIterator<TQDockWindow> dockWindowIt( dockWindows );
for ( ; dockWindowIt.current(); ++dockWindowIt ) { for ( ; dockWindowIt.current(); ++dockWindowIt ) {
TDEToolBar *toolBar = tqt_dynamic_cast<TDEToolBar *>( dockWindowIt.current() ); TDEToolBar *toolBar = dynamic_cast<TDEToolBar *>( dockWindowIt.current() );
if ( !toolBar ) if ( !toolBar )
continue; continue;
@ -232,7 +232,7 @@ void ToolBarHandler::connectToActionContainer( TDEAction *action )
void ToolBarHandler::connectToActionContainer( TQWidget *container ) void ToolBarHandler::connectToActionContainer( TQWidget *container )
{ {
TQPopupMenu *popupMenu = tqt_dynamic_cast<TQPopupMenu *>( container ); TQPopupMenu *popupMenu = dynamic_cast<TQPopupMenu *>( container );
if ( !popupMenu ) if ( !popupMenu )
return; return;

@ -445,7 +445,7 @@ void KFindDialog::showPatterns()
if ( d->m_regexpDialog ) if ( d->m_regexpDialog )
{ {
KRegExpEditorInterface *iface = tqt_dynamic_cast<KRegExpEditorInterface *>( d->m_regexpDialog ); KRegExpEditorInterface *iface = dynamic_cast<KRegExpEditorInterface *>( d->m_regexpDialog );
assert( iface ); assert( iface );
iface->setRegExp( pattern() ); iface->setRegExp( pattern() );

@ -445,13 +445,13 @@ void KMultiTabBarButton::setStyle(KMultiTabBar::KMultiTabBarStyle style)
void KMultiTabBarButton::hideEvent( TQHideEvent* he) { void KMultiTabBarButton::hideEvent( TQHideEvent* he) {
TQPushButton::hideEvent(he); TQPushButton::hideEvent(he);
KMultiTabBar *tb=tqt_dynamic_cast<KMultiTabBar*>(parentWidget()); KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
if (tb) tb->updateSeparator(); if (tb) tb->updateSeparator();
} }
void KMultiTabBarButton::showEvent( TQShowEvent* he) { void KMultiTabBarButton::showEvent( TQShowEvent* he) {
TQPushButton::showEvent(he); TQPushButton::showEvent(he);
KMultiTabBar *tb=tqt_dynamic_cast<KMultiTabBar*>(parentWidget()); KMultiTabBar *tb=dynamic_cast<KMultiTabBar*>(parentWidget());
if (tb) tb->updateSeparator(); if (tb) tb->updateSeparator();
} }

Loading…
Cancel
Save