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 /tdefx | |
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 'tdefx')
-rw-r--r-- | tdefx/kdrawutil.h | 4 | ||||
-rw-r--r-- | tdefx/kimageeffect.cpp | 6 | ||||
-rw-r--r-- | tdefx/kstyle.cpp | 66 | ||||
-rw-r--r-- | tdefx/kstyle.h | 12 |
4 files changed, 44 insertions, 44 deletions
diff --git a/tdefx/kdrawutil.h b/tdefx/kdrawutil.h index 44041968c..f1ec99ecb 100644 --- a/tdefx/kdrawutil.h +++ b/tdefx/kdrawutil.h @@ -21,7 +21,7 @@ #include <tqnamespace.h> #include <tqpainter.h> #include <tqbitmap.h> -#include <tqpalette.h> +#include <palette.h> #include <tdelibs_export.h> @@ -125,7 +125,7 @@ TDEFX_EXPORT void kRoundMaskRegion(TQRegion &r, int x, int y, int w, int h); * @c \#include @c <kdrawutil.h> * * Paints the pixels covered by a round button of the given size with - * Qt::color1. This function is useful in TQStyle::tqdrawControlMask(). + * Qt::color1. This function is useful in TQStyle::drawControlMask(). * * @param p The painter to use for drawing the button. * @param x The X coordinate of the button. diff --git a/tdefx/kimageeffect.cpp b/tdefx/kimageeffect.cpp index 3f6aa5ccb..c0086d884 100644 --- a/tdefx/kimageeffect.cpp +++ b/tdefx/kimageeffect.cpp @@ -1110,7 +1110,7 @@ TQImage& KImageEffect::blend(const TQColor& clr, TQImage& dst, float opacity) TQ_UINT32 *data = reinterpret_cast<TQ_UINT32*>( dst.bits() ); - // Check how many pixels we need to process to achieve 16 byte tqalignment + // Check how many pixels we need to process to achieve 16 byte alignment int offset = (16 - (TQ_UINT32( data ) & 0x0f)) / 4; // The main loop processes 8 pixels / iteration @@ -1358,7 +1358,7 @@ TQImage& KImageEffect::blend(TQImage& src, TQImage& dst, float opacity) TQ_UINT32 *data1 = reinterpret_cast<TQ_UINT32*>( src.bits() ); TQ_UINT32 *data2 = reinterpret_cast<TQ_UINT32*>( dst.bits() ); - // Check how many pixels we need to process to achieve 16 byte tqalignment + // Check how many pixels we need to process to achieve 16 byte alignment int offset = (16 - (TQ_UINT32( data2 ) & 0x0f)) / 4; // The main loop processes 4 pixels / iteration @@ -3697,7 +3697,7 @@ TQImage KImageEffect::charcoal(TQImage &src, double radius, double sigma) TQImage img(edge(src, radius)); img = blur(img, radius, sigma); normalize(img); - img.tqinvertPixels(false); + img.invertPixels(false); KImageEffect::toGray(img); return(img); } diff --git a/tdefx/kstyle.cpp b/tdefx/kstyle.cpp index 85503632b..419ae90ae 100644 --- a/tdefx/kstyle.cpp +++ b/tdefx/kstyle.cpp @@ -123,8 +123,8 @@ namespace static bool useDropShadow(TQWidget* w) { - return w && w->tqmetaObject() && - w->tqmetaObject()->findProperty("KStyleMenuDropShadow") != -1; + return w && w->metaObject() && + w->metaObject()->findProperty("KStyleMenuDropShadow") != -1; } } @@ -264,8 +264,8 @@ void KStyle::polish( TQWidget* widget ) if ( d->useFilledFrameWorkaround ) { if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { - TQFrame::Shape tqshape = frame->frameShape(); - if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) + TQFrame::Shape shape = frame->frameShape(); + if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) widget->installEventFilter(this); } } @@ -285,8 +285,8 @@ void KStyle::unPolish( TQWidget* widget ) if ( d->useFilledFrameWorkaround ) { if ( TQFrame *frame = ::tqqt_cast< TQFrame* >( widget ) ) { - TQFrame::Shape tqshape = frame->frameShape(); - if (tqshape == TQFrame::ToolBarPanel || tqshape == TQFrame::MenuBarPanel) + TQFrame::Shape shape = frame->frameShape(); + if (shape == TQFrame::ToolBarPanel || shape == TQFrame::MenuBarPanel) widget->removeEventFilter(this); } } @@ -554,7 +554,7 @@ int KStyle::kPixelMetric( KStylePixelMetric kpm, const TQWidget* /* widget */) c // // What should "widget" be in actuality? How should I get it? From where? // // Almost certainly it should not be null! // TQWidget *widget = 0; -// tqdrawControl(pe, p, widget, r, cg, flags, opt); +// drawControl(pe, p, widget, r, cg, flags, opt); //} // #endif // USE_QT4 @@ -627,9 +627,9 @@ void KStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, } XRenderFillRectangle( - p->tqdevice()->x11Display(), + p->device()->x11Display(), PictOpOver, - p->tqdevice()->x11RenderHandle(), + p->device()->x11RenderHandle(), &clr, rect.x() + point.x(), rect.y() + point.y(), @@ -654,7 +654,7 @@ void KStyle::tqdrawPrimitive( TQ_PrimitiveElement pe, -void KStyle::tqdrawControl( TQ_ControlElement element, +void KStyle::drawControl( TQ_ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -668,7 +668,7 @@ void KStyle::tqdrawControl( TQ_ControlElement element, // ------------------------------------------------------------------------ case CE_TabBarTab: { const TQTabBar* tb = (const TQTabBar*) widget; - TQTabBar::Shape tbs = tb->tqshape(); + TQTabBar::Shape tbs = tb->shape(); bool selected = flags & Style_Selected; int x = r.x(), y=r.y(), bottom=r.bottom(), right=r.right(); @@ -952,7 +952,7 @@ void KStyle::tqdrawControl( TQ_ControlElement element, } default: - TQCommonStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); + TQCommonStyle::drawControl(element, p, widget, r, cg, flags, opt); } } @@ -979,7 +979,7 @@ TQRect KStyle::subRect(SubRect r, const TQWidget* widget) const } -int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const +int KStyle::pixelMetric(PixelMetric m, const TQWidget* widget) const { switch(m) { @@ -1000,7 +1000,7 @@ int KStyle::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 @@ -1010,8 +1010,8 @@ int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabVSpace: { const TQTabBar * tb = (const TQTabBar *) widget; - if ( tb->tqshape() == TQTabBar::RoundedAbove || - tb->tqshape() == TQTabBar::RoundedBelow ) + if ( tb->shape() == TQTabBar::RoundedAbove || + tb->shape() == TQTabBar::RoundedBelow ) return 10; else return 4; @@ -1019,7 +1019,7 @@ int KStyle::tqpixelMetric(PixelMetric m, const TQWidget* widget) const case PM_TabBarTabOverlap: { const TQTabBar* tb = (const TQTabBar*)widget; - TQTabBar::Shape tbs = tb->tqshape(); + TQTabBar::Shape tbs = tb->shape(); if ( (tbs == TQTabBar::RoundedAbove) || (tbs == TQTabBar::RoundedBelow) ) @@ -1084,10 +1084,10 @@ int KStyle::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 ); } } @@ -1104,7 +1104,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item) return sibling; } -void KStyle::tqdrawComplexControl( TQ_ComplexControl control, +void KStyle::drawComplexControl( TQ_ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -1227,7 +1227,7 @@ void KStyle::tqdrawComplexControl( TQ_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 @@ -1253,7 +1253,7 @@ void KStyle::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) ) @@ -1393,7 +1393,7 @@ void KStyle::tqdrawComplexControl( TQ_ComplexControl control, } default: - TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, + TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); break; } @@ -1432,7 +1432,7 @@ TQRect KStyle::querySubControlMetrics( TQ_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; @@ -1443,7 +1443,7 @@ TQRect KStyle::querySubControlMetrics( TQ_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 ) @@ -1833,7 +1833,7 @@ TQPixmap KStyle::stylePixmap( StylePixmap stylepixmap, } -int KStyle::tqstyleHint( TQ_StyleHint sh, const TQWidget* w, +int KStyle::styleHint( TQ_StyleHint sh, const TQWidget* w, const TQStyleOption &opt, TQStyleHintReturn* shr) const { switch (sh) @@ -1848,7 +1848,7 @@ int KStyle::tqstyleHint( TQ_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 QMIN( 100, d->popupMenuDelay ); else return d->popupMenuDelay; @@ -1884,7 +1884,7 @@ int KStyle::tqstyleHint( TQ_StyleHint sh, const TQWidget* w, } default: - return TQCommonStyle::tqstyleHint(sh, w, opt, shr); + return TQCommonStyle::styleHint(sh, w, opt, shr); } } @@ -1897,7 +1897,7 @@ bool KStyle::eventFilter( TQObject* object, TQEvent* event ) // ensure that the filled frame contents are properly painted. // We essentially modify the paintEvent's rect to include the // panel border, which also paints the widget's interior. - // This is nasty, but I see no other way to properly tqrepaint + // This is nasty, but I see no other way to properly repaint // filled frames in all QMenuBars and QToolBars. // -- Karol. TQFrame *frame = 0; @@ -2222,12 +2222,12 @@ bool TransparencyHandler::eventFilter( TQObject* object, TQEvent* event ) case XRender: #endif case SoftwareBlend: - blendToPixmap(p->tqcolorGroup(), p); + blendToPixmap(p->colorGroup(), p); break; case SoftwareTint: default: - blendToColor(p->tqcolorGroup().button()); + blendToColor(p->colorGroup().button()); }; p->setErasePixmap(pix); @@ -2315,10 +2315,10 @@ void TransparencyHandler::XRenderBlendToPixmap(const TQWidget* p) // Allow styles to define the blend pixmap - allows for some interesting effects. if (::tqqt_cast<TQPopupMenu*>(p)) - kstyle->renderMenuBlendPixmap( renderPix, p->tqcolorGroup(), + kstyle->renderMenuBlendPixmap( renderPix, p->colorGroup(), ::tqqt_cast<TQPopupMenu*>(p) ); else - renderPix.fill(p->tqcolorGroup().button()); // Just tint as the default behavior + renderPix.fill(p->colorGroup().button()); // Just tint as the default behavior Display* dpy = qt_xdisplay(); Pixmap alphaPixmap; diff --git a/tdefx/kstyle.h b/tdefx/kstyle.h index da71d83b7..ed641d5c6 100644 --- a/tdefx/kstyle.h +++ b/tdefx/kstyle.h @@ -172,7 +172,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * This virtual function defines the pixmap used to blend between the popup * menu and the background to create different menu transparency effects. * For example, you can fill the pixmap "pix" with a gradient based on the - * popup's tqcolorGroup, a texture, or some other fancy painting routine. + * popup's colorGroup, a texture, or some other fancy painting routine. * KStyle will then internally blend this pixmap with a snapshot of the * background behind the popupMenu to create the illusion of transparency. * @@ -244,7 +244,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle * * @see KStyle::KStylePrimitive * @see TQStyle::tqdrawPrimitive - * @see TQStyle::tqdrawComplexControl + * @see TQStyle::drawComplexControl */ virtual void drawKStylePrimitive( KStylePrimitive kpe, TQPainter* p, @@ -293,7 +293,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle // #endif // USE_QT4 - void tqdrawControl( TQ_ControlElement element, + void drawControl( TQ_ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect &r, @@ -301,7 +301,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::SO_Default ) const; - void tqdrawComplexControl( TQ_ComplexControl control, + void drawComplexControl( TQ_ComplexControl control, TQPainter *p, const TQWidget* widget, const TQRect &r, @@ -321,7 +321,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle SubControl sc, const TQStyleOption& = TQStyleOption::SO_Default ) const; - int tqpixelMetric( PixelMetric m, + int pixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; TQRect subRect( SubRect r, @@ -331,7 +331,7 @@ class TDEFX_EXPORT KStyle: public TQCommonStyle const TQWidget* widget = 0, const TQStyleOption& = TQStyleOption::SO_Default ) const; - int tqstyleHint( TQ_StyleHint sh, + int styleHint( TQ_StyleHint sh, const TQWidget* w = 0, const TQStyleOption &opt = TQStyleOption::SO_Default, TQStyleHintReturn* shr = 0 ) const; |