diff options
Diffstat (limited to 'domino/domino.cpp')
-rw-r--r-- | domino/domino.cpp | 206 |
1 files changed, 103 insertions, 103 deletions
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 <mosfet@kde.org> (C) 2000 Dirk Mueller <mueller@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> 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); } } |