Rename KStyle to TDEStyle to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent 4fd5598837
commit c185347c72

@ -47,6 +47,6 @@ Some code adopted from the "Keramik" kde style. Thanks!
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 KStyle, Progressbar code based on TDEStyle,
Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org> Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
--------------------------------------------------------------------------- ---------------------------------------------------------------------------

@ -26,7 +26,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 KStyle, Progressbar code based on TDEStyle,
Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org> Copyright (C) 2001-2002 Karol Szwed <gallium@kde.org>
...also based on plastikq, krisp, comix, motifplus, polyester, qtcurve... ...also based on plastikq, krisp, comix, motifplus, polyester, qtcurve...
@ -160,7 +160,7 @@ class LipstikStylePlugin : public TQStylePlugin
TQ_EXPORT_PLUGIN( LipstikStylePlugin ) TQ_EXPORT_PLUGIN( LipstikStylePlugin )
// -- end -- // -- end --
LipstikStyle::LipstikStyle() : KStyle( AllowMenuTransparency, ThreeButtonScrollBar), LipstikStyle::LipstikStyle() : TDEStyle( AllowMenuTransparency, ThreeButtonScrollBar),
kickerMode(false), kickerMode(false),
kornMode(false), kornMode(false),
flatMode(false) flatMode(false)
@ -221,11 +221,11 @@ LipstikStyle::LipstikStyle() : KStyle( AllowMenuTransparency, ThreeButtonScrollB
settings.endGroup(); settings.endGroup();
if( !strcmp(_scrollBarStyle,"WindowsStyleScrollBar" ) ) if( !strcmp(_scrollBarStyle,"WindowsStyleScrollBar" ) )
this->setScrollBarType(KStyle::WindowsStyleScrollBar); this->setScrollBarType(TDEStyle::WindowsStyleScrollBar);
else if( !strcmp(_scrollBarStyle,"PlatinumStyleScrollBar" ) ) else if( !strcmp(_scrollBarStyle,"PlatinumStyleScrollBar" ) )
this->setScrollBarType(KStyle::PlatinumStyleScrollBar); this->setScrollBarType(TDEStyle::PlatinumStyleScrollBar);
else if( !strcmp(_scrollBarStyle,"NextStyleScrollBar" ) ) else if( !strcmp(_scrollBarStyle,"NextStyleScrollBar" ) )
this->setScrollBarType(KStyle::NextStyleScrollBar); this->setScrollBarType(TDEStyle::NextStyleScrollBar);
// setup pixmap cache... // setup pixmap cache...
pixmapCache = new TQIntCache<CacheEntry>(150000, 499); pixmapCache = new TQIntCache<CacheEntry>(150000, 499);
@ -340,7 +340,7 @@ void LipstikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
} }
} }
KStyle::polish(ceData, elementFlags, ptr); TDEStyle::polish(ceData, elementFlags, ptr);
} }
void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr) void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *ptr)
@ -380,7 +380,7 @@ void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
} }
} }
KStyle::unPolish(ceData, elementFlags, ptr); TDEStyle::unPolish(ceData, elementFlags, ptr);
} }
void LipstikStyle::tdehtmlWidgetDestroyed(TQObject* obj) void LipstikStyle::tdehtmlWidgetDestroyed(TQObject* obj)
@ -1291,7 +1291,7 @@ void LipstikStyle::renderTab(TQPainter *p,
} }
} }
void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe, void LipstikStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe,
TQPainter *p, TQPainter *p,
const TQStyleControlElementData &ceData, const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,
@ -1573,7 +1573,7 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
break; break;
} }
// copied and slightly modified from KStyle. // copied and slightly modified from TDEStyle.
case KPE_ListViewBranch: { case KPE_ListViewBranch: {
// Typical Windows style listview branch element (dotted line). // Typical Windows style listview branch element (dotted line).
@ -1646,7 +1646,7 @@ void LipstikStyle::drawKStylePrimitive(KStylePrimitive kpe,
} }
default: default:
KStyle::drawKStylePrimitive(kpe, p, ceData, elementFlags, r, cg, flags, opt, widget); TDEStyle::drawTDEStylePrimitive(kpe, p, ceData, elementFlags, r, cg, flags, opt, widget);
} }
} }
@ -2477,7 +2477,7 @@ void LipstikStyle::drawPrimitive(PrimitiveElement pe,
} }
default: { default: {
return KStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt); return TDEStyle::drawPrimitive(pe, p, ceData, elementFlags, r, cg, flags, opt);
} }
} }
} }
@ -2677,7 +2677,7 @@ void LipstikStyle::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:
KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); TDEStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget);
} }
break; break;
@ -3161,7 +3161,7 @@ void LipstikStyle::drawControl(ControlElement element,
break; break;
default: default:
KStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget); TDEStyle::drawControl(element, p, ceData, elementFlags, r, cg, flags, opt, widget);
} }
} }
@ -3182,7 +3182,7 @@ void LipstikStyle::drawControlMask(ControlElement element,
} }
default: { default: {
KStyle::drawControlMask (element, p, ceData, elementFlags, r, opt, w); TDEStyle::drawControlMask (element, p, ceData, elementFlags, r, opt, w);
} }
} }
} }
@ -3205,7 +3205,7 @@ void LipstikStyle::drawComplexControlMask(ComplexControl c,
break; break;
} }
default: { default: {
KStyle::drawComplexControlMask (c, p, ceData, elementFlags, r, o, w); TDEStyle::drawComplexControlMask (c, p, ceData, elementFlags, r, o, w);
} }
} }
} }
@ -3628,7 +3628,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
} }
default: default:
KStyle::drawComplexControl(control, p, ceData, elementFlags, TDEStyle::drawComplexControl(control, p, ceData, elementFlags,
r, cg, flags, controls, r, cg, flags, controls,
active, opt, widget); active, opt, widget);
break; break;
@ -3643,7 +3643,7 @@ TQRect LipstikStyle::subRect(SubRect r, const TQStyleControlElementData &ceData,
return querySubControlMetrics( CC_ComboBox, ceData, elementFlags, SC_ComboBoxEditField, TQStyleOption::Default, widget ); return querySubControlMetrics( CC_ComboBox, ceData, elementFlags, SC_ComboBoxEditField, TQStyleOption::Default, widget );
} }
// Don't use KStyles progressbar subrect // Don't use TDEStyles progressbar subrect
// TODO: // TODO:
case SR_ProgressBarGroove: { case SR_ProgressBarGroove: {
return TQRect(ceData.rect); return TQRect(ceData.rect);
@ -3655,7 +3655,7 @@ TQRect LipstikStyle::subRect(SubRect r, const TQStyleControlElementData &ceData,
} }
default: { default: {
return KStyle::subRect(r, ceData, elementFlags, widget); return TDEStyle::subRect(r, ceData, elementFlags, widget);
} }
} }
} }
@ -3676,7 +3676,7 @@ TQRect LipstikStyle::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 KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); return TDEStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget);
} }
} }
break; break;
@ -3720,13 +3720,13 @@ TQRect LipstikStyle::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 KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); return TDEStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget);
} }
} }
break; break;
} }
default: { default: {
return KStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget); return TDEStyle::querySubControlMetrics(control, ceData, elementFlags, subcontrol, opt, widget);
} }
} }
} }
@ -3848,7 +3848,7 @@ int LipstikStyle::pixelMetric(PixelMetric m, const TQStyleControlElementData &ce
return 2; return 2;
default: default:
return KStyle::pixelMetric(m, ceData, elementFlags, widget); return TDEStyle::pixelMetric(m, ceData, elementFlags, widget);
} }
} }
@ -3928,14 +3928,14 @@ TQSize LipstikStyle::sizeFromContents(ContentsType t,
if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING)) if (ceData.parentWidgetData.widgetObjectTypes.contains(TQTOOLBAR_OBJECT_NAME_STRING))
return TQSize( s.width()+2*4+_toolBarSpacing, s.height()+2*4 ); return TQSize( s.width()+2*4+_toolBarSpacing, 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);
} }
int LipstikStyle::styleHint( StyleHint stylehint, int LipstikStyle::styleHint( StyleHint stylehint,
@ -3961,13 +3961,13 @@ int LipstikStyle::styleHint( StyleHint stylehint,
} }
default: default:
return KStyle::styleHint(stylehint, ceData, elementFlags, option, returnData, widget); return TDEStyle::styleHint(stylehint, ceData, elementFlags, option, returnData, widget);
} }
} }
bool LipstikStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *ev ) bool LipstikStyle::objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *ev )
{ {
if (KStyle::objectEventHandler(ceData, elementFlags, source, ev) ) if (TDEStyle::objectEventHandler(ceData, elementFlags, source, ev) )
return true; return true;
if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQOBJECT_OBJECT_NAME_STRING)) {

@ -24,7 +24,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 KStyle, Progressbar code based on TDEStyle,
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
@ -60,7 +60,7 @@ class TQSettings;
class TQTab; class TQTab;
class TQTimer; class TQTimer;
class LipstikStyle : public KStyle class LipstikStyle : public TDEStyle
{ {
Q_OBJECT Q_OBJECT
@ -73,7 +73,7 @@ public:
void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void polish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *); void unPolish(const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void *);
void drawKStylePrimitive(KStylePrimitive kpe, void drawTDEStylePrimitive(TDEStylePrimitive kpe,
TQPainter* p, TQPainter* p,
const TQStyleControlElementData &ceData, const TQStyleControlElementData &ceData,
ControlElementFlags elementFlags, ControlElementFlags elementFlags,

Loading…
Cancel
Save