Rename a number of libraries and executables to avoid conflicts with KDE4

pull/1/head
Timothy Pearson 12 years ago
parent c1751ea5db
commit 153dafe022

@ -291,9 +291,9 @@ void LipstikStyle::polish(const TQStyleControlElementData &ceData, ControlElemen
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...? if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
khtmlWidgets[widget] = true; tdehtmlWidgets[widget] = true;
connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(khtmlWidgetDestroyed(TQObject*))); connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(tdehtmlWidgetDestroyed(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
@ -348,8 +348,8 @@ void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) { if (ceData.widgetObjectTypes.contains(TQWIDGET_OBJECT_NAME_STRING)) {
TQWidget *widget = reinterpret_cast<TQWidget*>(ptr); TQWidget *widget = reinterpret_cast<TQWidget*>(ptr);
if( !strcmp(widget->name(), "__khtml") ) { // is it a khtml widget...? if( !strcmp(widget->name(), "__tdehtml") ) { // is it a tdehtml widget...?
khtmlWidgets.remove(widget); tdehtmlWidgets.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.
@ -383,9 +383,9 @@ void LipstikStyle::unPolish(const TQStyleControlElementData &ceData, ControlElem
KStyle::unPolish(ceData, elementFlags, ptr); KStyle::unPolish(ceData, elementFlags, ptr);
} }
void LipstikStyle::khtmlWidgetDestroyed(TQObject* obj) void LipstikStyle::tdehtmlWidgetDestroyed(TQObject* obj)
{ {
khtmlWidgets.remove(TQT_TQWIDGET(obj)); tdehtmlWidgets.remove(TQT_TQWIDGET(obj));
} }
void LipstikStyle::progressBarDestroyed(TQObject* obj) void LipstikStyle::progressBarDestroyed(TQObject* obj)
@ -788,7 +788,7 @@ void LipstikStyle::renderButton(TQPainter *p,
bool mouseOver, bool mouseOver,
bool horizontal, bool horizontal,
bool enabled, bool enabled,
bool khtmlMode) const bool tdehtmlMode) const
{ {
// small fix for the kicker buttons... // small fix for the kicker buttons...
if(kickerMode) enabled = true; if(kickerMode) enabled = true;
@ -797,7 +797,7 @@ void LipstikStyle::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(khtmlMode) contourFlags|=Draw_AlphaBlend; if(tdehtmlMode) 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;
@ -1744,8 +1744,8 @@ void LipstikStyle::drawPrimitive(PrimitiveElement pe,
case PE_ButtonTool: case PE_ButtonTool:
case PE_ButtonDropDown: case PE_ButtonDropDown:
case PE_ButtonCommand: { case PE_ButtonCommand: {
bool khtmlMode = opt.isDefault() ? false : khtmlWidgets.contains(opt.widget()); bool tdehtmlMode = opt.isDefault() ? false : tdehtmlWidgets.contains(opt.widget());
renderButton(p, r, cg, (on||down), mouseOver, true, enabled, khtmlMode ); renderButton(p, r, cg, (on||down), mouseOver, true, enabled, tdehtmlMode );
break; break;
} }
@ -2099,12 +2099,12 @@ void LipstikStyle::drawPrimitive(PrimitiveElement pe,
// HACK!! // HACK!!
// //
// In order to draw nice edges in khtml, we need to paint alpha-blended. // In order to draw nice edges in tdehtml, 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 khtml; the // In this place there is no reliable way to detect if we are in tdehtml; the
// only thing we know is that khtml buffers its widgets into a pixmap. So // only thing we know is that tdehtml buffers its widgets into a pixmap. So
// when the paint device is a TQPixmap, chances are high that we are in khtml. // when the paint device is a TQPixmap, chances are high that we are in tdehtml.
// 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;
@ -3243,7 +3243,7 @@ void LipstikStyle::drawComplexControl(ComplexControl control,
:cg.background(); :cg.background();
uint contourFlags = 0; uint contourFlags = 0;
if( khtmlWidgets.contains(cb) ) if( tdehtmlWidgets.contains(cb) )
contourFlags |= Draw_AlphaBlend; contourFlags |= Draw_AlphaBlend;
if (_inputFocusHighlight && hasFocus && editable && enabled) if (_inputFocusHighlight && hasFocus && editable && enabled)

@ -243,7 +243,7 @@ protected:
bool mouseOver = false, bool mouseOver = false,
bool horizontal = true, bool horizontal = true,
bool enabled = true, bool enabled = true,
bool khtmlMode = false) const; bool tdehtmlMode = false) const;
void renderPanel(TQPainter *p, void renderPanel(TQPainter *p,
const TQRect &r, const TQRect &r,
@ -279,7 +279,7 @@ protected:
virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e ); virtual bool objectEventHandler( const TQStyleControlElementData &ceData, ControlElementFlags elementFlags, void* source, TQEvent *e );
protected slots: protected slots:
void khtmlWidgetDestroyed(TQObject* w); void tdehtmlWidgetDestroyed(TQObject* w);
//Animation slots. //Animation slots.
void updateProgressPos(); void updateProgressPos();
@ -339,8 +339,8 @@ private:
TQColor _defaultMenuStripeColor; TQColor _defaultMenuStripeColor;
// TQColor _arrowColor; // TQColor _arrowColor;
// track khtml widgets. // track tdehtml widgets.
TQMap<const TQWidget*,bool> khtmlWidgets; TQMap<const TQWidget*,bool> tdehtmlWidgets;
//Animation support. //Animation support.
TQMap<TQWidget*, int> progAnimWidgets; TQMap<TQWidget*, int> progAnimWidgets;

Loading…
Cancel
Save