diff options
author | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
---|---|---|
committer | tpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da> | 2011-01-03 04:12:51 +0000 |
commit | 560378aaca1784ba19806a0414a32b20c744de39 (patch) | |
tree | ce0dfd7c3febf2a1adc7603d1019a8be2083c415 /kstyles/keramik | |
parent | d4d5af1cdbd3cc65d095e0afc5b1f4260091cf5d (diff) | |
download | tdelibs-560378aaca1784ba19806a0414a32b20c744de39.tar.gz tdelibs-560378aaca1784ba19806a0414a32b20c744de39.zip |
Automated conversion for enhanced compatibility with TQt for Qt4 3.4.0 TP1
NOTE: This will not compile with Qt4 (yet), however it does compile with Qt3
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1211081 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstyles/keramik')
-rw-r--r-- | kstyles/keramik/genembed.cpp | 32 | ||||
-rw-r--r-- | kstyles/keramik/gradients.cpp | 2 | ||||
-rw-r--r-- | kstyles/keramik/keramik.cpp | 204 | ||||
-rw-r--r-- | kstyles/keramik/keramik.h | 22 | ||||
-rw-r--r-- | kstyles/keramik/pixmaploader.cpp | 124 | ||||
-rw-r--r-- | kstyles/keramik/pixmaploader.h | 4 |
6 files changed, 194 insertions, 194 deletions
diff --git a/kstyles/keramik/genembed.cpp b/kstyles/keramik/genembed.cpp index 2fecf94d1..e47e7e6e7 100644 --- a/kstyles/keramik/genembed.cpp +++ b/kstyles/keramik/genembed.cpp @@ -146,7 +146,7 @@ int main(int argc, char** argv) int readJustID = 0; - if ((pos = s.findRev("-")) != -1) + if ((pos = s.tqfindRev("-")) != -1) { int suffix = evalSuffix(s.mid(pos)); if (suffix !=-1 ) @@ -156,16 +156,16 @@ int main(int argc, char** argv) } } - if (!assignID.contains(id)) + if (!assignID.tqcontains(id)) { assignID[id] = nextID; nextID += 256; } - s.replace("-","_"); + s.tqreplace("-","_"); - if (s.contains("button")) + if (s.tqcontains("button")) KImageEffect::contrastHSV(input); int fullID = assignID[id] + readJustID;//Subwidget.. @@ -178,7 +178,7 @@ int main(int argc, char** argv) - if (s.contains("toolbar") || s.contains("tab-top-active") || s.contains("menubar") ) + if (s.tqcontains("toolbar") || s.tqcontains("tab-top-active") || s.tqcontains("menubar") ) { // highlights = false; gamma = 1/1.25f; @@ -186,7 +186,7 @@ int main(int argc, char** argv) shadows = false; } - if (s.contains("scrollbar") && s.contains("groove")) + if (s.tqcontains("scrollbar") && s.tqcontains("groove")) { //highlights = false; //gamma = 1.5; @@ -194,7 +194,7 @@ int main(int argc, char** argv) } //brightAdj = -10; - if (s.contains("scrollbar") && s.contains("slider")) + if (s.tqcontains("scrollbar") && s.tqcontains("slider")) { //highlights = false; gamma =1/0.7f; @@ -202,7 +202,7 @@ int main(int argc, char** argv) } - if (s.contains("menuitem")) + if (s.tqcontains("menuitem")) { //highlights = false; gamma =1/0.6f; @@ -222,14 +222,14 @@ int main(int argc, char** argv) cout<<"static const unsigned char "<<s.latin1()<<"[]={\n"; - Q_UINT32* read = reinterpret_cast< Q_UINT32* >(input.bits() ); + TQ_UINT32* read = reinterpret_cast< TQ_UINT32* >(input.bits() ); int size = input.width()*input.height(); for (int pos=0; pos<size; pos++) { QRgb basePix = (QRgb)*read; - if (qAlpha(basePix) != 255) + if (tqAlpha(basePix) != 255) reallySolid = false; else pixSolid++; @@ -242,7 +242,7 @@ int main(int argc, char** argv) images.push_back(image); - read = reinterpret_cast< Q_UINT32* >(input.bits() ); + read = reinterpret_cast< TQ_UINT32* >(input.bits() ); for (int pos=0; pos<size; pos++) { QRgb basePix = (QRgb)*read; @@ -252,10 +252,10 @@ int main(int argc, char** argv) int h,s,v; clr.hsv(&h,&s,&v); - v=qGray(basePix); + v=tqGray(basePix); int targetColorAlpha = 0 , greyAdd = 0; - //int srcAlpha = qAlpha(basePix); + //int srcAlpha = tqAlpha(basePix); if (s>0 || v > 128) { //Non-shadow @@ -296,8 +296,8 @@ int main(int argc, char** argv) if (reallySolid) cout<<targetColorAlpha<<","<<greyAdd<<","; else - cout<<targetColorAlpha<<","<<greyAdd<<","<<qAlpha(basePix)<<","; - //cout<<qRed(basePix)<<","<<qGreen(basePix)<<","<<qBlue(basePix)<<","<<qAlpha(basePix)<<","; + cout<<targetColorAlpha<<","<<greyAdd<<","<<tqAlpha(basePix)<<","; + //cout<<tqRed(basePix)<<","<<tqGreen(basePix)<<","<<tqBlue(basePix)<<","<<tqAlpha(basePix)<<","; if (pos%8 == 7) cout<<"\n"; @@ -373,7 +373,7 @@ int main(int argc, char** argv) for (TQMap<TQString, int>::iterator i = assignID.begin(); i != assignID.end(); ++i) { TQString name = "keramik_"+i.key(); - name.replace("-","_"); + name.tqreplace("-","_"); ts<<"\t"<<name<<" = "<<i.data()<<",\n"; } ts<<"\tkeramik_last\n"; diff --git a/kstyles/keramik/gradients.cpp b/kstyles/keramik/gradients.cpp index ab804d117..4a5c7dfc9 100644 --- a/kstyles/keramik/gradients.cpp +++ b/kstyles/keramik/gradients.cpp @@ -96,7 +96,7 @@ void GradientPainter::renderGradient( TQPainter* p, const TQRect& r, TQColor c, int key = entry.key(); - if ((cacheEntry = cache.find(key, false))) + if ((cacheEntry = cache.tqfind(key, false))) { if (entry == *cacheEntry) { diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp index 6921efa2f..9ac37d2b9 100644 --- a/kstyles/keramik/keramik.cpp +++ b/kstyles/keramik/keramik.cpp @@ -102,7 +102,7 @@ TQBitmap lightBmp; TQBitmap grayBmp; TQBitmap dgrayBmp; TQBitmap centerBmp; -TQBitmap maskBmp; +TQBitmap tqmaskBmp; TQBitmap xBmp; */ namespace @@ -146,8 +146,8 @@ namespace p->save(); /*if ( down ) - p->translate( pixelMetric( PM_ButtonShiftHorizontal ), - pixelMetric( PM_ButtonShiftVertical ) ); + p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), + tqpixelMetric( PM_ButtonShiftVertical ) ); */ if ( enabled ) { @@ -277,7 +277,7 @@ TQPixmap KeramikStyle::stylePixmap(StylePixmap stylepixmap, KeramikStyle::KeramikStyle() :KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ), - maskMode(false), formMode(false), + tqmaskMode(false), formMode(false), toolbarBlendWidget(0), titleBarMode(None), flatMode(false), customScrollMode(false), kickerMode(false) { forceSmallMode = false; @@ -346,8 +346,8 @@ void KeramikStyle::polish(TQWidget* widget) else if ( widget->inherits( "QMenuBar" ) || widget->inherits( "QPopupMenu" ) ) widget->setBackgroundMode( NoBackground ); - else if ( widget->parentWidget() && - ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->inherits( "QComboBox" ) ) || + else if ( widget->tqparentWidget() && + ( ( widget->inherits( "QListBox" ) && widget->tqparentWidget()->inherits( "QComboBox" ) ) || widget->inherits( "KCompletionBox" ) ) ) { TQListBox* listbox = (TQListBox*) widget; listbox->setLineWidth( 4 ); @@ -387,8 +387,8 @@ void KeramikStyle::unPolish(TQWidget* widget) else if ( widget->inherits( "QMenuBar" ) || widget->inherits( "QPopupMenu" ) ) widget->setBackgroundMode( PaletteBackground ); - else if ( widget->parentWidget() && - ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->inherits( "QComboBox" ) ) || + else if ( widget->tqparentWidget() && + ( ( widget->inherits( "QListBox" ) && widget->tqparentWidget()->inherits( "QComboBox" ) ) || widget->inherits( "KCompletionBox" ) ) ) { TQListBox* listbox = (TQListBox*) widget; listbox->setLineWidth( 1 ); @@ -432,7 +432,7 @@ static void renderToolbarEntryBackground(TQPainter* paint, //Do we have a parent toolbar to use? if (parent) { - //Calculate the toolbar geometry. + //Calculate the toolbar tqgeometry. //The initial guess is the size of the parent widget toolWidth = parent->width(); toolHeight = parent->height(); @@ -476,7 +476,7 @@ static void renderToolbarWidgetBackground(TQPainter* painter, const TQWidget* wi // Find the top-level toolbar of this widget, since it may be nested in other // widgets that are on the toolbar. - TQWidget *parent = static_cast<TQWidget*>(widget->parentWidget()); + TQWidget *parent = static_cast<TQWidget*>(widget->tqparentWidget()); int x_offset = widget->x(), y_offset = widget->y(); while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) ) { @@ -519,19 +519,19 @@ static void renderToolbarWidgetBackground(TQPainter* painter, const TQWidget* wi if (painter) { Keramik::GradientPainter::renderGradient( painter, widget->rect(), - widget->colorGroup().button(), horiz_grad, false, + widget->tqcolorGroup().button(), horiz_grad, false, x_offset, y_offset, toolWidth, toolHeight); } else { TQPainter p( widget ); Keramik::GradientPainter::renderGradient( &p, widget->rect(), - widget->colorGroup().button(), horiz_grad, false, + widget->tqcolorGroup().button(), horiz_grad, false, x_offset, y_offset, toolWidth, toolHeight); } } -// This function draws primitive elements as well as their masks. +// This function draws primitive elements as well as their tqmasks. void KeramikStyle::drawPrimitive( PrimitiveElement pe, TQPainter *p, const TQRect &r, @@ -944,7 +944,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe, //p->setPen( cg.shadow() ); //p->drawRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2); - //p->fillRect( visualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) ); + //p->fillRect( tqvisualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) ); //break; // GENERAL PANELS @@ -976,7 +976,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe, case PE_WindowFrame: { bool sunken = flags & Style_Sunken; - int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw == 2) { @@ -1014,7 +1014,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe, int x2 = r.x()+r.width()-1; int y2 = r.y()+r.height()-1; - int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw) { @@ -1034,7 +1034,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe, int y = r.y(); int x2 = r.x() + r.width() - 1; int y2 = r.y() + r.height() - 1; - int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth) + int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) : opt.lineWidth(); if (lw) @@ -1092,7 +1092,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe, TQWidget* paintWidget = dynamic_cast<TQWidget*>(p->device()); TQToolBar* parent = 0; if (paintWidget) - parent = ::qt_cast<TQToolBar*>(paintWidget->parentWidget()); + parent = ::qt_cast<TQToolBar*>(paintWidget->tqparentWidget()); renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal) ); if ( !(flags & Style_Horizontal) ) @@ -1140,8 +1140,8 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe, p->save(); if ( flags & Style_Down ) - p->translate( pixelMetric( PM_ButtonShiftHorizontal ), - pixelMetric( PM_ButtonShiftVertical ) ); + p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ), + tqpixelMetric( PM_ButtonShiftVertical ) ); if ( flags & Style_Enabled ) { @@ -1305,16 +1305,16 @@ bool KeramikStyle::isFormWidget(const TQWidget* widget) const { //Form widgets are in the KHTMLView, but that has 2 further inner levels //of widgets - QClipperWidget, and outside of that, QViewportWidget - TQWidget* potentialClipPort = widget->parentWidget(); + TQWidget* potentialClipPort = widget->tqparentWidget(); if ( !potentialClipPort || potentialClipPort->isTopLevel() ) return false; - TQWidget* potentialViewPort = potentialClipPort->parentWidget(); + TQWidget* potentialViewPort = potentialClipPort->tqparentWidget(); if (!potentialViewPort || potentialViewPort->isTopLevel() || qstrcmp(potentialViewPort->name(), "qt_viewport") ) return false; - TQWidget* potentialKHTML = potentialViewPort->parentWidget(); + TQWidget* potentialKHTML = potentialViewPort->tqparentWidget(); if (!potentialKHTML || potentialKHTML->isTopLevel() || qstrcmp(potentialKHTML->className(), "KHTMLView") ) return false; @@ -1323,7 +1323,7 @@ bool KeramikStyle::isFormWidget(const TQWidget* widget) const return true; } -void KeramikStyle::drawControl( ControlElement element, +void KeramikStyle::tqdrawControl( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1381,15 +1381,15 @@ void KeramikStyle::drawControl( ControlElement element, // Shift button contents if pushed. if ( active ) { - x += pixelMetric(PM_ButtonShiftHorizontal, widget); - y += pixelMetric(PM_ButtonShiftVertical, widget); + x += tqpixelMetric(PM_ButtonShiftHorizontal, widget); + y += tqpixelMetric(PM_ButtonShiftVertical, widget); flags |= Style_Sunken; } // Does the button have a popup menu? if ( button->isMenuButton() ) { - int dx = pixelMetric( PM_MenuButtonIndicator, widget ); + int dx = tqpixelMetric( PM_MenuButtonIndicator, widget ); if ( button->iconSet() && !button->iconSet()->isNull() && (dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w ) { @@ -1397,7 +1397,7 @@ void KeramikStyle::drawControl( ControlElement element, } else { - drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), + drawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ), cg, flags, opt ); w -= dx; } @@ -1446,18 +1446,18 @@ void KeramikStyle::drawControl( ControlElement element, } if (cornArrow) //Draw over the icon - drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), + drawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ), cg, flags, opt ); } // Make the label indicate if the button is a default button or not - drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(), + drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->tqcolorGroup(), button->isEnabled(), button->pixmap(), button->text(), -1, - &button->colorGroup().buttonText() ); + &button->tqcolorGroup().buttonText() ); if ( flags & Style_HasFocus ) drawPrimitive( PE_FocusRect, p, - visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), + tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ), cg, flags ); break; } @@ -1465,13 +1465,13 @@ void KeramikStyle::drawControl( ControlElement element, case CE_ToolButtonLabel: { //const TQToolButton *toolbutton = static_cast<const TQToolButton * >(widget); - bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" ); + bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" ); TQRect nr = r; if (!onToolbar) { - if (widget->parentWidget() && - !qstrcmp(widget->parentWidget()->name(),"qt_maxcontrols" ) ) + if (widget->tqparentWidget() && + !qstrcmp(widget->tqparentWidget()->name(),"qt_maxcontrols" ) ) { //Make sure we don't cut into the endline if (!qstrcmp(widget->name(), "close")) @@ -1486,7 +1486,7 @@ void KeramikStyle::drawControl( ControlElement element, // nr.setWidth(r.width()-2); //Account for shadow } - KStyle::drawControl(element, p, widget, nr, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, nr, cg, flags, opt); break; } @@ -1494,8 +1494,8 @@ void KeramikStyle::drawControl( ControlElement element, { const TQTabBar* tabBar = static_cast< const TQTabBar* >( widget ); - bool bottom = tabBar->shape() == TQTabBar::RoundedBelow || - tabBar->shape() == TQTabBar::TriangularBelow; + bool bottom = tabBar->tqshape() == TQTabBar::RoundedBelow || + tabBar->tqshape() == TQTabBar::TriangularBelow; if ( flags & Style_Selected ) { @@ -1551,7 +1551,7 @@ void KeramikStyle::drawControl( ControlElement element, tb->orientation() == Qt::Horizontal); } else - KStyle::drawControl( CE_DockWindowEmptyArea, p, + KStyle::tqdrawControl( CE_DockWindowEmptyArea, p, widget, r, cg, flags, opt ); break; } @@ -1607,7 +1607,7 @@ void KeramikStyle::drawControl( ControlElement element, bool enabled = mi->isEnabled(); bool checkable = popupmenu->isCheckable(); bool active = flags & Style_Active; - bool etchtext = styleHint( SH_EtchDisabledText ); + bool etchtext = tqstyleHint( SH_EtchDisabledText ); bool reverse = TQApplication::reverseLayout(); if ( checkable ) checkcol = QMAX( checkcol, 20 ); @@ -1641,7 +1641,7 @@ void KeramikStyle::drawControl( ControlElement element, break; } - TQRect cr = visualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r ); + TQRect cr = tqvisualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r ); // Do we have an icon? if ( mi->iconSet() ) { @@ -1724,7 +1724,7 @@ void KeramikStyle::drawControl( ControlElement element, TQString s = mi->text(); // Does the menu item have a text label? if ( !s.isNull() ) { - int t = s.find( '\t' ); + int t = s.tqfind( '\t' ); int m = itemVMargin; int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine; text_flags |= reverse ? AlignRight : AlignLeft; @@ -1787,8 +1787,8 @@ void KeramikStyle::drawControl( ControlElement element, // Does the menu item have a submenu? if ( mi->popup() ) { PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight; - int dim = pixelMetric(PM_MenuButtonIndicator) - itemFrame; - TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, + int dim = tqpixelMetric(PM_MenuButtonIndicator) - itemFrame; + TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - itemFrame - dim, y + h / 2 - dim / 2, dim, dim), r ); // Draw an arrow at the far end of the menu item @@ -1868,7 +1868,7 @@ void KeramikStyle::drawControl( ControlElement element, //Here, we can't simply shift, as the painter code calculates everything based //on the left corner, so we need to draw the 2 portions ourselves. - //Start off by checking the geometry of the end pixmap - it introduces a bit of an offset + //Start off by checking the tqgeometry of the end pixmap - it introduces a bit of an offset TQSize endDim = loader.size(keramik_progressbar + 3); //3 = 3*1 + 0 = (1,0) = cl //We might not have anything to animate at all, though, if the ender is the only thing to paint @@ -1914,27 +1914,27 @@ void KeramikStyle::drawControl( ControlElement element, default: - KStyle::drawControl(element, p, widget, r, cg, flags, opt); + KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt); } } -void KeramikStyle::drawControlMask( ControlElement element, +void KeramikStyle::tqdrawControlMask( ControlElement element, TQPainter *p, const TQWidget *widget, const TQRect &r, const TQStyleOption& opt ) const { p->fillRect(r, color1); - maskMode = true; - drawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt); - maskMode = false; + tqmaskMode = true; + tqdrawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt); + tqmaskMode = false; } bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const { if (combo->width() >= 80) return false; - int suggestedWidth = combo->sizeHint().width(); + int suggestedWidth = combo->tqsizeHint().width(); if (combo->width() - suggestedWidth < -5) return true; @@ -1942,7 +1942,7 @@ bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const return false; } -void KeramikStyle::drawComplexControl( ComplexControl control, +void KeramikStyle::tqdrawComplexControl( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -1996,8 +1996,8 @@ void KeramikStyle::drawComplexControl( ComplexControl control, //When in compact mode, we force the shadow-less bevel mode, //but that also alters height and not just width. //readjust height to fake the other metrics (plus clear - //the other areas, as appropriate). The automasker - //will take care of the overall shape. + //the other areas, as appropriate). The autotqmasker + //will take care of the overall tqshape. if ( compact ) { forceSmallMode = true; @@ -2019,7 +2019,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control, toolbarBlendWidget = 0; } - // don't draw the focus rect etc. on the mask + // don't draw the focus rect etc. on the tqmask if ( cg.button() == color1 && cg.background() == color0 ) break; @@ -2033,11 +2033,11 @@ void KeramikStyle::drawComplexControl( ComplexControl control, if (!compact) { ar.setWidth(ar.width()-13); - TQRect rr = visualRect( TQRect( ar.x(), ar.y() + 4, + TQRect rr = tqvisualRect( TQRect( ar.x(), ar.y() + 4, loader.size(keramik_ripple ).width(), ar.height() - 8 ), widget ); - ar = visualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(), + ar = tqvisualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(), 11, ar.height() ), widget ); @@ -2054,7 +2054,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control, else //Size-constrained combo -- loose the ripple. { ar.setWidth(ar.width() - 7); - ar = visualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget); + ar = tqvisualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget); TQPointArray a; a.setPoints(QCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow); @@ -2069,7 +2069,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control, { if ( cb->editable() ) { - TQRect er = visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget ); + TQRect er = tqvisualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget ); er.addCoords( -2, -2, 2, 2 ); p2->fillRect( er, cg.base() ); drawPrimitive( PE_PanelLineEdit, p2, er, cg ); @@ -2078,7 +2078,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control, } else if ( cb->hasFocus() ) { - TQRect re = TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, cb), widget); + TQRect re = TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, cb), widget); if ( compact ) re.addCoords( 3, 3, 0, -3 ); p2->fillRect( re, cg.brush( TQColorGroup::Highlight ) ); @@ -2113,7 +2113,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control, case CC_SpinWidget: { const TQSpinWidget* sw = static_cast< const TQSpinWidget* >( widget ); - TQRect br = visualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget ); + TQRect br = tqvisualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget ); if ( controls & SC_SpinWidgetButtonField ) { Keramik::SpinBoxPainter().draw( p, br, cg.button(), cg.background(), !sw->isEnabled() ); @@ -2135,9 +2135,9 @@ void KeramikStyle::drawComplexControl( ComplexControl control, case CC_ScrollBar: { const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget ); - if (highlightScrollBar && sb->parentWidget()) //Don't do the check if not highlighting anyway + if (highlightScrollBar && sb->tqparentWidget()) //Don't do the check if not highlighting anyway { - if (sb->parentWidget()->colorGroup().button() != sb->colorGroup().button()) + if (sb->tqparentWidget()->tqcolorGroup().button() != sb->tqcolorGroup().button()) customScrollMode = true; } bool horizontal = sb->orientation() == Horizontal; @@ -2208,14 +2208,14 @@ void KeramikStyle::drawComplexControl( ComplexControl control, // ------------------------------------------------------------------- case CC_ToolButton: { const TQToolButton *toolbutton = (const TQToolButton *) widget; - bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" ); + bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" ); bool onExtender = !onToolbar && - widget->parentWidget() && widget->parentWidget()->inherits( "QToolBarExtensionWidget") && - widget->parentWidget()->parentWidget()->inherits( "QToolBar" ); + widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBarExtensionWidget") && + widget->tqparentWidget()->tqparentWidget()->inherits( "QToolBar" ); bool onControlButtons = false; - if (!onToolbar && !onExtender && widget->parentWidget() && - !qstrcmp(widget->parentWidget()->name(),"qt_maxcontrols" ) ) + if (!onToolbar && !onExtender && widget->tqparentWidget() && + !qstrcmp(widget->tqparentWidget()->name(),"qt_maxcontrols" ) ) { onControlButtons = true; titleBarMode = Maximized; @@ -2254,11 +2254,11 @@ void KeramikStyle::drawComplexControl( ComplexControl control, } // Check whether to draw a background pixmap - else if ( toolbutton->parentWidget() && - toolbutton->parentWidget()->backgroundPixmap() && - !toolbutton->parentWidget()->backgroundPixmap()->isNull() ) + else if ( toolbutton->tqparentWidget() && + toolbutton->tqparentWidget()->backgroundPixmap() && + !toolbutton->tqparentWidget()->backgroundPixmap()->isNull() ) { - TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap()); + TQPixmap pixmap = *(toolbutton->tqparentWidget()->backgroundPixmap()); p->drawTiledPixmap( r, pixmap, toolbutton->pos() ); } else if (onToolbar) @@ -2311,14 +2311,14 @@ void KeramikStyle::drawComplexControl( ComplexControl control, case CC_TitleBar: titleBarMode = Regular; //Handle buttons on titlebar different from toolbuttons default: - KStyle::drawComplexControl( control, p, widget, + KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt ); titleBarMode = None; } } -void KeramikStyle::drawComplexControlMask( ComplexControl control, +void KeramikStyle::tqdrawComplexControlMask( ComplexControl control, TQPainter *p, const TQWidget *widget, const TQRect &r, @@ -2326,11 +2326,11 @@ void KeramikStyle::drawComplexControlMask( ComplexControl control, { if (control == CC_ComboBox) { - maskMode = true; - drawComplexControl(CC_ComboBox, p, widget, r, + tqmaskMode = true; + tqdrawComplexControl(CC_ComboBox, p, widget, r, TQApplication::palette().active(), Style_Default, SC_ComboBoxFrame,SC_None, opt); - maskMode = false; + tqmaskMode = false; } else @@ -2338,7 +2338,7 @@ void KeramikStyle::drawComplexControlMask( ComplexControl control, } -int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const +int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const { switch(m) { @@ -2395,8 +2395,8 @@ int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const const TQTabBar* tb = ::qt_cast<const TQTabBar*>(widget); if (tb) { - if (tb->shape() == TQTabBar::RoundedBelow || - tb->shape() == TQTabBar::TriangularBelow) + if (tb->tqshape() == TQTabBar::RoundedBelow || + tb->tqshape() == TQTabBar::TriangularBelow) return 0; } @@ -2408,7 +2408,7 @@ int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const return titleBarH; default: - return KStyle::pixelMetric(m, widget); + return KStyle::tqpixelMetric(m, widget); } } @@ -2426,8 +2426,8 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, { const TQPushButton* btn = static_cast< const TQPushButton* >( widget ); - int w = contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget ); - int h = contentSize.height() + 2 * pixelMetric( PM_ButtonMargin, widget ); + int w = contentSize.width() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); + int h = contentSize.height() + 2 * tqpixelMetric( PM_ButtonMargin, widget ); if ( btn->text().isEmpty() && contentSize.width() < 32 ) return TQSize( w, h ); @@ -2440,7 +2440,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, case CT_ToolButton: { - bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" ); + bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" ); if (!onToolbar) //Behaves like a button, so scale appropriately to the border { int w = contentSize.width(); @@ -2473,8 +2473,8 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, int w = contentSize.width(), h = contentSize.height(); if ( mi->custom() ) { - w = mi->custom()->sizeHint().width(); - h = mi->custom()->sizeHint().height(); + w = mi->custom()->tqsizeHint().width(); + h = mi->custom()->tqsizeHint().height(); if ( ! mi->custom()->fullSpan() ) h += 2*itemVMargin + 2*itemFrame; } @@ -2500,7 +2500,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents, 2 * itemFrame ); } - if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 ) + if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 ) w += itemHMargin + itemFrame*2 + 7; else if ( mi->popup() ) w += 2 * arrowHMargin; @@ -2584,7 +2584,7 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control, { //Note that the widget here == the combo, not the completion //box, so we don't get any recursion - int suggestedWidth = widget->sizeHint().width(); + int suggestedWidth = widget->tqsizeHint().width(); TQRect def = opt.rect(); def.addCoords( 4, -4, -6, 4 ); @@ -2621,7 +2621,7 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control, { int range = sb->maxValue() - sb->minValue(); sliderlen = ( sb->pageStep() * maxlen ) / ( range + sb->pageStep() ); - slidermin = pixelMetric( PM_ScrollBarSliderMin, sb ); + slidermin = tqpixelMetric( PM_ScrollBarSliderMin, sb ); if ( sliderlen < slidermin ) sliderlen = slidermin; if ( sliderlen > maxlen ) sliderlen = maxlen; } @@ -2664,9 +2664,9 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control, bool horizontal = sl->orientation() == Horizontal; TQSlider::TickSetting ticks = sl->tickmarks(); int pos = sl->sliderStart(); - int size = pixelMetric( PM_SliderControlThickness, widget ); - int handleSize = pixelMetric( PM_SliderThickness, widget ); - int len = pixelMetric( PM_SliderLength, widget ); + int size = tqpixelMetric( PM_SliderControlThickness, widget ); + int handleSize = tqpixelMetric( PM_SliderThickness, widget ); + int len = tqpixelMetric( PM_SliderLength, widget ); //Shrink the metrics if the widget is too small //to fit our normal values for them. @@ -2749,7 +2749,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) { TQWidget* button = static_cast<TQWidget*>(object); hoverWidget = 0; - button->repaint( false ); + button->tqrepaint( false ); return false; } @@ -2759,7 +2759,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) if (event->type() == TQEvent::Enter && static_cast<TQWidget*>(object)->isEnabled() ) { hoverWidget = static_cast<TQWidget*>(object); - hoverWidget->repaint( false ); + hoverWidget->tqrepaint( false ); } return false; } @@ -2787,7 +2787,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) switch (event->type()) { #ifdef HAVE_X11_EXTENSIONS_SHAPE_H - //Combo dropdowns are shaped + //Combo dropdowns are tqshaped case TQEvent::Resize: { TQListBox* listbox = static_cast<TQListBox*>(object); @@ -2819,7 +2819,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) TQPaintEvent* paint = (TQPaintEvent*) event; - if ( !listbox->contentsRect().contains( paint->rect() ) ) + if ( !listbox->contentsRect().tqcontains( paint->rect() ) ) { TQPainter p( listbox ); Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(), @@ -2858,12 +2858,12 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) TQMouseEvent* mev = static_cast<TQMouseEvent*>(event); TQListBox* box = static_cast<TQListBox*> (object); - TQWidget* parent = box->parentWidget(); + TQWidget* parent = box->tqparentWidget(); if (!parent) return false; TQPoint inParCoords = parent->mapFromGlobal(mev->globalPos()); - if (parent->rect().contains(inParCoords)) + if (parent->rect().tqcontains(inParCoords)) return true; } break; @@ -2899,20 +2899,20 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) if ( toolbar->orientation() == Qt::Horizontal ) { - Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(), + Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(), true /*horizontal*/, false /*not a menu*/, 0, widget->y(), wr.width(), tr.height()); } else { - Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(), + Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(), false /*vertical*/, false /*not a menu*/, widget->x(), 0, tr.width(), wr.height()); } //Draw terminator line, too - p.setPen( toolbar->colorGroup().mid() ); + p.setPen( toolbar->tqcolorGroup().mid() ); if ( toolbar->orientation() == Qt::Horizontal ) p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 ); else @@ -2932,4 +2932,4 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event ) } // vim: ts=4 sw=4 noet -// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off; +// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off; diff --git a/kstyles/keramik/keramik.h b/kstyles/keramik/keramik.h index 03d97ee3a..135a92751 100644 --- a/kstyles/keramik/keramik.h +++ b/kstyles/keramik/keramik.h @@ -70,7 +70,7 @@ public: SFlags flags = Style_Default, const TQStyleOption& = TQStyleOption::Default ) const; - void drawControl( ControlElement element, + void tqdrawControl( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -78,13 +78,13 @@ public: SFlags flags = Style_Default, const TQStyleOption& opt = TQStyleOption::Default ) const; - void drawControlMask( ControlElement element, + void tqdrawControlMask( ControlElement element, TQPainter* p, const TQWidget* widget, const TQRect& r, const TQStyleOption& opt = TQStyleOption::Default ) const; - void drawComplexControl( ComplexControl control, + void tqdrawComplexControl( ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, @@ -94,13 +94,13 @@ public: SCFlags active = SC_None, const TQStyleOption& = TQStyleOption::Default ) const; - void drawComplexControlMask( ComplexControl control, + void tqdrawComplexControlMask( ComplexControl control, TQPainter* p, const TQWidget* widget, const TQRect& r, const TQStyleOption& = TQStyleOption::Default ) const; - int pixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; + int tqpixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const; TQSize sizeFromContents( ContentsType contents, const TQWidget* widget, @@ -133,7 +133,7 @@ private: //Rendering flags mutable bool forceSmallMode; - mutable bool maskMode; //Ugly round trip flag to permit masking with little code; + mutable bool tqmaskMode; //Ugly round trip flag to permit tqmasking with little code; mutable bool formMode; //Set when rendering form widgets mutable const TQWidget* toolbarBlendWidget; //Ditto for blending with toolbars @@ -166,15 +166,15 @@ private: if (formMode) { //If we're a form widget, we blend on painting, and consider ourselves - //not to have a mask (so we don't get clipped to it) - if (maskMode) + //not to have a tqmask (so we don't get clipped to it) + if (tqmaskMode) return Keramik::TilePainter::PaintTrivialMask; else return Keramik::TilePainter::PaintFullBlend; } else { - if (maskMode) + if (tqmaskMode) return Keramik::TilePainter::PaintMask; else return Keramik::TilePainter::PaintNormal; @@ -183,7 +183,7 @@ private: Keramik::TilePainter::PaintMode pmodeFullBlend() const { - return maskMode?Keramik::TilePainter::PaintMask : Keramik::TilePainter::PaintFullBlend; + return tqmaskMode?Keramik::TilePainter::PaintMask : Keramik::TilePainter::PaintFullBlend; } TQWidget* hoverWidget; @@ -204,4 +204,4 @@ private: #endif // vim: ts=4 sw=4 noet -// kate: indent-width 4; replace-tabs off; tab-width 4; +// kate: indent-width 4; tqreplace-tabs off; tab-width 4; diff --git a/kstyles/keramik/pixmaploader.cpp b/kstyles/keramik/pixmaploader.cpp index 01cdf5fc6..3013c8277 100644 --- a/kstyles/keramik/pixmaploader.cpp +++ b/kstyles/keramik/pixmaploader.cpp @@ -69,13 +69,13 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor //OK, now, fill it in, using the color.. - Q_UINT32 r, g,b; - Q_UINT32 i = qGray(color.rgb()); + TQ_UINT32 r, g,b; + TQ_UINT32 i = tqGray(color.rgb()); r = (3*color.red()+i)>>2; g = (3*color.green()+i)>>2; b = (3*color.blue()+i)>>2; - Q_UINT32 br = back.red(), bg = back.green(), bb = back.blue(); + TQ_UINT32 br = back.red(), bg = back.green(), bb = back.blue(); if (edata->haveAlpha) @@ -83,21 +83,21 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor if (blend) { img->setAlphaBuffer(false); - Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() ); + TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() ); int size = img->width()*img->height() * 3; for (int pos = 0; pos < size; pos+=3) { - Q_UINT32 scale = edata->data[pos]; - Q_UINT32 add = (edata->data[pos+1]*i+127)>>8; - Q_UINT32 alpha = edata->data[pos+2]; - Q_UINT32 destAlpha = 256 - alpha; + TQ_UINT32 scale = edata->data[pos]; + TQ_UINT32 add = (edata->data[pos+1]*i+127)>>8; + TQ_UINT32 alpha = edata->data[pos+2]; + TQ_UINT32 destAlpha = 256 - alpha; - Q_UINT32 rr = clamp[((r*scale+127)>>8) + add]; - Q_UINT32 rg = clamp[((g*scale+127)>>8) + add]; - Q_UINT32 rb = clamp[((b*scale+127)>>8) + add]; + TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add]; + TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add]; + TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add]; - *write =qRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8), + *write =tqRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8), ((rg*alpha+127)>>8) + ((bg*destAlpha+127)>>8), ((rb*alpha+127)>>8) + ((bb*destAlpha+127)>>8)); @@ -107,20 +107,20 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor else { img->setAlphaBuffer(true); - Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() ); + TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() ); int size = img->width()*img->height() * 3; for (int pos = 0; pos < size; pos+=3) { - Q_UINT32 scale = edata->data[pos]; - Q_UINT32 add = (edata->data[pos+1]*i+127)>>8; - Q_UINT32 alpha = edata->data[pos+2]; + TQ_UINT32 scale = edata->data[pos]; + TQ_UINT32 add = (edata->data[pos+1]*i+127)>>8; + TQ_UINT32 alpha = edata->data[pos+2]; - Q_UINT32 rr = clamp[((r*scale+127)>>8) + add]; - Q_UINT32 rg = clamp[((g*scale+127)>>8) + add]; - Q_UINT32 rb = clamp[((b*scale+127)>>8) + add]; + TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add]; + TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add]; + TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add]; - *write =qRgba(rr, rg, rb, alpha); + *write =tqRgba(rr, rg, rb, alpha); write++; } @@ -130,17 +130,17 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor else { img->setAlphaBuffer(false); - Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() ); + TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() ); int size = img->width()*img->height() * 2; for (int pos = 0; pos < size; pos+=2) { - Q_UINT32 scale = edata->data[pos]; - Q_UINT32 add = (edata->data[pos+1]*i+127)>>8; - Q_UINT32 rr = clamp[((r*scale+127)>>8) + add]; - Q_UINT32 rg = clamp[((g*scale+127)>>8) + add]; - Q_UINT32 rb = clamp[((b*scale+127)>>8) + add]; - *write =qRgb(rr, rg, rb); + TQ_UINT32 scale = edata->data[pos]; + TQ_UINT32 add = (edata->data[pos+1]*i+127)>>8; + TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add]; + TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add]; + TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add]; + *write =tqRgb(rr, rg, rb); write++; } } @@ -158,14 +158,14 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor& TQImage* img = new TQImage(edata->width, edata->height, 32); //OK, now, fill it in, using the color.. - Q_UINT32 r, g,b; + TQ_UINT32 r, g,b; r = color.red() + 2; g = color.green() + 2; b = color.blue() + 2; -// int i = qGray(color.rgb()); +// int i = tqGray(color.rgb()); - Q_UINT32 br = back.red(), bg = back.green(), bb = back.blue(); + TQ_UINT32 br = back.red(), bg = back.green(), bb = back.blue(); if (edata->haveAlpha) { @@ -173,23 +173,23 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor& { img->setAlphaBuffer(false); - Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() ); + TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() ); int size = img->width()*img->height() * 3; for (int pos = 0; pos < size; pos+=3) { - Q_UINT32 scale = edata->data[pos]; - Q_UINT32 add = edata->data[pos+1]; - Q_UINT32 alpha = edata->data[pos+2]; - Q_UINT32 destAlpha = 256 - alpha; + TQ_UINT32 scale = edata->data[pos]; + TQ_UINT32 add = edata->data[pos+1]; + TQ_UINT32 alpha = edata->data[pos+2]; + TQ_UINT32 destAlpha = 256 - alpha; if (scale != 0) add = add*5/4; - Q_UINT32 rr = clamp[((r*scale+127)>>8) + add]; - Q_UINT32 rg = clamp[((g*scale+127)>>8) + add]; - Q_UINT32 rb = clamp[((b*scale+127)>>8) + add]; + TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add]; + TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add]; + TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add]; - *write =qRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8), + *write =tqRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8), ((rg*alpha+127)>>8) + ((bg*destAlpha+127)>>8), ((rb*alpha+127)>>8) + ((bb*destAlpha+127)>>8)); @@ -200,22 +200,22 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor& { img->setAlphaBuffer(true); - Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() ); + TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() ); int size = img->width()*img->height() * 3; for (int pos = 0; pos < size; pos+=3) { - Q_UINT32 scale = edata->data[pos]; - Q_UINT32 add = edata->data[pos+1]; - Q_UINT32 alpha = edata->data[pos+2]; + TQ_UINT32 scale = edata->data[pos]; + TQ_UINT32 add = edata->data[pos+1]; + TQ_UINT32 alpha = edata->data[pos+2]; if (scale != 0) add = add*5/4; - Q_UINT32 rr = clamp[((r*scale+127)>>8) + add]; - Q_UINT32 rg = clamp[((g*scale+127)>>8) + add]; - Q_UINT32 rb = clamp[((b*scale+127)>>8) + add]; + TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add]; + TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add]; + TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add]; - *write =qRgba(rr, rg, rb, alpha); + *write =tqRgba(rr, rg, rb, alpha); write++; } } @@ -224,22 +224,22 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor& { img->setAlphaBuffer(false); - Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() ); + TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() ); int size = img->width()*img->height() * 2; for (int pos = 0; pos < size; pos+=2) { - Q_UINT32 scale = edata->data[pos]; - Q_UINT32 add = edata->data[pos+1]; + TQ_UINT32 scale = edata->data[pos]; + TQ_UINT32 add = edata->data[pos+1]; if (scale != 0) add = add*5/4; - Q_UINT32 rr = clamp[((r*scale+127)>>8) + add]; - Q_UINT32 rg = clamp[((g*scale+127)>>8) + add]; - Q_UINT32 rb = clamp[((b*scale+127)>>8) + add]; + TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add]; + TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add]; + TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add]; - *write =qRgb(rr, rg, rb); + *write =tqRgb(rr, rg, rb); write++; } } @@ -260,7 +260,7 @@ TQPixmap PixmapLoader::scale( int name, int width, int height, const TQColor& co int key = entry.key(); - if ((cacheEntry = m_pixmapCache.find(key, true))) + if ((cacheEntry = m_pixmapCache.tqfind(key, true))) { if (entry == *cacheEntry) //True match! return *cacheEntry->m_pixmap; @@ -422,12 +422,12 @@ void TilePainter::draw( TQPainter *p, int x, int y, int width, int height, const } else { - const TQBitmap* mask = scale( col, row, w, h, color, bg, disabled, false ).mask(); - if (mask) + const TQBitmap* tqmask = scale( col, row, w, h, color, bg, disabled, false ).tqmask(); + if (tqmask) { p->setBackgroundColor(Qt::color0); p->setPen(Qt::color1); - p->drawTiledPixmap( xpos, ypos, realW, realH, *mask); + p->drawTiledPixmap( xpos, ypos, realW, realH, *tqmask); } else p->fillRect ( xpos, ypos, realW, realH, Qt::color1); @@ -442,12 +442,12 @@ void TilePainter::draw( TQPainter *p, int x, int y, int width, int height, const } else { - const TQBitmap* mask = tile( col, row, color, bg, disabled, false ).mask(); - if (mask) + const TQBitmap* tqmask = tile( col, row, color, bg, disabled, false ).tqmask(); + if (tqmask) { p->setBackgroundColor(Qt::color0); p->setPen(Qt::color1); - p->drawTiledPixmap( xpos, ypos, realW, realH, *mask); + p->drawTiledPixmap( xpos, ypos, realW, realH, *tqmask); } else p->fillRect ( xpos, ypos, realW, realH, Qt::color1); @@ -626,4 +626,4 @@ int SpinBoxPainter::tileName( unsigned int column, unsigned int ) const } // vim: ts=4 sw=4 noet -// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off; +// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off; diff --git a/kstyles/keramik/pixmaploader.h b/kstyles/keramik/pixmaploader.h index ab0bb4223..6b8440ec0 100644 --- a/kstyles/keramik/pixmaploader.h +++ b/kstyles/keramik/pixmaploader.h @@ -161,7 +161,7 @@ namespace Keramik Note that the IDs and offsets are separated since we can reuse the same code in many cases by splitting the widget identify from tile identity (as there are many - different widgets that have the same or similar tile layout) + different widgets that have the same or similar tile tqlayout) */ virtual int tileName( unsigned int, unsigned int ) const { return 0; } @@ -364,4 +364,4 @@ namespace Keramik #endif // vim: ts=4 sw=4 noet -// kate: indent-width 4; replace-tabs off; tab-width 4; +// kate: indent-width 4; tqreplace-tabs off; tab-width 4; |