diff options
author | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:48:49 -0600 |
---|---|---|
committer | Timothy Pearson <kb9vqf@pearsoncomputing.net> | 2011-12-15 15:48:49 -0600 |
commit | 13281e2856a2ef43bbab78c5528470309c23aa77 (patch) | |
tree | 936bcf8145dc235004c73e9fb3d6b3dca9aa370b /kstyles/highcontrast | |
parent | e81c741bb2cf337a43524e75f22f7728ce17a343 (diff) | |
download | tdelibs-13281e2856a2ef43bbab78c5528470309c23aa77.tar.gz tdelibs-13281e2856a2ef43bbab78c5528470309c23aa77.zip |
Rename a number of old tq methods that are no longer tq specific
Diffstat (limited to 'kstyles/highcontrast')
-rw-r--r-- | kstyles/highcontrast/config/highcontrastconfig.cpp | 2 | ||||
-rw-r--r-- | kstyles/highcontrast/highcontrast.cpp | 70 | ||||
-rw-r--r-- | kstyles/highcontrast/highcontrast.h | 10 |
3 files changed, 41 insertions, 41 deletions
diff --git a/kstyles/highcontrast/config/highcontrastconfig.cpp b/kstyles/highcontrast/config/highcontrastconfig.cpp index 233fb7365..08baa83bc 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 <tqlayout.h> +#include <layout.h> #include <tqsettings.h> #include <kdialog.h> #include <kglobal.h> diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp index 732a566c6..e6c3be350 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, @@ -759,9 +759,9 @@ void HighContrastStyle::tqdrawControl (TQ_ControlElement element, drawRoundRect (p, r); const TQTabBar *tb = static_cast< const TQTabBar * >(widget); - TQTabBar::Shape tqshape = tb->tqshape(); - if (tqshape == TQTabBar::TriangularBelow || - tqshape == TQTabBar::RoundedBelow) { + TQTabBar::Shape shape = tb->shape(); + if (shape == TQTabBar::TriangularBelow || + shape == TQTabBar::RoundedBelow) { p->fillRect (r.left(), r.top(), r.width(), 2*basicLineWidth, p->pen().color()); @@ -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; } @@ -1811,7 +1811,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event) || widget->inherits (TQSPINWIDGET_OBJECT_NAME_STRING))) { hoverWidget = widget; - widget->tqrepaint (false); + widget->repaint (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->tqrepaint (false); + widget->repaint (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->tqrepaint (false); + widgetparent->repaint (false); else - widget->tqrepaint (false); + widget->repaint (false); } } diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h index 8967a0d4d..48a7c6e92 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 tqdrawControl( TQ_ControlElement element, + void drawControl( 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 tqdrawControlMask( TQ_ControlElement element, + void drawControlMask( TQ_ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& = TQStyleOption::Default ) const; - void tqdrawComplexControl( TQ_ComplexControl control, + void drawComplexControl( 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 tqdrawComplexControlMask( TQ_ComplexControl control, + void drawComplexControlMask( 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 tqpixelMetric( PixelMetric m, + int pixelMetric( PixelMetric m, const TQWidget *widget = 0 ) const; int kPixelMetric( KStylePixelMetric m, |