diff options
Diffstat (limited to 'domino')
-rw-r--r-- | domino/Makefile.am | 6 | ||||
-rw-r--r-- | domino/domino.cpp | 206 | ||||
-rw-r--r-- | domino/domino.h | 24 | ||||
-rw-r--r-- | domino/domino.themerc | 2 | ||||
-rw-r--r-- | domino/eventfilter.cpp | 74 |
5 files changed, 156 insertions, 156 deletions
diff --git a/domino/Makefile.am b/domino/Makefile.am index d182150..5517313 100644 --- a/domino/Makefile.am +++ b/domino/Makefile.am @@ -4,9 +4,9 @@ KDE_CXXFLAGS = -DQT_PLUGIN $(FT2_CFLAGS) INCLUDES = $(all_includes) -stylercdir = $(kde_datadir)/kstyle/themes +stylercdir = $(kde_datadir)/tdestyle/themes stylerc_DATA = domino.themerc -schemedir = $(kde_datadir)/kdisplay/color-schemes +schemedir = $(kde_datadir)/tdedisplay/color-schemes scheme_DATA = Domino.kcsrc noinst_HEADERS = domino.h misc.h data.h @@ -14,7 +14,7 @@ noinst_HEADERS = domino.h misc.h data.h kde_style_LTLIBRARIES = domino.la domino_la_SOURCES = domino.cpp misc.cpp domino_la_LDFLAGS = $(all_libraries) $(KDE_PLUGIN) -module $(KDE_RPATH) -domino_la_LIBADD = $(LIB_KDEUI) $(LIB_KUTILS) $(LIB_QT) -lkdefx -lXrender -lXft $(LIB_KDECORE) +domino_la_LIBADD = $(LIB_TDEUI) $(LIB_TDEUTILS) $(LIB_QT) -ltdefx -lXrender -lXft $(LIB_TDECORE) domino_la_METASOURCES = AUTO noinst_LTLIBRARIES = libdomino_style.la diff --git a/domino/domino.cpp b/domino/domino.cpp index fa78200..aa9d7d3 100644 --- a/domino/domino.cpp +++ b/domino/domino.cpp @@ -21,7 +21,7 @@ Copyright (C) 2000 Daniel M. Duley <[email protected]> (C) 2000 Dirk Mueller <[email protected]> (C) 2001 Martijn Klingens <[email protected]> - Progressbar code based on KStyle, + Progressbar code based on TDEStyle, Copyright (C) 2001-2002 Karol Szwed <[email protected]> This library is free software; you can redistribute it and/or @@ -39,7 +39,7 @@ */ -#include <kglobalsettings.h> +#include <tdeglobalsettings.h> #include <tqpainter.h> #include <tqtabbar.h> #include <tqprogressbar.h> @@ -49,7 +49,7 @@ #include <tqstyleplugin.h> #include <tqpushbutton.h> #include <tqtoolbutton.h> -#include <kpopupmenu.h> +#include <tdepopupmenu.h> #include <tqradiobutton.h> #include <tqslider.h> #include <tqsettings.h> @@ -59,26 +59,26 @@ #include <tqdockarea.h> #include <tqobjectlist.h> #include <tqheader.h> -#include <klistview.h> +#include <tdelistview.h> #include <tqstatusbar.h> #include <tqcombobox.h> #include <tqtabwidget.h> -#include <ktoolbar.h> +#include <tdetoolbar.h> #include <tqlabel.h> #include <tqsimplerichtext.h> #include <tqiconview.h> -#include <kconfig.h> +#include <tdeconfig.h> #include <tqapplication.h> #include <tqtoolbox.h> #include <tqstylesheet.h> // #include <tqsplitter.h> #include <tqwidgetstack.h> #include <tqtimer.h> -#include <kmultitabbar.h> +#include <tdemultitabbar.h> #include <tqspinbox.h> #include <tqcursor.h> #include <tqtextedit.h> -#include <kdeversion.h> +#include <tdeversion.h> #include <kimageeffect.h> #include <X11/Xlib.h> @@ -266,7 +266,7 @@ class DominoStylePlugin : public TQStylePlugin KDE_Q_EXPORT_PLUGIN( DominoStylePlugin ) // -- end -- - DominoStyle::DominoStyle() : KStyle( KStyle::Default /*AllowMenuTransparency*/, ThreeButtonScrollBar ) + DominoStyle::DominoStyle() : TDEStyle( TDEStyle::Default /*AllowMenuTransparency*/, ThreeButtonScrollBar ) { konsoleMode = false; kickerMode = false; @@ -276,7 +276,7 @@ KDE_Q_EXPORT_PLUGIN( DominoStylePlugin ) oldRubberRect = TQRect(); rubber = 0; ignoreNextFocusRect = false; -#if KDE_VERSION < 0x30506 +#if TDE_VERSION < 0x30506 compositeManagerRunning = true; #endif configMode = "0"; // temporaly to avoid cache problems between the configs previewStyle and this style @@ -530,22 +530,22 @@ KDE_Q_EXPORT_PLUGIN( DominoStylePlugin ) settings.endGroup(); if(!strcmp(tqApp->argv()[0], "konqueror")) { - KGlobal::config()->setGroup("General"); - minTabLength = KGlobal::config()->readNumEntry("MinimumTabLength", 3); + TDEGlobal::config()->setGroup("General"); + minTabLength = TDEGlobal::config()->readNumEntry("MinimumTabLength", 3); } else minTabLength = 0; - if(!strcmp(tqApp->className(), "KApplication")) { - TQString oldgroup = KGlobal::config()->group(); - KGlobal::config()->setGroup("KDE"); - macStyleBar = KGlobal::config()->readBoolEntry("macStyle", false); - KGlobal::config()->setGroup(oldgroup); // reset the group, do not interfere with the application - KApplicationMode = true; + if(!strcmp(tqApp->className(), "TDEApplication")) { + TQString oldgroup = TDEGlobal::config()->group(); + TDEGlobal::config()->setGroup("KDE"); + macStyleBar = TDEGlobal::config()->readBoolEntry("macStyle", false); + TDEGlobal::config()->setGroup(oldgroup); // reset the group, do not interfere with the application + TDEApplicationMode = true; } else { macStyleBar = false; - KApplicationMode = false; + TDEApplicationMode = false; } @@ -695,15 +695,15 @@ void DominoStyle::polish(TQPalette &p) { void DominoStyle::polish(TQWidget* widget) { - if(!strcmp(widget->name(), "__khtml")) { // is it a khtml widget...? - khtmlWidgets[widget] = true; - connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(khtmlWidgetDestroyed(TQObject*))); + if(!strcmp(widget->name(), "__tdehtml")) { // is it a tdehtml widget...? + tdehtmlWidgets[widget] = true; + connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(tdehtmlWidgetDestroyed(TQObject*))); } - else if((!strcmp(widget->name(), "kfile button") || (widget->isA("KLineEdit") && widget->parentWidget())) && !strcmp(widget->parentWidget()->name(), "__khtml")) { + else if((!strcmp(widget->name(), "tdefile button") || (widget->isA("KLineEdit") && widget->parentWidget())) && !strcmp(widget->parentWidget()->name(), "__tdehtml")) { widget->setBackgroundMode(TQt::NoBackground); widget->parentWidget()->setBackgroundMode(TQt::NoBackground); - khtmlWidgets[widget] = true; - connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(khtmlWidgetDestroyed(TQObject*))); + tdehtmlWidgets[widget] = true; + connect(widget, SIGNAL(destroyed(TQObject*)), this, SLOT(tdehtmlWidgetDestroyed(TQObject*))); } if(dynamic_cast<TQPushButton*>(widget)) { @@ -714,7 +714,7 @@ void DominoStyle::polish(TQWidget* widget) widget->setFixedSize(13, 13); // 12x12 pixmap + 1px top and right spacing else { ((DominoTQWidget*)widget)->setWFlags(TQt::WNoAutoErase); - if(widget->parentWidget() && widget->parentWidget()->paletteBackgroundPixmap() && !khtmlWidgets.contains(widget)) { + if(widget->parentWidget() && widget->parentWidget()->paletteBackgroundPixmap() && !tdehtmlWidgets.contains(widget)) { widget->setBackgroundMode(TQt::PaletteButton); widget->setBackgroundPixmap(*widget->parentWidget()->paletteBackgroundPixmap()); widget->setBackgroundOrigin(setPixmapOrigin(widget->parentWidget()->backgroundOrigin())); @@ -727,8 +727,8 @@ void DominoStyle::polish(TQWidget* widget) ((DominoTQWidget*)widget)->setWFlags(TQt::WNoAutoErase); widget->installEventFilter(this); } - else if(dynamic_cast<KToolBarButton*>(widget)) { - KToolBarButton* tb = static_cast<KToolBarButton*>(widget); + else if(dynamic_cast<TDEToolBarButton*>(widget)) { + TDEToolBarButton* tb = static_cast<TDEToolBarButton*>(widget); //setDominoButtonPalette(widget); // ### changing the palette breaks them! if(tb->popupDelay() < 1) @@ -769,7 +769,7 @@ void DominoStyle::polish(TQWidget* widget) TQComboBox* cb = static_cast<TQComboBox*>(widget); ((DominoTQWidget*)widget)->setWFlags(TQt::WNoAutoErase); - if(widget->parentWidget() && widget->parentWidget()->paletteBackgroundPixmap() && !khtmlWidgets.contains(widget)) { + if(widget->parentWidget() && widget->parentWidget()->paletteBackgroundPixmap() && !tdehtmlWidgets.contains(widget)) { widget->setBackgroundMode(TQt::PaletteButton); widget->setBackgroundOrigin(setPixmapOrigin(widget->parentWidget()->backgroundOrigin())); } @@ -894,7 +894,7 @@ void DominoStyle::polish(TQWidget* widget) } else if(dynamic_cast<TQScrollView*>(widget)) { TQFrame* f = dynamic_cast<TQFrame*>(widget); - if((konquerorMode && widget->isA("KHTMLView")) || f->parentWidget() && !strcmp(f->parentWidget()->name(), "KonqFrame")) { // konqi frames + if((konquerorMode && widget->isA("TDEHTMLView")) || f->parentWidget() && !strcmp(f->parentWidget()->name(), "KonqFrame")) { // konqi frames f->setFrameStyle(TQFrame::Box|TQFrame::Plain); f->setLineWidth(1); widget->installEventFilter(this); @@ -908,7 +908,7 @@ void DominoStyle::polish(TQWidget* widget) else if(dynamic_cast<TQListBox*>(widget)) { widget->installEventFilter(this); } - else if(dynamic_cast<KToolBarSeparator*>(widget) || dynamic_cast<TQToolBar*>(widget)) { + else if(dynamic_cast<TDEToolBarSeparator*>(widget) || dynamic_cast<TQToolBar*>(widget)) { widget->setBackgroundMode(TQt::PaletteBackground); } @@ -938,7 +938,7 @@ void DominoStyle::polish(TQWidget* widget) // animationTimer->start( 50, false ); widget->installEventFilter(this); } - else if(dynamic_cast<KPopupTitle*>(widget)) { + else if(dynamic_cast<TDEPopupTitle*>(widget)) { widget->installEventFilter(this); } else if(dynamic_cast<TQFrame*>(widget)) { @@ -972,7 +972,7 @@ void DominoStyle::polish(TQWidget* widget) f->setMargin(0); TQWidget* w = widget->parentWidget(); - for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm khtml_plugins + for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm tdehtml_plugins if(!w) break; if(dynamic_cast<TQGroupBox*>(w)) { widget->setPaletteBackgroundColor(tqApp->palette().active().background()); @@ -1029,8 +1029,8 @@ void DominoStyle::polish(TQWidget* widget) void DominoStyle::unPolish(TQWidget* widget) { - if( !strcmp(widget->name(), "__khtml") || (!strcmp(widget->name(), "kfile button") && !strcmp(widget->parentWidget()->name(), "__khtml"))) { // is it a khtml widget...? - khtmlWidgets.remove(widget); + if( !strcmp(widget->name(), "__tdehtml") || (!strcmp(widget->name(), "tdefile button") && !strcmp(widget->parentWidget()->name(), "__tdehtml"))) { // is it a tdehtml widget...? + tdehtmlWidgets.remove(widget); } if (dynamic_cast<TQPushButton*>(widget) || @@ -1070,7 +1070,7 @@ void DominoStyle::unPolish(TQWidget* widget) static_cast<TQFrame*>(widget)->setLineWidth(2); widget->clearMask(); } - else if(dynamic_cast<KToolBarButton*>(widget)) { + else if(dynamic_cast<TDEToolBarButton*>(widget)) { widget->removeEventFilter(this); widget->setBackgroundMode(TQt::PaletteBackground); } @@ -1093,7 +1093,7 @@ void DominoStyle::unPolish(TQWidget* widget) else if(dynamic_cast<TQProgressBar*>(widget) ) { progAnimWidgets.remove(widget); } - else if(dynamic_cast<KToolBarSeparator*>(widget) || dynamic_cast<TQToolBar*>(widget) ) { + else if(dynamic_cast<TDEToolBarSeparator*>(widget) || dynamic_cast<TQToolBar*>(widget) ) { widget->removeEventFilter(this); widget->setBackgroundMode(TQt::PaletteButton); } @@ -1119,13 +1119,13 @@ void DominoStyle::unPolish(TQWidget* widget) } else if(dynamic_cast<TQScrollView*>(widget)) { TQFrame* f = dynamic_cast<TQFrame*>(widget); - if((konquerorMode && widget->isA("KHTMLView")) || f->parentWidget() && !strcmp(f->parentWidget()->name(), "KonqFrame")) { // konqi frames + if((konquerorMode && widget->isA("TDEHTMLView")) || f->parentWidget() && !strcmp(f->parentWidget()->name(), "KonqFrame")) { // konqi frames widget->removeEventFilter(this); f->setFrameStyle(TQFrame::NoFrame|TQFrame::Plain); f->setLineWidth(0); } } - else if(dynamic_cast<KPopupTitle*>(widget)) { + else if(dynamic_cast<TDEPopupTitle*>(widget)) { widget->removeEventFilter(this); } else if(dynamic_cast<TQFrame*>(widget)) { @@ -1156,12 +1156,12 @@ void DominoStyle::unPolish(TQWidget* widget) } - KStyle::unPolish(widget); + TDEStyle::unPolish(widget); } -void DominoStyle::khtmlWidgetDestroyed(TQObject* obj) +void DominoStyle::tdehtmlWidgetDestroyed(TQObject* obj) { - khtmlWidgets.remove(static_cast<TQWidget*>(obj)); + tdehtmlWidgets.remove(static_cast<TQWidget*>(obj)); } void DominoStyle::groupBoxDestroyed(TQObject* obj) @@ -1941,14 +1941,14 @@ void DominoStyle::renderButton(TQPainter *p, bool /*mouseOver*/, bool horizontal, bool enabled, - bool khtmlMode) const + bool tdehtmlMode) const { uint contourFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom; if(!enabled) contourFlags|=Is_Disabled; - if(khtmlMode || buttonContour->alphaMode() /* || kickerMode*/) { + if(tdehtmlMode || buttonContour->alphaMode() /* || kickerMode*/) { contourFlags|=Draw_AlphaBlend; } @@ -1966,7 +1966,7 @@ void DominoStyle::renderButton(TQPainter *p, } } -// TQColor buttonColor = khtmlMode ? g.button() : tqApp->palette().active().background(); +// TQColor buttonColor = tdehtmlMode ? g.button() : tqApp->palette().active().background(); if (!flatMode) { contourFlags |= Round_UpperLeft|Round_UpperRight|Round_BottomLeft|Round_BottomRight|Is_Button; @@ -2685,7 +2685,7 @@ void DominoStyle::renderTab(TQPainter *p, } } -void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe, +void DominoStyle::drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -2693,7 +2693,7 @@ void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe, SFlags flags, const TQStyleOption& opt) const { - //return KStyle::drawKStylePrimitive(kpe, p, widget, r, cg, flags, opt); + //return TDEStyle::drawTDEStylePrimitive(kpe, p, widget, r, cg, flags, opt); // SLIDER // ------ @@ -2948,7 +2948,7 @@ void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe, break; } - // copied and slightly modified from KStyle. + // copied and slightly modified from TDEStyle. case KPE_ListViewBranch: { if(_drawTriangularExpander) break; // Typical Windows style listview branch element (dotted line). @@ -3021,7 +3021,7 @@ void DominoStyle::drawKStylePrimitive(KStylePrimitive kpe, } default: - KStyle::drawKStylePrimitive(kpe, p, widget, r, cg, flags, opt); + TDEStyle::drawTDEStylePrimitive(kpe, p, widget, r, cg, flags, opt); } } @@ -3049,7 +3049,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe, - //return KStyle::drawPrimitive(pe, p, r, cg, flags, opt); + //return TDEStyle::drawPrimitive(pe, p, r, cg, flags, opt); switch(pe) { @@ -3159,7 +3159,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe, if(dynamic_cast<TQPixmap*>(p->device())) // more likely a backgroundPixmap than a doublebuffer buttonContour->setAlphaMode(); - renderButton(p, r, cg, (on||down), mouseOver, true, enabled, khtmlWidgets.contains(opt.widget()) ); + renderButton(p, r, cg, (on||down), mouseOver, true, enabled, tdehtmlWidgets.contains(opt.widget()) ); buttonContour->reset(); break; } @@ -4353,7 +4353,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe, case PE_RubberBand: { -#if KDE_VERSION >= 0x30506 +#if TDE_VERSION >= 0x30506 if(rubberBandType != ArgbRubber || !compositeManagerRunning) { #else if(rubberBandType != ArgbRubber) { @@ -4365,7 +4365,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe, p->restore(); } else { - KStyle::drawPrimitive(pe, p, r, cg, flags, opt); + TDEStyle::drawPrimitive(pe, p, r, cg, flags, opt); } break; } @@ -4642,7 +4642,7 @@ void DominoStyle::drawPrimitive(PrimitiveElement pe, } default: { - return KStyle::drawPrimitive(pe, p, r, cg, flags, opt); + return TDEStyle::drawPrimitive(pe, p, r, cg, flags, opt); } } } @@ -4658,13 +4658,13 @@ void DominoStyle::drawControl(ControlElement element, const bool enabled = (flags & Style_Enabled); - //return KStyle::drawControl(element, p, widget, r, cg, flags, opt); + //return TDEStyle::drawControl(element, p, widget, r, cg, flags, opt); switch (element) { case CE_ToolButtonLabel: { - if(widget->isA("KToolBarButton")) { + if(widget->isA("TDEToolBarButton")) { DominoKToolBarButton* tb= (DominoKToolBarButton *) widget; TQStyle::SFlags flags = TQStyle::Style_Default; @@ -4680,14 +4680,14 @@ void DominoStyle::drawControl(ControlElement element, if (tb->hasFocus()) flags |= TQStyle::Style_HasFocus; int dx, dy; - TQFont tmp_font(KGlobalSettings::toolBarFont()); + TQFont tmp_font(TDEGlobalSettings::toolBarFont()); TQFontMetrics fm(tmp_font); TQRect textRect; int textFlags = 0; TQPixmap pixmap; - if (tb->iconTextMode() != KToolBar::TextOnly) { + if (tb->iconTextMode() != TDEToolBar::TextOnly) { pixmap =tb->iconSet().pixmap( TQIconSet::Automatic, tb->isEnabled() ? (tb->isActive() ? TQIconSet::Active : TQIconSet::Normal) : TQIconSet::Disabled, @@ -4710,7 +4710,7 @@ void DominoStyle::drawControl(ControlElement element, drawOutlinePixmap = true; } - if (tb->iconTextMode() == KToolBar::IconOnly) // icon only + if (tb->iconTextMode() == TDEToolBar::IconOnly) // icon only { if( !pixmap.isNull()) { @@ -4726,7 +4726,7 @@ void DominoStyle::drawControl(ControlElement element, } } - else if (tb->iconTextMode() == KToolBar::IconTextRight) // icon and text (if any) + else if (tb->iconTextMode() == TDEToolBar::IconTextRight) // icon and text (if any) { if( !pixmap.isNull()) { @@ -4751,7 +4751,7 @@ void DominoStyle::drawControl(ControlElement element, textRect = TQRect(dx, dy, tb->width()-dx, tb->height()-1); } } - else if (tb->iconTextMode() == KToolBar::TextOnly) + else if (tb->iconTextMode() == TDEToolBar::TextOnly) { if (!tb->textLabel().isNull()) { @@ -4762,7 +4762,7 @@ void DominoStyle::drawControl(ControlElement element, textRect = TQRect( dx, dy, fm.width(tb->textLabel()), fm.lineSpacing() ); } } - else if (tb->iconTextMode() == KToolBar::IconTextBottom) + else if (tb->iconTextMode() == TDEToolBar::IconTextBottom) { if( !pixmap.isNull()) { @@ -4787,13 +4787,13 @@ void DominoStyle::drawControl(ControlElement element, } if (!tb->textLabel().isNull() && !textRect.isNull()) { - p->setFont(KGlobalSettings::toolBarFont()); + p->setFont(TDEGlobalSettings::toolBarFont()); TQColor pencolor; if (!tb->isEnabled()) pencolor = tb->palette().disabled().dark(); // replaced through icon highlights // else if(tb->isRaised()) -// pencolor = KGlobalSettings::toolBarHighlightColor(); +// pencolor = TDEGlobalSettings::toolBarHighlightColor(); else pencolor = tb->colorGroup().buttonText(); @@ -5087,7 +5087,7 @@ void DominoStyle::drawControl(ControlElement element, case CE_CheckBox: { TQColorGroup g = cg; - if(!khtmlWidgets.contains(widget)) + if(!tdehtmlWidgets.contains(widget)) g.setColor(TQColorGroup::Button, tqApp->palette().active().background()); TQPixmap insidePix = qembed_findImage("checkbox2inside"); @@ -5139,7 +5139,7 @@ void DominoStyle::drawControl(ControlElement element, // ------------ case CE_RadioButton: { TQColorGroup g = cg; - if(!khtmlWidgets.contains(widget)) + if(!tdehtmlWidgets.contains(widget)) g.setColor(TQColorGroup::Button, tqApp->palette().active().background()); TQString down = flags& Style_Down ? "1" : "0"; @@ -5243,7 +5243,7 @@ void DominoStyle::drawControl(ControlElement element, renderTab(p, r, cg, (flags & Style_MouseOver), selected, true, pos, false, false, konqTab); break; default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + TDEStyle::drawControl(element, p, widget, r, cg, flags, opt); } // TQt3 uses this painter to draw the iconSet between CE_TabBarTab and CE_TabBarLabel. If we clip the painter here @@ -5256,7 +5256,7 @@ void DominoStyle::drawControl(ControlElement element, case CE_PushButton: { TQPushButton *button = (TQPushButton *)widget; - bool khtmlMode = khtmlWidgets.contains(button); + bool tdehtmlMode = tdehtmlWidgets.contains(button); bool isDefault = enabled && button->isDefault(); bool isHoverWidget = enabled && button == hoverWidget; bool isSunken = flags & Style_On || flags & Style_Down; @@ -5266,7 +5266,7 @@ void DominoStyle::drawControl(ControlElement element, flatMode = button->isFlat(); TQColor bg; - if(!khtmlMode && !button->paletteBackgroundPixmap()) { + if(!tdehtmlMode && !button->paletteBackgroundPixmap()) { if(dynamic_cast<TQGroupBox*>(button->parentWidget())) { bg = button->parentWidget()->paletteBackgroundColor(); @@ -5284,7 +5284,7 @@ void DominoStyle::drawControl(ControlElement element, buttonContour->setAlphaMode(); contourFlags|=Draw_AlphaBlend; } - if(khtmlMode) contourFlags|=Draw_AlphaBlend; + if(tdehtmlMode) contourFlags|=Draw_AlphaBlend; if(!enabled) { contourFlags|=Is_Disabled; surfaceFlags|=Is_Disabled; @@ -5516,7 +5516,7 @@ void DominoStyle::drawControl(ControlElement element, bool enabled = t->isEnabled() && tb->isEnabled(); TQPixmap pixmap; - if(!KApplicationMode) { + if(!TDEApplicationMode) { TQIconSet::Mode mode = (t->identifier() && tb->keyboardFocusTab()) ? TQIconSet::Active : TQIconSet::Normal; pixmap = t->iconSet()->pixmap( TQIconSet::Small, mode ); if(!enabled) @@ -5690,7 +5690,7 @@ void DominoStyle::drawControl(ControlElement element, // Select the correct icon from the iconset TQPixmap pixmap; - if(KApplicationMode) { + if(TDEApplicationMode) { if (active) mode = enabled ? TQIconSet::Active : TQIconSet::Disabled; else @@ -5873,7 +5873,7 @@ void DominoStyle::drawControl(ControlElement element, break; } default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + TDEStyle::drawControl(element, p, widget, r, cg, flags, opt); } } @@ -5898,7 +5898,7 @@ void DominoStyle::drawControlMask(ControlElement element, } default: { break; - //KStyle::drawControlMask (element, p, w, r, opt); + //TDEStyle::drawControlMask (element, p, w, r, opt); } } } @@ -5917,7 +5917,7 @@ void DominoStyle::drawComplexControl(ComplexControl control, const bool enabled = (flags & Style_Enabled); - //return KStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); + //return TDEStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); switch(control) { @@ -5934,7 +5934,7 @@ void DominoStyle::drawComplexControl(ComplexControl control, const TQColor bg = (cb && cb->parentWidget()) ? cb->parentWidget()->paletteBackgroundColor() : cg.background(); bool hasPixmap = cb && cb->count() > 0 && cb->pixmap(cb->currentItem()); uint contourFlags = 0; - bool isKhtmlWidget = khtmlWidgets.contains(cb); + bool isKhtmlWidget = tdehtmlWidgets.contains(cb); if(isKhtmlWidget || (cb && cb->parentWidget() && cb->parentWidget()->paletteBackgroundPixmap())) { contourFlags |= Draw_AlphaBlend; @@ -6059,14 +6059,14 @@ void DominoStyle::drawComplexControl(ComplexControl control, TQToolButton *tb = (TQToolButton *) widget; - if(_toolBtnAsBtn && ::tqt_cast<KToolBarButton*>(tb)) { + if(_toolBtnAsBtn && ::tqt_cast<TDEToolBarButton*>(tb)) { const bool reverse = TQApplication::reverseLayout(); - KToolBar *bar = dynamic_cast<KToolBar*>(tb->parentWidget()); + TDEToolBar *bar = dynamic_cast<TDEToolBar*>(tb->parentWidget()); if(!bar) break; - KToolBarButton* btn = ::tqt_cast<KToolBarButton*>(tb); - KToolBarButton* prevBtn = 0; - KToolBarButton* nextBtn = 0; + TDEToolBarButton* btn = ::tqt_cast<TDEToolBarButton*>(tb); + TDEToolBarButton* prevBtn = 0; + TDEToolBarButton* nextBtn = 0; bool prevBtnIsOn = false; bool nextBtnIsOn = false; bool isOn = flags &Style_On || flags &Style_Down; @@ -6382,7 +6382,7 @@ void DominoStyle::drawComplexControl(ComplexControl control, btn->erase(); } - else if(_toolBtnAsBtn) { // not a KToolBarButton + else if(_toolBtnAsBtn) { // not a TDEToolBarButton if(kickerMode && !(flags&(Style_Raised))) break; @@ -6417,7 +6417,7 @@ void DominoStyle::drawComplexControl(ComplexControl control, else if(flags & Style_Default) buttonContour->setState(Contour_DefaultButton); - renderButton(p, br, g, (flags & Style_On || flags & Style_Down), flags & Style_MouseOver, true, enabled, khtmlWidgets.contains(opt.widget()) ); + renderButton(p, br, g, (flags & Style_On || flags & Style_Down), flags & Style_MouseOver, true, enabled, tdehtmlWidgets.contains(opt.widget()) ); buttonContour->reset(); @@ -6439,7 +6439,7 @@ void DominoStyle::drawComplexControl(ComplexControl control, } else { - bool isKbtn = ::tqt_cast<KToolBarButton*>(tb); + bool isKbtn = ::tqt_cast<TDEToolBarButton*>(tb); TQPixmap buffer(tb->size()); TQPainter painter(&buffer); @@ -6773,7 +6773,7 @@ void DominoStyle::drawComplexControl(ComplexControl control, break; } default: - KStyle::drawComplexControl(control, p, widget, + TDEStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; @@ -6816,7 +6816,7 @@ TQRect DominoStyle::subRect(SubRect r, const TQWidget *widget) const case SR_CheckBoxFocusRect: { TQRect cr = subRect(SR_CheckBoxContents, widget); - TQRect fr = KStyle::subRect(r, widget); + TQRect fr = TDEStyle::subRect(r, widget); if(cr.width() <= 0) // no text fr.setHeight(fr.height()+2); else @@ -6826,7 +6826,7 @@ TQRect DominoStyle::subRect(SubRect r, const TQWidget *widget) const case SR_RadioButtonFocusRect: { TQRect cr = subRect(SR_CheckBoxContents, widget); - TQRect fr = KStyle::subRect(r, widget); + TQRect fr = TDEStyle::subRect(r, widget); if(cr.width() <= 0) // no text fr.setHeight(fr.height()+2); else @@ -6846,7 +6846,7 @@ TQRect DominoStyle::subRect(SubRect r, const TQWidget *widget) const return TQRect(rw.left()+18, rw.top(), rw.width()-18, rw.height()); } default: { - return KStyle::subRect(r, widget); + return TDEStyle::subRect(r, widget); } } } @@ -6868,7 +6868,7 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control, switch (subcontrol) { case SC_ComboBoxEditField: { const TQComboBox* cb = dynamic_cast<const TQComboBox *>(widget); - if(!cb) // maybe kdevelop's KComboView + if(!cb) // maybe tdevelop's KComboView return TQRect(r.left()+4, r.top()+3, r.width()-4-15-3, r.height()-7); if(!cb->editable()) return TQRect(r.left()+3, r.top()+3, r.width()-4-15-2, r.height()-6); @@ -6876,7 +6876,7 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control, return TQRect(r.left()+3, r.top()+3, r.width()-4-15-2, r.height()-7); } default: { - return KStyle::querySubControlMetrics(control, widget, subcontrol, opt); + return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt); } } break; @@ -6908,7 +6908,7 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control, return TQRect(buttonsLeft, r.top()+2, buttonsWidth, r.height()-5); } default: { - return KStyle::querySubControlMetrics(control, widget, subcontrol, opt); + return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt); } } break; @@ -6973,14 +6973,14 @@ TQRect DominoStyle::querySubControlMetrics(ComplexControl control, } } default: { - return KStyle::querySubControlMetrics(control, widget, subcontrol, opt); + return TDEStyle::querySubControlMetrics(control, widget, subcontrol, opt); } } } int DominoStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const { - //return KStyle::pixelMetric(m, widget); + //return TDEStyle::pixelMetric(m, widget); switch(m) { // FRAMES @@ -7123,7 +7123,7 @@ int DominoStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const // case PM_PopupMenuFrameHorizontalExtra: // return 1; default: - return KStyle::pixelMetric(m, widget); + return TDEStyle::pixelMetric(m, widget); } } @@ -7133,7 +7133,7 @@ TQSize DominoStyle::sizeFromContents(ContentsType t, const TQSize &s, const TQStyleOption &opt) const { - //return KStyle::sizeFromContents (t, widget, s, opt); + //return TDEStyle::sizeFromContents (t, widget, s, opt); switch (t) { @@ -7189,7 +7189,7 @@ TQSize DominoStyle::sizeFromContents(ContentsType t, if((dots*minTabLength+44)*count >= tb->width()) // 44 = frame+iconwidth return TQSize(s.width(), s.height()); - TQSize sz = KStyle::sizeFromContents( t, widget, s, opt ); + TQSize sz = TDEStyle::sizeFromContents( t, widget, s, opt ); TQString str; str.fill(' ', minTabLength); @@ -7217,16 +7217,16 @@ TQSize DominoStyle::sizeFromContents(ContentsType t, return TQSize( s.width()+9, s.height()+7 ); return TQSize( s.width()+11, s.height()+7 ); } - return KStyle::sizeFromContents (t, widget, s, opt); // KMultiTabBar buttons + return TDEStyle::sizeFromContents (t, widget, s, opt); // KMultiTabBar buttons } case CT_SpinBox: { - TQSize sz = KStyle::sizeFromContents( t, widget, s, opt ); + TQSize sz = TDEStyle::sizeFromContents( t, widget, s, opt ); int h = sz.height()%2 != 0 ? sz.height()+1 : sz.height(); return ( TQSize( sz.width(), h < 24 ? 24 : h) ); } case CT_Header: { - TQSize sz = KStyle::sizeFromContents( t, widget, s, opt ); + TQSize sz = TDEStyle::sizeFromContents( t, widget, s, opt ); return TQSize(sz.width(), sz.height()-2); } @@ -7292,10 +7292,10 @@ TQSize DominoStyle::sizeFromContents(ContentsType t, return TQSize(w, h); } default: - return KStyle::sizeFromContents (t, widget, s, opt); + return TDEStyle::sizeFromContents (t, widget, s, opt); } - return KStyle::sizeFromContents (t, widget, s, opt); + return TDEStyle::sizeFromContents (t, widget, s, opt); } int DominoStyle::styleHint( StyleHint stylehint, @@ -7335,7 +7335,7 @@ int DominoStyle::styleHint( StyleHint stylehint, return '*'; } default: - return KStyle::styleHint(stylehint, widget, option, returnData); + return TDEStyle::styleHint(stylehint, widget, option, returnData); } } @@ -7352,7 +7352,7 @@ TQPixmap DominoStyle::stylePixmap(StylePixmap stylepixmap, const TQWidget* widge case SP_TitleBarNormalButton: return TQPixmap(qembed_findImage("ToDesktopButton").copy(0,0,12,12)); default: - return KStyle::stylePixmap(stylepixmap, widget, opt); + return TDEStyle::stylePixmap(stylepixmap, widget, opt); } } diff --git a/domino/domino.h b/domino/domino.h index 9142482..115748e 100644 --- a/domino/domino.h +++ b/domino/domino.h @@ -21,7 +21,7 @@ Copyright (C) 2000 Daniel M. Duley <[email protected]> (C) 2000 Dirk Mueller <[email protected]> (C) 2001 Martijn Klingens <[email protected]> - Progressbar code based on KStyle, + Progressbar code based on TDEStyle, Copyright (C) 2001-2002 Karol Szwed <[email protected]> This library is free software; you can redistribute it and/or @@ -41,9 +41,9 @@ #ifndef __DOMINO_H #define __DOMINO_H -#include <kstyle.h> +#include <tdestyle.h> #include <tqintcache.h> -#include <ktoolbarbutton.h> +#include <tdetoolbarbutton.h> #include "misc.h" #include "data.h" #include <tqpixmapcache.h> @@ -92,7 +92,7 @@ class Rubber; }; -class DominoStyle : public KStyle +class DominoStyle : public TDEStyle { Q_OBJECT @@ -113,7 +113,7 @@ public: void polish( TQPalette &p ); void unPolish(TQWidget* widget ); - void drawKStylePrimitive(KStylePrimitive kpe, + void drawTDEStylePrimitive(TDEStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -334,7 +334,7 @@ protected: bool mouseOver = false, bool horizontal = true, bool enabled = true, - bool khtmlMode = false) const; + bool tdehtmlMode = false) const; void renderHeader(TQPainter *p, const TQRect &r, @@ -397,7 +397,7 @@ protected: TQPixmap* popupFrame; TQPixmap* border1; mutable bool alphaButtonMode; - bool KApplicationMode; + bool TDEApplicationMode; TQColor _checkMarkColor; TQMap<const TQGroupBox*, const TQPixmap*> groupBoxPixmaps; @@ -407,7 +407,7 @@ protected: TQPoint popupMousePressPos; protected slots: - void khtmlWidgetDestroyed(TQObject* w); + void tdehtmlWidgetDestroyed(TQObject* w); void groupBoxDestroyed(TQObject* w); //Animation slots. @@ -470,8 +470,8 @@ private: bool hoveredToolBoxTab; - // track khtml widgets. - TQMap<const TQWidget*,bool> khtmlWidgets; + // track tdehtml widgets. + TQMap<const TQWidget*,bool> tdehtmlWidgets; //Animation support. TQMap<TQWidget*, int> progAnimWidgets; @@ -817,11 +817,11 @@ class DominoTQWhatsThat : public TQWidget TQString text; }; -class DominoKToolBarButton : public KToolBarButton +class DominoKToolBarButton : public TDEToolBarButton { friend class DominoStyle; public: - DominoKToolBarButton(): KToolBarButton() {} + DominoKToolBarButton(): TDEToolBarButton() {} }; class DominoTQListBoxItem : public TQListBoxItem diff --git a/domino/domino.themerc b/domino/domino.themerc index 30ae7f5..91093c5 100644 --- a/domino/domino.themerc +++ b/domino/domino.themerc @@ -2,6 +2,6 @@ Name=Domino Comment=A style with customizable color gradients Comment[de]=Ein Stil mit anpassbaren Farbverl�ufen -ConfigPage=kstyle_domino_config +ConfigPage=tdestyle_domino_config [KDE] WidgetStyle=Domino diff --git a/domino/eventfilter.cpp b/domino/eventfilter.cpp index 69be358..d3ec418 100644 --- a/domino/eventfilter.cpp +++ b/domino/eventfilter.cpp @@ -27,12 +27,12 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) case TQEvent::Paint: { TQComboBox* cb = dynamic_cast<TQComboBox*>(obj); - bool khtmlWidget = khtmlWidgets.contains(cb); + bool tdehtmlWidget = tdehtmlWidgets.contains(cb); const TQColorGroup & g = cb->colorGroup(); TQPixmap buffer; TQPainter p; - if(khtmlWidget) + if(tdehtmlWidget) p.begin(cb); else { buffer.resize(cb->width(), cb->height()); @@ -42,7 +42,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) p.setFont(cb->font()); - if(!khtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){ + if(!tdehtmlWidget && cb->parentWidget() && cb->parentWidget()->backgroundPixmap()){ TQPoint point = cb->backgroundOffset(); p.drawTiledPixmap( 0, 0, cb->width(), cb->height(), @@ -154,7 +154,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) } } p.end(); - if(!khtmlWidget) { + if(!tdehtmlWidget) { p.begin(cb); p.drawPixmap(0, 0, buffer); } @@ -187,7 +187,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) return false; } case TQEvent::ApplicationPaletteChange: { - if(!khtmlWidgets.contains(static_cast<TQWidget*>(obj))) + if(!tdehtmlWidgets.contains(static_cast<TQWidget*>(obj))) setDominoButtonPalette(static_cast<TQWidget*>(obj), Palette_Application); return true; } @@ -219,11 +219,11 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) if (dynamic_cast<TQLineEdit*>(obj) || (dynamic_cast<TQFrame*>(obj) && dynamic_cast<TQFrame*>(obj)->frameShape() == TQFrame::LineEditPanel) || obj->isA("TQDateTimeEditor")) { TQWidget* lineEdit = dynamic_cast<TQWidget*>(obj); - bool khtmlMode = khtmlWidgets.contains(lineEdit); + bool tdehtmlMode = tdehtmlWidgets.contains(lineEdit); bool isLineEdit = dynamic_cast<TQLineEdit*>(obj); bool isReadOnly = isLineEdit && dynamic_cast<TQLineEdit*>(obj)->isReadOnly(); TQFrame* frame = dynamic_cast<TQFrame*>(obj); - if((isReadOnly || khtmlMode) && frame->frameWidth() <= 0) { + if((isReadOnly || tdehtmlMode) && frame->frameWidth() <= 0) { return false; } @@ -256,7 +256,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) switch(ev->type()) { case TQEvent::Show: - if(khtmlMode) + if(tdehtmlMode) return true; case TQEvent::Resize: { if(noFrame) return false; @@ -335,8 +335,8 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) // normal lineEdit const TQPixmap* parentBgPix = lineEdit->parentWidget() ? lineEdit->parentWidget()->paletteBackgroundPixmap() : 0; TQPixmap* lineEditEdges = 0; - if(khtmlMode || parentBgPix || !(lineEditEdges = TQPixmapCache::find(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges"))) { - if(khtmlMode) { + if(tdehtmlMode || parentBgPix || !(lineEditEdges = TQPixmapCache::find(TQString::number(bg.pixel(), 16)+TQString::number(cg.background().pixel(), 16)+"lEditEdges"))) { + if(tdehtmlMode) { TQPixmap insidePix = tintImage(qembed_findImage("lineedit4inside"), bg); bitBlt(lineEdit, x, y, &insidePix, 0, 0, 4, 4); @@ -379,7 +379,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) TQPixmap* lineEditPix = 0; - if(khtmlMode) + if(tdehtmlMode) p.begin(lineEdit); else { lineEditPix = new TQPixmap(w, h); @@ -422,7 +422,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) p.end(); - if(!khtmlMode) { + if(!tdehtmlMode) { if(isLineEdit) { // simply drawing the pixmap would be faster, but the problem with the base color as erase color for disabled lineEdits would remain. @@ -443,24 +443,24 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) case TQEvent::MouseButtonPress: case 6/*TQEvent::KeyPress*/: { // it will be reseted in TQLineEdit::mouseMoveEvent() - if(isLineEdit && !khtmlMode && isEnabled && !isReadOnly && !isDateTimeEditor) + if(isLineEdit && !tdehtmlMode && isEnabled && !isReadOnly && !isDateTimeEditor) static_cast<TQWidget*>(obj)->setCursor(TQt::blankCursor); return false; } case TQEvent::ApplicationPaletteChange: - if(!khtmlMode) { + if(!tdehtmlMode) { lineEdit->setBackgroundMode(TQWidget::PaletteBase); lineEdit->setPalette(tqApp->palette()); } return true; case TQEvent::ParentPaletteChange: - if(!khtmlMode) { + if(!tdehtmlMode) { lineEdit->setBackgroundMode(TQWidget::PaletteBase); lineEdit->setPalette(lineEdit->parentWidget()->palette()); } return true; case TQEvent::PaletteChange: - if(!khtmlMode) { + if(!tdehtmlMode) { lineEdit->setBackgroundMode(TQWidget::PaletteBase); lineEdit->setPalette(lineEdit->palette()); } @@ -507,7 +507,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) rubber->destroy(); } -#if KDE_VERSION >= 0x30506 +#if TDE_VERSION >= 0x30506 case TQEvent::Show: { char selectionName[64]; snprintf(selectionName, 64, "_NET_WM_CM_S%d", DefaultScreen(tqt_xdisplay())); @@ -1017,18 +1017,18 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) } return false; } - if(::tqt_cast<KToolBarButton*>(obj)) { + if(::tqt_cast<TDEToolBarButton*>(obj)) { switch(ev->type()) { case TQEvent::Paint: { - KToolBar *bar = dynamic_cast<KToolBar*>(obj->parent()); + TDEToolBar *bar = dynamic_cast<TDEToolBar*>(obj->parent()); if(!bar) return false; // KMyMoney2 - KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); + TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj); int index = bar->itemIndex(btn->id()); if(_toolBtnAsBtn && sideRepaint == false) { sideRepaint = true; - KToolBarButton* sideBtn; + TDEToolBarButton* sideBtn; if((sideBtn = bar->getButton(bar->idAt(index-1)))) { sideBtn->repaint(false); } @@ -1065,7 +1065,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) case TQEvent::MouseButtonPress: { if(((TQMouseEvent*)ev)->button() == TQt::RightButton) return false; - KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); + TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj); btn->setUpdatesEnabled(false); if(!btn->isOn()) btn->setOn(true); btn->setUpdatesEnabled(true); @@ -1075,7 +1075,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) case TQEvent::MouseButtonRelease: { if(((TQMouseEvent*)ev)->button() == TQt::RightButton) return false; - KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); + TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj); btn->setUpdatesEnabled(false); if(btn->isOn()) btn->setOn(false); btn->setUpdatesEnabled(true); @@ -1086,13 +1086,13 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) case TQEvent::MouseButtonDblClick: { if(((TQMouseEvent*)ev)->button() == TQt::RightButton) return false; - KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); + TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj); if(!btn->isOn()) btn->setOn(true); hoverWidget = 0; return false; } case TQEvent::Enter: { - KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); + TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj); if(btn->isEnabled()) { hoverWidget = btn; btn->repaint(false); @@ -1100,7 +1100,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) return false; } case TQEvent::Leave: { - KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); + TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj); if(btn == hoverWidget) { hoverWidget = 0; btn->repaint(false); @@ -1109,7 +1109,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) } case TQEvent::Move: { if(_toolBtnAsBtn) { - KToolBarButton* btn = dynamic_cast<KToolBarButton*>(obj); + TDEToolBarButton* btn = dynamic_cast<TDEToolBarButton*>(obj); btn->repaint(false); } return false; @@ -1149,7 +1149,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) drawControl(CE_RadioButton, &p, rb, TQRect(0,0,17,17), rb->palette().active(), flags); return true; } - if (ev->type() == TQEvent::Show && !strcmp(obj->name(), "__khtml")) { + if (ev->type() == TQEvent::Show && !strcmp(obj->name(), "__tdehtml")) { TQRadioButton* rb = static_cast<TQRadioButton*>(obj); TQBitmap bm(rb->size()); bm.fill(color0); @@ -1192,9 +1192,9 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) if (ev->type() == TQEvent::Paint) { TQCheckBox* cb = static_cast<TQCheckBox*>(obj); - bool khtmlWidget = !strcmp(obj->name(), "__khtml"); - if(khtmlWidget || cb->paletteBackgroundPixmap()) { - if(khtmlWidget) { + bool tdehtmlWidget = !strcmp(obj->name(), "__tdehtml"); + if(tdehtmlWidget || cb->paletteBackgroundPixmap()) { + if(tdehtmlWidget) { // this prevents the checkbox been erased before the rest of the html page TQBitmap bm(cb->size()); bm.fill(color0); @@ -1287,14 +1287,14 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) } case TQEvent::MouseMove: { TQMouseEvent* e = (TQMouseEvent*)ev; - if(dynamic_cast<TQToolButton*>(obj) && popupTimer->isActive() && ((e->pos()-popupMousePressPos).manhattanLength() > 4 /*KGlobalSettings::dndEventDelay()*/)) + if(dynamic_cast<TQToolButton*>(obj) && popupTimer->isActive() && ((e->pos()-popupMousePressPos).manhattanLength() > 4 /*TDEGlobalSettings::dndEventDelay()*/)) popupToolMenu(); return false; } case TQEvent::ParentPaletteChange: { if(obj->isA("TQToolButton")) { - if(w->parentWidget() && !khtmlWidgets.contains(w)) { + if(w->parentWidget() && !tdehtmlWidgets.contains(w)) { w->setUpdatesEnabled(false); if(w->parentWidget()->paletteBackgroundPixmap()) { w->setBackgroundOrigin(setPixmapOrigin(w->parentWidget()->backgroundOrigin())); @@ -1364,12 +1364,12 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) return false; } - if(dynamic_cast<KPopupTitle*>(obj)) { + if(dynamic_cast<TDEPopupTitle*>(obj)) { switch(ev->type()) { case TQEvent::Paint: { - KPopupTitle* pt = static_cast<KPopupTitle*>(obj); + TDEPopupTitle* pt = static_cast<TDEPopupTitle*>(obj); TQRect r = pt->rect(); TQPainter p(pt); @@ -1770,7 +1770,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) p.fillRect(r.width()-16, r.height()-16, 15, 15, tqApp->palette().active().background()); // 15x15 scrollview cornerwidget gap return true; } - else if(konquerorMode && f->isA("KHTMLView")) { + else if(konquerorMode && f->isA("TDEHTMLView")) { TQPainter p(f); p.setPen(tqApp->palette().active().background().dark(120)); p.drawRect(f->rect()); @@ -1796,7 +1796,7 @@ bool DominoStyle::eventFilter(TQObject *obj, TQEvent *ev) f->setMargin(0); TQWidget* w = f->parentWidget(); - for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm khtml_plugins + for(int i=0; i<3; i++) { // the third parentcheck is for the tabWidget on kcm tdehtml_plugins if(!w) break; if(dynamic_cast<TQGroupBox*>(w)) { f->setPaletteBackgroundColor(tqApp->palette().active().background()); |