Rename KStyle to TDEStyle to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 990bf92fa5
commit cd7745fcd0

@ -438,7 +438,7 @@ KlearlookStyle::KlearlookStyle(
bool ge, bool va, bool bdt, bool crlh, EDefBtnIndicator dbi, ETBarBorder tbb, bool ge, bool va, bool bdt, bool crlh, EDefBtnIndicator dbi, ETBarBorder tbb,
ELvExpander lve, ELvLines lvl, bool lvd, bool ico, int popuplvl ) ) ELvExpander lve, ELvLines lvl, bool lvd, bool ico, int popuplvl ) )
#endif #endif
: KStyle( AllowMenuTransparency, WindowsStyleScrollBar ), : TDEStyle( AllowMenuTransparency, WindowsStyleScrollBar ),
themedApp( APP_OTHER ), themedApp( APP_OTHER ),
#ifndef USE_SINGLE_STYLE #ifndef USE_SINGLE_STYLE
borderButton( bb ), borderFrame( bf ), rounded( round ), etchedSlider( etched ), appearance( ge ? APPEARANCE_GRADIENT : APPEARANCE_FLAT ), borderButton( bb ), borderFrame( bf ), rounded( round ), etchedSlider( etched ), appearance( ge ? APPEARANCE_GRADIENT : APPEARANCE_FLAT ),
@ -628,7 +628,7 @@ void KlearlookStyle::polish( TQStyleControlElementData ceData, ControlElementFla
} }
} }
KStyle::polish( ceData, elementFlags, ptr ); TDEStyle::polish( ceData, elementFlags, ptr );
} }
void KlearlookStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) { void KlearlookStyle::unPolish( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void *ptr ) {
@ -672,7 +672,7 @@ void KlearlookStyle::unPolish( TQStyleControlElementData ceData, ControlElementF
} }
} }
KStyle::unPolish( ceData, elementFlags, ptr ); TDEStyle::unPolish( ceData, elementFlags, ptr );
} }
bool KlearlookStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) { bool KlearlookStyle::objectEventHandler( TQStyleControlElementData ceData, ControlElementFlags elementFlags, void* source, TQEvent *event ) {
@ -769,7 +769,7 @@ bool KlearlookStyle::objectEventHandler( TQStyleControlElementData ceData, Contr
} }
} }
return KStyle::objectEventHandler( ceData, elementFlags, source, event ); return TDEStyle::objectEventHandler( ceData, elementFlags, source, event );
} }
void KlearlookStyle::drawLightBevelButton( void KlearlookStyle::drawLightBevelButton(
@ -1331,7 +1331,7 @@ void KlearlookStyle::drawPrimitiveMenu( TQ_PrimitiveElement pe, TQPainter *p, TQ
break; break;
default: default:
KStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, data ); TDEStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, data );
} }
} }
@ -2049,11 +2049,11 @@ void KlearlookStyle::drawPrimitive( TQ_PrimitiveElement pe, TQPainter *p, TQStyl
break; break;
} }
default: default:
KStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, data ); TDEStyle::drawPrimitive( pe, p, ceData, elementFlags, r, cg, flags, data );
} }
} }
void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, void KlearlookStyle::drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter *p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt, const TQWidget *widget ) const { const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt, const TQWidget *widget ) const {
switch ( kpe ) { switch ( kpe ) {
case KPE_ToolBarHandle: case KPE_ToolBarHandle:
@ -2208,7 +2208,7 @@ void KlearlookStyle::drawKStylePrimitive( KStylePrimitive kpe, TQPainter *p, TQS
} }
break; break;
default: default:
KStyle::drawKStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget ); TDEStyle::drawTDEStylePrimitive( kpe, p, ceData, elementFlags, r, cg, flags, opt, widget );
} }
} }
@ -2392,7 +2392,7 @@ void KlearlookStyle::drawControl(
p->fillRect( fr, flags & Style_Selected ? cg.background() : gray[ 2 ] ); p->fillRect( fr, flags & Style_Selected ? cg.background() : gray[ 2 ] );
break; break;
default: default:
KStyle::drawControl( control, p, ceData, elementFlags, r, cg, flags, data, widget ); TDEStyle::drawControl( control, p, ceData, elementFlags, r, cg, flags, data, widget );
} }
} else { } else {
TQRect br( r ); TQRect br( r );
@ -2948,7 +2948,7 @@ void KlearlookStyle::drawControl(
drawPrimitive( PE_FocusRect, p, ceData, elementFlags, drawPrimitive( PE_FocusRect, p, ceData, elementFlags,
visualRect( subRect( SR_CheckBoxFocusRect, ceData, elementFlags, widget ), ceData, elementFlags ), cg, flags ); visualRect( subRect( SR_CheckBoxFocusRect, ceData, elementFlags, widget ), ceData, elementFlags ), cg, flags );
} else } else
KStyle::drawControl( control, p, ceData, elementFlags, r, cg, flags, data, widget ); TDEStyle::drawControl( control, p, ceData, elementFlags, r, cg, flags, data, widget );
break; break;
case CE_RadioButton: case CE_RadioButton:
formMode = isFormWidget( widget ); formMode = isFormWidget( widget );
@ -2984,7 +2984,7 @@ void KlearlookStyle::drawControl(
break; break;
} }
default: default:
KStyle::drawControl( control, p, ceData, elementFlags, r, cg, flags, data, widget ); TDEStyle::drawControl( control, p, ceData, elementFlags, r, cg, flags, data, widget );
} }
} }
@ -3008,7 +3008,7 @@ void KlearlookStyle::drawControlMask( ControlElement control, TQPainter *p, TQSt
p->fillRect( r, color1 ); p->fillRect( r, color1 );
break; break;
default: default:
KStyle::drawControlMask( control, p, ceData, elementFlags, r, data, widget ); TDEStyle::drawControlMask( control, p, ceData, elementFlags, r, data, widget );
} }
} }
@ -3020,7 +3020,7 @@ void KlearlookStyle::drawComplexControlMask( ComplexControl control, TQPainter *
drawControlMask( CE_PushButton, p, ceData, elementFlags, r, data, widget ); drawControlMask( CE_PushButton, p, ceData, elementFlags, r, data, widget );
break; break;
default: default:
KStyle::drawComplexControlMask( control, p, ceData, elementFlags, r, data, widget ); TDEStyle::drawComplexControlMask( control, p, ceData, elementFlags, r, data, widget );
} }
} }
@ -3070,7 +3070,7 @@ TQRect KlearlookStyle::subRect( SubRect subrect, const TQStyleControlElementData
wrect.height() - 2 ); wrect.height() - 2 );
break; break;
default: default:
rect = KStyle::subRect( subrect, ceData, elementFlags, widget ); rect = TDEStyle::subRect( subrect, ceData, elementFlags, widget );
} }
return rect; return rect;
@ -3367,7 +3367,7 @@ void KlearlookStyle::drawComplexControl(
break; break;
} }
default: default:
KStyle::drawComplexControl( control, p, ceData, elementFlags, r, cg, flags, controls, active, data, widget ); TDEStyle::drawComplexControl( control, p, ceData, elementFlags, r, cg, flags, controls, active, data, widget );
} }
} }
@ -3410,7 +3410,7 @@ TQRect KlearlookStyle::querySubControlMetrics( TQ_ComplexControl control, TQStyl
} }
} }
default: default:
return KStyle::querySubControlMetrics( control, ceData, elementFlags, sc, data, widget ); return TDEStyle::querySubControlMetrics( control, ceData, elementFlags, sc, data, widget );
} }
} }
@ -3486,16 +3486,16 @@ int KlearlookStyle::pixelMetric( PixelMetric metric, TQStyleControlElementData c
case PM_MaximumDragDistance: case PM_MaximumDragDistance:
return -1; return -1;
default: default:
return KStyle::pixelMetric( metric, ceData, elementFlags, widget ); return TDEStyle::pixelMetric( metric, ceData, elementFlags, widget );
} }
} }
int KlearlookStyle::kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const { int KlearlookStyle::kPixelMetric( TDEStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const {
switch ( kpm ) { switch ( kpm ) {
case KPM_MenuItemSeparatorHeight: case KPM_MenuItemSeparatorHeight:
return 4; return 4;
default: default:
return KStyle::kPixelMetric( kpm, ceData, elementFlags, widget ); return TDEStyle::kPixelMetric( kpm, ceData, elementFlags, widget );
} }
} }
@ -3579,15 +3579,15 @@ TQSize KlearlookStyle::sizeFromContents( ContentsType t,
if ( widget->parent() && ::tqqt_cast<TQToolBar*>( widget->parent() ) ) if ( widget->parent() && ::tqqt_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 KStyle::sizeFromContents ( t, ceData, elementFlags, s, opt, widget ); return TDEStyle::sizeFromContents ( t, ceData, elementFlags, s, opt, widget );
} }
} }
default: default:
return KStyle::sizeFromContents ( t, ceData, elementFlags, s, opt, widget ); return TDEStyle::sizeFromContents ( t, ceData, elementFlags, s, opt, widget );
} }
return KStyle::sizeFromContents ( t, ceData, elementFlags, s, opt, widget ); return TDEStyle::sizeFromContents ( t, ceData, elementFlags, s, opt, widget );
} }
@ -3614,7 +3614,7 @@ int KlearlookStyle::styleHint( StyleHint stylehint, TQStyleControlElementData ce
case SH_PopupMenu_AllowActiveAndDisabled: case SH_PopupMenu_AllowActiveAndDisabled:
return 0; return 0;
default: default:
return KStyle::styleHint( stylehint, ceData, elementFlags, option, returnData, widget ); return TDEStyle::styleHint( stylehint, ceData, elementFlags, option, returnData, widget );
} }
} }

