diff options
author | Timothy Pearson <[email protected]> | 2011-12-18 18:15:07 -0600 |
---|---|---|
committer | Timothy Pearson <[email protected]> | 2011-12-18 18:15:07 -0600 |
commit | 965dc06c3148fe15166123ff463a32a50c6077ba (patch) | |
tree | 2065fd8d7aae25c1b2d2253e1dc9bc6726d3faab /style | |
parent | 77252ab600ddb54c54afda4182db0b62e6734ae8 (diff) | |
download | tde-style-qtcurve-965dc06c3148fe15166123ff463a32a50c6077ba.tar.gz tde-style-qtcurve-965dc06c3148fe15166123ff463a32a50c6077ba.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'style')
-rw-r--r-- | style/qtc_fixx11h.h | 28 | ||||
-rw-r--r-- | style/qtc_kstyle.cpp | 30 | ||||
-rw-r--r-- | style/qtc_kstyle.h | 10 | ||||
-rw-r--r-- | style/qtcurve.cpp | 170 | ||||
-rw-r--r-- | style/qtcurve.h | 12 |
5 files changed, 125 insertions, 125 deletions
diff --git a/style/qtc_fixx11h.h b/style/qtc_fixx11h.h index efa125a..572870a 100644 --- a/style/qtc_fixx11h.h +++ b/style/qtc_fixx11h.h @@ -168,25 +168,25 @@ const int GrayScale = XGrayScale; #endif // Affects: Should be without side effects. -#ifdef tqStatus -#ifndef FIXX11H_tqStatus -#define FIXX11H_tqStatus -typedef tqStatus XtqStatus; -#undef tqStatus -typedef XtqStatus tqStatus; +#ifdef Status +#ifndef FIXX11H_Status +#define FIXX11H_Status +typedef Status XStatus; +#undef Status +typedef XStatus Status; #endif -#undef tqStatus +#undef Status #endif // Affects: Should be without side effects. -#ifdef tqCursorShape -#ifndef FIXX11H_tqCursorShape -#define FIXX11H_tqCursorShape -const int XtqCursorShape = tqCursorShape; -#undef tqCursorShape -const int tqCursorShape = tqCursorShape; +#ifdef CursorShape +#ifndef FIXX11H_CursorShape +#define FIXX11H_CursorShape +const int XCursorShape = CursorShape; +#undef CursorShape +const int CursorShape = CursorShape; #endif -#undef tqCursorShape +#undef CursorShape #endif // template ---> diff --git a/style/qtc_kstyle.cpp b/style/qtc_kstyle.cpp index 910ec7c..2f5b687 100644 --- a/style/qtc_kstyle.cpp +++ b/style/qtc_kstyle.cpp @@ -423,7 +423,7 @@ void TQtCKStyle::drawPrimitive( PrimitiveElement pe, -void TQtCKStyle::tqdrawControl( ControlElement element, +void TQtCKStyle::drawControl( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -721,7 +721,7 @@ void TQtCKStyle::tqdrawControl( ControlElement element, } default: - TQCommonStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + TQCommonStyle::drawControl(element, p, widget, r, cg, flags, opt); } } @@ -748,7 +748,7 @@ TQRect TQtCKStyle::subRect(SubRect r, const TQWidget* widget) const } -int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const +int TQtCKStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const { switch(m) { @@ -769,7 +769,7 @@ int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const && widget->inherits(TQDOCKWINDOWHANDLE_OBJECT_NAME_STRING) ) return widget->fontMetrics().lineSpacing(); else - return TQCommonStyle::tqpixelMetric(m, widget); + return TQCommonStyle::pixelMetric(m, widget); } // TABS @@ -853,10 +853,10 @@ int TQtCKStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const return 0; case PM_PopupMenuScrollerHeight: - return tqpixelMetric( PM_ScrollBarExtent, 0); + return pixelMetric( PM_ScrollBarExtent, 0); default: - return TQCommonStyle::tqpixelMetric( m, widget ); + return TQCommonStyle::pixelMetric( m, widget ); } } @@ -873,7 +873,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void TQtCKStyle::tqdrawComplexControl( ComplexControl control, +void TQtCKStyle::drawComplexControl( ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -996,7 +996,7 @@ void TQtCKStyle::tqdrawComplexControl( ComplexControl control, // Draw the tickmarks if (controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, &p2, widget, + TQCommonStyle::drawComplexControl(control, &p2, widget, r, cg, flags, SC_SliderTickmarks, active, opt); // Draw the slider handle @@ -1022,7 +1022,7 @@ void TQtCKStyle::tqdrawComplexControl( ComplexControl control, // Paint the icon and text. if ( controls & SC_ListView ) - TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); // If we're have a branch or are expanded... if ( controls & (SC_ListViewBranch | SC_ListViewExpand) ) @@ -1162,7 +1162,7 @@ void TQtCKStyle::tqdrawComplexControl( ComplexControl control, } default: - TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } @@ -1201,7 +1201,7 @@ TQRect TQtCKStyle::querySubControlMetrics( ComplexControl control, const TQScrollBar *sb = (const TQScrollBar*)widget; bool horizontal = sb->orientation() == Qt::Horizontal; int sliderstart = sb->sliderStart(); - int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget); + int sbextent = pixelMetric(PM_ScrollBarExtent, widget); int maxlen = (horizontal ? sb->width() : sb->height()) - (sbextent * (threeButtonScrollBar ? 3 : 2)); int sliderlen; @@ -1212,7 +1212,7 @@ TQRect TQtCKStyle::querySubControlMetrics( ComplexControl control, uint range = sb->maxValue() - sb->minValue(); sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep()); - int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -1602,7 +1602,7 @@ TQPixmap TQtCKStyle::stylePixmap( StylePixmap stylepixmap, } -int TQtCKStyle::tqstyleHint( StyleHint sh, const TQWidget* w, +int TQtCKStyle::styleHint( StyleHint sh, const TQWidget* w, const TQStyleOption &opt, TQStyleHintReturn* shr) const { switch (sh) @@ -1617,7 +1617,7 @@ int TQtCKStyle::tqstyleHint( StyleHint sh, const TQWidget* w, return d->menuAltKeyNavigation ? 1 : 0; case SH_PopupMenu_SubMenuPopupDelay: - if ( tqstyleHint( SH_PopupMenu_SloppySubMenus, w ) ) + if ( styleHint( SH_PopupMenu_SloppySubMenus, w ) ) return TQMIN( 100, d->popupMenuDelay ); else return d->popupMenuDelay; @@ -1653,7 +1653,7 @@ int TQtCKStyle::tqstyleHint( StyleHint sh, const TQWidget* w, } default: - return TQCommonStyle::tqstyleHint(sh, w, opt, shr); + return TQCommonStyle::styleHint(sh, w, opt, shr); } } diff --git a/style/qtc_kstyle.h b/style/qtc_kstyle.h index 8b3bc8c..51243f7 100644 --- a/style/qtc_kstyle.h +++ b/style/qtc_kstyle.h @@ -224,7 +224,7 @@ class TQtCKStyle: public TQCommonStyle * * @see KStyle::KStylePrimitive * @see TQStyle::drawPrimitive - * @see TQStyle::tqdrawComplexControl + * @see TQStyle::drawComplexControl */ virtual void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, @@ -262,7 +262,7 @@ class TQtCKStyle: public TQCommonStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawControl( ControlElement element, + void drawControl( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -270,7 +270,7 @@ class TQtCKStyle: public TQCommonStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawComplexControl( ComplexControl control, + void drawComplexControl( ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -290,7 +290,7 @@ class TQtCKStyle: public TQCommonStyle SubControl sc, const TQStyleOption& = TQStyleOption::Default ) const; - int tqpixelMetric( PixelMetric m, + int pixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; TQRect subRect( SubRect r, @@ -300,7 +300,7 @@ class TQtCKStyle: public TQCommonStyle const TQWidget* widget = 0, const TQStyleOption& = TQStyleOption::Default ) const; - int tqstyleHint( StyleHint sh, + int styleHint( StyleHint sh, const TQWidget* w = 0, const TQStyleOption &opt = TQStyleOption::Default, TQStyleHintReturn* shr = 0 ) const; diff --git a/style/qtcurve.cpp b/style/qtcurve.cpp index 84853da..97dee20 100644 --- a/style/qtcurve.cpp +++ b/style/qtcurve.cpp @@ -53,7 +53,7 @@ KHTML Srollbars: For some reason Scrollbars in KHTML seem to lose the bottom/left pixels. As if KHTML expects -the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the tqpixelMetric +the scrollbar to be 1 pixel smaller/thinner than it actually is. To 'fix' this, the pixelMetric function will return 1 scrollbar with 1 greater than standard for form widgets, or where widget==0L In the CC_ScrollBar draw code, the rects used for each component are shrunk by 1, in the appropriate @@ -1218,7 +1218,7 @@ void TQtCurveStyle::polish(TQApplication *app) // works around this... if(opts.useHighlightForMenu) { - TQMetaObject *meta=(TQMetaObject *)tqmetaObject(); + TQMetaObject *meta=(TQMetaObject *)metaObject(); #ifdef USE_QT4 #warning Qt4 does not allow the metaobject classname to be set (skipping) @@ -2005,7 +2005,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) *parent(TQT_TQWIDGET(object->parent())); if(IS_FLAT(opts.toolbarAppearance)) - TQPainter(widget).fillRect(widget->rect(), parent->tqcolorGroup().background()); + TQPainter(widget).fillRect(widget->rect(), parent->colorGroup().background()); else { int y_offset(widget->y()); @@ -2034,7 +2034,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) else bgndRect.addCoords(-1, 0, 1, 0); - drawMenuOrToolBarBackground(&p, bgndRect, parent->tqcolorGroup(), false, horiz); + drawMenuOrToolBarBackground(&p, bgndRect, parent->colorGroup(), false, horiz); } if(!::tqqt_cast<TQLineEdit*>(object) && !::tqqt_cast<TQTextEdit*>(object) && @@ -2080,10 +2080,10 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) TQPainter painter(frame); if (TQFrame::VLine==frame->frameShape()) tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(), - frame->tqcolorGroup(), Style_Horizontal); + frame->colorGroup(), Style_Horizontal); else if (TQFrame::HLine==frame->frameShape()) tqdrawPrimitive(PE_DockWindowSeparator, &painter, frame->rect(), - frame->tqcolorGroup()); + frame->colorGroup()); else return false; return true; // been drawn! @@ -2103,7 +2103,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) r.addCoords(0, 0, 0, -tbHeight); else r.addCoords(0, tbHeight, 0, 0); - tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->tqcolorGroup(), + tqdrawPrimitive(PE_PanelTabWidget, &painter, r, widget->colorGroup(), Style_Horizontal|Style_Enabled); return true; } @@ -2143,7 +2143,7 @@ bool TQtCurveStyle::eventFilter(TQObject *object, TQEvent *event) r.setY(r.y()-y_offset); r.setHeight(parent->rect().height()); - drawMenuOrToolBarBackground(&p, r, parent->tqcolorGroup()); + drawMenuOrToolBarBackground(&p, r, parent->colorGroup()); return true; } } @@ -3941,7 +3941,7 @@ void TQtCurveStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, TQPainter *p, const if(itsActive && opts.shadeMenubarOnlyWhenActive && SHADE_NONE!=opts.shadeMenubars) { - TQWidget *top=w->tqtopLevelWidget(); + TQWidget *top=w->topLevelWidget(); if(top && !top->isActiveWindow()) itsActive=false; @@ -4457,7 +4457,7 @@ void TQtCurveStyle::drawKStylePrimitive(KStylePrimitive kpe, TQPainter *p, const } } -void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::drawControl(ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &data) const { @@ -4711,7 +4711,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ const TQTabBar *tb((const TQTabBar *) widget); TQTab *t(data.tab()); TQRect tr(r); - int shift(tqpixelMetric(PM_TabBarTabShiftVertical, tb)); + int shift(pixelMetric(PM_TabBarTabShiftVertical, tb)); if (t->identifier() == tb->currentTab()) { @@ -4724,7 +4724,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ if(APP_MACTOR==itsThemedApp) { - tqdrawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data); + drawControl(CE_TabBarTab, p, widget, t->rect(), cg, flags, data); if(t->iconSet()) { @@ -4741,8 +4741,8 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ if(!(flags&Style_Selected)) { - xoff = tqpixelMetric(PM_TabBarTabShiftHorizontal, widget); - yoff = tqpixelMetric(PM_TabBarTabShiftVertical, widget); + xoff = pixelMetric(PM_TabBarTabShiftHorizontal, widget); + yoff = pixelMetric(PM_TabBarTabShiftVertical, widget); } p->drawPixmap(t->rect().left()+8+xoff, t->rect().center().y()-pixh/2 + yoff, pixmap); @@ -4778,16 +4778,16 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ // Shift button contents if pushed. if (active) { - x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); - y += tqpixelMetric(PM_ButtonShiftVertical, widget); + x += pixelMetric(PM_ButtonShiftHorizontal, widget); + y += pixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if (button->isMenuButton()) { - int dx(tqpixelMetric(PM_MenuButtonIndicator, widget)), - margin(tqpixelMetric(PM_ButtonMargin, widget)); + int dx(pixelMetric(PM_MenuButtonIndicator, widget)), + margin(pixelMetric(PM_ButtonMargin, widget)); if(button->iconSet() && !button->iconSet()->isNull() && (dx+button->iconSet()->pixmap(TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off @@ -4796,7 +4796,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ //the widget else { - ::drawArrow(p, tqvisualRect(TQRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r), + ::drawArrow(p, visualRect(TQRect((x + w) - (dx + margin + arrowOffset), y, dx, h), r), MO_ARROW(cg.buttonText()), PE_ArrowDown, opts); w-=(dx+arrowOffset); } @@ -4839,7 +4839,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ } if (cornArrow) //Draw over the icon - ::drawArrow(p, tqvisualRect(TQRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r), + ::drawArrow(p, visualRect(TQRect(x + w - (6+arrowOffset), y + h - (6+arrowOffset), 7, 7), r), MO_ARROW(cg.buttonText()), PE_ArrowDown, opts); if(xo && iw) @@ -4863,17 +4863,17 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ button->parentWidget()->inherits("Ideal::ButtonBar")))); const TQColor &textCol(sidebar && (button->isOn() || flags&Style_On) ? TQApplication::tqpalette().active().highlightedText() - : button->tqcolorGroup().buttonText()); + : button->colorGroup().buttonText()); for(i=0; i<j; i++) - drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->tqcolorGroup(), + drawItem(p, TQRect(x+i, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, &textCol); // Draw a focus rect if the button has focus if (flags&Style_HasFocus && FOCUS_GLOW!=opts.focus && !(flags&Style_MouseOver && FOCUS_FULL==opts.focus && MO_NONE!=opts.coloredMouseOver)) - tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_PushButtonFocusRect, + tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_PushButtonFocusRect, widget), widget), cg, flags); break; } @@ -4939,10 +4939,10 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ if(reverse) { - cr=tqvisualRect(cr, r); - sr=tqvisualRect(sr, r); - tr=tqvisualRect(tr, r); - ir=tqvisualRect(ir, r); + cr=visualRect(cr, r); + sr=visualRect(sr, r); + tr=visualRect(tr, r); + ir=visualRect(ir, r); } if(mi->iconSet() && opts.menuIcons) @@ -4951,7 +4951,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ TQIconSet::Mode mode=flags & Style_Active ? (mi->isEnabled() ? TQIconSet::Active : TQIconSet::Disabled) : (mi->isEnabled() ? TQIconSet::Normal : TQIconSet::Disabled); - cr=tqvisualRect(TQRect(x, y, maxpmw, h), r); + cr=visualRect(TQRect(x, y, maxpmw, h), r); // Do we have an icon and are checked at the same time? // Then draw a "pressed" background behind the icon @@ -5078,7 +5078,7 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ drawMenuOrToolBarBackground(p, r, cg, false, Qt::Horizontal==wind->orientation()); } else - BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); break; case CE_ProgressBarGroove: { @@ -5301,15 +5301,15 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ { #if 0x039999 >= 0x030200 TQRect cr(checkbox->rect()); - TQRegion r(TQRect(cr.x(), cr.y(), tqvisualRect(subRect(SR_CheckBoxFocusRect, widget), + TQRegion r(TQRect(cr.x(), cr.y(), visualRect(subRect(SR_CheckBoxFocusRect, widget), widget).width()+ - tqpixelMetric(PM_IndicatorWidth)+4, + pixelMetric(PM_IndicatorWidth)+4, cr.height())); #else TQRegion r(checkbox->rect()); #endif - r-=tqvisualRect(subRect(SR_CheckBoxIndicator, widget), widget); + r-=visualRect(subRect(SR_CheckBoxIndicator, widget), widget); p->setClipRegion(r); drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, checkbox->rect(), true, false, opts.selectionAppearance, WIDGET_SELECTION); @@ -5321,11 +5321,11 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ flags & Style_Enabled, checkbox->pixmap(), checkbox->text()); if(checkbox->hasFocus() && FOCUS_GLOW!=opts.focus) - tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_CheckBoxFocusRect, widget), + tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_CheckBoxFocusRect, widget), widget), cg, flags); } else - BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); break; case CE_RadioButton: itsFormMode=isFormWidget(widget); @@ -5346,14 +5346,14 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ #if 0x039999 >= 0x030200 TQRect rb(radiobutton->rect()); TQRegion r(TQRect(rb.x(), rb.y(), - tqvisualRect(subRect(SR_RadioButtonFocusRect, widget), + visualRect(subRect(SR_RadioButtonFocusRect, widget), widget).width()+ - tqpixelMetric(PM_ExclusiveIndicatorWidth)+4, + pixelMetric(PM_ExclusiveIndicatorWidth)+4, rb.height())); #else TQRegion r(radiobutton->rect()); #endif - r-=tqvisualRect(subRect(SR_RadioButtonIndicator, widget), widget); + r-=visualRect(subRect(SR_RadioButtonIndicator, widget), widget); p->setClipRegion(r); drawBevelGradient(shade(cg.background(), TO_FACTOR(opts.crHighlight)), p, radiobutton->rect(), true, false, opts.selectionAppearance, WIDGET_SELECTION); @@ -5366,17 +5366,17 @@ void TQtCurveStyle::tqdrawControl(ControlElement control, TQPainter *p, const TQ radiobutton->pixmap(), radiobutton->text()); if(radiobutton->hasFocus() && FOCUS_GLOW!=opts.focus) - tqdrawPrimitive(PE_FocusRect, p, tqvisualRect(subRect(SR_RadioButtonFocusRect, + tqdrawPrimitive(PE_FocusRect, p, visualRect(subRect(SR_RadioButtonFocusRect, widget), widget), cg, flags); break; } // Fall through intentional! default: - BASE_STYLE::tqdrawControl(control, p, widget, r, cg, flags, data); + BASE_STYLE::drawControl(control, p, widget, r, cg, flags, data); } } -void TQtCurveStyle::tqdrawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::drawControlMask(ControlElement control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const { switch(control) @@ -5398,11 +5398,11 @@ void TQtCurveStyle::tqdrawControlMask(ControlElement control, TQPainter *p, cons break; } default: - BASE_STYLE::tqdrawControlMask(control, p, widget, r, data); + BASE_STYLE::drawControlMask(control, p, widget, r, data); } } -void TQtCurveStyle::tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const { switch (control) @@ -5410,10 +5410,10 @@ void TQtCurveStyle::tqdrawComplexControlMask(ComplexControl control, TQPainter * case CC_SpinWidget: case CC_ComboBox: case CC_ToolButton: - tqdrawControlMask(CE_PushButton, p, widget, r, data); + drawControlMask(CE_PushButton, p, widget, r, data); break; default: - BASE_STYLE::tqdrawComplexControlMask(control, p, widget, r, data); + BASE_STYLE::drawComplexControlMask(control, p, widget, r, data); } } @@ -5430,7 +5430,7 @@ TQRect TQtCurveStyle::subRect(SubRect subrect, const TQWidget *widget)const rect=wrect; else { - int dbw1(tqpixelMetric(PM_ButtonDefaultIndicator, widget)), + int dbw1(pixelMetric(PM_ButtonDefaultIndicator, widget)), dbw2(dbw1*2), border(3), border2=(border*2); @@ -5474,7 +5474,7 @@ class TQTitleBar : public TQWidget TQWidget *window() const; }; -void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget, +void TQtCurveStyle::drawComplexControl(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, SCFlags controls, SCFlags active, const TQStyleOption &data) const @@ -5623,13 +5623,13 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c itsFormMode = isFormWidget(widget); const TQComboBox *combobox((const TQComboBox *)widget); - TQRect frame(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + TQRect frame(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxFrame, data), widget)), - arrow(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + arrow(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow, data), widget)), - field(TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget, + field(TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxEditField, data), widget)); const TQColor *use(buttonColors(cg)); @@ -5745,7 +5745,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c fr=frame; else if(opts.comboSplitter) { - fr=TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, widget), widget); + fr=TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, widget), widget); if(reverse) fr.addCoords(3, 0, 0, 0); else @@ -6290,7 +6290,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c if((controls & SC_SliderHandle)&& handle.isValid()) drawSliderHandle(paint, handle, cg, flags, widget ? ::tqqt_cast<TQSlider *>(widget) : 0L, tb); if(controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks, + TQCommonStyle::drawComplexControl(control, paint, widget, r, cg, flags, SC_SliderTickmarks, active, data); if(flags&Style_HasFocus && FOCUS_GLOW!=opts.focus) @@ -6308,7 +6308,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c const int buttonMargin(3); const TQTitleBar *tb((const TQTitleBar *)widget); bool isActive((tb->isActive() && widget->isActiveWindow()) || - (!tb->window() && widget->tqtopLevelWidget()->isActiveWindow())); + (!tb->window() && widget->topLevelWidget()->isActiveWindow())); TQColorGroup cgroup(isActive ? widget->tqpalette().active() : widget->tqpalette().inactive()); @@ -6339,7 +6339,7 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c tqalignment|=TQt::AlignRight; } - TQRect ir(tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)), + TQRect ir(visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarLabel), widget)), textRect(full ? tb->rect().x() : ir.x(), ir.y(), full ? tb->rect().width() : ir.width(), ir.height()); EAppearance app=isActive ? opts.titlebarAppearance : opts.inactiveTitlebarAppearance; @@ -6383,9 +6383,9 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c if (controls&SC_TitleBarCloseButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarCloseButton), widget); down = active & SC_TitleBarCloseButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarCloseButton); } @@ -6393,49 +6393,49 @@ void TQtCurveStyle::tqdrawComplexControl(ComplexControl control, TQPainter *p, c { if (controls &SC_TitleBarMaxButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMaxButton), widget); down = active & SC_TitleBarMaxButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarMaxButton); } if (controls&SC_TitleBarNormalButton || controls&SC_TitleBarMinButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarMinButton), widget); TQStyle::SubControl ctrl = (controls & SC_TitleBarNormalButton ? SC_TitleBarNormalButton : SC_TitleBarMinButton); down = active & ctrl; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, ctrl); } if (controls&SC_TitleBarShadeButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarShadeButton), widget); down = active & SC_TitleBarShadeButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarShadeButton); } if (controls&SC_TitleBarUnshadeButton) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarUnshadeButton), widget); down = active & SC_TitleBarUnshadeButton; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); drawMdiIcon(p, textCol, shadowCol, ir, down, buttonMargin, SC_TitleBarUnshadeButton); } } if (controls&SC_TitleBarSysMenu && tb->icon()) { - ir = tqvisualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget); + ir = visualRect(querySubControlMetrics(CC_TitleBar, widget, SC_TitleBarSysMenu), widget); down = active & SC_TitleBarSysMenu; - tqdrawPrimitive(PE_ButtonTool, p, ir, tb->tqcolorGroup(), down ? Style_Down : Style_Raised); - drawItem(p, ir, AlignCenter, tb->tqcolorGroup(), true, tb->icon(), TQString()); + tqdrawPrimitive(PE_ButtonTool, p, ir, tb->colorGroup(), down ? Style_Down : Style_Raised); + drawItem(p, ir, AlignCenter, tb->colorGroup(), true, tb->icon(), TQString()); } break; } default: - BASE_STYLE::tqdrawComplexControl(control, p, widget, r, cg, flags, controls, active, data); + BASE_STYLE::drawComplexControl(control, p, widget, r, cg, flags, controls, active, data); } } @@ -6451,7 +6451,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ if(!widget) return TQRect(); - int fw(tqpixelMetric(PM_SpinBoxFrameWidth, 0)); + int fw(pixelMetric(PM_SpinBoxFrameWidth, 0)); TQSize bs; bs.setHeight(widget->height()>>1); @@ -6510,7 +6510,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ const TQScrollBar *sb((const TQScrollBar*)widget); bool horizontal(sb->orientation() == Qt::Horizontal); int sliderstart(sb->sliderStart()), - sbextent(tqpixelMetric(PM_ScrollBarExtent, widget)), + sbextent(pixelMetric(PM_ScrollBarExtent, widget)), maxlen((horizontal ? sb->width() : sb->height()) - (noButtons ? 0 : (sbextent * (threeButtonScrollBar ? 3 : 2)))), sliderlen; @@ -6521,7 +6521,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ uint range = sb->maxValue() - sb->minValue(); sliderlen = (sb->pageStep() * maxlen) / (range + sb->pageStep()); - int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget ); + int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget ); if ( sliderlen < slidermin || range > INT_MAX / 2 ) sliderlen = slidermin; if ( sliderlen > maxlen ) @@ -6723,7 +6723,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ else r.setRect(r.left()+windowMargin+pos, r.top()+windowMargin, controlSize, controlSize); - return tqvisualRect(tb->direction, tb->rect, r); + return visualRect(tb->direction, tb->rect, r); } } #endif @@ -6734,7 +6734,7 @@ TQRect TQtCurveStyle::querySubControlMetrics(TQ_ComplexControl control, const TQ return BASE_STYLE::querySubControlMetrics(control, widget, sc, data); } -int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) const +int TQtCurveStyle::pixelMetric(PixelMetric metric, const TQWidget *widget) const { switch(metric) { @@ -6753,7 +6753,7 @@ int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) con ? TQTabBar::RoundedAbove==tb->tqshape() || TQTabBar::TriangularAbove==tb->tqshape() ? 1 : -1 - : BASE_STYLE::tqpixelMetric(metric, widget); + : BASE_STYLE::pixelMetric(metric, widget); } case PM_TabBarTabShiftHorizontal: return 0; @@ -6820,7 +6820,7 @@ int TQtCurveStyle::tqpixelMetric(PixelMetric metric, const TQWidget *widget) con case PM_TabBarTabVSpace: return opts.highlightTab ? 11 : 9; default: - return BASE_STYLE::tqpixelMetric(metric, widget); + return BASE_STYLE::pixelMetric(metric, widget); } } @@ -6846,8 +6846,8 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget * if (button && !button->text().isEmpty()) { - int margin(2*tqpixelMetric(PM_ButtonMargin, widget)), - mbi(button->isMenuButton() ? tqpixelMetric(PM_MenuButtonIndicator, widget) : 0), + int margin(2*pixelMetric(PM_ButtonMargin, widget)), + mbi(button->isMenuButton() ? pixelMetric(PM_MenuButtonIndicator, widget) : 0), w(contentsSize.width() + margin + mbi + 16); // if(button->text()=="...") @@ -6887,8 +6887,8 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget * if (mi->custom()) { - w = mi->custom()->tqsizeHint().width(); - h = mi->custom()->tqsizeHint().height(); + w = mi->custom()->sizeHint().width(); + h = mi->custom()->sizeHint().height(); if (!mi->custom()->fullSpan() && h < constMinH) h = constMinH; @@ -6947,7 +6947,7 @@ TQSize TQtCurveStyle::tqsizeFromContents(ContentsType contents, const TQWidget * return BASE_STYLE::tqsizeFromContents(contents, widget, contentsSize, data); } -int TQtCurveStyle::tqstyleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, +int TQtCurveStyle::styleHint(StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn *returnData) const { switch(stylehint) @@ -6990,7 +6990,7 @@ int TQtCurveStyle::tqstyleHint(StyleHint stylehint, const TQWidget *widget, cons case SH_TabBar_Alignment: return AlignLeft; default: - return BASE_STYLE::tqstyleHint(stylehint, widget, option, returnData); + return BASE_STYLE::styleHint(stylehint, widget, option, returnData); } } @@ -7017,7 +7017,7 @@ void TQtCurveStyle::drawItem(TQPainter *p, const TQRect &r, int flags, const TQC rb.rect(&left, &top, &width, &height); //rb.coords(&left, &top, &right, &bottom); f.setBold(true); - p->setPen(box->tqcolorGroup().foreground()); + p->setPen(box->colorGroup().foreground()); p->setFont(f); p->drawText(TQRect(left, top, width, th), (TQApplication::reverseLayout() ? AlignRight @@ -8150,8 +8150,8 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos) if(rb) { TQRect rect(0, 0, - tqvisualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+ - tqpixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height()); + visualRect(subRect(SR_RadioButtonFocusRect, rb), rb).width()+ + pixelMetric(PM_ExclusiveIndicatorWidth)+4, itsHoverWidget->height()); itsHover=rect.contains(pos) ? HOVER_RADIO : HOVER_NONE; return (HOVER_NONE!=itsHover && !rect.contains(itsOldPos)) || @@ -8164,8 +8164,8 @@ bool TQtCurveStyle::redrawHoverWidget(const TQPoint &pos) if(cb) { TQRect rect(0, 0, - tqvisualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+ - tqpixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height()); + visualRect(subRect(SR_CheckBoxFocusRect, cb), cb).width()+ + pixelMetric(PM_IndicatorWidth)+4, itsHoverWidget->height()); itsHover=rect.contains(pos) ? HOVER_CHECK : HOVER_NONE; return (HOVER_NONE!=itsHover && !rect.contains(itsOldPos)) || (HOVER_NONE==itsHover && rect.contains(itsOldPos)); diff --git a/style/qtcurve.h b/style/qtcurve.h index 54cb871..a157016 100644 --- a/style/qtcurve.h +++ b/style/qtcurve.h @@ -162,23 +162,23 @@ class TQtCurveStyle : public BASE_STYLE SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; void drawKStylePrimitive(KStylePrimitive kpe, TQPainter* p, const TQWidget* widget, const TQRect &r, const TQColorGroup &cg, SFlags flags, const TQStyleOption &opt ) const; - void tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, + void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &, + void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, + void drawComplexControlMask(ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption &data) const; TQRect subRect(SubRect, const TQWidget *) const; - void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &, + void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &, const TQColorGroup &, SFlags = Style_Default, SCFlags = SC_All, SCFlags = SC_None, const TQStyleOption & = TQStyleOption::Default) const; TQRect querySubControlMetrics(TQ_ComplexControl, const TQWidget *, SubControl, const TQStyleOption & = TQStyleOption::Default) const; - int tqpixelMetric(PixelMetric, const TQWidget *widget= 0) const; + int pixelMetric(PixelMetric, const TQWidget *widget= 0) const; int kPixelMetric(KStylePixelMetric kpm, const TQWidget *widget) const; TQSize tqsizeFromContents(ContentsType, const TQWidget *, const TQSize &, const TQStyleOption & = TQStyleOption::Default) const; - int tqstyleHint(StyleHint, const TQWidget *widget= 0, const TQStyleOption & = TQStyleOption::Default, + int styleHint(StyleHint, const TQWidget *widget= 0, const TQStyleOption & = TQStyleOption::Default, TQStyleHintReturn *returnData= 0) const; void drawItem(TQPainter *p, const TQRect &r, int flags, const TQColorGroup &cg, bool enabled, const TQPixmap *pixmap, const TQString &text, int len=-1, const TQColor *penColor=0) const; |