@ -23,7 +23,7 @@
Copyright ( C ) 2000 Daniel M . Duley < mosfet @ kde . org >
Copyright ( C ) 2000 Daniel M . Duley < mosfet @ kde . org >
( C ) 2000 Dirk Mueller < mueller @ kde . org >
( C ) 2000 Dirk Mueller < mueller @ kde . org >
( C ) 2001 Martijn Klingens < klingens @ kde . org >
( C ) 2001 Martijn Klingens < klingens @ kde . org >
Progressbar code based on K Style,
Progressbar code based on TDE Style,
Copyright ( C ) 2001 - 2002 Karol Szwed < gallium @ kde . org >
Copyright ( C ) 2001 - 2002 Karol Szwed < gallium @ kde . org >
This library is free software ; you can redistribute it and / or
This library is free software ; you can redistribute it and / or
@ -73,7 +73,7 @@
# include <tqsettings.h>
# include <tqsettings.h>
# include <kpixmap.h>
# include <kpixmap.h>
# include <kimageeffect.h>
# include <kimageeffect.h>
# include < k global.h>
# include < tde global.h>
# include "polyester.h"
# include "polyester.h"
# include "polyester.moc"
# include "polyester.moc"
@ -160,7 +160,7 @@ class PolyesterStylePlugin : public TQStylePlugin
KDE_Q_EXPORT_PLUGIN ( PolyesterStylePlugin )
KDE_Q_EXPORT_PLUGIN ( PolyesterStylePlugin )
// -- end --
// -- end --
PolyesterStyle : : PolyesterStyle ( ) : K Style( AllowMenuTransparency , ThreeButtonScrollBar ) ,
PolyesterStyle : : PolyesterStyle ( ) : TDE Style( AllowMenuTransparency , ThreeButtonScrollBar ) ,
kickerMode ( false ) ,
kickerMode ( false ) ,
kornMode ( false ) ,
kornMode ( false ) ,
flatMode ( false )
flatMode ( false )
@ -236,19 +236,19 @@ PolyesterStyle::PolyesterStyle() : KStyle( AllowMenuTransparency, ThreeButtonScr
this hack may be disabled in the future , let ' s see . . . */
this hack may be disabled in the future , let ' s see . . . */
if ( ! qstrcmp ( tqApp - > argv ( ) [ 0 ] , " unknown " ) )
if ( ! qstrcmp ( tqApp - > argv ( ) [ 0 ] , " unknown " ) )
{
{
_scrollBarType = K Style: : WindowsStyleScrollBar ;
_scrollBarType = TDE Style: : WindowsStyleScrollBar ;
_menuStripe = false ;
_menuStripe = false ;
}
}
//Thanks, Lipstik :-)
//Thanks, Lipstik :-)
else if ( ! strcmp ( _scrollBarStyle , " ThreeButtonScrollBar " ) )
else if ( ! strcmp ( _scrollBarStyle , " ThreeButtonScrollBar " ) )
_scrollBarType = K Style: : ThreeButtonScrollBar ;
_scrollBarType = TDE Style: : ThreeButtonScrollBar ;
else if ( ! strcmp ( _scrollBarStyle , " WindowsStyleScrollBar " ) )
else if ( ! strcmp ( _scrollBarStyle , " WindowsStyleScrollBar " ) )
_scrollBarType = K Style: : WindowsStyleScrollBar ;
_scrollBarType = TDE Style: : WindowsStyleScrollBar ;
else if ( ! strcmp ( _scrollBarStyle , " PlatinumStyleScrollBar " ) )
else if ( ! strcmp ( _scrollBarStyle , " PlatinumStyleScrollBar " ) )
_scrollBarType = K Style: : PlatinumStyleScrollBar ;
_scrollBarType = TDE Style: : PlatinumStyleScrollBar ;
else if ( ! strcmp ( _scrollBarStyle , " NextStyleScrollBar " ) )
else if ( ! strcmp ( _scrollBarStyle , " NextStyleScrollBar " ) )
_scrollBarType = K Style: : NextStyleScrollBar ;
_scrollBarType = TDE Style: : NextStyleScrollBar ;
//HACK for gtk-qt: if setScrollBarType is called wxwidgets applications will broke
//HACK for gtk-qt: if setScrollBarType is called wxwidgets applications will broke
/*if( qstrcmp( tqApp->argv() [ 0 ], "unknown" ) )
/*if( qstrcmp( tqApp->argv() [ 0 ], "unknown" ) )
@ -363,9 +363,9 @@ void PolyesterStyle::polish(TQApplication* app)
void PolyesterStyle : : polish ( TQWidget * widget )
void PolyesterStyle : : polish ( TQWidget * widget )
{
{
if ( ! strcmp ( widget - > name ( ) , " __ khtml" ) ) { // is it a k html widget...?
if ( ! strcmp ( widget - > name ( ) , " __ tdehtml" ) ) { // is it a tde html widget...?
k htmlWidgets[ widget ] = true ;
tde htmlWidgets[ widget ] = true ;
connect ( widget , SIGNAL ( destroyed ( TQObject * ) ) , this , SLOT ( k htmlWidgetDestroyed( TQObject * ) ) ) ;
connect ( widget , SIGNAL ( destroyed ( TQObject * ) ) , this , SLOT ( tde htmlWidgetDestroyed( TQObject * ) ) ) ;
}
}
// use tqt_cast where possible to check if the widget inheits one of the classes. might improve
// use tqt_cast where possible to check if the widget inheits one of the classes. might improve
@ -401,7 +401,7 @@ void PolyesterStyle::polish(TQWidget* widget)
widget - > installEventFilter ( this ) ;
widget - > installEventFilter ( this ) ;
} else if ( : : tqt_cast < TQPopupMenu * > ( widget ) ) {
} else if ( : : tqt_cast < TQPopupMenu * > ( widget ) ) {
widget - > setBackgroundMode ( NoBackground ) ;
widget - > setBackgroundMode ( NoBackground ) ;
} else if ( ! qstrcmp ( widget - > name ( ) , " k de toolbar widget" ) ) {
} else if ( ! qstrcmp ( widget - > name ( ) , " t de toolbar widget" ) ) {
widget - > installEventFilter ( this ) ;
widget - > installEventFilter ( this ) ;
} else if ( : : tqt_cast < TQHeader * > ( widget ) ) {
} else if ( : : tqt_cast < TQHeader * > ( widget ) ) {
connect ( widget - > parent ( ) , SIGNAL ( contentsMoving ( int , int ) ) , widget , SLOT ( update ( ) ) ) ;
connect ( widget - > parent ( ) , SIGNAL ( contentsMoving ( int , int ) ) , widget , SLOT ( update ( ) ) ) ;
@ -421,13 +421,13 @@ void PolyesterStyle::polish(TQWidget* widget)
K Style: : polish ( widget ) ;
TDE Style: : polish ( widget ) ;
}
}
void PolyesterStyle : : unPolish ( TQWidget * widget )
void PolyesterStyle : : unPolish ( TQWidget * widget )
{
{
if ( ! strcmp ( widget - > name ( ) , " __ khtml" ) ) { // is it a k html widget...?
if ( ! strcmp ( widget - > name ( ) , " __ tdehtml" ) ) { // is it a tde html widget...?
k htmlWidgets. remove ( widget ) ;
tde htmlWidgets. remove ( widget ) ;
}
}
// use tqt_cast to check if the widget inheits one of the classes.
// use tqt_cast to check if the widget inheits one of the classes.
@ -446,7 +446,7 @@ void PolyesterStyle::unPolish(TQWidget* widget)
widget - > removeEventFilter ( this ) ;
widget - > removeEventFilter ( this ) ;
} else if ( : : tqt_cast < TQPopupMenu * > ( widget ) ) {
} else if ( : : tqt_cast < TQPopupMenu * > ( widget ) ) {
widget - > setBackgroundMode ( PaletteBackground ) ;
widget - > setBackgroundMode ( PaletteBackground ) ;
} else if ( ! qstrcmp ( widget - > name ( ) , " k de toolbar widget" ) ) {
} else if ( ! qstrcmp ( widget - > name ( ) , " t de toolbar widget" ) ) {
widget - > removeEventFilter ( this ) ;
widget - > removeEventFilter ( this ) ;
}
}
@ -459,13 +459,13 @@ void PolyesterStyle::unPolish(TQWidget* widget)
progAnimWidgets . remove ( widget ) ;
progAnimWidgets . remove ( widget ) ;
}
}
K Style: : unPolish ( widget ) ;
TDE Style: : unPolish ( widget ) ;
}
}
/*a bunch of slots stuff...*/
/*a bunch of slots stuff...*/
void PolyesterStyle : : k htmlWidgetDestroyed( TQObject * obj )
void PolyesterStyle : : tde htmlWidgetDestroyed( TQObject * obj )
{
{
k htmlWidgets. remove ( static_cast < TQWidget * > ( obj ) ) ;
tde htmlWidgets. remove ( static_cast < TQWidget * > ( obj ) ) ;
}
}
void PolyesterStyle : : progressBarDestroyed ( TQObject * obj )
void PolyesterStyle : : progressBarDestroyed ( TQObject * obj )
@ -962,7 +962,7 @@ void PolyesterStyle::renderButton(TQPainter *p,
bool mouseOver ,
bool mouseOver ,
bool horizontal ,
bool horizontal ,
bool enabled ,
bool enabled ,
bool k htmlMode,
bool tde htmlMode,
int animFrame ,
int animFrame ,
bool isDefault //TODO: move here all the default-button related code?
bool isDefault //TODO: move here all the default-button related code?
) const
) const
@ -975,7 +975,7 @@ void PolyesterStyle::renderButton(TQPainter *p,
uint contourFlags = Draw_Left | Draw_Right | Draw_Top | Draw_Bottom ;
uint contourFlags = Draw_Left | Draw_Right | Draw_Top | Draw_Bottom ;
if ( ! enabled ) contourFlags | = Is_Disabled ;
if ( ! enabled ) contourFlags | = Is_Disabled ;
if ( k htmlMode) contourFlags | = Draw_AlphaBlend ;
if ( tde htmlMode) contourFlags | = Draw_AlphaBlend ;
uint surfaceFlags = Draw_Left | Draw_Right | Draw_Top | Draw_Bottom ;
uint surfaceFlags = Draw_Left | Draw_Right | Draw_Top | Draw_Bottom ;
if ( horizontal ) surfaceFlags | = Is_Horizontal ;
if ( horizontal ) surfaceFlags | = Is_Horizontal ;
@ -1547,7 +1547,7 @@ void PolyesterStyle::sliderThumbMoved(int val)
}
}
}
}
void PolyesterStyle : : draw KStylePrimitive( K StylePrimitive kpe ,
void PolyesterStyle : : draw TDEStylePrimitive( TDE StylePrimitive kpe ,
TQPainter * p ,
TQPainter * p ,
const TQWidget * widget ,
const TQWidget * widget ,
const TQRect & r ,
const TQRect & r ,
@ -1844,7 +1844,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
break ;
break ;
}
}
// copied and slightly modified from K Style.
// copied and slightly modified from TDE Style.
case KPE_ListViewBranch : {
case KPE_ListViewBranch : {
// Typical Windows style listview branch element (dotted line).
// Typical Windows style listview branch element (dotted line).
@ -1917,7 +1917,7 @@ void PolyesterStyle::drawKStylePrimitive(KStylePrimitive kpe,
}
}
default :
default :
KStyle: : drawK StylePrimitive( kpe , p , widget , r , cg , flags , opt ) ;
TDEStyle: : drawTDE StylePrimitive( kpe , p , widget , r , cg , flags , opt ) ;
}
}
}
}
@ -2093,12 +2093,12 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
case PE_ButtonTool :
case PE_ButtonTool :
case PE_ButtonDropDown :
case PE_ButtonDropDown :
case PE_ButtonCommand : {
case PE_ButtonCommand : {
bool khtmlMode = k htmlWidgets. contains ( opt . widget ( ) ) ;
bool tdehtmlMode = tde htmlWidgets. contains ( opt . widget ( ) ) ;
int animFrame = 0 ;
int animFrame = 0 ;
if ( _animateButton & & animWidgets . contains ( opt . widget ( ) ) )
if ( _animateButton & & animWidgets . contains ( opt . widget ( ) ) )
animFrame = ( int ) animWidgets [ opt . widget ( ) ] . animFrame ;
animFrame = ( int ) animWidgets [ opt . widget ( ) ] . animFrame ;
renderButton ( p , r , cg , ( on | | down ) , mouseOver , true , enabled ,
renderButton ( p , r , cg , ( on | | down ) , mouseOver , true , enabled ,
k htmlMode, animFrame , flags & Style_ButtonDefault ) ;
tde htmlMode, animFrame , flags & Style_ButtonDefault ) ;
break ;
break ;
}
}
@ -2222,14 +2222,14 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
//coordinates for the surface
//coordinates for the surface
uint xs = x , ws = w ;
uint xs = x , ws = w ;
if ( pe = = PE_ScrollBarSubPage & & ( _scrollBarType = = K Style: : PlatinumStyleScrollBar ) )
if ( pe = = PE_ScrollBarSubPage & & ( _scrollBarType = = TDE Style: : PlatinumStyleScrollBar ) )
{
{
contourFlags | = Draw_Left | Round_UpperLeft | Round_BottomLeft ;
contourFlags | = Draw_Left | Round_UpperLeft | Round_BottomLeft ;
surfaceFlags | = Round_UpperLeft | Round_BottomLeft ;
surfaceFlags | = Round_UpperLeft | Round_BottomLeft ;
xs + + ;
xs + + ;
ws - - ;
ws - - ;
}
}
else if ( pe = = PE_ScrollBarAddPage & & ( _scrollBarType = = K Style: : NextStyleScrollBar ) )
else if ( pe = = PE_ScrollBarAddPage & & ( _scrollBarType = = TDE Style: : NextStyleScrollBar ) )
{
{
contourFlags | = Draw_Right | Round_UpperRight | Round_BottomRight ;
contourFlags | = Draw_Right | Round_UpperRight | Round_BottomRight ;
surfaceFlags | = Round_UpperRight | Round_BottomRight ;
surfaceFlags | = Round_UpperRight | Round_BottomRight ;
@ -2255,14 +2255,14 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
//coordinates for the surface
//coordinates for the surface
uint ys = y , hs = h ;
uint ys = y , hs = h ;
if ( pe = = PE_ScrollBarSubPage & & ( _scrollBarType = = K Style: : PlatinumStyleScrollBar ) )
if ( pe = = PE_ScrollBarSubPage & & ( _scrollBarType = = TDE Style: : PlatinumStyleScrollBar ) )
{
{
contourFlags | = Draw_Top | Round_UpperLeft | Round_UpperRight ;
contourFlags | = Draw_Top | Round_UpperLeft | Round_UpperRight ;
surfaceFlags | = Round_UpperLeft | Round_UpperRight ;
surfaceFlags | = Round_UpperLeft | Round_UpperRight ;
ys + + ;
ys + + ;
hs - - ;
hs - - ;
}
}
else if ( pe = = PE_ScrollBarAddPage & & ( _scrollBarType = = K Style: : NextStyleScrollBar ) )
else if ( pe = = PE_ScrollBarAddPage & & ( _scrollBarType = = TDE Style: : NextStyleScrollBar ) )
{
{
contourFlags | = Draw_Bottom | Round_BottomLeft | Round_BottomRight ;
contourFlags | = Draw_Bottom | Round_BottomLeft | Round_BottomRight ;
surfaceFlags | = Round_BottomLeft | Round_BottomRight ;
surfaceFlags | = Round_BottomLeft | Round_BottomRight ;
@ -2349,7 +2349,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
}
case PE_ScrollBarAddLine : {
case PE_ScrollBarAddLine : {
uint isNext = _scrollBarType = = K Style: : NextStyleScrollBar ;
uint isNext = _scrollBarType = = TDE Style: : NextStyleScrollBar ;
uint contourFlags = ( ! isNext | | ! horiz | | down ? Draw_Left : 0 ) |
uint contourFlags = ( ! isNext | | ! horiz | | down ? Draw_Left : 0 ) |
Draw_Right |
Draw_Right |
( ! isNext | | horiz | | down ? Draw_Top : 0 ) |
( ! isNext | | horiz | | down ? Draw_Top : 0 ) |
@ -2378,13 +2378,13 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
if ( horiz )
if ( horiz )
{
{
contourFlags | = Sharp_UpperLeft | Sharp_BottomLeft ;
contourFlags | = Sharp_UpperLeft | Sharp_BottomLeft ;
if ( _scrollBarType = = K Style: : NextStyleScrollBar )
if ( _scrollBarType = = TDE Style: : NextStyleScrollBar )
contourFlags | = Sharp_UpperRight | Sharp_BottomRight ;
contourFlags | = Sharp_UpperRight | Sharp_BottomRight ;
}
}
else
else
{
{
contourFlags | = Sharp_UpperLeft | Sharp_UpperRight ;
contourFlags | = Sharp_UpperLeft | Sharp_UpperRight ;
if ( _scrollBarType = = K Style: : NextStyleScrollBar )
if ( _scrollBarType = = TDE Style: : NextStyleScrollBar )
contourFlags | = Sharp_BottomLeft | Sharp_BottomRight ;
contourFlags | = Sharp_BottomLeft | Sharp_BottomRight ;
}
}
@ -2561,12 +2561,12 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
// HACK!!
// HACK!!
//
//
// In order to draw nice edges in k html, we need to paint alpha-blended.
// In order to draw nice edges in tde html, we need to paint alpha-blended.
// On the other hand, we can't paint alpha-blended in normal widgets.
// On the other hand, we can't paint alpha-blended in normal widgets.
//
//
// In this place there is no reliable way to detect if we are in k html; the
// In this place there is no reliable way to detect if we are in tde html; the
// only thing we know is that k html buffers its widgets into a pixmap. So
// only thing we know is that tde html buffers its widgets into a pixmap. So
// when the paint device is a TQPixmap, chances are high that we are in k html.
// when the paint device is a TQPixmap, chances are high that we are in tde html.
// It's possible that this breaks other things, so let's see how it works...
// It's possible that this breaks other things, so let's see how it works...
if ( p - > device ( ) & & dynamic_cast < TQPixmap * > ( p - > device ( ) ) ) {
if ( p - > device ( ) & & dynamic_cast < TQPixmap * > ( p - > device ( ) ) ) {
contourFlags + = Draw_AlphaBlend ;
contourFlags + = Draw_AlphaBlend ;
@ -2873,7 +2873,7 @@ void PolyesterStyle::drawPrimitive(PrimitiveElement pe,
}
}
default : {
default : {
return K Style: : drawPrimitive ( pe , p , r , cg , flags , opt ) ;
return TDE Style: : drawPrimitive ( pe , p , r , cg , flags , opt ) ;
}
}
}
}
}
}
@ -3169,7 +3169,7 @@ void PolyesterStyle::drawControl(ControlElement element,
renderTab ( p , r , cg , mouseOver , selected , true , pos , false , cornerWidget ) ;
renderTab ( p , r , cg , mouseOver , selected , true , pos , false , cornerWidget ) ;
break ;
break ;
default :
default :
K Style: : drawControl ( element , p , widget , r , cg , flags , opt ) ;
TDE Style: : drawControl ( element , p , widget , r , cg , flags , opt ) ;
}
}
break ;
break ;
@ -3720,7 +3720,7 @@ void PolyesterStyle::drawControl(ControlElement element,
}
}
default :
default :
K Style: : drawControl ( element , p , widget , r , cg , flags , opt ) ;
TDE Style: : drawControl ( element , p , widget , r , cg , flags , opt ) ;
}
}
}
}
@ -3739,7 +3739,7 @@ void PolyesterStyle::drawControlMask(ControlElement element,
}
}
default : {
default : {
K Style: : drawControlMask ( element , p , w , r , opt ) ;
TDE Style: : drawControlMask ( element , p , w , r , opt ) ;
}
}
}
}
}
}
@ -3760,7 +3760,7 @@ void PolyesterStyle::drawComplexControlMask(ComplexControl c,
break ;
break ;
}
}
default : {
default : {
K Style: : drawComplexControlMask ( c , p , w , r , o ) ;
TDE Style: : drawComplexControlMask ( c , p , w , r , o ) ;
}
}
}
}
}
}
@ -3806,7 +3806,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
: cg . background ( ) ;
: cg . background ( ) ;
uint contourFlags = 0 ;
uint contourFlags = 0 ;
if ( k htmlWidgets. contains ( cb ) )
if ( tde htmlWidgets. contains ( cb ) )
contourFlags | = Draw_AlphaBlend ;
contourFlags | = Draw_AlphaBlend ;
if ( _inputFocusHighlight & & hasFocus & & editable & & enabled )
if ( _inputFocusHighlight & & hasFocus & & editable & & enabled )
@ -4185,7 +4185,7 @@ void PolyesterStyle::drawComplexControl(ComplexControl control,
}
}
default :
default :
K Style: : drawComplexControl ( control , p , widget ,
TDE Style: : drawComplexControl ( control , p , widget ,
r , cg , flags , controls ,
r , cg , flags , controls ,
active , opt ) ;
active , opt ) ;
break ;
break ;
@ -4200,7 +4200,7 @@ TQRect PolyesterStyle::subRect(SubRect r, const TQWidget *widget) const
return querySubControlMetrics ( CC_ComboBox , widget , SC_ComboBoxEditField ) ;
return querySubControlMetrics ( CC_ComboBox , widget , SC_ComboBoxEditField ) ;
}
}
// Don't use K Styles progressbar subrect
// Don't use TDE Styles progressbar subrect
// TODO:
// TODO:
case SR_ProgressBarGroove : {
case SR_ProgressBarGroove : {
return TQRect ( widget - > rect ( ) ) ;
return TQRect ( widget - > rect ( ) ) ;
@ -4212,7 +4212,7 @@ TQRect PolyesterStyle::subRect(SubRect r, const TQWidget *widget) const
}
}
default : {
default : {
return K Style: : subRect ( r , widget ) ;
return TDE Style: : subRect ( r , widget ) ;
}
}
}
}
}
}
@ -4235,7 +4235,7 @@ TQRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
return TQRect ( r . left ( ) + 2 , r . top ( ) + 2 , r . width ( ) - 4 - 15 - 1 , r . height ( ) - 4 ) ;
return TQRect ( r . left ( ) + 2 , r . top ( ) + 2 , r . width ( ) - 4 - 15 - 1 , r . height ( ) - 4 ) ;
}
}
default : {
default : {
return K Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
return TDE Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
}
}
}
}
break ;
break ;
@ -4279,13 +4279,13 @@ TQRect PolyesterStyle::querySubControlMetrics(ComplexControl control,
return TQRect ( buttonsLeft , r . top ( ) + 1 , bs . width ( ) , r . height ( ) - 2 ) ;
return TQRect ( buttonsLeft , r . top ( ) + 1 , bs . width ( ) , r . height ( ) - 2 ) ;
}
}
default : {
default : {
return K Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
return TDE Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
}
}
}
}
break ;
break ;
}
}
default : {
default : {
return K Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
return TDE Style: : querySubControlMetrics ( control , widget , subcontrol , opt ) ;
}
}
}
}
}
}
@ -4391,19 +4391,19 @@ int PolyesterStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
}
}
default :
default :
return K Style: : pixelMetric ( m , widget ) ;
return TDE Style: : pixelMetric ( m , widget ) ;
}
}
}
}
int PolyesterStyle : : kPixelMetric ( K StylePixelMetric kpm , const TQWidget * widget ) const
int PolyesterStyle : : kPixelMetric ( TDE StylePixelMetric kpm , const TQWidget * widget ) const
{
{
switch ( kpm )
switch ( kpm )
{
{
case KPM_MenuItemSeparatorHeight :
case KPM_MenuItemSeparatorHeight :
return 2 ;
return 2 ;
default :
default :
return K Style: : kPixelMetric ( kpm , widget ) ;
return TDE Style: : kPixelMetric ( kpm , widget ) ;
}
}
}
}
@ -4483,14 +4483,14 @@ TQSize PolyesterStyle::sizeFromContents(ContentsType t,
if ( widget - > parent ( ) & & : : tqt_cast < TQToolBar * > ( widget - > parent ( ) ) )
if ( widget - > parent ( ) & & : : tqt_cast < TQToolBar * > ( widget - > parent ( ) ) )
return TQSize ( s . width ( ) + 2 * 4 , s . height ( ) + 2 * 4 ) ;
return TQSize ( s . width ( ) + 2 * 4 , s . height ( ) + 2 * 4 ) ;
else
else
return K Style: : sizeFromContents ( t , widget , s , opt ) ;
return TDE Style: : sizeFromContents ( t , widget , s , opt ) ;
}
}
default :
default :
return K Style: : sizeFromContents ( t , widget , s , opt ) ;
return TDE Style: : sizeFromContents ( t , widget , s , opt ) ;
}
}
return K Style: : sizeFromContents ( t , widget , s , opt ) ;
return TDE Style: : sizeFromContents ( t , widget , s , opt ) ;
}
}
int PolyesterStyle : : styleHint ( StyleHint stylehint ,
int PolyesterStyle : : styleHint ( StyleHint stylehint ,
@ -4532,14 +4532,14 @@ int PolyesterStyle::styleHint( StyleHint stylehint,
}
}
# endif
# endif
default :
default :
return K Style: : styleHint ( stylehint , widget , option , returnData ) ;
return TDE Style: : styleHint ( stylehint , widget , option , returnData ) ;
}
}
}
}
bool PolyesterStyle : : eventFilter ( TQObject * obj , TQEvent * ev )
bool PolyesterStyle : : eventFilter ( TQObject * obj , TQEvent * ev )
{
{
if ( K Style: : eventFilter ( obj , ev ) )
if ( TDE Style: : eventFilter ( obj , ev ) )
return true ;
return true ;
if ( ! obj - > isWidgetType ( ) ) return false ;
if ( ! obj - > isWidgetType ( ) ) return false ;
@ -4690,7 +4690,7 @@ bool PolyesterStyle::eventFilter(TQObject *obj, TQEvent *ev)
animationTimer - > start ( 50 , false ) ;
animationTimer - > start ( 50 , false ) ;
}
}
}
}
if ( ! qstrcmp ( obj - > name ( ) , " k de toolbar widget" ) )
if ( ! qstrcmp ( obj - > name ( ) , " t de toolbar widget" ) )
{
{
TQWidget * lb = static_cast < TQWidget * > ( obj ) ;
TQWidget * lb = static_cast < TQWidget * > ( obj ) ;
if ( lb - > backgroundMode ( ) = = TQt : : PaletteButton )
if ( lb - > backgroundMode ( ) = = TQt : : PaletteButton )