@ -184,7 +184,7 @@ extern "C" {
} }
#endif #endif
class KlearlookStyle : public KStyle { class KlearlookStyle : public TDEStyle {
Q_OBJECT Q_OBJECT
@ -258,7 +258,7 @@ class KlearlookStyle : public KStyle {
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
void drawPrimitiveMenu( TQ_PrimitiveElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &, SFlags = Style_Default, void drawPrimitiveMenu( TQ_PrimitiveElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const; const TQStyleOption & = TQStyleOption::Default ) const;
void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r, void drawTDEStylePrimitive( TDEStylePrimitive kpe, TQPainter* p, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &r,
const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt, const TQWidget* widget = 0 ) const; const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt, const TQWidget* widget = 0 ) const;
void drawControl( ControlElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &, void drawControl( ControlElement, TQPainter *, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQRect &, const TQColorGroup &,
SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0 ) const; SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0 ) const;
@ -273,7 +273,7 @@ class KlearlookStyle : public KStyle {
TQRect querySubControlMetrics( TQ_ComplexControl, TQStyleControlElementData ceData, ControlElementFlags elementFlags, SubControl, TQRect querySubControlMetrics( TQ_ComplexControl, TQStyleControlElementData ceData, ControlElementFlags elementFlags, SubControl,
const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0 ) const; const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0 ) const;
int pixelMetric( PixelMetric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const; int pixelMetric( PixelMetric, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget = 0 ) const;
int kPixelMetric( KStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const; int kPixelMetric( TDEStylePixelMetric kpm, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQWidget *widget ) const;
TQSize sizeFromContents( ContentsType, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQSize &, TQSize sizeFromContents( ContentsType, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQSize &,
const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0 ) const; const TQStyleOption & = TQStyleOption::Default, const TQWidget * = 0 ) const;
int styleHint( StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default, int styleHint( StyleHint, TQStyleControlElementData ceData, ControlElementFlags elementFlags, const TQStyleOption & = TQStyleOption::Default,

Loading…
Cancel
Save