summaryrefslogtreecommitdiffstats
path: root/kstyles/keramik
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
commit10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch)
tree4bc444c00a79e88105f2cfce5b6209994c413ca0 /kstyles/keramik
parent307136d8eef0ba133b78ceee8e901138d4c996a1 (diff)
downloadtdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz
tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip
Revert automated changes
Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstyles/keramik')
-rw-r--r--kstyles/keramik/genembed.cpp32
-rw-r--r--kstyles/keramik/gradients.cpp2
-rw-r--r--kstyles/keramik/keramik.cpp204
-rw-r--r--kstyles/keramik/keramik.h22
-rw-r--r--kstyles/keramik/pixmaploader.cpp124
-rw-r--r--kstyles/keramik/pixmaploader.h4
6 files changed, 194 insertions, 194 deletions
diff --git a/kstyles/keramik/genembed.cpp b/kstyles/keramik/genembed.cpp
index e47e7e6e7..2fecf94d1 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.tqfindRev("-")) != -1)
+ if ((pos = s.findRev("-")) != -1)
{
int suffix = evalSuffix(s.mid(pos));
if (suffix !=-1 )
@@ -156,16 +156,16 @@ int main(int argc, char** argv)
}
}
- if (!assignID.tqcontains(id))
+ if (!assignID.contains(id))
{
assignID[id] = nextID;
nextID += 256;
}
- s.tqreplace("-","_");
+ s.replace("-","_");
- if (s.tqcontains("button"))
+ if (s.contains("button"))
KImageEffect::contrastHSV(input);
int fullID = assignID[id] + readJustID;//Subwidget..
@@ -178,7 +178,7 @@ int main(int argc, char** argv)
- if (s.tqcontains("toolbar") || s.tqcontains("tab-top-active") || s.tqcontains("menubar") )
+ if (s.contains("toolbar") || s.contains("tab-top-active") || s.contains("menubar") )
{
// highlights = false;
gamma = 1/1.25f;
@@ -186,7 +186,7 @@ int main(int argc, char** argv)
shadows = false;
}
- if (s.tqcontains("scrollbar") && s.tqcontains("groove"))
+ if (s.contains("scrollbar") && s.contains("groove"))
{
//highlights = false;
//gamma = 1.5;
@@ -194,7 +194,7 @@ int main(int argc, char** argv)
}
//brightAdj = -10;
- if (s.tqcontains("scrollbar") && s.tqcontains("slider"))
+ if (s.contains("scrollbar") && s.contains("slider"))
{
//highlights = false;
gamma =1/0.7f;
@@ -202,7 +202,7 @@ int main(int argc, char** argv)
}
- if (s.tqcontains("menuitem"))
+ if (s.contains("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";
- TQ_UINT32* read = reinterpret_cast< TQ_UINT32* >(input.bits() );
+ Q_UINT32* read = reinterpret_cast< Q_UINT32* >(input.bits() );
int size = input.width()*input.height();
for (int pos=0; pos<size; pos++)
{
QRgb basePix = (QRgb)*read;
- if (tqAlpha(basePix) != 255)
+ if (qAlpha(basePix) != 255)
reallySolid = false;
else
pixSolid++;
@@ -242,7 +242,7 @@ int main(int argc, char** argv)
images.push_back(image);
- read = reinterpret_cast< TQ_UINT32* >(input.bits() );
+ read = reinterpret_cast< Q_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=tqGray(basePix);
+ v=qGray(basePix);
int targetColorAlpha = 0 , greyAdd = 0;
- //int srcAlpha = tqAlpha(basePix);
+ //int srcAlpha = qAlpha(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<<","<<tqAlpha(basePix)<<",";
- //cout<<tqRed(basePix)<<","<<tqGreen(basePix)<<","<<tqBlue(basePix)<<","<<tqAlpha(basePix)<<",";
+ cout<<targetColorAlpha<<","<<greyAdd<<","<<qAlpha(basePix)<<",";
+ //cout<<qRed(basePix)<<","<<qGreen(basePix)<<","<<qBlue(basePix)<<","<<qAlpha(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.tqreplace("-","_");
+ name.replace("-","_");
ts<<"\t"<<name<<" = "<<i.data()<<",\n";
}
ts<<"\tkeramik_last\n";
diff --git a/kstyles/keramik/gradients.cpp b/kstyles/keramik/gradients.cpp
index 4a5c7dfc9..ab804d117 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.tqfind(key, false)))
+ if ((cacheEntry = cache.find(key, false)))
{
if (entry == *cacheEntry)
{
diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp
index 9ac37d2b9..6921efa2f 100644
--- a/kstyles/keramik/keramik.cpp
+++ b/kstyles/keramik/keramik.cpp
@@ -102,7 +102,7 @@ TQBitmap lightBmp;
TQBitmap grayBmp;
TQBitmap dgrayBmp;
TQBitmap centerBmp;
-TQBitmap tqmaskBmp;
+TQBitmap maskBmp;
TQBitmap xBmp;
*/
namespace
@@ -146,8 +146,8 @@ namespace
p->save();
/*if ( down )
- p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ),
- tqpixelMetric( PM_ButtonShiftVertical ) );
+ p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
+ pixelMetric( PM_ButtonShiftVertical ) );
*/
if ( enabled ) {
@@ -277,7 +277,7 @@ TQPixmap KeramikStyle::stylePixmap(StylePixmap stylepixmap,
KeramikStyle::KeramikStyle()
:KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ),
- tqmaskMode(false), formMode(false),
+ maskMode(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->tqparentWidget() &&
- ( ( widget->inherits( "QListBox" ) && widget->tqparentWidget()->inherits( "QComboBox" ) ) ||
+ else if ( widget->parentWidget() &&
+ ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->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->tqparentWidget() &&
- ( ( widget->inherits( "QListBox" ) && widget->tqparentWidget()->inherits( "QComboBox" ) ) ||
+ else if ( widget->parentWidget() &&
+ ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->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 tqgeometry.
+ //Calculate the toolbar geometry.
//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->tqparentWidget());
+ TQWidget *parent = static_cast<TQWidget*>(widget->parentWidget());
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->tqcolorGroup().button(), horiz_grad, false,
+ widget->colorGroup().button(), horiz_grad, false,
x_offset, y_offset, toolWidth, toolHeight);
}
else
{
TQPainter p( widget );
Keramik::GradientPainter::renderGradient( &p, widget->rect(),
- widget->tqcolorGroup().button(), horiz_grad, false,
+ widget->colorGroup().button(), horiz_grad, false,
x_offset, y_offset, toolWidth, toolHeight);
}
}
-// This function draws primitive elements as well as their tqmasks.
+// This function draws primitive elements as well as their masks.
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( tqvisualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) );
+ //p->fillRect( visualRect( 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() ? tqpixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? pixelMetric(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() ? tqpixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? pixelMetric(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() ? tqpixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? pixelMetric(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->tqparentWidget());
+ parent = ::qt_cast<TQToolBar*>(paintWidget->parentWidget());
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( tqpixelMetric( PM_ButtonShiftHorizontal ),
- tqpixelMetric( PM_ButtonShiftVertical ) );
+ p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
+ pixelMetric( 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->tqparentWidget();
+ TQWidget* potentialClipPort = widget->parentWidget();
if ( !potentialClipPort || potentialClipPort->isTopLevel() )
return false;
- TQWidget* potentialViewPort = potentialClipPort->tqparentWidget();
+ TQWidget* potentialViewPort = potentialClipPort->parentWidget();
if (!potentialViewPort || potentialViewPort->isTopLevel() ||
qstrcmp(potentialViewPort->name(), "qt_viewport") )
return false;
- TQWidget* potentialKHTML = potentialViewPort->tqparentWidget();
+ TQWidget* potentialKHTML = potentialViewPort->parentWidget();
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::tqdrawControl( ControlElement element,
+void KeramikStyle::drawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1381,15 +1381,15 @@ void KeramikStyle::tqdrawControl( ControlElement element,
// Shift button contents if pushed.
if ( active )
{
- x += tqpixelMetric(PM_ButtonShiftHorizontal, widget);
- y += tqpixelMetric(PM_ButtonShiftVertical, widget);
+ x += pixelMetric(PM_ButtonShiftHorizontal, widget);
+ y += pixelMetric(PM_ButtonShiftVertical, widget);
flags |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() )
{
- int dx = tqpixelMetric( PM_MenuButtonIndicator, widget );
+ int dx = pixelMetric( 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::tqdrawControl( ControlElement element,
}
else
{
- drawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
cg, flags, opt );
w -= dx;
}
@@ -1446,18 +1446,18 @@ void KeramikStyle::tqdrawControl( ControlElement element,
}
if (cornArrow) //Draw over the icon
- drawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( 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->tqcolorGroup(),
+ drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,
- &button->tqcolorGroup().buttonText() );
+ &button->colorGroup().buttonText() );
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, flags );
break;
}
@@ -1465,13 +1465,13 @@ void KeramikStyle::tqdrawControl( ControlElement element,
case CE_ToolButtonLabel:
{
//const TQToolButton *toolbutton = static_cast<const TQToolButton * >(widget);
- bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" );
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
TQRect nr = r;
if (!onToolbar)
{
- if (widget->tqparentWidget() &&
- !qstrcmp(widget->tqparentWidget()->name(),"qt_maxcontrols" ) )
+ if (widget->parentWidget() &&
+ !qstrcmp(widget->parentWidget()->name(),"qt_maxcontrols" ) )
{
//Make sure we don't cut into the endline
if (!qstrcmp(widget->name(), "close"))
@@ -1486,7 +1486,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
// nr.setWidth(r.width()-2); //Account for shadow
}
- KStyle::tqdrawControl(element, p, widget, nr, cg, flags, opt);
+ KStyle::drawControl(element, p, widget, nr, cg, flags, opt);
break;
}
@@ -1494,8 +1494,8 @@ void KeramikStyle::tqdrawControl( ControlElement element,
{
const TQTabBar* tabBar = static_cast< const TQTabBar* >( widget );
- bool bottom = tabBar->tqshape() == TQTabBar::RoundedBelow ||
- tabBar->tqshape() == TQTabBar::TriangularBelow;
+ bool bottom = tabBar->shape() == TQTabBar::RoundedBelow ||
+ tabBar->shape() == TQTabBar::TriangularBelow;
if ( flags & Style_Selected )
{
@@ -1551,7 +1551,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
tb->orientation() == Qt::Horizontal);
}
else
- KStyle::tqdrawControl( CE_DockWindowEmptyArea, p,
+ KStyle::drawControl( CE_DockWindowEmptyArea, p,
widget, r, cg, flags, opt );
break;
}
@@ -1607,7 +1607,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
bool enabled = mi->isEnabled();
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
- bool etchtext = tqstyleHint( SH_EtchDisabledText );
+ bool etchtext = styleHint( SH_EtchDisabledText );
bool reverse = TQApplication::reverseLayout();
if ( checkable )
checkcol = QMAX( checkcol, 20 );
@@ -1641,7 +1641,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
break;
}
- TQRect cr = tqvisualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r );
+ TQRect cr = visualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r );
// Do we have an icon?
if ( mi->iconSet() )
{
@@ -1724,7 +1724,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() ) {
- int t = s.tqfind( '\t' );
+ int t = s.find( '\t' );
int m = itemVMargin;
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
@@ -1787,8 +1787,8 @@ void KeramikStyle::tqdrawControl( ControlElement element,
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
- int dim = tqpixelMetric(PM_MenuButtonIndicator) - itemFrame;
- TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
+ int dim = pixelMetric(PM_MenuButtonIndicator) - itemFrame;
+ TQRect vr = visualRect( 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::tqdrawControl( 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 tqgeometry of the end pixmap - it introduces a bit of an offset
+ //Start off by checking the geometry 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::tqdrawControl( ControlElement element,
default:
- KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
}
-void KeramikStyle::tqdrawControlMask( ControlElement element,
+void KeramikStyle::drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& opt ) const
{
p->fillRect(r, color1);
- tqmaskMode = true;
- tqdrawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt);
- tqmaskMode = false;
+ maskMode = true;
+ drawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt);
+ maskMode = false;
}
bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const
{
if (combo->width() >= 80)
return false;
- int suggestedWidth = combo->tqsizeHint().width();
+ int suggestedWidth = combo->sizeHint().width();
if (combo->width() - suggestedWidth < -5)
return true;
@@ -1942,7 +1942,7 @@ bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const
return false;
}
-void KeramikStyle::tqdrawComplexControl( ComplexControl control,
+void KeramikStyle::drawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1996,8 +1996,8 @@ void KeramikStyle::tqdrawComplexControl( 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 autotqmasker
- //will take care of the overall tqshape.
+ //the other areas, as appropriate). The automasker
+ //will take care of the overall shape.
if ( compact )
{
forceSmallMode = true;
@@ -2019,7 +2019,7 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
toolbarBlendWidget = 0;
}
- // don't draw the focus rect etc. on the tqmask
+ // don't draw the focus rect etc. on the mask
if ( cg.button() == color1 && cg.background() == color0 )
break;
@@ -2033,11 +2033,11 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
if (!compact)
{
ar.setWidth(ar.width()-13);
- TQRect rr = tqvisualRect( TQRect( ar.x(), ar.y() + 4,
+ TQRect rr = visualRect( TQRect( ar.x(), ar.y() + 4,
loader.size(keramik_ripple ).width(), ar.height() - 8 ),
widget );
- ar = tqvisualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(),
+ ar = visualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(),
11, ar.height() ),
widget );
@@ -2054,7 +2054,7 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
else //Size-constrained combo -- loose the ripple.
{
ar.setWidth(ar.width() - 7);
- ar = tqvisualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget);
+ ar = visualRect( 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::tqdrawComplexControl( ComplexControl control,
{
if ( cb->editable() )
{
- TQRect er = tqvisualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget );
+ TQRect er = visualRect( 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::tqdrawComplexControl( ComplexControl control,
}
else if ( cb->hasFocus() )
{
- TQRect re = TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, cb), widget);
+ TQRect re = TQStyle::visualRect(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::tqdrawComplexControl( ComplexControl control,
case CC_SpinWidget:
{
const TQSpinWidget* sw = static_cast< const TQSpinWidget* >( widget );
- TQRect br = tqvisualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget );
+ TQRect br = visualRect( 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::tqdrawComplexControl( ComplexControl control,
case CC_ScrollBar:
{
const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget );
- if (highlightScrollBar && sb->tqparentWidget()) //Don't do the check if not highlighting anyway
+ if (highlightScrollBar && sb->parentWidget()) //Don't do the check if not highlighting anyway
{
- if (sb->tqparentWidget()->tqcolorGroup().button() != sb->tqcolorGroup().button())
+ if (sb->parentWidget()->colorGroup().button() != sb->colorGroup().button())
customScrollMode = true;
}
bool horizontal = sb->orientation() == Horizontal;
@@ -2208,14 +2208,14 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
// -------------------------------------------------------------------
case CC_ToolButton: {
const TQToolButton *toolbutton = (const TQToolButton *) widget;
- bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" );
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
bool onExtender = !onToolbar &&
- widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBarExtensionWidget") &&
- widget->tqparentWidget()->tqparentWidget()->inherits( "QToolBar" );
+ widget->parentWidget() && widget->parentWidget()->inherits( "QToolBarExtensionWidget") &&
+ widget->parentWidget()->parentWidget()->inherits( "QToolBar" );
bool onControlButtons = false;
- if (!onToolbar && !onExtender && widget->tqparentWidget() &&
- !qstrcmp(widget->tqparentWidget()->name(),"qt_maxcontrols" ) )
+ if (!onToolbar && !onExtender && widget->parentWidget() &&
+ !qstrcmp(widget->parentWidget()->name(),"qt_maxcontrols" ) )
{
onControlButtons = true;
titleBarMode = Maximized;
@@ -2254,11 +2254,11 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
}
// Check whether to draw a background pixmap
- else if ( toolbutton->tqparentWidget() &&
- toolbutton->tqparentWidget()->backgroundPixmap() &&
- !toolbutton->tqparentWidget()->backgroundPixmap()->isNull() )
+ else if ( toolbutton->parentWidget() &&
+ toolbutton->parentWidget()->backgroundPixmap() &&
+ !toolbutton->parentWidget()->backgroundPixmap()->isNull() )
{
- TQPixmap pixmap = *(toolbutton->tqparentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, toolbutton->pos() );
}
else if (onToolbar)
@@ -2311,14 +2311,14 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
case CC_TitleBar:
titleBarMode = Regular; //Handle buttons on titlebar different from toolbuttons
default:
- KStyle::tqdrawComplexControl( control, p, widget,
+ KStyle::drawComplexControl( control, p, widget,
r, cg, flags, controls, active, opt );
titleBarMode = None;
}
}
-void KeramikStyle::tqdrawComplexControlMask( ComplexControl control,
+void KeramikStyle::drawComplexControlMask( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -2326,11 +2326,11 @@ void KeramikStyle::tqdrawComplexControlMask( ComplexControl control,
{
if (control == CC_ComboBox)
{
- tqmaskMode = true;
- tqdrawComplexControl(CC_ComboBox, p, widget, r,
+ maskMode = true;
+ drawComplexControl(CC_ComboBox, p, widget, r,
TQApplication::palette().active(), Style_Default,
SC_ComboBoxFrame,SC_None, opt);
- tqmaskMode = false;
+ maskMode = false;
}
else
@@ -2338,7 +2338,7 @@ void KeramikStyle::tqdrawComplexControlMask( ComplexControl control,
}
-int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
+int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m)
{
@@ -2395,8 +2395,8 @@ int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
const TQTabBar* tb = ::qt_cast<const TQTabBar*>(widget);
if (tb)
{
- if (tb->tqshape() == TQTabBar::RoundedBelow ||
- tb->tqshape() == TQTabBar::TriangularBelow)
+ if (tb->shape() == TQTabBar::RoundedBelow ||
+ tb->shape() == TQTabBar::TriangularBelow)
return 0;
}
@@ -2408,7 +2408,7 @@ int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
return titleBarH;
default:
- return KStyle::tqpixelMetric(m, widget);
+ return KStyle::pixelMetric(m, widget);
}
}
@@ -2426,8 +2426,8 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents,
{
const TQPushButton* btn = static_cast< const TQPushButton* >( widget );
- int w = contentSize.width() + 2 * tqpixelMetric( PM_ButtonMargin, widget );
- int h = contentSize.height() + 2 * tqpixelMetric( PM_ButtonMargin, widget );
+ int w = contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget );
+ int h = contentSize.height() + 2 * pixelMetric( 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->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" );
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->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()->tqsizeHint().width();
- h = mi->custom()->tqsizeHint().height();
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().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().tqfind('\t') >= 0 )
+ if ( ! mi->text().isNull() && mi->text().find('\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->tqsizeHint().width();
+ int suggestedWidth = widget->sizeHint().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 = tqpixelMetric( PM_ScrollBarSliderMin, sb );
+ slidermin = pixelMetric( 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 = tqpixelMetric( PM_SliderControlThickness, widget );
- int handleSize = tqpixelMetric( PM_SliderThickness, widget );
- int len = tqpixelMetric( PM_SliderLength, widget );
+ int size = pixelMetric( PM_SliderControlThickness, widget );
+ int handleSize = pixelMetric( PM_SliderThickness, widget );
+ int len = pixelMetric( 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->tqrepaint( false );
+ button->repaint( 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->tqrepaint( false );
+ hoverWidget->repaint( 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 tqshaped
+ //Combo dropdowns are shaped
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().tqcontains( paint->rect() ) )
+ if ( !listbox->contentsRect().contains( 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->tqparentWidget();
+ TQWidget* parent = box->parentWidget();
if (!parent)
return false;
TQPoint inParCoords = parent->mapFromGlobal(mev->globalPos());
- if (parent->rect().tqcontains(inParCoords))
+ if (parent->rect().contains(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->tqcolorGroup().button(),
+ Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(),
true /*horizontal*/, false /*not a menu*/,
0, widget->y(), wr.width(), tr.height());
}
else
{
- Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(),
+ Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(),
false /*vertical*/, false /*not a menu*/,
widget->x(), 0, tr.width(), wr.height());
}
//Draw terminator line, too
- p.setPen( toolbar->tqcolorGroup().mid() );
+ p.setPen( toolbar->colorGroup().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; tqreplace-tabs off; tab-width 4; space-indent off;
+// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/kstyles/keramik/keramik.h b/kstyles/keramik/keramik.h
index 135a92751..03d97ee3a 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 tqdrawControl( ControlElement element,
+ void drawControl( 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 tqdrawControlMask( ControlElement element,
+ void drawControlMask( ControlElement element,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
const TQStyleOption& opt = TQStyleOption::Default ) const;
- void tqdrawComplexControl( ComplexControl control,
+ void drawComplexControl( 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 tqdrawComplexControlMask( ComplexControl control,
+ void drawComplexControlMask( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
const TQStyleOption& = TQStyleOption::Default ) const;
- int tqpixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const;
+ int pixelMetric( 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 tqmaskMode; //Ugly round trip flag to permit tqmasking with little code;
+ mutable bool maskMode; //Ugly round trip flag to permit masking 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 tqmask (so we don't get clipped to it)
- if (tqmaskMode)
+ //not to have a mask (so we don't get clipped to it)
+ if (maskMode)
return Keramik::TilePainter::PaintTrivialMask;
else
return Keramik::TilePainter::PaintFullBlend;
}
else
{
- if (tqmaskMode)
+ if (maskMode)
return Keramik::TilePainter::PaintMask;
else
return Keramik::TilePainter::PaintNormal;
@@ -183,7 +183,7 @@ private:
Keramik::TilePainter::PaintMode pmodeFullBlend() const
{
- return tqmaskMode?Keramik::TilePainter::PaintMask : Keramik::TilePainter::PaintFullBlend;
+ return maskMode?Keramik::TilePainter::PaintMask : Keramik::TilePainter::PaintFullBlend;
}
TQWidget* hoverWidget;
@@ -204,4 +204,4 @@ private:
#endif
// vim: ts=4 sw=4 noet
-// kate: indent-width 4; tqreplace-tabs off; tab-width 4;
+// kate: indent-width 4; replace-tabs off; tab-width 4;
diff --git a/kstyles/keramik/pixmaploader.cpp b/kstyles/keramik/pixmaploader.cpp
index 3013c8277..01cdf5fc6 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..
- TQ_UINT32 r, g,b;
- TQ_UINT32 i = tqGray(color.rgb());
+ Q_UINT32 r, g,b;
+ Q_UINT32 i = qGray(color.rgb());
r = (3*color.red()+i)>>2;
g = (3*color.green()+i)>>2;
b = (3*color.blue()+i)>>2;
- TQ_UINT32 br = back.red(), bg = back.green(), bb = back.blue();
+ Q_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);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 3;
for (int pos = 0; pos < size; pos+=3)
{
- 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 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 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];
+ 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 =tqRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8),
+ *write =qRgb(((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);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 3;
for (int pos = 0; pos < size; pos+=3)
{
- 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 scale = edata->data[pos];
+ Q_UINT32 add = (edata->data[pos+1]*i+127)>>8;
+ Q_UINT32 alpha = edata->data[pos+2];
- 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];
+ 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 =tqRgba(rr, rg, rb, alpha);
+ *write =qRgba(rr, rg, rb, alpha);
write++;
}
@@ -130,17 +130,17 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor
else
{
img->setAlphaBuffer(false);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 2;
for (int pos = 0; pos < size; pos+=2)
{
- 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);
+ 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);
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..
- TQ_UINT32 r, g,b;
+ Q_UINT32 r, g,b;
r = color.red() + 2;
g = color.green() + 2;
b = color.blue() + 2;
-// int i = tqGray(color.rgb());
+// int i = qGray(color.rgb());
- TQ_UINT32 br = back.red(), bg = back.green(), bb = back.blue();
+ Q_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);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 3;
for (int pos = 0; pos < size; pos+=3)
{
- 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;
+ 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;
if (scale != 0)
add = add*5/4;
- 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];
+ 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 =tqRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8),
+ *write =qRgb(((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);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 3;
for (int pos = 0; pos < size; pos+=3)
{
- TQ_UINT32 scale = edata->data[pos];
- TQ_UINT32 add = edata->data[pos+1];
- TQ_UINT32 alpha = edata->data[pos+2];
+ Q_UINT32 scale = edata->data[pos];
+ Q_UINT32 add = edata->data[pos+1];
+ Q_UINT32 alpha = edata->data[pos+2];
if (scale != 0)
add = add*5/4;
- 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];
+ 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 =tqRgba(rr, rg, rb, alpha);
+ *write =qRgba(rr, rg, rb, alpha);
write++;
}
}
@@ -224,22 +224,22 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor&
{
img->setAlphaBuffer(false);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 2;
for (int pos = 0; pos < size; pos+=2)
{
- TQ_UINT32 scale = edata->data[pos];
- TQ_UINT32 add = edata->data[pos+1];
+ Q_UINT32 scale = edata->data[pos];
+ Q_UINT32 add = edata->data[pos+1];
if (scale != 0)
add = add*5/4;
- 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];
+ 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 =tqRgb(rr, rg, rb);
+ *write =qRgb(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.tqfind(key, true)))
+ if ((cacheEntry = m_pixmapCache.find(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* tqmask = scale( col, row, w, h, color, bg, disabled, false ).tqmask();
- if (tqmask)
+ const TQBitmap* mask = scale( col, row, w, h, color, bg, disabled, false ).mask();
+ if (mask)
{
p->setBackgroundColor(Qt::color0);
p->setPen(Qt::color1);
- p->drawTiledPixmap( xpos, ypos, realW, realH, *tqmask);
+ p->drawTiledPixmap( xpos, ypos, realW, realH, *mask);
}
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* tqmask = tile( col, row, color, bg, disabled, false ).tqmask();
- if (tqmask)
+ const TQBitmap* mask = tile( col, row, color, bg, disabled, false ).mask();
+ if (mask)
{
p->setBackgroundColor(Qt::color0);
p->setPen(Qt::color1);
- p->drawTiledPixmap( xpos, ypos, realW, realH, *tqmask);
+ p->drawTiledPixmap( xpos, ypos, realW, realH, *mask);
}
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; tqreplace-tabs off; tab-width 4; space-indent off;
+// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/kstyles/keramik/pixmaploader.h b/kstyles/keramik/pixmaploader.h
index 6b8440ec0..ab0bb4223 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 tqlayout)
+ different widgets that have the same or similar tile layout)
*/
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; tqreplace-tabs off; tab-width 4;
+// kate: indent-width 4; replace-tabs off; tab-width 4;