diff options
Diffstat (limited to 'kstyles')
24 files changed, 615 insertions, 615 deletions
diff --git a/kstyles/asteroid/asteroid.cpp b/kstyles/asteroid/asteroid.cpp index 362ebd1b5..59b37df83 100644 --- a/kstyles/asteroid/asteroid.cpp +++ b/kstyles/asteroid/asteroid.cpp @@ -20,7 +20,7 @@ #include <tqlistbox.h> #include <tqslider.h> #include <tqpushbutton.h> -#include <textedit.h> +#include <tqtextedit.h> #include <tqlineedit.h> #include <tqtoolbar.h> #include <tqcheckbox.h> @@ -108,7 +108,7 @@ void AsteroidStyle::polish(TQWidget *w) { /* Screwing with the palette is fun! and required in order to make it feel authentic. -clee */ - TQPalette wp = w->palette(); + TQPalette wp = w->tqpalette(); //wp.setColor(TQColorGroup::Dark, wp.active().color(TQColorGroup::Button).dark(350)); wp.setColor(TQColorGroup::Dark, TQColor(128, 128, 128)); wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to? @@ -149,10 +149,10 @@ void AsteroidStyle::unPolish(TQWidget *w) void AsteroidStyle::polish( TQApplication* app) { - TQPalette wp = TQApplication::palette(); + TQPalette wp = TQApplication::tqpalette(); wp.setColor(TQColorGroup::Dark, TQColor(128, 128, 128)); wp.setColor(TQColorGroup::Mid, wp.active().color(TQColorGroup::Button).dark(150)); // Which GUI element(s) does this correspond to? - TQApplication::setPalette( wp, TRUE ); + TQApplication::tqsetPalette( wp, TRUE ); } /*! \reimp @@ -289,7 +289,7 @@ void AsteroidStyle::drawKStylePrimitive(KStylePrimitive ksp, } } -int AsteroidStyle::styleHint( TQ_StyleHint stylehint, +int AsteroidStyle::tqstyleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -309,7 +309,7 @@ int AsteroidStyle::styleHint( TQ_StyleHint stylehint, return 1; default: - return KStyle::styleHint(stylehint, widget, option, returnData); + return KStyle::tqstyleHint(stylehint, widget, option, returnData); } } @@ -613,13 +613,13 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, p->drawPolygon(TQPointArray(24, outside)); } p->setPen(cg.mid()); - p->drawPolyline(TQPointArray(24, outside), 0, 12); + p->tqdrawPolyline(TQPointArray(24, outside), 0, 12); p->setPen(cg.light()); - p->drawPolyline(TQPointArray(24, outside), 12, 12); + p->tqdrawPolyline(TQPointArray(24, outside), 12, 12); p->setPen(cg.dark()); - p->drawPolyline(TQPointArray(20, inside), 0, 10); + p->tqdrawPolyline(TQPointArray(20, inside), 0, 10); p->setPen(cg.background()); - p->drawPolyline(TQPointArray(20, inside), 10, 10); + p->tqdrawPolyline(TQPointArray(20, inside), 10, 10); break; } @@ -907,8 +907,8 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } if (sf & Style_Down) { - p->translate(pixelMetric(PM_ButtonShiftHorizontal), - pixelMetric(PM_ButtonShiftVertical)); + p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), + tqpixelMetric(PM_ButtonShiftVertical)); } a.translate((x + w/2), (y + (h-1)/2)); @@ -916,8 +916,8 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, p->drawPoint(a[6]); if (sf & Style_Down) { - p->translate(-pixelMetric(PM_ButtonShiftHorizontal), - -pixelMetric(PM_ButtonShiftVertical)); + p->translate(-tqpixelMetric(PM_ButtonShiftHorizontal), + -tqpixelMetric(PM_ButtonShiftVertical)); } break; @@ -929,7 +929,7 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } } -void AsteroidStyle::drawControl(TQ_ControlElement ce, +void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -977,7 +977,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, bool lastTab = (tb->indexOf( t->identifier() ) == tb->count()-1) ? TRUE : FALSE; TQRect r2( r ); - if ( tb->shape() == TQTabBar::RoundedAbove ) { + if ( tb->tqshape() == TQTabBar::RoundedAbove ) { p->setPen( cg.light() ); p->drawLine( r2.left(), r2.bottom()-1, r2.right(), r2.bottom()-1 ); if ( r2.left() == 0 ) @@ -1015,8 +1015,8 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, x2++; p->drawLine( x2, r2.top() + 2, x2, r2.bottom() - (selected ? (lastTab ? 0:1) :2)); - } else if ( tb->shape() == TQTabBar::RoundedBelow ) { - bool rightAligned = styleHint( SH_TabBar_Alignment, tb ) == TQt::AlignRight; + } else if ( tb->tqshape() == TQTabBar::RoundedBelow ) { + bool rightAligned = tqstyleHint( SH_TabBar_Alignment, tb ) == TQt::AlignRight; bool firstTab = tb->indexOf( t->identifier() ) == 0; if ( selected ) { p->fillRect( TQRect( r2.left()+1, r2.top(), r2.width()-3, 1), @@ -1060,7 +1060,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, p->drawLine( r2.left(), r2.top() + (selected ? 0 : 2), r2.left(), r2.bottom() - 2 ); } else { - TQCommonStyle::drawControl(ce, p, w, r, cg, sf, o); + TQCommonStyle::tqdrawControl(ce, p, w, r, cg, sf, o); } break; } @@ -1074,16 +1074,16 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, TQTab * t = o.tab(); const bool enabled = sf & Style_Enabled; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); TQRect tr = r; if ( t->identifier() == tb->currentTab() ) tr.setBottom( tr.bottom() - - pixelMetric( TQStyle::PM_DefaultFrameWidth, tb ) ); + tqpixelMetric( TQStyle::PM_DefaultFrameWidth, tb ) ); - int alignment = TQt::AlignCenter | TQt::ShowPrefix; - if (!styleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) - alignment |= TQt::NoAccel; + int tqalignment = TQt::AlignCenter | TQt::ShowPrefix; + if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + tqalignment |= TQt::NoAccel; tr.setWidth(tr.width()+4); // Compensate for text appearing too far to the left // TQRect tr_offset = TQRect(tr.x()+ETCH_X_OFFSET, tr.y()+ETCH_Y_OFFSET, tr.width(), tr.height()); TQRect tr_offset = TQRect(tr.x()+0, tr.y()+0, tr.width(), tr.height()); @@ -1098,7 +1098,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.light() ); etchedcg.setColor( TQColorGroup::BrightText, cg.light() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.light() ); - drawItem( p, tr_offset, alignment, etchedcg, enabled, 0, t->text() ); + drawItem( p, tr_offset, tqalignment, etchedcg, enabled, 0, t->text() ); p->setPen( cg.dark() ); etchedcg.setColor( TQColorGroup::Text, cg.dark() ); etchedcg.setColor( TQColorGroup::Mid, cg.dark() ); @@ -1107,11 +1107,11 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.dark() ); etchedcg.setColor( TQColorGroup::BrightText, cg.dark() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.dark() ); - drawItem( p, tr, alignment, etchedcg, enabled, 0, t->text() ); + drawItem( p, tr, tqalignment, etchedcg, enabled, 0, t->text() ); p->setPen(savePen); } else { - drawItem( p, tr, alignment, cg, enabled, 0, t->text() ); + drawItem( p, tr, tqalignment, cg, enabled, 0, t->text() ); } if ( (sf & Style_HasFocus) && !t->text().isEmpty() ) @@ -1126,11 +1126,11 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, const TQCheckBox *checkbox = (const TQCheckBox *) w; const bool enabled = sf & Style_Enabled; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); - int alignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; - if (!styleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) - alignment |= TQt::NoAccel; + int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; + if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + tqalignment |= TQt::NoAccel; //TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height()); TQRect r_offset = TQRect(r.x()+0, r.y()+0, r.width(), r.height()); @@ -1145,7 +1145,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.light() ); etchedcg.setColor( TQColorGroup::BrightText, cg.light() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.light() ); - drawItem(p, r_offset, alignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); + drawItem(p, r_offset, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); p->setPen( cg.dark() ); etchedcg.setColor( TQColorGroup::Text, cg.dark() ); etchedcg.setColor( TQColorGroup::Mid, cg.dark() ); @@ -1154,15 +1154,15 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.dark() ); etchedcg.setColor( TQColorGroup::BrightText, cg.dark() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.dark() ); - drawItem(p, r, alignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); + drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); p->setPen(savePen); } else { - drawItem(p, r, alignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); + drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, sf & Style_Enabled, checkbox->pixmap(), checkbox->text()); } if (sf & Style_HasFocus) { - TQRect fr = visualRect(subRect(SR_CheckBoxFocusRect, w), w); + TQRect fr = tqvisualRect(subRect(SR_CheckBoxFocusRect, w), w); tqdrawPrimitive(TQStyle::PE_FocusRect, p, fr, cg, sf); } #endif @@ -1175,11 +1175,11 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, const TQRadioButton *radiobutton = (const TQRadioButton *) w; const bool enabled = sf & Style_Enabled; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); - int alignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; - if (!styleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) - alignment |= TQt::NoAccel; + int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; + if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + tqalignment |= TQt::NoAccel; // TQRect r_offset = TQRect(r.x()+ETCH_X_OFFSET, r.y()+ETCH_Y_OFFSET, r.width(), r.height()); TQRect r_offset = TQRect(r.x()+0, r.y()+0, r.width(), r.height()); @@ -1194,7 +1194,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.light() ); etchedcg.setColor( TQColorGroup::BrightText, cg.light() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.light() ); - drawItem(p, r_offset, alignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, enabled, radiobutton->pixmap(), radiobutton->text()); + drawItem(p, r_offset, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, enabled, radiobutton->pixmap(), radiobutton->text()); p->setPen( cg.dark() ); etchedcg.setColor( TQColorGroup::Text, cg.dark() ); etchedcg.setColor( TQColorGroup::Mid, cg.dark() ); @@ -1203,13 +1203,13 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, etchedcg.setColor( TQColorGroup::HighlightedText, cg.dark() ); etchedcg.setColor( TQColorGroup::BrightText, cg.dark() ); etchedcg.setColor( TQColorGroup::ButtonText, cg.dark() ); - drawItem(p, r, alignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, enabled, radiobutton->pixmap(), radiobutton->text()); + drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, etchedcg, enabled, radiobutton->pixmap(), radiobutton->text()); p->setPen(savePen); } - drawItem(p, r, alignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, enabled, radiobutton->pixmap(), radiobutton->text()); + drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, enabled, radiobutton->pixmap(), radiobutton->text()); if (sf & Style_HasFocus) { - TQRect fr = visualRect(subRect(SR_RadioButtonFocusRect, w), w); + TQRect fr = tqvisualRect(subRect(SR_RadioButtonFocusRect, w), w); tqdrawPrimitive(TQStyle::PE_FocusRect, p, fr, cg, sf); } #endif @@ -1343,7 +1343,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, bool focused = sf & Style_HasFocus; bool down = sf & Style_Down; bool enabled = sf & Style_Enabled; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | AlignHCenter | ShowPrefix | DontClip | SingleLine; if (active && focused) { @@ -1390,13 +1390,13 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, case CE_PushButtonLabel: { const TQPushButton *pb = dynamic_cast<const TQPushButton *>(w); const bool enabled = sf & Style_Enabled; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | AlignHCenter | ShowPrefix | DontClip | SingleLine; int dx = 0; if (sf & Style_Down) { - p->translate(pixelMetric(PM_ButtonShiftHorizontal), - pixelMetric(PM_ButtonShiftVertical)); + p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), + tqpixelMetric(PM_ButtonShiftVertical)); } if (pb->iconSet() && !pb->iconSet()->isNull()) { @@ -1425,7 +1425,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, } if (!pb->text().isNull()) { - p->setPen(POPUPMENUITEM_TEXT_ETCH_CONDITIONS?cg.dark():(enabled ? cg.buttonText() : pb->palette().disabled().buttonText())); + p->setPen(POPUPMENUITEM_TEXT_ETCH_CONDITIONS?cg.dark():(enabled ? cg.buttonText() : pb->tqpalette().disabled().buttonText())); if (pb->iconSet() && !pb->iconSet()->isNull()) { TQRect tpr(dx, r.y(), r.width()-dx, r.height()); TQRect tr(p->boundingRect(tpr, text_flags, pb->text())); @@ -1458,7 +1458,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, const TQHeader *hw = dynamic_cast<const TQHeader *>(w); int hs = o.headerSection(); const bool enabled = sf & Style_Enabled; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; TQIconSet *is = hw->iconSet(hs); @@ -1513,7 +1513,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, bool disabled = !mi->isEnabled(); bool checkable = pum->isCheckable(); bool enabled = mi->isEnabled(); - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); int xpos = x; int xm = itemFrame + checkcol + itemHMargin; @@ -1553,7 +1553,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, pmr.moveCenter(cr.center()); if (backwards) - pmr = visualRect(pmr, r); + pmr = tqvisualRect(pmr, r); p->setPen(cg.highlightedText()); p->drawPixmap(pmr.topLeft(), pixmap); @@ -1572,7 +1572,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, TQRect rr = TQRect(xp, y, checkcol, sh); if (backwards) { - rr = visualRect(rr, r); + rr = tqvisualRect(rr, r); } tqdrawPrimitive(PE_CheckMark, p, rr, cg, cflags); @@ -1624,8 +1624,8 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, TQRect rr = TQRect(xp, y+m, tab, sh-(2*m)); TQRect rr_offset = TQRect(xp+ETCH_X_OFFSET, y+m+ETCH_Y_OFFSET, tab, sh-(2*m)); if (backwards) { - rr = visualRect(rr, r); - rr_offset = visualRect(rr_offset, r); + rr = tqvisualRect(rr, r); + rr_offset = tqvisualRect(rr_offset, r); } if POPUPMENUITEM_TEXT_ETCH_CONDITIONS { @@ -1642,8 +1642,8 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, TQRect rr = TQRect(xpos, y+m, sw-xm-tab+1, sh-(2*m)); TQRect rr_offset = TQRect(xpos+ETCH_X_OFFSET, y+m+ETCH_Y_OFFSET, sw-xm-tab+1, sh-(2*m)); if (backwards) { - rr = visualRect(rr, r); - rr_offset = visualRect(rr_offset, r); + rr = tqvisualRect(rr, r); + rr_offset = tqvisualRect(rr_offset, r); text_flags |= AlignRight; } @@ -1668,7 +1668,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, } if (mi->popup()) { - int dim = pixelMetric(PM_MenuButtonIndicator); + int dim = tqpixelMetric(PM_MenuButtonIndicator); xpos = x + sw - arrowHMargin - 2 * itemFrame - dim; @@ -1680,7 +1680,7 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, TQRect rr = TQRect(xpos, y + sh/2 - dim/2, dim, dim); if (backwards) - rr = visualRect(rr, r); + rr = tqvisualRect(rr, r); tqdrawPrimitive((backwards ? PE_ArrowLeft : PE_ArrowRight), p, rr, cg, Style_Enabled); } @@ -1688,12 +1688,12 @@ void AsteroidStyle::drawControl(TQ_ControlElement ce, } default: { - KStyle::drawControl(ce, p, w, r, cg, sf, o); + KStyle::tqdrawControl(ce, p, w, r, cg, sf, o); } } } -void AsteroidStyle::drawControlMask(TQ_ControlElement ce, +void AsteroidStyle::tqdrawControlMask(TQ_ControlElement ce, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1733,12 +1733,12 @@ void AsteroidStyle::drawControlMask(TQ_ControlElement ce, CE_HeaderLabel */ default: { - KStyle::drawControlMask(ce, p, w, r, o); + KStyle::tqdrawControlMask(ce, p, w, r, o); } } } -void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, +void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1762,7 +1762,7 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, case CC_ListView: { if ( sc & SC_ListView ) { - TQCommonStyle::drawComplexControl( cc, p, w, r, cg, sf, sc, sa, o ); + TQCommonStyle::tqdrawComplexControl( cc, p, w, r, cg, sf, sc, sa, o ); } if ( sc & ( SC_ListViewBranch | SC_ListViewExpand ) ) { if (o.isDefault()) @@ -1960,7 +1960,7 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, TQRect hr(sw - handle_offset-1, y+2, handle_width, sh-4); int hrx, hry, hrx2, hry2; hr.coords(&hrx, &hry, &hrx2, &hry2); - if (backwards) { hr = visualRect(hr, r); } + if (backwards) { hr = tqvisualRect(hr, r); } p->drawRect(hr); @@ -1991,7 +1991,7 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, pmr.moveBy(1, 1); } - if (backwards) { pmr = visualRect(pmr, r); } + if (backwards) { pmr = tqvisualRect(pmr, r); } p->setPen(cg.foreground()); p->drawPixmap(pmr.topLeft(), downArrow); @@ -2008,8 +2008,8 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, if ( toolbutton->backgroundMode() != TQt::PaletteButton ) c.setBrush( TQColorGroup::Button, toolbutton->paletteBackgroundColor() ); TQRect button, menuarea; - button = visualRect( querySubControlMetrics(cc, w, SC_ToolButton, o), w ); - menuarea = visualRect( querySubControlMetrics(cc, w, SC_ToolButtonMenu, o), w ); + button = tqvisualRect( querySubControlMetrics(cc, w, SC_ToolButton, o), w ); + menuarea = tqvisualRect( querySubControlMetrics(cc, w, SC_ToolButtonMenu, o), w ); SFlags bflags = sf; SFlags mflags = sf; @@ -2077,7 +2077,7 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, /* Turn these off for now */ // Draw the tickmarks /*if (controls & SC_SliderTickmarks) - TQCommonStyle::drawComplexControl(control, &p2, + TQCommonStyle::tqdrawComplexControl(control, &p2, r, cg, flags, SC_SliderTickmarks, sa, o);*/ // Draw the slider handle @@ -2126,12 +2126,12 @@ void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, default: { - KStyle::drawComplexControl(cc, p, w, r, cg, sf, sc, sa, o); + KStyle::tqdrawComplexControl(cc, p, w, r, cg, sf, sc, sa, o); } } } -void AsteroidStyle::drawComplexControlMask(TQ_ComplexControl cc, +void AsteroidStyle::tqdrawComplexControlMask(TQ_ComplexControl cc, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -2149,12 +2149,12 @@ void AsteroidStyle::drawComplexControlMask(TQ_ComplexControl cc, CC_ListView */ default: { - KStyle::drawComplexControlMask(cc, p, w, r, o); + KStyle::tqdrawComplexControlMask(cc, p, w, r, o); } } } -int AsteroidStyle::pixelMetric(PixelMetric pm, const TQWidget *w) const +int AsteroidStyle::tqpixelMetric(PixelMetric pm, const TQWidget *w) const { switch (pm) { /* PixelMetrics available are: @@ -2248,7 +2248,7 @@ int AsteroidStyle::pixelMetric(PixelMetric pm, const TQWidget *w) const if (w && w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { return 3; } else { - return KStyle::pixelMetric(pm, w); + return KStyle::tqpixelMetric(pm, w); } } @@ -2274,7 +2274,7 @@ int AsteroidStyle::pixelMetric(PixelMetric pm, const TQWidget *w) const return TQMAX( 4, TQApplication::globalStrut().width() ); default: { - return KStyle::pixelMetric(pm, w); + return KStyle::tqpixelMetric(pm, w); } } } @@ -2454,7 +2454,7 @@ TQSize AsteroidStyle::tqsizeFromContents(ContentsType ct, } case CT_ComboBox: { - int padding = (pixelMetric(PM_DefaultFrameWidth, w) * 2) + 1; + int padding = (tqpixelMetric(PM_DefaultFrameWidth, w) * 2) + 1; return TQSize(s.width() + 21, s.height() + padding); } diff --git a/kstyles/asteroid/asteroid.h b/kstyles/asteroid/asteroid.h index 7b513896b..e8516c6e1 100644 --- a/kstyles/asteroid/asteroid.h +++ b/kstyles/asteroid/asteroid.h @@ -42,7 +42,7 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - int styleHint(TQ_StyleHint, const TQWidget * = 0, + int tqstyleHint(TQ_StyleHint, const TQWidget * = 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn * = 0 ) const; @@ -53,7 +53,7 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - void drawControl(TQ_ControlElement, + void tqdrawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, @@ -61,13 +61,13 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - void drawControlMask(TQ_ControlElement, + void tqdrawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const; - void drawComplexControl(TQ_ComplexControl, + void tqdrawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, @@ -77,13 +77,13 @@ public: SCFlags active = SC_None, const TQStyleOption & = TQStyleOption::Default) const; - void drawComplexControlMask(TQ_ComplexControl, + void tqdrawComplexControlMask(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &r, const TQStyleOption & = TQStyleOption::Default) const; - int pixelMetric(PixelMetric, const TQWidget * = 0) const; + int tqpixelMetric(PixelMetric, const TQWidget * = 0) const; int kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) const; diff --git a/kstyles/highcolor/highcolor.cpp b/kstyles/highcolor/highcolor.cpp index f42ff4061..318b0f207 100644 --- a/kstyles/highcolor/highcolor.cpp +++ b/kstyles/highcolor/highcolor.cpp @@ -317,7 +317,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( sunken ) kDrawBeButton( p, x, y, w, h, cg, true, - &cg.brush(TQColorGroup::Mid) ); + &cg.tqbrush(TQColorGroup::Mid) ); else if ( flags & Style_MouseOver && !flat ) { TQBrush brush(cg.button().light(110)); @@ -367,7 +367,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, cg.button(), false); } else kDrawBeButton(p, x, y, w, h, cg, false, - &cg.brush(TQColorGroup::Button)); + &cg.tqbrush(TQColorGroup::Button)); break; } @@ -764,7 +764,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_WindowFrame: case PE_PanelLineEdit: { bool sunken = flags & Style_Sunken; - int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw == 2) { @@ -799,7 +799,7 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_PanelDockWindow: { // Toolbar int x2 = r.x()+r.width()-1; int y2 = r.y()+r.height()-1; - int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw) @@ -893,8 +893,8 @@ void HighColorStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, p->save(); if ( flags & Style_Down ) - p->translate( pixelMetric( PM_ButtonShiftHorizontal ), - pixelMetric( PM_ButtonShiftVertical ) ); + p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), + tqpixelMetric( PM_ButtonShiftVertical ) ); if ( flags & Style_Enabled ) { a.translate( r.x() + r.width() / 2, r.y() + r.height() / 2 ); @@ -1096,7 +1096,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe, } -void HighColorStyle::drawControl( TQ_ControlElement element, +void HighColorStyle::tqdrawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1119,7 +1119,7 @@ void HighColorStyle::drawControl( TQ_ControlElement element, if ( btnDefault || button->autoDefault() ) { // Compensate for default indicator - static int di = pixelMetric( PM_ButtonDefaultIndicator ); + static int di = tqpixelMetric( PM_ButtonDefaultIndicator ); br.addCoords( di, di, -di, -di ); } @@ -1145,14 +1145,14 @@ void HighColorStyle::drawControl( TQ_ControlElement element, // Shift button contents if pushed. if ( active ) { - x += pixelMetric(PM_ButtonShiftHorizontal, widget); - y += pixelMetric(PM_ButtonShiftVertical, widget); + x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); + y += tqpixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = pixelMetric( PM_MenuButtonIndicator, widget ); + int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); tqdrawPrimitive( PE_ArrowDown, p, TQRect(x + w - dx - 2, y + 2, dx, h - 4), cg, flags, opt ); w -= dx; @@ -1193,25 +1193,25 @@ void HighColorStyle::drawControl( TQ_ControlElement element, if (button->isEnabled()) // Don't draw double-shadow when disabled for(i=0; i<2; i++) drawItem( p, TQRect(x+i+1, y+1, w, h), AlignCenter | ShowPrefix, - button->colorGroup(), button->isEnabled(), NULL, + button->tqcolorGroup(), button->isEnabled(), NULL, button->text(), -1, - active ? &button->colorGroup().dark() : &button->colorGroup().mid() ); + active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() ); // Normal Text for(i=0; i<2; i++) drawItem( p, TQRect(x+i, y, w, h), AlignCenter | ShowPrefix, - button->colorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL, + button->tqcolorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL, button->text(), -1, - active ? &button->colorGroup().light() : &button->colorGroup().buttonText() ); + active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() ); } else - drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(), + drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->tqcolorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, - active ? &button->colorGroup().light() : &button->colorGroup().buttonText() ); + active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() ); // Draw a focus rect if the button has focus if ( flags & Style_HasFocus ) tqdrawPrimitive( PE_FocusRect, p, - TQStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget), + TQStyle::tqvisualRect(subRect(SR_PushButtonFocusRect, widget), widget), cg, flags ); break; } @@ -1297,7 +1297,7 @@ void HighColorStyle::drawControl( TQ_ControlElement element, bool enabled = mi->isEnabled(); bool checkable = popupmenu->isCheckable(); bool active = flags & Style_Active; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); bool reverse = TQApplication::reverseLayout(); int x, y, w, h; r.rect( &x, &y, &w, &h ); @@ -1328,7 +1328,7 @@ void HighColorStyle::drawControl( TQ_ControlElement element, // Do we have an icon? if ( mi->iconSet() ) { TQIconSet::Mode mode; - TQRect cr = visualRect( TQRect(x, y, checkcol, h), r ); + TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r ); // Select the correct icon from the iconset if ( active ) @@ -1463,8 +1463,8 @@ void HighColorStyle::drawControl( TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = pixelMetric(PM_MenuButtonIndicator); - TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, + int dim = tqpixelMetric(PM_MenuButtonIndicator); + TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, y + h / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -1484,12 +1484,12 @@ void HighColorStyle::drawControl( TQ_ControlElement element, } default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } } -void HighColorStyle::drawControlMask( TQ_ControlElement element, +void HighColorStyle::tqdrawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1510,12 +1510,12 @@ void HighColorStyle::drawControlMask( TQ_ControlElement element, } default: - KStyle::drawControlMask(element, p, widget, r, opt); + KStyle::tqdrawControlMask(element, p, widget, r, opt); } } -void HighColorStyle::drawComplexControl( TQ_ComplexControl control, +void HighColorStyle::tqdrawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1566,7 +1566,7 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control, p->drawLine(x+1, y+2, x+1, y2-2); // Get the button bounding box - TQRect ar = TQStyle::visualRect( + TQRect ar = TQStyle::tqvisualRect( querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow), widget ); @@ -1585,7 +1585,7 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control, if ( controls & SC_ComboBoxEditField ) { const TQComboBox * cb = (const TQComboBox *) widget; - TQRect re = TQStyle::visualRect( + TQRect re = TQStyle::tqvisualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField), widget ); @@ -1609,7 +1609,7 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control, p->fillRect( re.x(), re.y(), re.width(), re.height(), cg.brush( TQColorGroup::Highlight ) ); - TQRect re = TQStyle::visualRect( + TQRect re = TQStyle::tqvisualRect( subRect(SR_ComboBoxFocusRect, cb), widget); tqdrawPrimitive( PE_FocusRect, p, re, cg, @@ -1697,14 +1697,14 @@ void HighColorStyle::drawComplexControl( TQ_ComplexControl control, default: - KStyle::drawComplexControl(control, p, widget, + KStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; } } -void HighColorStyle::drawComplexControlMask( TQ_ComplexControl control, +void HighColorStyle::tqdrawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1726,7 +1726,7 @@ void HighColorStyle::drawComplexControlMask( TQ_ComplexControl control, } default: - KStyle::drawComplexControlMask(control, p, widget, r, opt); + KStyle::tqdrawComplexControlMask(control, p, widget, r, opt); } } @@ -1769,11 +1769,11 @@ TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const int dbw1 = 0, dbw2 = 0; if (button->isDefault() || button->autoDefault()) { - dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget); + dbw1 = tqpixelMetric(PM_ButtonDefaultIndicator, widget); dbw2 = dbw1 * 2; } - int dfw1 = pixelMetric(PM_DefaultFrameWidth, widget) * 2, + int dfw1 = tqpixelMetric(PM_DefaultFrameWidth, widget) * 2, dfw2 = dfw1 * 2; return TQRect(wrect.x() + dfw1 + dbw1 + 1, @@ -1785,7 +1785,7 @@ TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const } -int HighColorStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const +int HighColorStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const { switch(m) { @@ -1818,7 +1818,7 @@ int HighColorStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const } default: - return KStyle::pixelMetric(m, widget); + return KStyle::tqpixelMetric(m, widget); } } @@ -1836,8 +1836,8 @@ TQSize HighColorStyle::tqsizeFromContents( ContentsType contents, const TQPushButton* button = (const TQPushButton*) widget; int w = contentSize.width(); int h = contentSize.height(); - int bm = pixelMetric( PM_ButtonMargin, widget ); - int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int bm = tqpixelMetric( PM_ButtonMargin, widget ); + int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; w += bm + fw + 6; // ### Add 6 to make way for bold font. h += bm + fw; @@ -1849,7 +1849,7 @@ TQSize HighColorStyle::tqsizeFromContents( ContentsType contents, if ( type != HighColor ) { // Compensate for default indicator - int di = pixelMetric( PM_ButtonDefaultIndicator ); + int di = tqpixelMetric( PM_ButtonDefaultIndicator ); w += di * 2; h += di * 2; } @@ -1926,7 +1926,7 @@ TQSize HighColorStyle::tqsizeFromContents( ContentsType contents, } -// Fix Qt's wacky image alignment +// Fix Qt's wacky image tqalignment TQPixmap HighColorStyle::stylePixmap(StylePixmap stylepixmap, const TQWidget* widget, const TQStyleOption& opt) const @@ -1958,12 +1958,12 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event ) if ( (event->type() == TQEvent::Enter) && (button->isEnabled()) ) { hoverWidget = button; - button->repaint( false ); + button->tqrepaint( false ); } else if ( (event->type() == TQEvent::Leave) && (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget)) ) { hoverWidget = 0L; - button->repaint( false ); + button->tqrepaint( false ); } } else if ( object->parent() && !qstrcmp( object->name(), kdeToolbarWidget ) ) { @@ -1992,7 +1992,7 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event ) if (tb) horiz_grad = tb->orientation() == Qt::Vertical; TQPainter p( widget ); - renderGradient(&p, r, parent->colorGroup().button(), horiz_grad, + renderGradient(&p, r, parent->tqcolorGroup().button(), horiz_grad, x_offset, y_offset, pr.width(), pr.height()); return false; // Now draw the contents @@ -2006,11 +2006,11 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event ) TQWidget *widget = TQT_TQWIDGET(object); TQRect wr = widget->rect(), tr = toolbar->rect(); TQPainter p( widget ); - renderGradient(&p, wr, toolbar->colorGroup().button(), + renderGradient(&p, wr, toolbar->tqcolorGroup().button(), toolbar->orientation() == Qt::Vertical, wr.x(), wr.y(), tr.width() - 2, tr.height() - 2); - p.setPen( toolbar->colorGroup().dark() ); + p.setPen( toolbar->tqcolorGroup().dark() ); if ( toolbar->orientation() == Qt::Horizontal ) p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 ); else diff --git a/kstyles/highcolor/highcolor.h b/kstyles/highcolor/highcolor.h index ff0fce2d7..14f9056e5 100644 --- a/kstyles/highcolor/highcolor.h +++ b/kstyles/highcolor/highcolor.h @@ -86,7 +86,7 @@ class HighColorStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControl( TQ_ControlElement element, + void tqdrawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -94,13 +94,13 @@ class HighColorStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControlMask( TQ_ControlElement element, + void tqdrawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControl( TQ_ComplexControl control, + void tqdrawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -110,7 +110,7 @@ class HighColorStyle : public KStyle SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControlMask( TQ_ComplexControl control, + void tqdrawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -126,7 +126,7 @@ class HighColorStyle : public KStyle int len = -1, const TQColor *penColor = 0 ) const; - int pixelMetric( PixelMetric m, + int tqpixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; TQSize tqsizeFromContents( ContentsType contents, diff --git a/kstyles/highcontrast/config/highcontrastconfig.cpp b/kstyles/highcontrast/config/highcontrastconfig.cpp index 08baa83bc..233fb7365 100644 --- a/kstyles/highcontrast/config/highcontrastconfig.cpp +++ b/kstyles/highcontrast/config/highcontrastconfig.cpp @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. */ #include <tqcheckbox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqsettings.h> #include <kdialog.h> #include <kglobal.h> diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp index e6c3be350..732a566c6 100644 --- a/kstyles/highcontrast/highcontrast.cpp +++ b/kstyles/highcontrast/highcontrast.cpp @@ -706,13 +706,13 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, } case KPE_ListViewExpander: { - // TODO There is no pixelMetric associated with the + // TODO There is no tqpixelMetric associated with the // ListViewExpander in KStyle. // To have a properly large expander, the CC_ListView case of - // drawComplexControl should be handled. + // tqdrawComplexControl should be handled. // Probably it would be better to add a KPM_ListViewExpander metric // to the KStyle KStylePixelMetric enum, and have the KStyle - // drawComplexControl handle it. + // tqdrawComplexControl handle it. TQ_PrimitiveElement direction; if (flags & Style_On) { // Collapsed = On direction = PE_ArrowRight; @@ -733,7 +733,7 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe, } -void HighContrastStyle::drawControl (TQ_ControlElement element, +void HighContrastStyle::tqdrawControl (TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -759,9 +759,9 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, drawRoundRect (p, r); const TQTabBar *tb = static_cast< const TQTabBar * >(widget); - TQTabBar::Shape shape = tb->shape(); - if (shape == TQTabBar::TriangularBelow || - shape == TQTabBar::RoundedBelow) { + TQTabBar::Shape tqshape = tb->tqshape(); + if (tqshape == TQTabBar::TriangularBelow || + tqshape == TQTabBar::RoundedBelow) { p->fillRect (r.left(), r.top(), r.width(), 2*basicLineWidth, p->pen().color()); @@ -793,7 +793,7 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, if (( btnDefault || button->autoDefault() ) && (button->isEnabled())) { // Compensate for default indicator - static int di = pixelMetric( PM_ButtonDefaultIndicator ); + static int di = tqpixelMetric( PM_ButtonDefaultIndicator ); addOffset (&br, di); } @@ -864,7 +864,7 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, // Does the button have a popup menu? if (popup) { - int dx = pixelMetric (PM_MenuButtonIndicator, widget); + int dx = tqpixelMetric (PM_MenuButtonIndicator, widget); drawArrow (p, TQRect(x + w - dx - 2, y + 2, dx, h - 4), PE_ArrowDown); w -= dx; } @@ -1013,7 +1013,7 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, // Do we have an icon? if ( mi->iconSet() && !mi->iconSet()->isNull() ) { TQIconSet::Mode mode; - TQRect cr = visualRect( TQRect(x, y, checkcol, h), r ); + TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r ); // Select the correct icon from the iconset if (!(flags & Style_Enabled)) @@ -1122,8 +1122,8 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = pixelMetric(PM_MenuButtonIndicator); - TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, + int dim = tqpixelMetric(PM_MenuButtonIndicator); + TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, y + h / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -1133,11 +1133,11 @@ void HighContrastStyle::drawControl (TQ_ControlElement element, } default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } } -void HighContrastStyle::drawControlMask (TQ_ControlElement element, +void HighContrastStyle::tqdrawControlMask (TQ_ControlElement element, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1161,7 +1161,7 @@ void HighContrastStyle::drawControlMask (TQ_ControlElement element, } default: { - KStyle::drawControlMask (element, p, w, r, opt); + KStyle::tqdrawControlMask (element, p, w, r, opt); } } } @@ -1180,7 +1180,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, +void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1201,7 +1201,7 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, setColorsText (p, cg, flags); drawRoundRect (p, r); - TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget); + TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget); if (flags & Style_HasFocus) { TQRect r3 (r); if (r2.left() > 0) @@ -1236,12 +1236,12 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, setColorsButton (p, cg, flags); // Draw arrows if required if (controls & SC_SpinWidgetDown) { - TQRect r2 = TQStyle::visualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetDown), widget); + TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetDown), widget); drawRoundRect (p, r2); drawArrow (p, r2, PE_SpinWidgetDown, 2*basicLineWidth); } if (controls & SC_SpinWidgetUp) { - TQRect r2 = TQStyle::visualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetUp), widget); + TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetUp), widget); drawRoundRect (p, r2); drawArrow (p, r2, PE_SpinWidgetUp, 2*basicLineWidth); } @@ -1316,7 +1316,7 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, // Paint the icon and text. if ( controls & SC_ListView ) - TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); // If we're have a branch or are expanded... if ( controls & (SC_ListViewBranch | SC_ListViewExpand) ) @@ -1462,13 +1462,13 @@ void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, } default: - KStyle::drawComplexControl(control, p, widget, + KStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; } } -void HighContrastStyle::drawComplexControlMask(TQ_ComplexControl c, +void HighContrastStyle::tqdrawComplexControlMask(TQ_ComplexControl c, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1482,7 +1482,7 @@ void HighContrastStyle::drawComplexControlMask(TQ_ComplexControl c, break; } default: { - KStyle::drawComplexControlMask (c, p, w, r, o); + KStyle::tqdrawComplexControlMask (c, p, w, r, o); } } } @@ -1519,7 +1519,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, switch (control) { case CC_ComboBox : { - int arrow = pixelMetric (PM_ScrollBarExtent, widget); + int arrow = tqpixelMetric (PM_ScrollBarExtent, widget); switch (subcontrol) { case SC_ComboBoxFrame: @@ -1535,7 +1535,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, break; } case CC_SpinWidget : { - int arrow = pixelMetric (PM_ScrollBarExtent, 0); + int arrow = tqpixelMetric (PM_ScrollBarExtent, 0); switch (subcontrol) { case SC_SpinWidgetFrame: @@ -1563,7 +1563,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, } -int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const +int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const { //### TODO: Use the tab metrics changes from Ker. switch(m) @@ -1647,7 +1647,7 @@ int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const } default: - return KStyle::pixelMetric(m, widget); + return KStyle::tqpixelMetric(m, widget); } } @@ -1676,8 +1676,8 @@ TQSize HighContrastStyle::tqsizeFromContents( ContentsType contents, const TQPushButton* button = (const TQPushButton*) widget; int w = contentSize.width(); int h = contentSize.height(); - int bm = pixelMetric( PM_ButtonMargin, widget ); - int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int bm = tqpixelMetric( PM_ButtonMargin, widget ); + int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; w += bm + fw + 6; // ### Add 6 to make way for bold font. h += bm + fw; @@ -1688,7 +1688,7 @@ TQSize HighContrastStyle::tqsizeFromContents( ContentsType contents, w = 80; // Compensate for default indicator - int di = pixelMetric( PM_ButtonDefaultIndicator ); + int di = tqpixelMetric( PM_ButtonDefaultIndicator ); w += di * 2; h += di * 2; } @@ -1713,7 +1713,7 @@ TQSize HighContrastStyle::tqsizeFromContents( ContentsType contents, case CT_ComboBox: { const TQComboBox *cb = static_cast< const TQComboBox* > (widget); int borderSize = (cb->editable() ? 4 : 2) * basicLineWidth; - int arrowSize = pixelMetric (PM_ScrollBarExtent, cb); + int arrowSize = tqpixelMetric (PM_ScrollBarExtent, cb); return TQSize(borderSize + basicLineWidth + arrowSize, borderSize) + contentSize; } @@ -1811,7 +1811,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) || widget->inherits (TQSPINWIDGET_OBJECT_NAME_STRING))) { hoverWidget = widget; - widget->repaint (false); + widget->tqrepaint (false); } else if (event->type() == TQEvent::Leave && (widget->inherits (TQBUTTON_OBJECT_NAME_STRING) @@ -1820,7 +1820,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) { if (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget)) hoverWidget = 0L; - widget->repaint (false); + widget->tqrepaint (false); } // Make sure the focus rectangle is shown correctly. else if (event->type() == TQEvent::FocusIn || event->type() == TQEvent::FocusOut) @@ -1834,9 +1834,9 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) } if (widgetparent) - widgetparent->repaint (false); + widgetparent->tqrepaint (false); else - widget->repaint (false); + widget->tqrepaint (false); } } diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h index 48a7c6e92..8967a0d4d 100644 --- a/kstyles/highcontrast/highcontrast.h +++ b/kstyles/highcontrast/highcontrast.h @@ -74,7 +74,7 @@ class HighContrastStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControl( TQ_ControlElement element, + void tqdrawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -82,13 +82,13 @@ class HighContrastStyle : public KStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControlMask( TQ_ControlElement element, + void tqdrawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControl( TQ_ComplexControl control, + void tqdrawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -98,7 +98,7 @@ class HighContrastStyle : public KStyle SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControlMask( TQ_ComplexControl control, + void tqdrawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -120,7 +120,7 @@ class HighContrastStyle : public KStyle int len = -1, const TQColor *penColor = 0 ) const; - int pixelMetric( PixelMetric m, + int tqpixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; int kPixelMetric( KStylePixelMetric m, diff --git a/kstyles/keramik/genembed.cpp b/kstyles/keramik/genembed.cpp index 60bcdf5ae..18608205d 100644 --- a/kstyles/keramik/genembed.cpp +++ b/kstyles/keramik/genembed.cpp @@ -27,7 +27,7 @@ DEALINGS IN THE SOFTWARE. #include <tqimage.h> #include <tqmap.h> #include <tqregexp.h> -#include <textstream.h> +#include <tqtextstream.h> #include <tqvaluevector.h> #include <kimageeffect.h> diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp index 8ebbe8683..2ca9ed360 100644 --- a/kstyles/keramik/keramik.cpp +++ b/kstyles/keramik/keramik.cpp @@ -147,8 +147,8 @@ namespace p->save(); /*if ( down ) - p->translate( pixelMetric( PM_ButtonShiftHorizontal ), - pixelMetric( PM_ButtonShiftVertical ) ); + p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), + tqpixelMetric( PM_ButtonShiftVertical ) ); */ if ( enabled ) { @@ -520,14 +520,14 @@ static void renderToolbarWidgetBackground(TQPainter* painter, const TQWidget* wi if (painter) { Keramik::GradientPainter::renderGradient( painter, widget->rect(), - widget->colorGroup().button(), horiz_grad, false, + widget->tqcolorGroup().button(), horiz_grad, false, x_offset, y_offset, toolWidth, toolHeight); } else { TQPainter p( widget ); Keramik::GradientPainter::renderGradient( &p, widget->rect(), - widget->colorGroup().button(), horiz_grad, false, + widget->tqcolorGroup().button(), horiz_grad, false, x_offset, y_offset, toolWidth, toolHeight); } } @@ -946,7 +946,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, //p->setPen( cg.shadow() ); //p->drawRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2); - //p->fillRect( visualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) ); + //p->fillRect( tqvisualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) ); //break; // GENERAL PANELS @@ -956,7 +956,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, if (kickerMode) { if (p->device() && p->device()->devType() == TQInternal::Widget && - TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->device()))->className()) == "FittsLawFrame" ) + TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->tqdevice()))->className()) == "FittsLawFrame" ) { int x2 = x + r.width() - 1; int y2 = y + r.height() - 1; @@ -978,7 +978,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_WindowFrame: { bool sunken = flags & Style_Sunken; - int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw == 2) { @@ -1016,7 +1016,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, int x2 = r.x()+r.width()-1; int y2 = r.y()+r.height()-1; - int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw) { @@ -1036,7 +1036,7 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, int y = r.y(); int x2 = r.x() + r.width() - 1; int y2 = r.y() + r.height() - 1; - int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw) @@ -1142,8 +1142,8 @@ void KeramikStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, p->save(); if ( flags & Style_Down ) - p->translate( pixelMetric( PM_ButtonShiftHorizontal ), - pixelMetric( PM_ButtonShiftVertical ) ); + p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), + tqpixelMetric( PM_ButtonShiftVertical ) ); if ( flags & Style_Enabled ) { @@ -1325,7 +1325,7 @@ bool KeramikStyle::isFormWidget(const TQWidget* widget) const return true; } -void KeramikStyle::drawControl( TQ_ControlElement element, +void KeramikStyle::tqdrawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1383,15 +1383,15 @@ void KeramikStyle::drawControl( TQ_ControlElement element, // Shift button contents if pushed. if ( active ) { - x += pixelMetric(PM_ButtonShiftHorizontal, widget); - y += pixelMetric(PM_ButtonShiftVertical, widget); + x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); + y += tqpixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = pixelMetric( PM_MenuButtonIndicator, widget ); + int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); if ( button->iconSet() && !button->iconSet()->isNull() && (dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w ) { @@ -1399,7 +1399,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, } else { - tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), + tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), cg, flags, opt ); w -= dx; } @@ -1448,18 +1448,18 @@ void KeramikStyle::drawControl( TQ_ControlElement element, } if (cornArrow) //Draw over the icon - tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), + tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), cg, flags, opt ); } // Make the label indicate if the button is a default button or not - drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(), + drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->tqcolorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, - &button->colorGroup().buttonText() ); + &button->tqcolorGroup().buttonText() ); if ( flags & Style_HasFocus ) tqdrawPrimitive( PE_FocusRect, p, - visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), + tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); break; } @@ -1488,7 +1488,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, // nr.setWidth(r.width()-2); //Account for shadow } - KStyle::drawControl(element, p, widget, nr, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, nr, cg, flags, opt); break; } @@ -1496,8 +1496,8 @@ void KeramikStyle::drawControl( TQ_ControlElement element, { const TQTabBar* tabBar = static_cast< const TQTabBar* >( widget ); - bool bottom = tabBar->shape() == TQTabBar::RoundedBelow || - tabBar->shape() == TQTabBar::TriangularBelow; + bool bottom = tabBar->tqshape() == TQTabBar::RoundedBelow || + tabBar->tqshape() == TQTabBar::TriangularBelow; if ( flags & Style_Selected ) { @@ -1553,7 +1553,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, tb->orientation() == Qt::Horizontal); } else - KStyle::drawControl( (TQ_ControlElement)CE_DockWindowEmptyArea, p, + KStyle::tqdrawControl( (TQ_ControlElement)CE_DockWindowEmptyArea, p, widget, r, cg, flags, opt ); break; } @@ -1609,7 +1609,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, bool enabled = mi->isEnabled(); bool checkable = popupmenu->isCheckable(); bool active = flags & Style_Active; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); bool reverse = TQApplication::reverseLayout(); if ( checkable ) checkcol = QMAX( checkcol, 20 ); @@ -1643,7 +1643,7 @@ void KeramikStyle::drawControl( TQ_ControlElement element, break; } - TQRect cr = visualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r ); + TQRect cr = tqvisualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r ); // Do we have an icon? if ( mi->iconSet() ) { @@ -1789,8 +1789,8 @@ void KeramikStyle::drawControl( TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = pixelMetric(PM_MenuButtonIndicator) - itemFrame; - TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, + int dim = tqpixelMetric(PM_MenuButtonIndicator) - itemFrame; + TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, y + h / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -1916,11 +1916,11 @@ void KeramikStyle::drawControl( TQ_ControlElement element, default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } } -void KeramikStyle::drawControlMask( TQ_ControlElement element, +void KeramikStyle::tqdrawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1928,7 +1928,7 @@ void KeramikStyle::drawControlMask( TQ_ControlElement element, { p->fillRect(r, color1); maskMode = true; - drawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt); + tqdrawControl( element, p, widget, r, TQApplication::tqpalette().active(), TQStyle::Style_Default, opt); maskMode = false; } @@ -1944,7 +1944,7 @@ bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const return false; } -void KeramikStyle::drawComplexControl( TQ_ComplexControl control, +void KeramikStyle::tqdrawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1999,7 +1999,7 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, //but that also alters height and not just width. //readjust height to fake the other metrics (plus clear //the other areas, as appropriate). The automasker - //will take care of the overall shape. + //will take care of the overall tqshape. if ( compact ) { forceSmallMode = true; @@ -2035,11 +2035,11 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, if (!compact) { ar.setWidth(ar.width()-13); - TQRect rr = visualRect( TQRect( ar.x(), ar.y() + 4, + TQRect rr = tqvisualRect( TQRect( ar.x(), ar.y() + 4, loader.size(keramik_ripple ).width(), ar.height() - 8 ), widget ); - ar = visualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(), + ar = tqvisualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(), 11, ar.height() ), widget ); @@ -2056,7 +2056,7 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, else //Size-constrained combo -- loose the ripple. { ar.setWidth(ar.width() - 7); - ar = visualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget); + ar = tqvisualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget); TQPointArray a; a.setPoints(TQCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow); @@ -2071,7 +2071,7 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, { if ( cb->editable() ) { - TQRect er = visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget ); + TQRect er = tqvisualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget ); er.addCoords( -2, -2, 2, 2 ); p2->fillRect( er, cg.base() ); tqdrawPrimitive( PE_PanelLineEdit, p2, er, cg ); @@ -2080,7 +2080,7 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, } else if ( cb->hasFocus() ) { - TQRect re = TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, cb), widget); + TQRect re = TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, cb), widget); if ( compact ) re.addCoords( 3, 3, 0, -3 ); p2->fillRect( re, cg.brush( TQColorGroup::Highlight ) ); @@ -2115,7 +2115,7 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, case CC_SpinWidget: { const TQSpinWidget* sw = static_cast< const TQSpinWidget* >( widget ); - TQRect br = visualRect( querySubControlMetrics( (TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget ); + TQRect br = tqvisualRect( querySubControlMetrics( (TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget ); if ( controls & SC_SpinWidgetButtonField ) { Keramik::SpinBoxPainter().draw( p, br, cg.button(), cg.background(), !sw->isEnabled() ); @@ -2139,7 +2139,7 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget ); if (highlightScrollBar && sb->parentWidget()) //Don't do the check if not highlighting anyway { - if (sb->parentWidget()->colorGroup().button() != sb->colorGroup().button()) + if (sb->parentWidget()->tqcolorGroup().button() != sb->tqcolorGroup().button()) customScrollMode = true; } bool horizontal = sb->orientation() == Qt::Horizontal; @@ -2313,14 +2313,14 @@ void KeramikStyle::drawComplexControl( TQ_ComplexControl control, case CC_TitleBar: titleBarMode = Regular; //Handle buttons on titlebar different from toolbuttons default: - KStyle::drawComplexControl( control, p, widget, + KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); titleBarMode = None; } } -void KeramikStyle::drawComplexControlMask( TQ_ComplexControl control, +void KeramikStyle::tqdrawComplexControlMask( TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -2329,8 +2329,8 @@ void KeramikStyle::drawComplexControlMask( TQ_ComplexControl control, if (control == CC_ComboBox) { maskMode = true; - drawComplexControl(CC_ComboBox, p, widget, r, - TQApplication::palette().active(), Style_Default, + tqdrawComplexControl(CC_ComboBox, p, widget, r, + TQApplication::tqpalette().active(), Style_Default, SC_ComboBoxFrame,SC_None, opt); maskMode = false; @@ -2340,7 +2340,7 @@ void KeramikStyle::drawComplexControlMask( TQ_ComplexControl control, } -int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const +int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const { switch(m) { @@ -2397,8 +2397,8 @@ int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const const TQTabBar* tb = ::tqqt_cast<const TQTabBar*>(widget); if (tb) { - if (tb->shape() == TQTabBar::RoundedBelow || - tb->shape() == TQTabBar::TriangularBelow) + if (tb->tqshape() == TQTabBar::RoundedBelow || + tb->tqshape() == TQTabBar::TriangularBelow) return 0; } @@ -2410,7 +2410,7 @@ int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const return titleBarH; default: - return KStyle::pixelMetric(m, widget); + return KStyle::tqpixelMetric(m, widget); } } @@ -2428,8 +2428,8 @@ TQSize KeramikStyle::tqsizeFromContents( ContentsType contents, { const TQPushButton* btn = static_cast< const TQPushButton* >( widget ); - int w = contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget ); - int h = contentSize.height() + 2 * pixelMetric( PM_ButtonMargin, widget ); + int w = contentSize.width() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); + int h = contentSize.height() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); if ( btn->text().isEmpty() && contentSize.width() < 32 ) return TQSize( w, h ); @@ -2623,7 +2623,7 @@ TQRect KeramikStyle::querySubControlMetrics( TQ_ComplexControl control, { int range = sb->maxValue() - sb->minValue(); sliderlen = ( sb->pageStep() * maxlen ) / ( range + sb->pageStep() ); - slidermin = pixelMetric( PM_ScrollBarSliderMin, sb ); + slidermin = tqpixelMetric( PM_ScrollBarSliderMin, sb ); if ( sliderlen < slidermin ) sliderlen = slidermin; if ( sliderlen > maxlen ) sliderlen = maxlen; } @@ -2666,9 +2666,9 @@ TQRect KeramikStyle::querySubControlMetrics( TQ_ComplexControl control, bool horizontal = sl->orientation() == Qt::Horizontal; TQSlider::TickSetting ticks = sl->tickmarks(); int pos = sl->sliderStart(); - int size = pixelMetric( PM_SliderControlThickness, widget ); - int handleSize = pixelMetric( PM_SliderThickness, widget ); - int len = pixelMetric( PM_SliderLength, widget ); + int size = tqpixelMetric( PM_SliderControlThickness, widget ); + int handleSize = tqpixelMetric( PM_SliderThickness, widget ); + int len = tqpixelMetric( PM_SliderLength, widget ); //Shrink the metrics if the widget is too small //to fit our normal values for them. @@ -2751,7 +2751,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) { TQWidget* button = TQT_TQWIDGET(object); hoverWidget = 0; - button->repaint( false ); + button->tqrepaint( false ); return false; } @@ -2761,7 +2761,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) if (event->type() == TQEvent::Enter && TQT_TQWIDGET(object)->isEnabled() ) { hoverWidget = TQT_TQWIDGET(object); - hoverWidget->repaint( false ); + hoverWidget->tqrepaint( false ); } return false; } @@ -2778,7 +2778,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) TQWidget* widget = TQT_TQWIDGET( object ); TQPainter p( widget ); Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, widget->rect(), - widget->palette().color( TQPalette::Normal, TQColorGroup::Button ), + widget->tqpalette().color( TQPalette::Normal, TQColorGroup::Button ), Qt::black, false, Keramik::TilePainter::PaintFullBlend); recursion = false; return true; @@ -2789,7 +2789,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) switch (event->type()) { #ifdef HAVE_X11_EXTENSIONS_SHAPE_H - //Combo dropdowns are shaped + //Combo dropdowns are tqshaped case TQEvent::Resize: { TQListBox* listbox = static_cast<TQListBox*>(TQT_TQWIDGET(object)); @@ -2825,8 +2825,8 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) { TQPainter p( listbox ); Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(), - listbox->palette().color( TQPalette::Normal, TQColorGroup::Button ), - listbox->palette().color( TQPalette::Normal, TQColorGroup::Background ) ); + listbox->tqpalette().color( TQPalette::Normal, TQColorGroup::Button ), + listbox->tqpalette().color( TQPalette::Normal, TQColorGroup::Background ) ); TQPaintEvent newpaint( paint->region().intersect( listbox->contentsRect() ), paint->erased() ); recursion = true; @@ -2901,20 +2901,20 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) if ( toolbar->orientation() == Qt::Horizontal ) { - Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(), + Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(), true /*horizontal*/, false /*not a menu*/, 0, widget->y(), wr.width(), tr.height()); } else { - Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(), + Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(), false /*vertical*/, false /*not a menu*/, widget->x(), 0, tr.width(), wr.height()); } //Draw terminator line, too - p.setPen( toolbar->colorGroup().mid() ); + p.setPen( toolbar->tqcolorGroup().mid() ); if ( toolbar->orientation() == Qt::Horizontal ) p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 ); else diff --git a/kstyles/keramik/keramik.h b/kstyles/keramik/keramik.h index e177d56f8..b0f021aee 100644 --- a/kstyles/keramik/keramik.h +++ b/kstyles/keramik/keramik.h @@ -70,7 +70,7 @@ public: SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControl( TQ_ControlElement element, + void tqdrawControl( TQ_ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -78,13 +78,13 @@ public: SFlags flags = Style_Default, const TQStyleOption& opt = TQStyleOption::Default ) const; - void drawControlMask( TQ_ControlElement element, + void tqdrawControlMask( TQ_ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect& r, const TQStyleOption& opt = TQStyleOption::Default ) const; - void drawComplexControl( TQ_ComplexControl control, + void tqdrawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -94,13 +94,13 @@ public: SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControlMask( TQ_ComplexControl control, + void tqdrawComplexControlMask( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, const TQStyleOption& = TQStyleOption::Default ) const; - int pixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; + int tqpixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; TQSize tqsizeFromContents( ContentsType contents, const TQWidget* widget, diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp index 2da6acb66..cb3ddf1fa 100644 --- a/kstyles/klegacy/klegacystyle.cpp +++ b/kstyles/klegacy/klegacystyle.cpp @@ -57,7 +57,7 @@ #include <tqinputdialog.h> #include <tqintdict.h> #include <tqlabel.h> -#include <layout.h> +#include <tqlayout.h> #include <tqlcdnumber.h> #include <tqlineedit.h> #include <tqptrlist.h> @@ -92,9 +92,9 @@ #include <tqtabdialog.h> #include <qtableview.h> #include <tqtabwidget.h> -#include <textbrowser.h> -#include <textstream.h> -#include <textview.h> +#include <tqtextbrowser.h> +#include <tqtextstream.h> +#include <tqtextview.h> #include <tqtoolbar.h> #include <tqtoolbutton.h> #include <tqtooltip.h> @@ -1975,7 +1975,7 @@ void KLegacyStyle::polish(TQWidget *widget) { } GtkObject *gobj = gobj = priv->gtkDict.find(((metaobject) ? metaobject : - widget->metaObject())); + widget->tqmetaObject())); if (gobj) { if (gobj->font() && (*gobj->font() != TQApplication::font())) @@ -2181,7 +2181,7 @@ void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) { key.cachekey = 0; key.data.function = KLegacy::Box; - TQColorGroup g = btn->colorGroup(); + TQColorGroup g = btn->tqcolorGroup(); TQBrush fill = g.brush(TQColorGroup::Button); int x1, y1, x2, y2; btn->rect().coords(&x1, &y1, &x2, &y2); @@ -2741,7 +2741,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll (active & SubLine), x, y, buttonDim, buttonDim, - scrollbar->colorGroup(), true); + scrollbar->tqcolorGroup(), true); if (scrollbar->orientation() == Vertical) y = scrollbar->height() - buttonDim - defaultFrameWidth(); @@ -2753,7 +2753,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll (active & AddLine), x, y, buttonDim, buttonDim, - scrollbar->colorGroup(), true); + scrollbar->tqcolorGroup(), true); } p->drawPixmap(0, 0, buf); } @@ -2954,8 +2954,8 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo key.data.function = KLegacy::Extension; key.data.state = (! selected) ? KLegacy::Active : KLegacy::Normal; key.data.shadow = KLegacy::Out; - key.data.gapSide = (tabbar->shape() == TQTabBar::RoundedAbove || - tabbar->shape() == TQTabBar::TriangularAbove) ? + key.data.gapSide = (tabbar->tqshape() == TQTabBar::RoundedAbove || + tabbar->tqshape() == TQTabBar::TriangularAbove) ? KLegacy::Bottom : KLegacy::Top; int ry = tab->r.top(), rh = tab->r.height(); @@ -2963,8 +2963,8 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo if (! selected) { rh -= 2; - if (tabbar->shape() == TQTabBar::RoundedAbove || - tabbar->shape() == TQTabBar::TriangularAbove) + if (tabbar->tqshape() == TQTabBar::RoundedAbove || + tabbar->tqshape() == TQTabBar::TriangularAbove) ry += 2; } @@ -3261,7 +3261,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { obj->inherits(TQSLIDER_OBJECT_NAME_STRING) || obj->inherits(TQSCROLLBAR_OBJECT_NAME_STRING)) { priv->lastWidget = (TQWidget *) obj; - priv->lastWidget->repaint(false); + priv->lastWidget->tqrepaint(false); } else if (obj->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING)) { TQWidget *w = (TQWidget *) obj; @@ -3327,7 +3327,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { { if (obj == priv->lastWidget) { priv->lastWidget = 0; - ((TQWidget *) obj)->repaint(false); + ((TQWidget *) obj)->tqrepaint(false); } else if (obj->inherits(TQRADIOBUTTON_OBJECT_NAME_STRING) || obj->inherits(TQCHECKBOX_OBJECT_NAME_STRING)) { TQWidget *w = (TQWidget *) obj; @@ -3335,7 +3335,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { if (! w->isTopLevel()) { w->setBackgroundMode(TQWidget::X11ParentRelative); w->setBackgroundOrigin(TQWidget::WidgetOrigin); - w->repaint(true); + w->tqrepaint(true); } } @@ -3349,7 +3349,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) { if (obj->inherits(TQSCROLLBAR_OBJECT_NAME_STRING) && (! (me->state() & (LeftButton | MidButton | RightButton)))) { priv->hovering = true; - ((TQWidget *) obj)->repaint(false); + ((TQWidget *) obj)->tqrepaint(false); priv->hovering = false; } diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp index 9da0fdabd..772dd41bc 100644 --- a/kstyles/kthemestyle/kthemebase.cpp +++ b/kstyles/kthemestyle/kthemebase.cpp @@ -70,7 +70,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey, TQString aValue = s->readEntry( pKey ); if ( !aValue.isEmpty() ) { - if ( aValue.at( 0 ) == '#' ) + if ( aValue.tqat( 0 ) == '#' ) { aRetColor.setNamedColor( aValue ); } @@ -1100,12 +1100,12 @@ TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg, lowlightVal = 100 + ( ( 2 * d->contrast + 4 ) * 10 ); return ( new TQColorGroup( fg, bg, bg.light( highlightVal ), bg.dark( lowlightVal ), bg.dark( 120 ), - fg, TQApplication::palette().active().base() ) ); + fg, TQApplication::tqpalette().active().base() ) ); } else return ( new TQColorGroup( fg, bg, bg.light( 150 ), bg.dark(), bg.dark( 120 ), fg, - TQApplication::palette().active().base() ) ); + TQApplication::tqpalette().active().base() ) ); } @@ -1273,12 +1273,12 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i ) // Gradient low color or blend background if ( keys.contains( "GradientLow" ) ) prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(), - &TQApplication::palette().active().background() ).name(); + &TQApplication::tqpalette().active().background() ).name(); // Gradient high color if ( keys.contains( "GradientHigh" ) ) prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(), - &TQApplication::palette().active().foreground() ).name(); + &TQApplication::tqpalette().active().foreground() ).name(); // Extended color attributes if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) ) @@ -1413,7 +1413,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname // Blend intensity tmpStr = prop[ "Blend" ]; if ( tmpStr.isEmpty() ) - tmpStr = TQString::fromLatin1( "0.0" ); + tmpStr = TQString::tqfromLatin1( "0.0" ); blends[ i ] = tmpStr.toFloat(); // Bevel contrast @@ -1429,7 +1429,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname if ( gradients[ i ] != GrNone || blends[ i ] != 0.0 ) grLowColors[ i ] = new TQColor( readColorEntry( prop, "GrLow", - TQApplication::palette().active(). + TQApplication::tqpalette().active(). background() ) ); else grLowColors[ i ] = NULL; @@ -1438,7 +1438,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname if ( gradients[ i ] != GrNone ) grHighColors[ i ] = new TQColor( readColorEntry( prop, "GrHigh", - TQApplication::palette().active(). + TQApplication::tqpalette().active(). background() ) ); else grHighColors[ i ] = NULL; @@ -1450,9 +1450,9 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname if ( fg.isValid() || bg.isValid() ) { if ( !fg.isValid() ) - fg = TQApplication::palette().active().foreground(); + fg = TQApplication::tqpalette().active().foreground(); if ( !bg.isValid() ) - bg = TQApplication::palette().active().background(); + bg = TQApplication::tqpalette().active().background(); colors[ i ] = makeColorGroup( fg, bg, TQt::WindowsStyle ); } else @@ -1609,7 +1609,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal ) { if ( isColor( Background ) ) { - background = colorGroup( pal.active(), Background ) + background = tqcolorGroup( pal.active(), Background ) ->background(); } if ( isPixmap( Background ) ) @@ -1622,7 +1622,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal ) background.dark( lowlightVal ), background.dark( 120 ), baseText, buttonText /*CHECKME: BrightText*/, base, background ); - buttonText = colorGroup( pre, PushButton ) ->foreground(); + buttonText = tqcolorGroup( pre, PushButton ) ->foreground(); } TQColor disfg = foreground; diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h index 63126337f..96faf57d5 100644 --- a/kstyles/kthemestyle/kthemebase.h +++ b/kstyles/kthemestyle/kthemebase.h @@ -36,7 +36,7 @@ Copyright (C) 1998, 1999, 2000 KDE Team #include <tqstring.h> #include <kstyle.h> #include <tqsettings.h> -#include <palette.h> // for QColorGroup +#include <tqpalette.h> // for QColorGroup #include "kstyledirs.h" #include <tqmap.h> @@ -300,12 +300,12 @@ public: * If a color group is set in the theme configuration * that is used, otherwise defaultColor is returned. * - * @param defaultGroup The colorGroup to set if one is available. + * @param defaultGroup The tqcolorGroup to set if one is available. * * @param widget The widget whose color group to retrieve. * */ - const TQColorGroup* colorGroup( const TQColorGroup &defaultGroup, + const TQColorGroup* tqcolorGroup( const TQColorGroup &defaultGroup, WidgetType widget ) const; TQBrush pixmapBrush( const TQColorGroup &group, TQColorGroup::ColorRole role, @@ -508,9 +508,9 @@ protected: /** These are included for fuuture extension purposes.. */ - virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const + virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const { - return KStyle::pixelMetric( metric, widget ); + return KStyle::tqpixelMetric( metric, widget ); } virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, @@ -522,7 +522,7 @@ protected: } - virtual void drawControl( TQ_ControlElement element, + virtual void tqdrawControl( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -530,21 +530,21 @@ protected: SFlags how = Style_Default, const TQStyleOption& opt = TQStyleOption::Default ) const { - KStyle::drawControl( element, p, widget, + KStyle::tqdrawControl( element, p, widget, r, cg, how, opt ); } - virtual void drawControlMask( TQ_ControlElement element, + virtual void tqdrawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& opt = TQStyleOption::Default ) const { - KStyle::drawControlMask( element, p, widget, r, opt ); + KStyle::tqdrawControlMask( element, p, widget, r, opt ); } - virtual void drawComplexControl( TQ_ComplexControl control, + virtual void tqdrawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -554,7 +554,7 @@ protected: SCFlags active = SC_None, const TQStyleOption& opt = TQStyleOption::Default ) const { - KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); } @@ -572,12 +572,12 @@ protected: } - virtual int styleHint( StyleHint sh, + virtual int tqstyleHint( StyleHint sh, const TQWidget *widget = 0, const TQStyleOption& opt = TQStyleOption::Default, TQStyleHintReturn* returnData = 0 ) const { - return KStyle::styleHint( sh, + return KStyle::tqstyleHint( sh, widget, opt, returnData ); @@ -731,7 +731,7 @@ inline TQBrush KThemeBase::pixmapBrush( const TQColorGroup &group, return ( group.color( role ) ); } -inline const TQColorGroup* KThemeBase::colorGroup( const TQColorGroup &defaultGroup, +inline const TQColorGroup* KThemeBase::tqcolorGroup( const TQColorGroup &defaultGroup, WidgetType widget ) const { return ( ( colors[ widget ] ) ? colors[ widget ] : &defaultGroup ); diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp index 4fe0ea9b0..b9f2b4ba1 100644 --- a/kstyles/kthemestyle/kthemestyle.cpp +++ b/kstyles/kthemestyle/kthemestyle.cpp @@ -50,7 +50,7 @@ Port version 0.9.7 #define INCLUDE_MENUITEM_DEF #include <tqmenudata.h> #include <tqpopupmenu.h> -#include <palette.h> +#include <tqpalette.h> #include <tqtabbar.h> #include <tqtoolbutton.h> #include <kglobalsettings.h> @@ -186,8 +186,8 @@ void kDrawWindowsArrow ( TQPainter *p, const TQStyle* style, TQStyle::PrimitiveE p->save(); if ( down ) { - p->translate( style->pixelMetric( TQStyle::PM_ButtonShiftHorizontal ), - style->pixelMetric( TQStyle::PM_ButtonShiftVertical ) ); + p->translate( style->tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ), + style->tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) ); } if ( enabled ) @@ -226,8 +226,8 @@ TQSize KThemeStyle::tqsizeFromContents( ContentsType contents, const TQPushButton * button = ( const TQPushButton* ) widget; int w = contentSize.width(); int h = contentSize.height(); - int bm = pixelMetric( PM_ButtonMargin, widget ); - int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int bm = tqpixelMetric( PM_ButtonMargin, widget ); + int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; w += bm + fw + 6; // ### Add 6 to make way for bold font. h += bm + fw; @@ -320,8 +320,8 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const { TQRect bounding = cb->rect(); - int cw = pixelMetric(PM_IndicatorWidth, widget); - int ch = pixelMetric(PM_IndicatorHeight, widget); + int cw = tqpixelMetric(PM_IndicatorWidth, widget); + int ch = tqpixelMetric(PM_IndicatorHeight, widget); TQRect checkbox(bounding.x() + 2, bounding.y() + 2 + (bounding.height() - ch)/2, cw - 4, ch - 4); @@ -331,7 +331,7 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const return KStyle::subRect(sr, widget); } -int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) const +int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) const { switch ( metric ) { @@ -361,26 +361,26 @@ int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) con if ( isPixmap( ExIndicatorOn ) ) return ( uncached( ExIndicatorOn ) ->size().width() ); else - return KThemeBase::pixelMetric ( metric, widget ); + return KThemeBase::tqpixelMetric ( metric, widget ); case PM_ExclusiveIndicatorHeight: if ( isPixmap( ExIndicatorOn ) ) return ( uncached( ExIndicatorOn ) ->size().height() ); else - return KThemeBase::pixelMetric ( metric, widget ); + return KThemeBase::tqpixelMetric ( metric, widget ); case PM_IndicatorWidth: if ( isPixmap( IndicatorOn ) ) return ( uncached( IndicatorOn ) ->size().width() ); else - return KThemeBase::pixelMetric ( metric, widget ); + return KThemeBase::tqpixelMetric ( metric, widget ); case PM_IndicatorHeight: if ( isPixmap( IndicatorOn ) ) return ( uncached( IndicatorOn ) ->size().height() ); else - return KThemeBase::pixelMetric ( metric, widget ); + return KThemeBase::tqpixelMetric ( metric, widget ); case PM_SliderLength: return ( sliderButtonLength() ); @@ -389,7 +389,7 @@ int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) con return ( splitWidth() ); default: - return KThemeBase::pixelMetric ( metric, widget ); + return KThemeBase::tqpixelMetric ( metric, widget ); } } @@ -458,7 +458,7 @@ void KThemeStyle::paletteChanged() void KThemeStyle::unPolish( TQApplication *app ) { - app->setPalette( oldPalette, true ); + app->tqsetPalette( oldPalette, true ); } bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event ) @@ -470,7 +470,7 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event ) { TQWidget *w = TQT_TQWIDGET(object); TQPoint pos(0, 0); - pos = w->mapTo(w->topLevelWidget(), pos); + pos = w->mapTo(w->tqtopLevelWidget(), pos); TQPixmap pix(uncached( Background )->size()); TQPainter p; p.begin(&pix); @@ -559,12 +559,12 @@ void KThemeStyle::polish( TQWidget *w ) TQPalette newPal( w->palette() ); if ( isColor( MenuItem ) ) { - newPal.setActive( *colorGroup( newPal.active(), MenuItem ) ); - newPal.setDisabled( *colorGroup( newPal.active(), MenuItem ) ); + newPal.setActive( *tqcolorGroup( newPal.active(), MenuItem ) ); + newPal.setDisabled( *tqcolorGroup( newPal.active(), MenuItem ) ); } if ( isColor( MenuItemDown ) ) { - newPal.setActive( *colorGroup( newPal.active(), MenuItemDown ) ); + newPal.setActive( *tqcolorGroup( newPal.active(), MenuItemDown ) ); } w->setPalette( newPal ); } @@ -578,11 +578,11 @@ void KThemeStyle::polish( TQWidget *w ) TQPalette newPal( w->palette() ); if ( isColor( IndicatorOff ) ) { - newPal.setActive( *colorGroup( newPal.active(), IndicatorOff ) ); - newPal.setDisabled( *colorGroup( newPal.active(), IndicatorOff ) ); + newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOff ) ); + newPal.setDisabled( *tqcolorGroup( newPal.active(), IndicatorOff ) ); } if ( isColor( IndicatorOn ) ) - newPal.setActive( *colorGroup( newPal.active(), IndicatorOn ) ); + newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOn ) ); w->setPalette( newPal ); } } @@ -593,12 +593,12 @@ void KThemeStyle::polish( TQWidget *w ) TQPalette newPal( w->palette() ); if ( isColor( ExIndicatorOff ) ) { - newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOff ) ); - newPal.setDisabled( *colorGroup( newPal.active(), + newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOff ) ); + newPal.setDisabled( *tqcolorGroup( newPal.active(), ExIndicatorOff ) ); } if ( isColor( ExIndicatorOn ) ) - newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOn ) ); + newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOn ) ); w->setPalette( newPal ); } } @@ -650,7 +650,7 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h, if ( gradientHint( type ) == GrReverseBevel ) { int i; - bitBlt( p->device(), x, y, TQT_TQPAINTDEVICE(scalePixmap( w, h, type )), 0, 0, w, h, + bitBlt( p->tqdevice(), x, y, TQT_TQPAINTDEVICE(scalePixmap( w, h, type )), 0, 0, w, h, TQt::CopyROP, true ); p->setPen( g.text() ); for ( i = 0; i < borderWidth( type ); ++i, ++x, ++y, w -= 2, h -= 2 ) @@ -690,7 +690,7 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h, } if ( borderPixmap( type ) ) { - bitBlt( p->device(), x, y, TQT_TQPAINTDEVICE(scaleBorder( w, h, type )), 0, 0, w, h, + bitBlt( p->tqdevice(), x, y, TQT_TQPAINTDEVICE(scaleBorder( w, h, type )), 0, 0, w, h, TQt::CopyROP, false ); } else @@ -757,7 +757,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe return ; } - const TQColorGroup *cg = colorGroup( g, widget ); + const TQColorGroup *cg = tqcolorGroup( g, widget ); // Standard arrow types if ( arrowType() == MotifArrow ) { @@ -791,8 +791,8 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe p->save(); if ( flags & Style_Down ) - p->translate( pixelMetric( PM_ButtonShiftHorizontal ), - pixelMetric( PM_ButtonShiftVertical ) ); + p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), + tqpixelMetric( PM_ButtonShiftVertical ) ); if ( flags & Style_Enabled ) { @@ -847,7 +847,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe case PE_ButtonBevel: { WidgetType type = ( sunken || on || down ) ? BevelDown : Bevel; - drawBaseButton( p, x, y, w, h, *colorGroup( g, type ), ( sunken || on || down ), false, type ); + drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, type ), ( sunken || on || down ), false, type ); handled = true; break; } @@ -860,7 +860,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe } case PE_PanelDockWindow: { - drawBaseButton( p, x, y, w, h, *colorGroup( g, ToolBar ), false, false, + drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, ToolBar ), false, false, ToolBar ); handled = true; break; @@ -939,7 +939,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe } case PE_Splitter: { - drawBaseButton( p, x, y, w, h, *colorGroup( g, Splitter ), false, false, + drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, Splitter ), false, false, Splitter ); handled = true; break; @@ -978,10 +978,10 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe if ( !isPixmap( widget ) ) { - p->fillRect( r, colorGroup( g, widget ) ->brush( TQColorGroup::Background ) ); + p->fillRect( r, tqcolorGroup( g, widget ) ->brush( TQColorGroup::Background ) ); // Do the borders and frame drawShade( p, r.x(), r.y(), r.width(), - r.height(), *colorGroup( g, widget ), true, false, + r.height(), *tqcolorGroup( g, widget ), true, false, highlightWidth( widget ), borderWidth( widget ), shade() ); } else @@ -992,7 +992,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe *scalePixmap( r.width(), r.height(), widget ) ); drawShade( p, r.x(), r.y(), r.width(), - r.height(), *colorGroup( g, widget ), true, false, + r.height(), *tqcolorGroup( g, widget ), true, false, highlightWidth( widget ), borderWidth( widget ), shade() ); } @@ -1003,12 +1003,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe { bool horizontal = ( flags & Style_Horizontal ); drawBaseButton( p, r.x(), r.y(), r.width(), r.height(), - *colorGroup( g, down ? ScrollButtonDown : ScrollButton ), + *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ), down, false, down ? ScrollButtonDown : ScrollButton ); tqdrawPrimitive( ( horizontal ) ? PE_ArrowRight : PE_ArrowDown, p , TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ), - *colorGroup( g, down ? ScrollButtonDown : ScrollButton ), + *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ), flags ); handled = true; @@ -1018,12 +1018,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe { bool horizontal = ( flags & Style_Horizontal ); drawBaseButton( p, r.x(), r.y(), r.width(), r.height(), - *colorGroup( g, down ? ScrollButtonDown : ScrollButton ), + *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ), down, false, down ? ScrollButtonDown : ScrollButton ); tqdrawPrimitive( ( horizontal ) ? PE_ArrowLeft : PE_ArrowUp, p , TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ), - *colorGroup( g, down ? ScrollButtonDown : ScrollButton ), + *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ), flags ); handled = true; break; @@ -1039,7 +1039,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe active ? HScrollBarSliderDown : HScrollBarSlider : active ? VScrollBarSliderDown : VScrollBarSlider; drawBaseButton( p, r.x()+offsetH, r.y()+offsetV, r.width()-2*offsetH, - r.height()-2*offsetV, *colorGroup( g, widget ), active, false, + r.height()-2*offsetV, *tqcolorGroup( g, widget ), active, false, widget ); int spaceW = horizontal ? r.width() - decoWidth( widget ) - 4 : @@ -1087,7 +1087,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const return menuCache; } - const TQColorGroup *g = colorGroup( TQApplication::palette().active(), MenuBar); + const TQColorGroup *g = tqcolorGroup( TQApplication::tqpalette().active(), MenuBar); menuCache = new TQPixmap ( w, h ); TQPainter p(menuCache); @@ -1097,7 +1097,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const } -void KThemeStyle::drawControl( ControlElement element, +void KThemeStyle::tqdrawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1116,9 +1116,9 @@ void KThemeStyle::drawControl( ControlElement element, { const TQPushButton * btn = ( const TQPushButton* ) widget; bool sunken = btn->isOn() || btn->isDown(); - int diw = pixelMetric( PM_ButtonDefaultIndicator, btn ); + int diw = tqpixelMetric( PM_ButtonDefaultIndicator, btn ); drawBaseButton( p, diw, diw, w - 2 * diw, h - 2 * diw, - *colorGroup( btn->colorGroup(), sunken ? PushButtonDown : + *tqcolorGroup( btn->tqcolorGroup(), sunken ? PushButtonDown : PushButton ), sunken, roundButton(), sunken ? PushButtonDown : PushButton ); // TODO if diw, draw fancy default button indicator @@ -1135,15 +1135,15 @@ void KThemeStyle::drawControl( ControlElement element, // Shift button contents if pushed. if ( active ) { - x += pixelMetric( PM_ButtonShiftHorizontal, widget ); - y += pixelMetric( PM_ButtonShiftVertical, widget ); + x += tqpixelMetric( PM_ButtonShiftHorizontal, widget ); + y += tqpixelMetric( PM_ButtonShiftVertical, widget ); how |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = pixelMetric( PM_MenuButtonIndicator, widget ); + int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); tqdrawPrimitive( PE_ArrowDown, p, TQRect( x + w - dx - 2, y + 2, dx, h - 4 ), cg, how, opt ); w -= dx; @@ -1185,42 +1185,42 @@ void KThemeStyle::drawControl( ControlElement element, // Text shadow for ( i = 0; i < 2; i++ ) drawItem( p, TQRect( x + i + 1, y + 1, w, h ), AlignCenter | ShowPrefix, - button->colorGroup(), button->isEnabled(), NULL, + button->tqcolorGroup(), button->isEnabled(), NULL, button->text(), -1, - active ? &button->colorGroup().dark() : &button->colorGroup().mid() ); + active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() ); // Normal Text for ( i = 0; i < 2; i++ ) drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix, - button->colorGroup(), true, i == 0 ? button->pixmap() : NULL, + button->tqcolorGroup(), true, i == 0 ? button->pixmap() : NULL, button->text(), -1, - active ? &button->colorGroup().light() : &button->colorGroup().buttonText() ); + active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() ); } else { if ( button->isEnabled() ) { - drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(), + drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(), true, button->pixmap(), button->text(), -1, - active ? &button->colorGroup().light() : &button->colorGroup().buttonText() ); + active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() ); } else { //TODO: Handle reversed - drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(), + drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(), true, button->pixmap(), button->text(), -1, - &button->colorGroup().light() ); + &button->tqcolorGroup().light() ); - drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(), + drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(), true, button->pixmap(), button->text(), -1, - &button->colorGroup().buttonText() ); + &button->tqcolorGroup().buttonText() ); } } // Draw a focus rect if the button has focus if ( how & Style_HasFocus ) tqdrawPrimitive( PE_FocusRect, p, - TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), + TQStyle::tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, how ); handled = true; break; @@ -1239,10 +1239,10 @@ void KThemeStyle::drawControl( ControlElement element, case CE_TabBarTab: { const TQTabBar* tb = ( const TQTabBar* ) widget; - TQTabBar::Shape tbs = tb->shape(); + TQTabBar::Shape tbs = tb->tqshape(); bool selected = how & Style_Selected; WidgetType widget = selected ? ActiveTab : InactiveTab; - const TQColorGroup *cg = colorGroup( tb->colorGroup(), widget ); + const TQColorGroup *cg = tqcolorGroup( tb->tqcolorGroup(), widget ); int i; int x2 = x + w - 1, y2 = y + h - 1; int bWidth = borderWidth( widget ); @@ -1253,7 +1253,7 @@ void KThemeStyle::drawControl( ControlElement element, if ( !selected ) { p->fillRect( x, y, x2 - x + 1, 2, - tb->palette().active().brush( TQColorGroup::Background ) ); + tb->tqpalette().active().brush( TQColorGroup::Background ) ); y += 2; } p->setPen( cg->text() ); @@ -1315,8 +1315,8 @@ void KThemeStyle::drawControl( ControlElement element, else p->fillRect( x, y, x2 - x + 1, y2 - y + 1, cg->background() ); } - else if ( tb->shape() == TQTabBar::RoundedBelow || - tb->shape() == TQTabBar::TriangularBelow ) + else if ( tb->tqshape() == TQTabBar::RoundedBelow || + tb->tqshape() == TQTabBar::TriangularBelow ) { if ( widget == ActiveTab ) widget = RotActiveTab; @@ -1326,7 +1326,7 @@ void KThemeStyle::drawControl( ControlElement element, if ( !selected ) { p->fillRect( x, y2 - 2, x2 - x + 1, 2, - tb->palette().active().brush( TQColorGroup::Background ) ); + tb->tqpalette().active().brush( TQColorGroup::Background ) ); y2 -= 2; } p->setPen( cg->text() ); @@ -1398,7 +1398,7 @@ void KThemeStyle::drawControl( ControlElement element, TQRect pr = mb->rect(); bool active = how & Style_Active; //bool focused = how & Style_HasFocus; - const TQColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar ); + const TQColorGroup *g = tqcolorGroup( cg, active ? MenuBarItem : MenuBar ); TQColor btext = g->buttonText(); TQPixmap* cache = makeMenuBarCache(pr.width(), pr.height()); @@ -1440,10 +1440,10 @@ void KThemeStyle::drawControl( ControlElement element, bool enabled = (mi? mi->isEnabled():true); bool checkable = popupmenu->isCheckable(); bool active = how & Style_Active; - bool etchtext = styleHint( SH_EtchDisabledText, 0 ); + bool etchtext = tqstyleHint( SH_EtchDisabledText, 0 ); bool reverse = TQApplication::reverseLayout(); - const TQColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem ); + const TQColorGroup& cg_ours = *tqcolorGroup( cg, active ? MenuItemDown : MenuItem ); //TQColor btext = cg_ours.buttonText(); @@ -1465,7 +1465,7 @@ void KThemeStyle::drawControl( ControlElement element, drawBaseButton( p, x, y, w, h, cg_ours, true, false, MenuItemDown ); else { - drawShade( p, x, y, w, h, *colorGroup( cg_ours, MenuItem ), false, false, + drawShade( p, x, y, w, h, *tqcolorGroup( cg_ours, MenuItem ), false, false, highlightWidth( MenuItem ), borderWidth( MenuItem ), shade() ); int dw = decoWidth( MenuItem ); @@ -1475,7 +1475,7 @@ void KThemeStyle::drawControl( ControlElement element, x + dw, y + dw, w - dw * 2, h - dw * 2, cg_ours.brush( TQColorGroup::Background ) ); //cg.brush( TQColorGroup::Background )); - //colorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) ); + //tqcolorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) ); } else { @@ -1493,7 +1493,7 @@ void KThemeStyle::drawControl( ControlElement element, if ( mi->iconSet() ) { TQIconSet::Mode mode; - TQRect cr = visualRect( TQRect( x, y, checkcol, h ), r ); + TQRect cr = tqvisualRect( TQRect( x, y, checkcol, h ), r ); // Select the correct icon from the iconset if ( active ) @@ -1504,7 +1504,7 @@ void KThemeStyle::drawControl( ControlElement element, // Do we have an icon and are checked at the same time? // Then draw a "pressed" background behind the icon if ( checkable && mi->isChecked() ) //!active && -- ?? - drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *colorGroup( cg_ours, BevelDown ), true, false, BevelDown ); + drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *tqcolorGroup( cg_ours, BevelDown ), true, false, BevelDown ); // Draw the icon TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode ); @@ -1644,7 +1644,7 @@ void KThemeStyle::drawControl( ControlElement element, { PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; int dim = 10 - itemFrame; //We're not very useful to inherit off, so just hardcode.. - TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, + TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, y + h / 2 - dim / 2, dim, dim ), r ); // Draw an arrow at the far end of the menu item @@ -1668,7 +1668,7 @@ void KThemeStyle::drawControl( ControlElement element, case CE_ProgressBarGroove: { TQBrush bg; - const TQColorGroup * cg2 = colorGroup( cg, ProgressBg ); + const TQColorGroup * cg2 = tqcolorGroup( cg, ProgressBg ); qDrawWinPanel( p, r, *cg2, true ); bg.setColor( cg2->color( TQColorGroup::Background ) ); if ( isPixmap( ProgressBg ) ) @@ -1715,13 +1715,13 @@ void KThemeStyle::drawControl( ControlElement element, } if ( !reverse ) - drawBaseButton( p, x + pstep, y, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar ); + drawBaseButton( p, x + pstep, y, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar ); else { //TODO:Optimize TQPixmap buf( width, h ); TQPainter p2( &buf ); - drawBaseButton( &p2, 0, 0, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar ); + drawBaseButton( &p2, 0, 0, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar ); p2.end(); TQPixmap mirroredPix = TQPixmap( TQImage(buf.convertToImage()).mirror( true, false ) ); bitBlt( p->device(), x + w - width - pstep, y, &mirroredPix ); @@ -1736,12 +1736,12 @@ void KThemeStyle::drawControl( ControlElement element, }; if ( !handled ) - KThemeBase::drawControl( element, + KThemeBase::tqdrawControl( element, p, widget, r, cg, how, opt ); } -void KThemeStyle::drawControlMask( ControlElement element, +void KThemeStyle::tqdrawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1765,7 +1765,7 @@ void KThemeStyle::drawControlMask( ControlElement element, }; if ( !handled ) - KThemeBase::drawControlMask( element, + KThemeBase::tqdrawControlMask( element, p, widget, r, opt ); } @@ -1792,12 +1792,12 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, bool horizontal = slider->orientation() == Qt::Horizontal; if ( horizontal ) { - drawBaseButton( p, x, y, w, h, *colorGroup( cg, SliderGroove ), true, + drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, SliderGroove ), true, false, SliderGroove ); } else { - drawBaseButton( p, x, y, w, h, *colorGroup( cg, RotSliderGroove ), true, + drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, RotSliderGroove ), true, false, RotSliderGroove ); } } @@ -1926,10 +1926,10 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, case KPE_GeneralHandle: { if ( w > h ) - drawBaseButton( p, x, y, w, h, *colorGroup( cg, HBarHandle ), false, false, + drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, HBarHandle ), false, false, HBarHandle ); else - drawBaseButton( p, x, y, w, h, *colorGroup( cg, VBarHandle ), false, false, + drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, VBarHandle ), false, false, VBarHandle ); handled = true; @@ -1951,7 +1951,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe, -void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, const TQWidget * widget, +void KThemeStyle::tqdrawComplexControl ( TQ_ComplexControl control, TQPainter * p, const TQWidget * widget, const TQRect & r, const TQColorGroup & g, SFlags how , SCFlags controls, SCFlags active, const TQStyleOption & opt ) const @@ -1978,7 +1978,7 @@ void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, { WidgetType widget = ( down || on ) ? ToolButtonDown : ToolButton; - drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *colorGroup( g, widget ), down || on, false, + drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *tqcolorGroup( g, widget ), down || on, false, widget ); // int m = decoWidth( widget ); @@ -2014,7 +2014,7 @@ void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, bool sunken = ( active == SC_ComboBoxArrow ); //No frame, edit box and button for now? WidgetType widget = sunken ? ComboBoxDown : ComboBox; - drawBaseButton( p, x, y, w, h, *colorGroup( g, widget ), sunken, + drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, widget ), sunken, roundComboBox(), widget ); controls ^= SC_ComboBoxFrame; @@ -2023,7 +2023,7 @@ void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, if ( controls & SC_ComboBoxArrow ) { bool sunken = ( active == SC_ComboBoxArrow ); - TQRect ar = TQStyle::visualRect( + TQRect ar = TQStyle::tqvisualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxArrow ), widget ); ar.rect( &x, &y, &w, &h ); @@ -2042,8 +2042,8 @@ void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, else { - mtfstyle->tqdrawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *colorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt ); - qDrawShadeRect( p, x, y, w, h, *colorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3, + mtfstyle->tqdrawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *tqcolorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt ); + qDrawShadeRect( p, x, y, w, h, *tqcolorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3, } controls ^= SC_ComboBoxArrow; } @@ -2116,7 +2116,7 @@ void KThemeStyle::drawComplexControl ( TQ_ComplexControl control, TQPainter * p, if ( !handled ) { - KThemeBase::drawComplexControl ( control, p, widget, + KThemeBase::tqdrawComplexControl ( control, p, widget, r, g, how , controls, active, opt ); @@ -2185,7 +2185,7 @@ void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h, p->fillRect( x, y, w, h, fillBrush ); } -int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, TQStyleHintReturn *shr ) const +int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, TQStyleHintReturn *shr ) const { switch ( sh ) { @@ -2207,7 +2207,7 @@ int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption return NoBackground; default: - return KThemeBase::styleHint( sh, w, opt, shr ); + return KThemeBase::tqstyleHint( sh, w, opt, shr ); }; } diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h index 6c2c0e332..4fbde91b1 100644 --- a/kstyles/kthemestyle/kthemestyle.h +++ b/kstyles/kthemestyle/kthemestyle.h @@ -79,13 +79,13 @@ public: KThemeStyle( const TQString& configDir, const TQString &configFile = TQString::null ); ~KThemeStyle(); - virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const; + virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const; virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg, SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - virtual void drawControl( ControlElement element, + virtual void tqdrawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -93,14 +93,14 @@ public: SFlags how = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - virtual void drawControlMask( ControlElement element, + virtual void tqdrawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; - virtual void drawComplexControl( TQ_ComplexControl control, + virtual void tqdrawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -119,7 +119,7 @@ public: const TQStyleOption& = TQStyleOption::Default ) const; - virtual int styleHint( StyleHint sh, + virtual int tqstyleHint( StyleHint sh, const TQWidget *widget = 0, const TQStyleOption& = TQStyleOption::Default, TQStyleHintReturn* returnData = 0 ) const; @@ -192,7 +192,7 @@ public: * @param w The rectangle width. * @param h The rectangle height. * @param sunken Draws a sunken style if @p true. - * @param rounded Draws a rounded shape if @p true. Requires bWidth to be + * @param rounded Draws a rounded tqshape if @p true. Requires bWidth to be * at least 1. * @param hWidth The highlight width. * @param bWidth The border width. diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp index 2614b928a..bb9373bed 100644 --- a/kstyles/light/lightstyle-v2.cpp +++ b/kstyles/light/lightstyle-v2.cpp @@ -25,7 +25,7 @@ #include "tqmenubar.h" #include "tqapplication.h" #include "tqpainter.h" -#include "palette.h" +#include "tqpalette.h" #include "tqframe.h" #include "tqpushbutton.h" #include "tqdrawutil.h" @@ -33,7 +33,7 @@ #include "tqscrollbar.h" #include "tqtabbar.h" #include "tqguardedptr.h" -#include "layout.h" +#include "tqlayout.h" #include "tqlineedit.h" #include "tqimage.h" #include "tqcombobox.h" @@ -160,11 +160,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken)) - fill = &cg.brush(TQColorGroup::Midlight); + fill = &cg.tqbrush(TQColorGroup::Midlight); else - fill = &cg.brush(TQColorGroup::Button); + fill = &cg.tqbrush(TQColorGroup::Button); } else - fill = &cg.brush(TQColorGroup::Background); + fill = &cg.tqbrush(TQColorGroup::Background); drawLightBevel(p, r, cg, flags, fill); break; } @@ -177,11 +177,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & TQStyle::Style_Enabled) { if (sunken) - thefill = cg.brush(TQColorGroup::Midlight); + thefill = cg.tqbrush(TQColorGroup::Midlight); else - thefill = cg.brush(TQColorGroup::Button); + thefill = cg.tqbrush(TQColorGroup::Button); } else - thefill = cg.brush(TQColorGroup::Background); + thefill = cg.tqbrush(TQColorGroup::Background); p->setPen(cg.dark()); p->drawLine(r.topLeft(), r.topRight()); @@ -225,11 +225,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_Indicator: const TQBrush *fill; if (! (flags & Style_Enabled)) - fill = &cg.brush(TQColorGroup::Background); + fill = &cg.tqbrush(TQColorGroup::Background); else if (flags & Style_Down) - fill = &cg.brush(TQColorGroup::Mid); + fill = &cg.tqbrush(TQColorGroup::Mid); else - fill = &cg.brush(TQColorGroup::Base); + fill = &cg.tqbrush(TQColorGroup::Base); drawLightBevel(p, r, cg, flags | Style_Sunken, fill); p->setPen(cg.text()); @@ -266,7 +266,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, cr.addCoords(2, 2, -2, -2); ir.addCoords(3, 3, -3, -3); - p->fillRect(r, cg.brush(TQColorGroup::Background)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Background)); p->setPen(cg.dark()); p->drawArc(r, 0, 16*360); @@ -308,7 +308,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPixmap pm(r.height(), r.width()); TQPainter p2(&pm); p2.fillRect(0, 0, pm.width(), pm.height(), - cg.brush(TQColorGroup::Highlight)); + cg.tqbrush(TQColorGroup::Highlight)); p2.setPen(cg.highlightedText()); p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title); p2.end(); @@ -332,7 +332,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, } } else { if (drawTitle) { - p->fillRect(r, cg.brush(TQColorGroup::Highlight)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight)); p->setPen(cg.highlightedText()); p->drawText(r, AlignCenter, title); } else { @@ -406,7 +406,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_WindowFrame: { int lw = data.isDefault() ? - pixelMetric(PM_DefaultFrameWidth) : data.lineWidth(); + tqpixelMetric(PM_DefaultFrameWidth) : data.lineWidth(); if ( ! ( flags & Style_Sunken ) ) flags |= Style_Raised; @@ -420,11 +420,11 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_PanelDockWindow: { int lw = data.isDefault() ? - pixelMetric(PM_DockWindowFrameWidth) : data.lineWidth(); + tqpixelMetric(PM_DockWindowFrameWidth) : data.lineWidth(); if (lw == 2) drawLightBevel(p, r, cg, flags | Style_Raised, - &cg.brush(TQColorGroup::Button)); + &cg.tqbrush(TQColorGroup::Button)); else TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data); break; @@ -433,10 +433,10 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_PanelMenuBar: { int lw = data.isDefault() ? - pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth(); + tqpixelMetric(PM_MenuBarFrameWidth) : data.lineWidth(); if (lw == 2) - drawLightBevel(p, r, cg, flags, &cg.brush(TQColorGroup::Button)); + drawLightBevel(p, r, cg, flags, &cg.tqbrush(TQColorGroup::Button)); else TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data); break; @@ -460,7 +460,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, pe = PE_ArrowUp; } - p->fillRect(fr, cg.brush((flags & Style_Down) ? + p->fillRect(fr, cg.tqbrush((flags & Style_Down) ? TQColorGroup::Midlight : TQColorGroup::Background)); tqdrawPrimitive(pe, p, ar, cg, flags); @@ -485,7 +485,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, pe = PE_ArrowDown; } - p->fillRect(fr, cg.brush((flags & Style_Down) ? + p->fillRect(fr, cg.tqbrush((flags & Style_Down) ? TQColorGroup::Midlight : TQColorGroup::Background)); tqdrawPrimitive(pe, p, ar, cg, flags); @@ -511,7 +511,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, fr.addCoords(2, 0, 0, 0); } - p->fillRect(fr, cg.brush((flags & Style_Down) ? + p->fillRect(fr, cg.tqbrush((flags & Style_Down) ? TQColorGroup::Midlight : TQColorGroup::Mid)); break; @@ -538,7 +538,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, drawLightBevel(p, fr, cg, ((flags | Style_Down) ^ Style_Down) | ((flags & Style_Enabled) ? Style_Raised : Style_Default), - &cg.brush(TQColorGroup::Button)); + &cg.tqbrush(TQColorGroup::Button)); break; } @@ -616,7 +616,7 @@ void LightStyleV2::tqdrawPrimitive( TQ_PrimitiveElement pe, } } -void LightStyleV2::drawControl( TQ_ControlElement control, +void LightStyleV2::tqdrawControl( TQ_ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -635,7 +635,7 @@ void LightStyleV2::drawControl( TQ_ControlElement control, tr.addCoords(0, 0, 0, -1); fr.addCoords(2, 2, -2, -2); - if ( tb->shape() == TQTabBar::RoundedBelow || tb->shape() == TQTabBar::TriangularBelow) { + if ( tb->tqshape() == TQTabBar::RoundedBelow || tb->tqshape() == TQTabBar::TriangularBelow) { tr = r; tr.addCoords(0, 1, 0, 0); fr = r; fr.addCoords(2, 2,-2, -4); below = true; @@ -790,7 +790,7 @@ void LightStyleV2::drawControl( TQ_ControlElement control, if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); else - p->fillRect(r, cg.brush(TQColorGroup::Button)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->setPen(cg.mid().dark(120)); p->drawLine(r.left() + 12, r.top() + 1, @@ -803,11 +803,11 @@ void LightStyleV2::drawControl( TQ_ControlElement control, if (flags & Style_Active) qDrawShadePanel(p, r, cg, true, 1, - &cg.brush(TQColorGroup::Midlight)); + &cg.tqbrush(TQColorGroup::Midlight)); else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); else - p->fillRect(r, cg.brush(TQColorGroup::Button)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); if ( !mi ) break; @@ -826,16 +826,16 @@ void LightStyleV2::drawControl( TQ_ControlElement control, bool reverse = TQApplication::reverseLayout(); if ( reverse ) { - cr = visualRect( cr, r ); - sr = visualRect( sr, r ); - tr = visualRect( tr, r ); - ir = visualRect( ir, r ); + cr = tqvisualRect( cr, r ); + sr = tqvisualRect( sr, r ); + tr = tqvisualRect( tr, r ); + ir = tqvisualRect( ir, r ); } if (mi->isChecked() && ! (flags & Style_Active) & (flags & Style_Enabled)) - qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight)); + qDrawShadePanel(p, cr, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight)); if (mi->iconSet()) { TQIconSet::Mode mode = @@ -936,13 +936,13 @@ void LightStyleV2::drawControl( TQ_ControlElement control, case CE_MenuBarEmptyArea: { - p->fillRect(r, cg.brush(TQColorGroup::Button)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); break; } case CE_DockWindowEmptyArea: { - p->fillRect(r, cg.brush(TQColorGroup::Button)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); break; } @@ -950,9 +950,9 @@ void LightStyleV2::drawControl( TQ_ControlElement control, case CE_MenuBarItem: { if (flags & Style_Active) - qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight)); + qDrawShadePanel(p, r, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight)); else - p->fillRect(r, cg.brush(TQColorGroup::Button)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); if (data.isDefault()) break; @@ -965,16 +965,16 @@ void LightStyleV2::drawControl( TQ_ControlElement control, } case CE_ProgressBarGroove: - drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(TQColorGroup::Background)); + drawLightBevel(p, r, cg, Style_Sunken, &cg.tqbrush(TQColorGroup::Background)); break; default: - TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data); + TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data); break; } } -void LightStyleV2::drawControlMask( TQ_ControlElement control, +void LightStyleV2::tqdrawControlMask( TQ_ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -986,7 +986,7 @@ void LightStyleV2::drawControlMask( TQ_ControlElement control, break; default: - TQCommonStyle::drawControlMask(control, p, widget, r, data); + TQCommonStyle::tqdrawControlMask(control, p, widget, r, data); break; } } @@ -1001,7 +1001,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const const TQPushButton *button = (const TQPushButton *) widget; int dbw1 = 0, dbw2 = 0; if (button->isDefault() || button->autoDefault()) { - dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget); + dbw1 = tqpixelMetric(PM_ButtonDefaultIndicator, widget); dbw2 = dbw1 * 2; } @@ -1019,7 +1019,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const return rect; } -void LightStyleV2::drawComplexControl( TQ_ComplexControl control, +void LightStyleV2::tqdrawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -1035,25 +1035,25 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control, const TQComboBox *combobox = (const TQComboBox *) widget; TQRect frame, arrow, field; frame = - TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxFrame, data), widget); arrow = - TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow, data), widget); field = - TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField, data), widget); if ((controls & SC_ComboBoxFrame) && frame.isValid()) drawLightBevel(p, frame, cg, flags | Style_Raised, - &cg.brush(TQColorGroup::Button)); + &cg.tqbrush(TQColorGroup::Button)); if ((controls & SC_ComboBoxArrow) && arrow.isValid()) { if (active == SC_ComboBoxArrow) - p->fillRect(arrow, cg.brush(TQColorGroup::Mid)); + p->fillRect(arrow, cg.tqbrush(TQColorGroup::Mid)); arrow.addCoords(4, 2, -2, -2); tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags); } @@ -1069,9 +1069,9 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control, if (flags & Style_HasFocus) { if (! combobox->editable()) { - p->fillRect( field, cg.brush( TQColorGroup::Highlight ) ); + p->fillRect( field, cg.tqbrush( TQColorGroup::Highlight ) ); TQRect fr = - TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), + TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); tqdrawPrimitive( PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder, @@ -1098,7 +1098,7 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control, if ((controls & SC_SpinWidgetFrame) && frame.isValid()) drawLightBevel(p, frame, cg, flags | Style_Sunken, - &cg.brush(TQColorGroup::Base)); + &cg.tqbrush(TQColorGroup::Base)); if ((controls & SC_SpinWidgetUp) && up.isValid()) { TQ_PrimitiveElement pe = PE_SpinWidgetUp; @@ -1109,7 +1109,7 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control, p->drawLine(up.topLeft(), up.bottomLeft()); up.addCoords(1, 0, 0, 0); - p->fillRect(up, cg.brush(TQColorGroup::Button)); + p->fillRect(up, cg.tqbrush(TQColorGroup::Button)); if (active == SC_SpinWidgetUp) p->setPen(cg.mid()); else @@ -1142,7 +1142,7 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control, p->drawLine(down.topLeft(), down.bottomLeft()); down.addCoords(1, 0, 0, 0); - p->fillRect(down, cg.brush(TQColorGroup::Button)); + p->fillRect(down, cg.tqbrush(TQColorGroup::Button)); if (active == SC_SpinWidgetDown) p->setPen(cg.mid()); else @@ -1274,30 +1274,30 @@ void LightStyleV2::drawComplexControl( TQ_ComplexControl control, drawLightBevel(p, groove, cg, ((flags | Style_Raised) ^ Style_Raised) | ((flags & Style_Enabled) ? Style_Sunken : Style_Default), - &cg.brush(TQColorGroup::Midlight)); + &cg.tqbrush(TQColorGroup::Midlight)); } if ((controls & SC_SliderHandle) && handle.isValid()) { drawLightBevel(p, handle, cg, ((flags | Style_Down) ^ Style_Down) | ((flags & Style_Enabled) ? Style_Raised : Style_Default), - &cg.brush(TQColorGroup::Button)); + &cg.tqbrush(TQColorGroup::Button)); } if (controls & SC_SliderTickmarks) - TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags, + TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data ); break; } case CC_ListView: // use the base style for CC_ListView - singleton->basestyle->drawComplexControl(control, p, widget, r, cg, flags, + singleton->basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data); break; default: - TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags, + TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data); break; } @@ -1315,7 +1315,7 @@ TQRect LightStyleV2::querySubControlMetrics( TQ_ComplexControl control, { const TQScrollBar *scrollbar = (const TQScrollBar *) widget; int sliderstart = scrollbar->sliderStart(); - int sbextent = pixelMetric(PM_ScrollBarExtent, widget); + int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget); int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ? scrollbar->width() : scrollbar->height()) - (sbextent * 3); int sliderlen; @@ -1326,7 +1326,7 @@ TQRect LightStyleV2::querySubControlMetrics( TQ_ComplexControl control, sliderlen = (scrollbar->pageStep() * maxlen) / (range + scrollbar->pageStep()); - int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -1413,7 +1413,7 @@ TQStyle::SubControl LightStyleV2::querySubControl( TQ_ComplexControl control, return ret; } -int LightStyleV2::pixelMetric( PixelMetric metric, +int LightStyleV2::tqpixelMetric( PixelMetric metric, const TQWidget *widget ) const { int ret; @@ -1468,7 +1468,7 @@ int LightStyleV2::pixelMetric( PixelMetric metric, case PM_SliderLength: case PM_SliderControlThickness: - ret = singleton->basestyle->pixelMetric( metric, widget ); + ret = singleton->basestyle->tqpixelMetric( metric, widget ); break; case PM_MaximumDragDistance: @@ -1476,7 +1476,7 @@ int LightStyleV2::pixelMetric( PixelMetric metric, break; default: - ret = TQCommonStyle::pixelMetric(metric, widget); + ret = TQCommonStyle::tqpixelMetric(metric, widget); break; } @@ -1590,7 +1590,7 @@ TQSize LightStyleV2::tqsizeFromContents( ContentsType contents, return ret; } -int LightStyleV2::styleHint( TQ_StyleHint stylehint, +int LightStyleV2::tqstyleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -1615,7 +1615,7 @@ int LightStyleV2::styleHint( TQ_StyleHint stylehint, break; default: - ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData); + ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData); break; } diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h index c4be4c0f3..9b54e5427 100644 --- a/kstyles/light/lightstyle-v2.h +++ b/kstyles/light/lightstyle-v2.h @@ -48,15 +48,15 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void drawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void drawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption & = TQStyleOption::Default) const; TQRect subRect(SubRect, const TQWidget *) const; - void drawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default ) const; @@ -67,12 +67,12 @@ public: SubControl querySubControl(TQ_ComplexControl, const TQWidget *, const TQPoint &, const TQStyleOption &data = TQStyleOption::Default ) const; - int pixelMetric(PixelMetric, const TQWidget * = 0 ) const; + int tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const; TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &, const TQStyleOption & = TQStyleOption::Default ) const; - int styleHint(TQ_StyleHint, const TQWidget * = 0, + int tqstyleHint(TQ_StyleHint, const TQWidget * = 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn * = 0 ) const; diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp index 3f5f5bab7..1493322fa 100644 --- a/kstyles/light/lightstyle-v3.cpp +++ b/kstyles/light/lightstyle-v3.cpp @@ -26,7 +26,7 @@ #include "tqapplication.h" #include "tqcheckbox.h" #include "tqpainter.h" -#include "palette.h" +#include "tqpalette.h" #include "tqframe.h" #include "tqpushbutton.h" #include "tqdrawutil.h" @@ -34,7 +34,7 @@ #include "tqscrollbar.h" #include "tqtabbar.h" #include "tqguardedptr.h" -#include "layout.h" +#include "tqlayout.h" #include "tqlineedit.h" #include "tqimage.h" #include "tqcombobox.h" @@ -249,7 +249,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, // fill the header if ( ! br.isValid() ) break; - p->fillRect( br, cg.brush( ( flags & Style_Down ) ? + p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); // the taskbuttons in kicker seem to allow the style to set the pencolor @@ -266,11 +266,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken)) - fill = &cg.brush(TQColorGroup::Midlight); + fill = &cg.tqbrush(TQColorGroup::Midlight); else - fill = &cg.brush(TQColorGroup::Button); + fill = &cg.tqbrush(TQColorGroup::Button); } else - fill = &cg.brush(TQColorGroup::Background); + fill = &cg.tqbrush(TQColorGroup::Background); bool etch = true; if ( flags & Style_ButtonDefault ) { @@ -278,7 +278,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, br.addCoords( 1, 1, -1, -1 ); } drawLightBevel( p, br, cg, flags, - pixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ), + tqpixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ), etch, true, fill ); break; } @@ -289,12 +289,12 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken)) - fill = &cg.brush(TQColorGroup::Midlight); + fill = &cg.tqbrush(TQColorGroup::Midlight); else - fill = &cg.brush(TQColorGroup::Button); + fill = &cg.tqbrush(TQColorGroup::Button); } else - fill = &cg.brush(TQColorGroup::Background); - drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ), + fill = &cg.tqbrush(TQColorGroup::Background); + drawLightBevel( p, r, cg, flags, tqpixelMetric( PM_DefaultFrameWidth ), false, true, fill ); break; @@ -306,11 +306,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if (flags & TQStyle::Style_Enabled) { if (sunken) - thefill = cg.brush(TQColorGroup::Midlight); + thefill = cg.tqbrush(TQColorGroup::Midlight); else - thefill = cg.brush(TQColorGroup::Button); + thefill = cg.tqbrush(TQColorGroup::Button); } else - thefill = cg.brush(TQColorGroup::Background); + thefill = cg.tqbrush(TQColorGroup::Background); p->setPen( cg.dark() ); p->drawLine(r.topLeft(), r.topRight()); @@ -353,11 +353,11 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_Indicator: const TQBrush *fill; if (! (flags & Style_Enabled)) - fill = &cg.brush(TQColorGroup::Background); + fill = &cg.tqbrush(TQColorGroup::Background); else if (flags & Style_Down) - fill = &cg.brush(TQColorGroup::Mid); + fill = &cg.tqbrush(TQColorGroup::Mid); else - fill = &cg.brush(TQColorGroup::Base); + fill = &cg.tqbrush(TQColorGroup::Base); drawLightBevel( p, r, cg, flags | Style_Sunken, 2, true, true, fill ); p->setPen(cg.text()); @@ -395,7 +395,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, cr.addCoords( 2, 2, -2, -2 ); ir.addCoords( 3, 3, -3, -3 ); - p->fillRect( r, cg.brush( TQColorGroup::Background ) ); + p->fillRect( r, cg.tqbrush( TQColorGroup::Background ) ); p->setPen( flags & Style_Down ? cg.mid() : ( flags & Style_Enabled ? cg.base() : cg.background() ) ); @@ -440,7 +440,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, TQPixmap pm(r.height(), r.width()); TQPainter p2(&pm); p2.fillRect(0, 0, pm.width(), pm.height(), - cg.brush(TQColorGroup::Highlight)); + cg.tqbrush(TQColorGroup::Highlight)); p2.setPen(cg.highlightedText()); p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title); p2.end(); @@ -461,7 +461,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, } } else { if (drawTitle) { - p->fillRect(r, cg.brush(TQColorGroup::Highlight)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight)); p->setPen(cg.highlightedText()); p->drawText(r, AlignCenter, title); } else { @@ -526,13 +526,13 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.brush( TQColorGroup::Button ) ); + p->fillRect( br, cg.tqbrush( TQColorGroup::Button ) ); break; } case PE_PanelPopup: drawLightBevel( p, r, cg, flags, - ( data.isDefault() ? pixelMetric(PM_DefaultFrameWidth) : + ( data.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : data.lineWidth() ), false, true ); break; @@ -545,7 +545,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, int cover = 0; int reallw = ( data.isDefault() ? - pixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() ); + tqpixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() ); cover = reallw - 1; if ( ! ( flags & Style_Sunken ) ) @@ -573,16 +573,16 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, case PE_PanelDockWindow: drawLightBevel( p, r, cg, flags, ( data.isDefault() ? - pixelMetric(PM_DefaultFrameWidth) : + tqpixelMetric(PM_DefaultFrameWidth) : data.lineWidth() ), false, false, - &cg.brush( TQColorGroup::Button ) ); + &cg.tqbrush( TQColorGroup::Button ) ); break; case PE_PanelMenuBar: drawLightBevel( p, r, cg, flags, ( data.isDefault() ? - pixelMetric(PM_MenuBarFrameWidth) : + tqpixelMetric(PM_MenuBarFrameWidth) : data.lineWidth() ), false, false, - &cg.brush( TQColorGroup::Button ) ); + &cg.tqbrush( TQColorGroup::Button ) ); break; case PE_ScrollBarSubLine: @@ -608,7 +608,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.brush( ( flags & Style_Down ) ? + p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); br.addCoords( 2, 2, -2, -2 ); @@ -642,7 +642,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.brush( ( flags & Style_Down ) ? + p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); br.addCoords( 2, 2, -2, -2 ); @@ -673,7 +673,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.brush( ( flags & Style_Down ) ? + p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); break; @@ -699,7 +699,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, if ( ! br.isValid() ) break; - p->fillRect( br, cg.brush( ( flags & Style_Down ) ? + p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ? TQColorGroup::Midlight : TQColorGroup::Button ) ); break; @@ -729,7 +729,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, p->drawLine( br.topRight(), br.bottomRight() ); br.addCoords( 1, 1, -1, -1 ); - p->fillRect( br, cg.brush( TQColorGroup::Highlight ) ); + p->fillRect( br, cg.tqbrush( TQColorGroup::Highlight ) ); break; } @@ -804,7 +804,7 @@ void LightStyleV3::tqdrawPrimitive( TQ_PrimitiveElement pe, } } -void LightStyleV3::drawControl( TQ_ControlElement control, +void LightStyleV3::tqdrawControl( TQ_ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -818,7 +818,7 @@ void LightStyleV3::drawControl( TQ_ControlElement control, const TQTabBar *tb = (const TQTabBar *) widget; TQRect br = r; - if ( tb->shape() == TQTabBar::RoundedAbove ) { + if ( tb->tqshape() == TQTabBar::RoundedAbove ) { if ( ! ( flags & Style_Selected ) ) { p->setPen( cg.background() ); p->drawLine( br.left(), br.bottom(), @@ -847,13 +847,13 @@ void LightStyleV3::drawControl( TQ_ControlElement control, if ( flags & Style_Selected ) { - p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.brush(TQColorGroup::Highlight)); + p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.tqbrush(TQColorGroup::Highlight)); br.addCoords( 1, 1, -4, 0 ); } else br.addCoords( 1, 1, -1, 0 ); p->fillRect( br, cg.background() ); - } else if ( tb->shape() == TQTabBar::RoundedBelow ) { + } else if ( tb->tqshape() == TQTabBar::RoundedBelow ) { if ( ! ( flags & Style_Selected ) ) { p->setPen( cg.background() ); p->drawLine( br.left(), br.top(), @@ -885,7 +885,7 @@ void LightStyleV3::drawControl( TQ_ControlElement control, if ( flags & Style_Selected ) { - p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.brush(TQColorGroup::Highlight)); + p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.tqbrush(TQColorGroup::Highlight)); br.addCoords( 1, 0, -3, -1 ); } else @@ -893,7 +893,7 @@ void LightStyleV3::drawControl( TQ_ControlElement control, p->fillRect( br, cg.background() ); } else - TQCommonStyle::drawControl( control, p, widget, r, cg, flags, data ); + TQCommonStyle::tqdrawControl( control, p, widget, r, cg, flags, data ); break; } @@ -911,7 +911,7 @@ void LightStyleV3::drawControl( TQ_ControlElement control, if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); else - p->fillRect(r, cg.brush(TQColorGroup::Button)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); p->setPen( cg.mid() ); p->drawLine(r.left() + 12, r.top() + 1, r.right() - 12, r.top() + 1); @@ -923,11 +923,11 @@ void LightStyleV3::drawControl( TQ_ControlElement control, if (flags & Style_Active) qDrawShadePanel(p, r, cg, true, 1, - &cg.brush(TQColorGroup::Midlight)); + &cg.tqbrush(TQColorGroup::Midlight)); else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() ) p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r ); else - p->fillRect(r, cg.brush(TQColorGroup::Button)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); if ( !mi ) break; @@ -946,16 +946,16 @@ void LightStyleV3::drawControl( TQ_ControlElement control, bool reverse = TQApplication::reverseLayout(); if ( reverse ) { - cr = visualRect( cr, r ); - sr = visualRect( sr, r ); - tr = visualRect( tr, r ); - ir = visualRect( ir, r ); + cr = tqvisualRect( cr, r ); + sr = tqvisualRect( sr, r ); + tr = tqvisualRect( tr, r ); + ir = tqvisualRect( ir, r ); } if (mi->isChecked() && ! (flags & Style_Active) & (flags & Style_Enabled)) - qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight)); + qDrawShadePanel(p, cr, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight)); if (mi->iconSet()) { TQIconSet::Mode mode = @@ -1057,16 +1057,16 @@ void LightStyleV3::drawControl( TQ_ControlElement control, case CE_MenuBarEmptyArea: { - p->fillRect(r, cg.brush(TQColorGroup::Button)); + p->fillRect(r, cg.tqbrush(TQColorGroup::Button)); break; } case CE_MenuBarItem: { if ( flags & Style_Active ) - qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight)); + qDrawShadePanel(p, r, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight)); else - p->fillRect( r, cg.brush( TQColorGroup::Button ) ); + p->fillRect( r, cg.tqbrush( TQColorGroup::Button ) ); if (data.isDefault()) break; @@ -1079,17 +1079,17 @@ void LightStyleV3::drawControl( TQ_ControlElement control, } case CE_ProgressBarGroove: - drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ), - true, true, &cg.brush( TQColorGroup::Background ) ); + drawLightBevel( p, r, cg, Style_Sunken, tqpixelMetric( PM_DefaultFrameWidth ), + true, true, &cg.tqbrush( TQColorGroup::Background ) ); break; default: - TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data); + TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data); break; } } -void LightStyleV3::drawControlMask( TQ_ControlElement control, +void LightStyleV3::tqdrawControlMask( TQ_ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1101,7 +1101,7 @@ void LightStyleV3::drawControlMask( TQ_ControlElement control, break; default: - TQCommonStyle::drawControlMask(control, p, widget, r, data); + TQCommonStyle::tqdrawControlMask(control, p, widget, r, data); break; } } @@ -1114,7 +1114,7 @@ TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const case SR_PushButtonFocusRect: { rect = TQCommonStyle::subRect( SR_PushButtonContents, widget ); - int bm = pixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2; + int bm = tqpixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2; rect.addCoords( hbm, hbm, -hbm, -hbm ); break; } @@ -1151,7 +1151,7 @@ TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const return rect; } -void LightStyleV3::drawComplexControl( TQ_ComplexControl control, +void LightStyleV3::tqdrawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -1167,15 +1167,15 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control, const TQComboBox *combobox = (const TQComboBox *) widget; TQRect frame, arrow, field; frame = - TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxFrame, data), widget); arrow = - TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow, data), widget); field = - TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, + TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField, data), widget); @@ -1185,7 +1185,7 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control, if ((controls & SC_ComboBoxArrow) && arrow.isValid()) { drawLightEtch( p, arrow, cg.button(), ( active == SC_ComboBoxArrow ) ); arrow.addCoords( 1, 1, -1, -1 ); - p->fillRect( arrow, cg.brush( TQColorGroup::Button ) ); + p->fillRect( arrow, cg.tqbrush( TQColorGroup::Button ) ); arrow.addCoords(3, 1, -1, -1); tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags); } @@ -1194,9 +1194,9 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control, if (flags & Style_HasFocus) { if (! combobox->editable()) { TQRect fr = - TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ), + TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ), widget ); - p->fillRect( fr, cg.brush( TQColorGroup::Highlight ) ); + p->fillRect( fr, cg.tqbrush( TQColorGroup::Highlight ) ); tqdrawPrimitive( PE_FocusRect, p, fr, cg, flags | Style_FocusAtBorder, TQStyleOption(cg.highlight())); @@ -1205,8 +1205,8 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control, p->setPen(cg.highlightedText()); } else { p->fillRect( field, ( ( flags & Style_Enabled ) ? - cg.brush( TQColorGroup::Base ) : - cg.brush( TQColorGroup::Background ) ) ); + cg.tqbrush( TQColorGroup::Base ) : + cg.tqbrush( TQColorGroup::Background ) ) ); p->setPen( cg.text() ); } } @@ -1236,7 +1236,7 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control, p->drawLine( up.topLeft(), up.bottomLeft() ); up.addCoords( 1, 0, 0, 0 ); - p->fillRect( up, cg.brush( TQColorGroup::Button ) ); + p->fillRect( up, cg.tqbrush( TQColorGroup::Button ) ); drawLightEtch( p, up, cg.button(), ( active == SC_SpinWidgetUp ) ); up.addCoords( 1, 0, 0, 0 ); @@ -1254,7 +1254,7 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control, p->drawLine( down.topLeft(), down.bottomLeft() ); down.addCoords( 1, 0, 0, 0 ); - p->fillRect( down, cg.brush( TQColorGroup::Button ) ); + p->fillRect( down, cg.tqbrush( TQColorGroup::Button ) ); drawLightEtch( p, down, cg.button(), ( active == SC_SpinWidgetDown ) ); down.addCoords( 1, 0, 0, 0 ); @@ -1409,19 +1409,19 @@ void LightStyleV3::drawComplexControl( TQ_ComplexControl control, } if (controls & SC_SliderTickmarks) - TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags, + TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, SC_SliderTickmarks, active, data ); break; } case CC_ListView: // use the base style for CC_ListView - basestyle->drawComplexControl(control, p, widget, r, cg, flags, + basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data); break; default: - TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags, + TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data); break; } @@ -1437,8 +1437,8 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, switch (control) { case CC_ComboBox: { - int fw = pixelMetric( PM_DefaultFrameWidth, widget ); - int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow + int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ); + int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow switch ( sc ) { case SC_ComboBoxFrame: @@ -1463,7 +1463,7 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, { const TQScrollBar *scrollbar = (const TQScrollBar *) widget; int sliderstart = scrollbar->sliderStart(); - int sbextent = pixelMetric(PM_ScrollBarExtent, widget); + int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget); int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ? scrollbar->width() : scrollbar->height()) - (sbextent * 3); int sliderlen; @@ -1474,7 +1474,7 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, sliderlen = (scrollbar->pageStep() * maxlen) / (range + scrollbar->pageStep()); - int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -1538,8 +1538,8 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, case CC_Slider: { const TQSlider *slider = (const TQSlider *) widget; - int tickOffset = pixelMetric( PM_SliderTickmarkOffset, widget ); - int thickness = pixelMetric( PM_SliderControlThickness, widget ); + int tickOffset = tqpixelMetric( PM_SliderTickmarkOffset, widget ); + int thickness = tqpixelMetric( PM_SliderControlThickness, widget ); switch ( sc ) { case SC_SliderGroove: @@ -1552,7 +1552,7 @@ TQRect LightStyleV3::querySubControlMetrics( TQ_ComplexControl control, case SC_SliderHandle: { int pos = slider->sliderStart(); - int len = pixelMetric( PM_SliderLength, widget ); + int len = tqpixelMetric( PM_SliderLength, widget ); if ( slider->orientation() == Qt::Horizontal ) ret.setRect( pos + 2, tickOffset + 2, len - 4, thickness - 4 ); @@ -1594,7 +1594,7 @@ TQStyle::SubControl LightStyleV3::querySubControl( TQ_ComplexControl control, return ret; } -int LightStyleV3::pixelMetric( PixelMetric metric, +int LightStyleV3::tqpixelMetric( PixelMetric metric, const TQWidget *widget ) const { int ret; @@ -1691,7 +1691,7 @@ int LightStyleV3::pixelMetric( PixelMetric metric, break; default: - ret = TQCommonStyle::pixelMetric(metric, widget); + ret = TQCommonStyle::tqpixelMetric(metric, widget); break; } @@ -1708,8 +1708,8 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents, switch (contents) { case CT_ComboBox: { - int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2; - int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow + int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow int w = contentsSize.width(); int h = contentsSize.height(); @@ -1729,7 +1729,7 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents, const TQPushButton *button = (const TQPushButton *) widget; ret = TQCommonStyle::tqsizeFromContents( contents, widget, contentsSize, data ); int w = ret.width(), h = ret.height(); - int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget ) * 2; + int dbi = tqpixelMetric( PM_ButtonDefaultIndicator, widget ) * 2; int mw = 80 - dbi, mh = 25 - dbi; // only expand the button if we are displaying text... @@ -1818,7 +1818,7 @@ TQSize LightStyleV3::tqsizeFromContents( ContentsType contents, return ret; } -int LightStyleV3::styleHint( TQ_StyleHint stylehint, +int LightStyleV3::tqstyleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -1847,7 +1847,7 @@ int LightStyleV3::styleHint( TQ_StyleHint stylehint, break; default: - ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData); + ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData); break; } diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h index a07bf6e53..a76279bfa 100644 --- a/kstyles/light/lightstyle-v3.h +++ b/kstyles/light/lightstyle-v3.h @@ -52,15 +52,15 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void drawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default ) const; - void drawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption & = TQStyleOption::Default) const; TQRect subRect(SubRect, const TQWidget *) const; - void drawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, + void tqdrawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default ) const; @@ -71,12 +71,12 @@ public: SubControl querySubControl(TQ_ComplexControl, const TQWidget *, const TQPoint &, const TQStyleOption &data = TQStyleOption::Default ) const; - int pixelMetric(PixelMetric, const TQWidget * = 0 ) const; + int tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const; TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &, const TQStyleOption & = TQStyleOption::Default ) const; - int styleHint(TQ_StyleHint, const TQWidget * = 0, + int tqstyleHint(TQ_StyleHint, const TQWidget * = 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn * = 0 ) const; diff --git a/kstyles/plastik/config/plastikconf.cpp b/kstyles/plastik/config/plastikconf.cpp index 5412a61bf..70d4f6cfa 100644 --- a/kstyles/plastik/config/plastikconf.cpp +++ b/kstyles/plastik/config/plastikconf.cpp @@ -25,7 +25,7 @@ DEALINGS IN THE SOFTWARE. */ #include <tqcheckbox.h> -#include <layout.h> +#include <tqlayout.h> #include <tqhbox.h> #include <tqsettings.h> #include <tqcolor.h> diff --git a/kstyles/plastik/plastik.cpp b/kstyles/plastik/plastik.cpp index 609ec91b2..d935a0ee5 100644 --- a/kstyles/plastik/plastik.cpp +++ b/kstyles/plastik/plastik.cpp @@ -885,21 +885,21 @@ void PlastikStyle::renderPanel(TQPainter *p, r.coords(&x, &y, &x2, &y2); if (kickerMode && - p->device() && p->device()->devType() == TQInternal::Widget && - TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->device()))->className()) == "FittsLawFrame") { + p->tqdevice() && p->tqdevice()->devType() == TQInternal::Widget && + TQCString(TQT_TQWIDGET(static_cast<TQPaintDevice*>(p->tqdevice()))->className()) == "FittsLawFrame") { // Stolen wholesale from Keramik. I don't like it, but oh well. if (sunken) { const TQCOORD corners[] = { x2, y, x2, y2, x, y2, x, y }; p->setPen(g.background().dark()); p->drawConvexPolygon(TQPointArray(4, corners)); p->setPen(g.background().light()); - p->drawPolyline(TQPointArray(4, corners), 0, 3); + p->tqdrawPolyline(TQPointArray(4, corners), 0, 3); } else { const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 }; p->setPen(g.background().dark()); p->drawPolygon(TQPointArray(4, corners)); p->setPen(g.background().light()); - p->drawPolyline(TQPointArray(4, corners), 0, 3); + p->tqdrawPolyline(TQPointArray(4, corners), 0, 3); } } else { renderContour(p, r, g.background(), getColor(g, PanelContour) ); @@ -1483,7 +1483,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, if(!kickerMode) { // detect if this is the left most header item bool isFirst = false; - TQHeader *header = dynamic_cast<TQHeader*>(p->device() ); + TQHeader *header = dynamic_cast<TQHeader*>(p->tqdevice() ); if (header) { isFirst = header->mapToIndex(header->sectionAt(r.x() ) ) == 0; } @@ -1819,7 +1819,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, // -------------- case PE_Splitter: { // highlight on mouse over - TQColor color = (static_cast<TQPaintDevice*>(static_cast<TQWidget*>(hoverWidget)) == static_cast<TQPaintDevice*>(p->device()))?TQColor(cg.background().light(100+_contrast)):cg.background(); + TQColor color = (static_cast<TQPaintDevice*>(static_cast<TQWidget*>(hoverWidget)) == static_cast<TQPaintDevice*>(p->tqdevice()))?TQColor(cg.background().light(100+_contrast)):cg.background(); p->fillRect(r, color); if (w > h) { if (h > 4) { @@ -1862,9 +1862,9 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, bool isEnabled = true; // panel is highlighted by default if it has focus, but if we have access to the // widget itself we can try to avoid highlighting in case it's readOnly or disabled. - if (p->device() && dynamic_cast<TQLineEdit*>(p->device())) + if (p->tqdevice() && dynamic_cast<TQLineEdit*>(p->tqdevice())) { - TQLineEdit* lineEdit = dynamic_cast<TQLineEdit*>(p->device()); + TQLineEdit* lineEdit = dynamic_cast<TQLineEdit*>(p->tqdevice()); isReadOnly = lineEdit->isReadOnly(); isEnabled = lineEdit->isEnabled(); } @@ -1881,7 +1881,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, // only thing we know is that khtml buffers its widgets into a pixmap. So // when the paint device is a TQPixmap, chances are high that we are in khtml. // 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->tqdevice() && dynamic_cast<TQPixmap*>(p->tqdevice() ) ) { contourFlags += Draw_AlphaBlend; } @@ -1942,7 +1942,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, case PE_PanelMenuBar: case PE_PanelDockWindow: { // fix for toolbar lag (from Mosfet Liquid) - TQWidget* w = dynamic_cast<TQWidget*>(p->device()); + TQWidget* w = dynamic_cast<TQWidget*>(p->tqdevice()); if(w && w->backgroundMode() == PaletteButton) w->setBackgroundMode(PaletteBackground); p->fillRect(r, cg.brush(TQColorGroup::Background)); @@ -2095,11 +2095,11 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } } - const TQWMatrix oldMatrix( p->worldMatrix() ); + const TQWMatrix oldMatrix( p->tqworldMatrix() ); if (flags & Style_Down) { - p->translate(pixelMetric(PM_ButtonShiftHorizontal), - pixelMetric(PM_ButtonShiftVertical)); + p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), + tqpixelMetric(PM_ButtonShiftVertical)); } a.translate((r.x()+r.width()/2), (r.y()+r.height()/2)); @@ -2139,7 +2139,7 @@ void PlastikStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } -void PlastikStyle::drawControl(TQ_ControlElement element, +void PlastikStyle::tqdrawControl(TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -2301,7 +2301,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, if(cw) cornerWidget = true; } - TQTabBar::Shape tbs = tb->shape(); + TQTabBar::Shape tbs = tb->tqshape(); bool selected = false; if (flags & Style_Selected) selected = true; TabPosition pos; @@ -2337,7 +2337,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget); break; default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } break; @@ -2380,15 +2380,15 @@ void PlastikStyle::drawControl(TQ_ControlElement element, // Shift button contents if pushed. if ( active ) { - x += pixelMetric(PM_ButtonShiftHorizontal, widget); - y += pixelMetric(PM_ButtonShiftVertical, widget); + x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); + y += tqpixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = pixelMetric( PM_MenuButtonIndicator, widget ); + int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); if ( button->iconSet() && !button->iconSet()->isNull() && (dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w ) { @@ -2397,7 +2397,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, else { p->setPen(cg.buttonText()); - tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), + tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), cg, flags, opt ); w -= dx; } @@ -2423,7 +2423,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap ); if (cornArrow) //Draw over the icon - tqdrawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), + tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), cg, flags, opt ); @@ -2433,14 +2433,14 @@ void PlastikStyle::drawControl(TQ_ControlElement element, } // Make the label indicate if the button is a default button or not - drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(), + drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix, button->tqcolorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, - &button->colorGroup().buttonText() ); + &button->tqcolorGroup().buttonText() ); if ( flags & Style_HasFocus ) tqdrawPrimitive( PE_FocusRect, p, - visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), + tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); break; } @@ -2490,7 +2490,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, bool enabled = mi->isEnabled(); bool checkable = popupmenu->isCheckable(); bool active = flags & Style_Active; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); bool reverse = TQApplication::reverseLayout(); if ( checkable ) checkcol = QMAX( checkcol, 20 ); @@ -2525,7 +2525,7 @@ void PlastikStyle::drawControl(TQ_ControlElement element, break; } - TQRect cr = visualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r ); + TQRect cr = tqvisualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r ); // Do we have an icon? if ( mi->iconSet() ) { @@ -2669,8 +2669,8 @@ void PlastikStyle::drawControl(TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = pixelMetric(PM_MenuButtonIndicator) - 1; - TQRect vr = visualRect( TQRect( r.x() + r.width() - 5 - 1 - dim, + int dim = tqpixelMetric(PM_MenuButtonIndicator) - 1; + TQRect vr = tqvisualRect( TQRect( r.x() + r.width() - 5 - 1 - dim, r.y() + r.height() / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -2706,11 +2706,11 @@ void PlastikStyle::drawControl(TQ_ControlElement element, break; default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } } -void PlastikStyle::drawControlMask(TQ_ControlElement element, +void PlastikStyle::tqdrawControlMask(TQ_ControlElement element, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -2725,12 +2725,12 @@ void PlastikStyle::drawControlMask(TQ_ControlElement element, } default: { - KStyle::drawControlMask (element, p, w, r, opt); + KStyle::tqdrawControlMask (element, p, w, r, opt); } } } -void PlastikStyle::drawComplexControlMask(TQ_ComplexControl c, +void PlastikStyle::tqdrawComplexControlMask(TQ_ComplexControl c, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -2746,12 +2746,12 @@ void PlastikStyle::drawComplexControlMask(TQ_ComplexControl c, break; } default: { - KStyle::drawComplexControlMask (c, p, w, r, o); + KStyle::tqdrawComplexControlMask (c, p, w, r, o); } } } -void PlastikStyle::drawComplexControl(TQ_ComplexControl control, +void PlastikStyle::tqdrawComplexControl(TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -3141,7 +3141,7 @@ void PlastikStyle::drawComplexControl(TQ_ComplexControl control, } default: - KStyle::drawComplexControl(control, p, widget, + KStyle::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; @@ -3246,15 +3246,15 @@ TQRect PlastikStyle::querySubControlMetrics(TQ_ComplexControl control, } } -int PlastikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const +int PlastikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const { switch(m) { // TABS // ---- case PM_TabBarTabVSpace: { const TQTabBar * tb = (const TQTabBar *) widget; - if (tb->shape() == TQTabBar::RoundedAbove || - tb->shape() == TQTabBar::RoundedBelow) + if (tb->tqshape() == TQTabBar::RoundedAbove || + tb->tqshape() == TQTabBar::RoundedBelow) return 12; else return 4; @@ -3343,7 +3343,7 @@ int PlastikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const } default: - return KStyle::pixelMetric(m, widget); + return KStyle::tqpixelMetric(m, widget); } } @@ -3412,8 +3412,8 @@ TQSize PlastikStyle::tqsizeFromContents(ContentsType t, { const TQPushButton* btn = static_cast<const TQPushButton*>(widget); - int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget); - int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget); + int w = s.width() + 2 * tqpixelMetric(PM_ButtonMargin, widget); + int h = s.height() + 2 * tqpixelMetric(PM_ButtonMargin, widget); if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h); return TQSize( w+25, h+5 ); @@ -3434,7 +3434,7 @@ TQSize PlastikStyle::tqsizeFromContents(ContentsType t, return KStyle::tqsizeFromContents (t, widget, s, opt); } -int PlastikStyle::styleHint( TQ_StyleHint stylehint, +int PlastikStyle::tqstyleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -3444,7 +3444,7 @@ int PlastikStyle::styleHint( TQ_StyleHint stylehint, return 96; // Motif-like delay... default: - return KStyle::styleHint(stylehint, widget, option, returnData); + return KStyle::tqstyleHint(stylehint, widget, option, returnData); } } @@ -3464,14 +3464,14 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) TQWidget* spinbox = widget->parentWidget(); if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut)) { - spinbox->repaint(false); + spinbox->tqrepaint(false); } return false; } if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut)) { - widget->repaint(false); + widget->tqrepaint(false); } return false; } @@ -3485,13 +3485,13 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) { TQWidget* button = TQT_TQWIDGET(obj); hoverWidget = button; - button->repaint(false); + button->tqrepaint(false); } else if ((ev->type() == TQEvent::Leave) && (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(hoverWidget)) ) { TQWidget* button = TQT_TQWIDGET(obj); hoverWidget = 0; - button->repaint(false); + button->tqrepaint(false); } return false; } @@ -3501,7 +3501,7 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) TQWidget* tabbar = TQT_TQWIDGET(obj); hoverWidget = tabbar; hoverTab = 0; - tabbar->repaint(false); + tabbar->tqrepaint(false); } else if (ev->type() == TQEvent::MouseMove) { @@ -3512,15 +3512,15 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) // avoid unnecessary repaints (which otherwise would occour on every // MouseMove event causing high cpu load). - bool repaint = true; + bool tqrepaint = true; TQTab *tab = tabbar->selectTab(me->pos() ); if (hoverTab == tab) - repaint = false; + tqrepaint = false; hoverTab = tab; - if (repaint) - tabbar->repaint(false); + if (tqrepaint) + tabbar->tqrepaint(false); } } else if (ev->type() == TQEvent::Leave) @@ -3528,7 +3528,7 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev) TQWidget* tabbar = TQT_TQWIDGET(obj); hoverWidget = 0; hoverTab = 0; - tabbar->repaint(false); + tabbar->tqrepaint(false); } return false; } diff --git a/kstyles/plastik/plastik.h b/kstyles/plastik/plastik.h index fbac34232..6fa325db9 100644 --- a/kstyles/plastik/plastik.h +++ b/kstyles/plastik/plastik.h @@ -81,7 +81,7 @@ public: SFlags flags = Style_Default, const TQStyleOption &opt = TQStyleOption::Default ) const; - void drawControl(TQ_ControlElement element, + void tqdrawControl(TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -89,9 +89,9 @@ public: SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControlMask( TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const; + void tqdrawControlMask( TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const; - void drawComplexControl(TQ_ComplexControl control, + void tqdrawComplexControl(TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -101,7 +101,7 @@ public: SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - int pixelMetric(PixelMetric m, + int tqpixelMetric(PixelMetric m, const TQWidget *widget = 0 ) const; TQRect subRect(SubRect r, @@ -112,7 +112,7 @@ public: SubControl subcontrol, const TQStyleOption &opt = TQStyleOption::Default ) const; - void drawComplexControlMask(TQStyle::TQ_ComplexControl c, + void tqdrawComplexControlMask(TQStyle::TQ_ComplexControl c, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -123,7 +123,7 @@ public: const TQSize &s, const TQStyleOption &o) const; - int styleHint(TQ_StyleHint, const TQWidget * = 0, + int tqstyleHint(TQ_StyleHint, const TQWidget * = 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn * = 0 ) const; diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp index 4c8a7ad5b..f1416526e 100644 --- a/kstyles/web/webstyle.cpp +++ b/kstyles/web/webstyle.cpp @@ -22,7 +22,7 @@ #endif #include <tqmenudata.h> -#include <palette.h> +#include <tqpalette.h> #include <tqbitmap.h> #include <tqtabbar.h> #include <tqpointarray.h> @@ -92,7 +92,7 @@ scrollBarControlsMetrics int extent = horizontal ? sb->height() : sb->width(); - TQColorGroup g = sb->colorGroup(); + TQColorGroup g = sb->tqcolorGroup(); if (sliderStart > sliderMax) sliderStart = sliderMax; @@ -303,12 +303,12 @@ WebStyle::eventFilter(TQObject * o, TQEvent * e) if (e->type() == TQEvent::Enter) { _highlightedButton = pb; - pb->repaint(false); + pb->tqrepaint(false); } else if (e->type() == TQEvent::Leave) { _highlightedButton = 0; - pb->repaint(false); + pb->tqrepaint(false); } return false; @@ -371,14 +371,14 @@ WebStyle::drawPushButton(TQPushButton * b, TQPainter * p) bool sunken(b->isDown() || b->isOn()); bool hl(_highlightedButton == b); - TQColor bg(b->colorGroup().button()); + TQColor bg(b->tqcolorGroup().button()); p->save(); - p->fillRect(b->rect(), b->colorGroup().brush(TQColorGroup::Background)); + p->fillRect(b->rect(), b->tqcolorGroup().brush(TQColorGroup::Background)); if (b->isDefault()) { - TQColor c(hl ? b->colorGroup().highlight() : b->colorGroup().mid()); + TQColor c(hl ? b->tqcolorGroup().highlight() : b->tqcolorGroup().mid()); p->setPen(contrastingForeground(c, bg)); @@ -391,26 +391,26 @@ WebStyle::drawPushButton(TQPushButton * b, TQPainter * p) 4, b->width() - 8, b->height() - 8, - b->colorGroup().brush(TQColorGroup::Button) + b->tqcolorGroup().brush(TQColorGroup::Button) ); if (b->isEnabled()) { if (sunken) { - p->setPen(contrastingForeground(b->colorGroup().light(), bg)); + p->setPen(contrastingForeground(b->tqcolorGroup().light(), bg)); } else { if (hl) - p->setPen(contrastingForeground(b->colorGroup().highlight(), bg)); + p->setPen(contrastingForeground(b->tqcolorGroup().highlight(), bg)); else - p->setPen(contrastingForeground(b->colorGroup().mid(), bg)); + p->setPen(contrastingForeground(b->tqcolorGroup().mid(), bg)); } } else { - p->setPen(b->colorGroup().button()); + p->setPen(b->tqcolorGroup().button()); } drawFunkyRect(p, 3, 3, b->width() - 6, b->height() - 6, true); @@ -459,7 +459,7 @@ WebStyle::drawScrollBarControls rSlider ); - TQColorGroup g(sb->colorGroup()); + TQColorGroup g(sb->tqcolorGroup()); if (controls & AddLine && rAdd.isValid()) { @@ -754,7 +754,7 @@ WebStyle::drawExclusiveIndicator p->setBrush(g.brush(TQColorGroup::Background)); - // Avoid misshapen ellipses. Qt or X bug ? Who knows... + // Avoid mistqshapen ellipses. Qt or X bug ? Who knows... if (0 == w % 2) --w; @@ -1450,14 +1450,14 @@ WebStyle::drawTab { TQRect r(tab->rect()); - TQColorGroup g(tabBar->colorGroup()); + TQColorGroup g(tabBar->tqcolorGroup()); p->save(); p->setPen(selected ? g.dark() : g.mid()); p->fillRect(r, g.brush(TQColorGroup::Background)); - switch (tabBar->shape()) + switch (tabBar->tqshape()) { case TQTabBar::RoundedAbove: case TQTabBar::TriangularAbove: diff --git a/kstyles/web/webstyle.h b/kstyles/web/webstyle.h index fffcbb965..5cd930c73 100644 --- a/kstyles/web/webstyle.h +++ b/kstyles/web/webstyle.h @@ -21,7 +21,7 @@ #define WEB_STYLE_H #include <kstyle.h> -#include <palette.h> +#include <tqpalette.h> class TQPainter; class TQScrollBar; |