diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:32:40 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:32:40 -0600 |
commit | 984c25aa6969e55896e9a13c8e7f7b8a58991a4e (patch) | |
tree | 3653d4ee49b0adf405ff17e0ecdc99bc6f10c1bf /kstyles/asteroid | |
parent | 56160bf4dfe503631ef6373367b281f081bab2b4 (diff) | |
download | tdelibs-984c25aa6969e55896e9a13c8e7f7b8a58991a4e.tar.gz tdelibs-984c25aa6969e55896e9a13c8e7f7b8a58991a4e.zip |
Rename old tq methods that no longer need a unique name
Diffstat (limited to 'kstyles/asteroid')
-rw-r--r-- | kstyles/asteroid/asteroid.cpp | 108 | ||||
-rw-r--r-- | kstyles/asteroid/asteroid.h | 12 |
2 files changed, 60 insertions, 60 deletions
diff --git a/kstyles/asteroid/asteroid.cpp b/kstyles/asteroid/asteroid.cpp index 59b37df83..8908d71fe 100644 --- a/kstyles/asteroid/asteroid.cpp +++ b/kstyles/asteroid/asteroid.cpp @@ -152,7 +152,7 @@ AsteroidStyle::polish( TQApplication* app) 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::tqsetPalette( wp, TRUE ); + TQApplication::setPalette( wp, TRUE ); } /*! \reimp @@ -289,7 +289,7 @@ void AsteroidStyle::drawKStylePrimitive(KStylePrimitive ksp, } } -int AsteroidStyle::tqstyleHint( TQ_StyleHint stylehint, +int AsteroidStyle::styleHint( TQ_StyleHint stylehint, const TQWidget *widget, const TQStyleOption &option, TQStyleHintReturn* returnData ) const @@ -309,7 +309,7 @@ int AsteroidStyle::tqstyleHint( TQ_StyleHint stylehint, return 1; default: - return KStyle::tqstyleHint(stylehint, widget, option, returnData); + return KStyle::styleHint(stylehint, widget, option, returnData); } } @@ -613,13 +613,13 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, p->drawPolygon(TQPointArray(24, outside)); } p->setPen(cg.mid()); - p->tqdrawPolyline(TQPointArray(24, outside), 0, 12); + p->drawPolyline(TQPointArray(24, outside), 0, 12); p->setPen(cg.light()); - p->tqdrawPolyline(TQPointArray(24, outside), 12, 12); + p->drawPolyline(TQPointArray(24, outside), 12, 12); p->setPen(cg.dark()); - p->tqdrawPolyline(TQPointArray(20, inside), 0, 10); + p->drawPolyline(TQPointArray(20, inside), 0, 10); p->setPen(cg.background()); - p->tqdrawPolyline(TQPointArray(20, inside), 10, 10); + p->drawPolyline(TQPointArray(20, inside), 10, 10); break; } @@ -907,8 +907,8 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } if (sf & Style_Down) { - p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), - tqpixelMetric(PM_ButtonShiftVertical)); + p->translate(pixelMetric(PM_ButtonShiftHorizontal), + pixelMetric(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(-tqpixelMetric(PM_ButtonShiftHorizontal), - -tqpixelMetric(PM_ButtonShiftVertical)); + p->translate(-pixelMetric(PM_ButtonShiftHorizontal), + -pixelMetric(PM_ButtonShiftVertical)); } break; @@ -929,7 +929,7 @@ void AsteroidStyle::tqdrawPrimitive(TQ_PrimitiveElement pe, } } -void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, +void AsteroidStyle::drawControl(TQ_ControlElement ce, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1016,7 +1016,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, p->drawLine( x2, r2.top() + 2, x2, r2.bottom() - (selected ? (lastTab ? 0:1) :2)); } else if ( tb->tqshape() == TQTabBar::RoundedBelow ) { - bool rightAligned = tqstyleHint( SH_TabBar_Alignment, tb ) == TQt::AlignRight; + bool rightAligned = styleHint( 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::tqdrawControl(TQ_ControlElement ce, p->drawLine( r2.left(), r2.top() + (selected ? 0 : 2), r2.left(), r2.bottom() - 2 ); } else { - TQCommonStyle::tqdrawControl(ce, p, w, r, cg, sf, o); + TQCommonStyle::drawControl(ce, p, w, r, cg, sf, o); } break; } @@ -1074,15 +1074,15 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQTab * t = o.tab(); const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); TQRect tr = r; if ( t->identifier() == tb->currentTab() ) tr.setBottom( tr.bottom() - - tqpixelMetric( TQStyle::PM_DefaultFrameWidth, tb ) ); + pixelMetric( TQStyle::PM_DefaultFrameWidth, tb ) ); int tqalignment = TQt::AlignCenter | TQt::ShowPrefix; - if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + if (!styleHint(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()); @@ -1126,10 +1126,10 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, const TQCheckBox *checkbox = (const TQCheckBox *) w; const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; - if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + if (!styleHint(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()); @@ -1162,7 +1162,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, } if (sf & Style_HasFocus) { - TQRect fr = tqvisualRect(subRect(SR_CheckBoxFocusRect, w), w); + TQRect fr = visualRect(subRect(SR_CheckBoxFocusRect, w), w); tqdrawPrimitive(TQStyle::PE_FocusRect, p, fr, cg, sf); } #endif @@ -1175,10 +1175,10 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, const TQRadioButton *radiobutton = (const TQRadioButton *) w; const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); int tqalignment = TQApplication::reverseLayout() ? TQt::AlignRight : TQt::AlignLeft; - if (!tqstyleHint(SH_UnderlineAccelerator, w, TQStyleOption::Default, 0)) + if (!styleHint(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()); @@ -1209,7 +1209,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, drawItem(p, r, tqalignment | TQt::AlignVCenter | TQt::ShowPrefix, cg, enabled, radiobutton->pixmap(), radiobutton->text()); if (sf & Style_HasFocus) { - TQRect fr = tqvisualRect(subRect(SR_RadioButtonFocusRect, w), w); + TQRect fr = visualRect(subRect(SR_RadioButtonFocusRect, w), w); tqdrawPrimitive(TQStyle::PE_FocusRect, p, fr, cg, sf); } #endif @@ -1343,7 +1343,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, bool focused = sf & Style_HasFocus; bool down = sf & Style_Down; bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | AlignHCenter | ShowPrefix | DontClip | SingleLine; if (active && focused) { @@ -1390,13 +1390,13 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, case CE_PushButtonLabel: { const TQPushButton *pb = dynamic_cast<const TQPushButton *>(w); const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | AlignHCenter | ShowPrefix | DontClip | SingleLine; int dx = 0; if (sf & Style_Down) { - p->translate(tqpixelMetric(PM_ButtonShiftHorizontal), - tqpixelMetric(PM_ButtonShiftVertical)); + p->translate(pixelMetric(PM_ButtonShiftHorizontal), + pixelMetric(PM_ButtonShiftVertical)); } if (pb->iconSet() && !pb->iconSet()->isNull()) { @@ -1458,7 +1458,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, const TQHeader *hw = dynamic_cast<const TQHeader *>(w); int hs = o.headerSection(); const bool enabled = sf & Style_Enabled; - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); const int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; TQIconSet *is = hw->iconSet(hs); @@ -1513,7 +1513,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, bool disabled = !mi->isEnabled(); bool checkable = pum->isCheckable(); bool enabled = mi->isEnabled(); - bool etchtext = tqstyleHint( SH_EtchDisabledText ); + bool etchtext = styleHint( SH_EtchDisabledText ); int xpos = x; int xm = itemFrame + checkcol + itemHMargin; @@ -1553,7 +1553,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, pmr.moveCenter(cr.center()); if (backwards) - pmr = tqvisualRect(pmr, r); + pmr = visualRect(pmr, r); p->setPen(cg.highlightedText()); p->drawPixmap(pmr.topLeft(), pixmap); @@ -1572,7 +1572,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQRect rr = TQRect(xp, y, checkcol, sh); if (backwards) { - rr = tqvisualRect(rr, r); + rr = visualRect(rr, r); } tqdrawPrimitive(PE_CheckMark, p, rr, cg, cflags); @@ -1624,8 +1624,8 @@ void AsteroidStyle::tqdrawControl(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 = tqvisualRect(rr, r); - rr_offset = tqvisualRect(rr_offset, r); + rr = visualRect(rr, r); + rr_offset = visualRect(rr_offset, r); } if POPUPMENUITEM_TEXT_ETCH_CONDITIONS { @@ -1642,8 +1642,8 @@ void AsteroidStyle::tqdrawControl(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 = tqvisualRect(rr, r); - rr_offset = tqvisualRect(rr_offset, r); + rr = visualRect(rr, r); + rr_offset = visualRect(rr_offset, r); text_flags |= AlignRight; } @@ -1668,7 +1668,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, } if (mi->popup()) { - int dim = tqpixelMetric(PM_MenuButtonIndicator); + int dim = pixelMetric(PM_MenuButtonIndicator); xpos = x + sw - arrowHMargin - 2 * itemFrame - dim; @@ -1680,7 +1680,7 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, TQRect rr = TQRect(xpos, y + sh/2 - dim/2, dim, dim); if (backwards) - rr = tqvisualRect(rr, r); + rr = visualRect(rr, r); tqdrawPrimitive((backwards ? PE_ArrowLeft : PE_ArrowRight), p, rr, cg, Style_Enabled); } @@ -1688,12 +1688,12 @@ void AsteroidStyle::tqdrawControl(TQ_ControlElement ce, } default: { - KStyle::tqdrawControl(ce, p, w, r, cg, sf, o); + KStyle::drawControl(ce, p, w, r, cg, sf, o); } } } -void AsteroidStyle::tqdrawControlMask(TQ_ControlElement ce, +void AsteroidStyle::drawControlMask(TQ_ControlElement ce, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1733,12 +1733,12 @@ void AsteroidStyle::tqdrawControlMask(TQ_ControlElement ce, CE_HeaderLabel */ default: { - KStyle::tqdrawControlMask(ce, p, w, r, o); + KStyle::drawControlMask(ce, p, w, r, o); } } } -void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, +void AsteroidStyle::drawComplexControl(TQ_ComplexControl cc, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1762,7 +1762,7 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, case CC_ListView: { if ( sc & SC_ListView ) { - TQCommonStyle::tqdrawComplexControl( cc, p, w, r, cg, sf, sc, sa, o ); + TQCommonStyle::drawComplexControl( cc, p, w, r, cg, sf, sc, sa, o ); } if ( sc & ( SC_ListViewBranch | SC_ListViewExpand ) ) { if (o.isDefault()) @@ -1960,7 +1960,7 @@ void AsteroidStyle::tqdrawComplexControl(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 = tqvisualRect(hr, r); } + if (backwards) { hr = visualRect(hr, r); } p->drawRect(hr); @@ -1991,7 +1991,7 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, pmr.moveBy(1, 1); } - if (backwards) { pmr = tqvisualRect(pmr, r); } + if (backwards) { pmr = visualRect(pmr, r); } p->setPen(cg.foreground()); p->drawPixmap(pmr.topLeft(), downArrow); @@ -2008,8 +2008,8 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, if ( toolbutton->backgroundMode() != TQt::PaletteButton ) c.setBrush( TQColorGroup::Button, toolbutton->paletteBackgroundColor() ); TQRect button, menuarea; - button = tqvisualRect( querySubControlMetrics(cc, w, SC_ToolButton, o), w ); - menuarea = tqvisualRect( querySubControlMetrics(cc, w, SC_ToolButtonMenu, o), w ); + button = visualRect( querySubControlMetrics(cc, w, SC_ToolButton, o), w ); + menuarea = visualRect( querySubControlMetrics(cc, w, SC_ToolButtonMenu, o), w ); SFlags bflags = sf; SFlags mflags = sf; @@ -2077,7 +2077,7 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, /* Turn these off for now */ // Draw the tickmarks /*if (controls & SC_SliderTickmarks) - TQCommonStyle::tqdrawComplexControl(control, &p2, + TQCommonStyle::drawComplexControl(control, &p2, r, cg, flags, SC_SliderTickmarks, sa, o);*/ // Draw the slider handle @@ -2126,12 +2126,12 @@ void AsteroidStyle::tqdrawComplexControl(TQ_ComplexControl cc, default: { - KStyle::tqdrawComplexControl(cc, p, w, r, cg, sf, sc, sa, o); + KStyle::drawComplexControl(cc, p, w, r, cg, sf, sc, sa, o); } } } -void AsteroidStyle::tqdrawComplexControlMask(TQ_ComplexControl cc, +void AsteroidStyle::drawComplexControlMask(TQ_ComplexControl cc, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -2149,12 +2149,12 @@ void AsteroidStyle::tqdrawComplexControlMask(TQ_ComplexControl cc, CC_ListView */ default: { - KStyle::tqdrawComplexControlMask(cc, p, w, r, o); + KStyle::drawComplexControlMask(cc, p, w, r, o); } } } -int AsteroidStyle::tqpixelMetric(PixelMetric pm, const TQWidget *w) const +int AsteroidStyle::pixelMetric(PixelMetric pm, const TQWidget *w) const { switch (pm) { /* PixelMetrics available are: @@ -2248,7 +2248,7 @@ int AsteroidStyle::tqpixelMetric(PixelMetric pm, const TQWidget *w) const if (w && w->inherits(TQPOPUPMENU_OBJECT_NAME_STRING)) { return 3; } else { - return KStyle::tqpixelMetric(pm, w); + return KStyle::pixelMetric(pm, w); } } @@ -2274,7 +2274,7 @@ int AsteroidStyle::tqpixelMetric(PixelMetric pm, const TQWidget *w) const return TQMAX( 4, TQApplication::globalStrut().width() ); default: { - return KStyle::tqpixelMetric(pm, w); + return KStyle::pixelMetric(pm, w); } } } @@ -2454,7 +2454,7 @@ TQSize AsteroidStyle::tqsizeFromContents(ContentsType ct, } case CT_ComboBox: { - int padding = (tqpixelMetric(PM_DefaultFrameWidth, w) * 2) + 1; + int padding = (pixelMetric(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 e8516c6e1..7b513896b 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 tqstyleHint(TQ_StyleHint, const TQWidget * = 0, + int styleHint(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 tqdrawControl(TQ_ControlElement, + void drawControl(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, @@ -61,13 +61,13 @@ public: SFlags = Style_Default, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawControlMask(TQ_ControlElement, + void drawControlMask(TQ_ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const; - void tqdrawComplexControl(TQ_ComplexControl, + void drawComplexControl(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &, @@ -77,13 +77,13 @@ public: SCFlags active = SC_None, const TQStyleOption & = TQStyleOption::Default) const; - void tqdrawComplexControlMask(TQ_ComplexControl, + void drawComplexControlMask(TQ_ComplexControl, TQPainter *, const TQWidget *, const TQRect &r, const TQStyleOption & = TQStyleOption::Default) const; - int tqpixelMetric(PixelMetric, const TQWidget * = 0) const; + int pixelMetric(PixelMetric, const TQWidget * = 0) const; int kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) const; |