diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-18 18:32:40 -0600 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2012-06-02 19:04:52 +0200 |
commit | e2867c1f1eec514d56386f2fc5350eaaf760532a (patch) | |
tree | 4803ad36a38c00b3ff22af6763e86d92a60629ee /kstyles/highcontrast/highcontrast.cpp | |
parent | 4418657ced76d97d20c3a4aeb79fefccdbd6ad7b (diff) | |
download | tdelibs-e2867c1f1eec514d56386f2fc5350eaaf760532a.tar.gz tdelibs-e2867c1f1eec514d56386f2fc5350eaaf760532a.zip |
Rename old tq methods that no longer need a unique name
(cherry picked from commit 984c25aa6969e55896e9a13c8e7f7b8a58991a4e)
Diffstat (limited to 'kstyles/highcontrast/highcontrast.cpp')
-rw-r--r-- | kstyles/highcontrast/highcontrast.cpp | 56 |
1 files changed, 28 insertions, 28 deletions
diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp index 732a566c6..984465a4e 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 tqpixelMetric associated with the + // TODO There is no pixelMetric associated with the // ListViewExpander in KStyle. // To have a properly large expander, the CC_ListView case of - // tqdrawComplexControl should be handled. + // drawComplexControl should be handled. // Probably it would be better to add a KPM_ListViewExpander metric // to the KStyle KStylePixelMetric enum, and have the KStyle - // tqdrawComplexControl handle it. + // drawComplexControl 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::tqdrawControl (TQ_ControlElement element, +void HighContrastStyle::drawControl (TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -793,7 +793,7 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, if (( btnDefault || button->autoDefault() ) && (button->isEnabled())) { // Compensate for default indicator - static int di = tqpixelMetric( PM_ButtonDefaultIndicator ); + static int di = pixelMetric( PM_ButtonDefaultIndicator ); addOffset (&br, di); } @@ -864,7 +864,7 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, // Does the button have a popup menu? if (popup) { - int dx = tqpixelMetric (PM_MenuButtonIndicator, widget); + int dx = pixelMetric (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::tqdrawControl (TQ_ControlElement element, // Do we have an icon? if ( mi->iconSet() && !mi->iconSet()->isNull() ) { TQIconSet::Mode mode; - TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r ); + TQRect cr = visualRect( TQRect(x, y, checkcol, h), r ); // Select the correct icon from the iconset if (!(flags & Style_Enabled)) @@ -1122,8 +1122,8 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { TQ_PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = tqpixelMetric(PM_MenuButtonIndicator); - TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim, + int dim = pixelMetric(PM_MenuButtonIndicator); + TQRect vr = visualRect( 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::tqdrawControl (TQ_ControlElement element, } default: - KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + KStyle::drawControl(element, p, widget, r, cg, flags, opt); } } -void HighContrastStyle::tqdrawControlMask (TQ_ControlElement element, +void HighContrastStyle::drawControlMask (TQ_ControlElement element, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1161,7 +1161,7 @@ void HighContrastStyle::tqdrawControlMask (TQ_ControlElement element, } default: { - KStyle::tqdrawControlMask (element, p, w, r, opt); + KStyle::drawControlMask (element, p, w, r, opt); } } } @@ -1180,7 +1180,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, +void HighContrastStyle::drawComplexControl (TQ_ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1201,7 +1201,7 @@ void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, setColorsText (p, cg, flags); drawRoundRect (p, r); - TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget); + TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget); if (flags & Style_HasFocus) { TQRect r3 (r); if (r2.left() > 0) @@ -1236,12 +1236,12 @@ void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, setColorsButton (p, cg, flags); // Draw arrows if required if (controls & SC_SpinWidgetDown) { - TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetDown), widget); + TQRect r2 = TQStyle::visualRect (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::tqvisualRect (querySubControlMetrics ((TQ_ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetUp), widget); + TQRect r2 = TQStyle::visualRect (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::tqdrawComplexControl (TQ_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) ) @@ -1462,13 +1462,13 @@ void HighContrastStyle::tqdrawComplexControl (TQ_ComplexControl control, } default: - KStyle::tqdrawComplexControl(control, p, widget, + KStyle::drawComplexControl(control, p, widget, r, cg, flags, controls, active, opt); break; } } -void HighContrastStyle::tqdrawComplexControlMask(TQ_ComplexControl c, +void HighContrastStyle::drawComplexControlMask(TQ_ComplexControl c, TQPainter *p, const TQWidget *w, const TQRect &r, @@ -1482,7 +1482,7 @@ void HighContrastStyle::tqdrawComplexControlMask(TQ_ComplexControl c, break; } default: { - KStyle::tqdrawComplexControlMask (c, p, w, r, o); + KStyle::drawComplexControlMask (c, p, w, r, o); } } } @@ -1519,7 +1519,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, switch (control) { case CC_ComboBox : { - int arrow = tqpixelMetric (PM_ScrollBarExtent, widget); + int arrow = pixelMetric (PM_ScrollBarExtent, widget); switch (subcontrol) { case SC_ComboBoxFrame: @@ -1535,7 +1535,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, break; } case CC_SpinWidget : { - int arrow = tqpixelMetric (PM_ScrollBarExtent, 0); + int arrow = pixelMetric (PM_ScrollBarExtent, 0); switch (subcontrol) { case SC_SpinWidgetFrame: @@ -1563,7 +1563,7 @@ TQRect HighContrastStyle::querySubControlMetrics( TQ_ComplexControl control, } -int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const +int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const { //### TODO: Use the tab metrics changes from Ker. switch(m) @@ -1647,7 +1647,7 @@ int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) cons } default: - return KStyle::tqpixelMetric(m, widget); + return KStyle::pixelMetric(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 = tqpixelMetric( PM_ButtonMargin, widget ); - int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2; + int bm = pixelMetric( PM_ButtonMargin, widget ); + int fw = pixelMetric( 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 = tqpixelMetric( PM_ButtonDefaultIndicator ); + int di = pixelMetric( 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 = tqpixelMetric (PM_ScrollBarExtent, cb); + int arrowSize = pixelMetric (PM_ScrollBarExtent, cb); return TQSize(borderSize + basicLineWidth + arrowSize, borderSize) + contentSize; } |