summaryrefslogtreecommitdiffstats
path: root/kstyles
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-13 08:32:36 +0000
commitf7e71d47719ab6094cf4a9fafffa5ea351973522 (patch)
tree30834aa632d442019e14f88685001d94657d060b /kstyles
parentb31cfd9a1ee986fe2ae9a693f3afd7f171dd897c (diff)
downloadtdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.tar.gz
tdelibs-f7e71d47719ab6094cf4a9fafffa5ea351973522.zip
Initial conversion for TQt for Qt4 3.4.0 TP2
This will also compile with TQt for Qt3, and should not cause any problems with dependent modules such as kdebase. If it does then it needs to be fixed! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1214149 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstyles')
-rw-r--r--kstyles/highcolor/bitmaps.h18
-rw-r--r--kstyles/highcolor/highcolor.cpp159
-rw-r--r--kstyles/highcolor/highcolor.h10
-rw-r--r--kstyles/highcontrast/config/highcontrastconfig.h2
-rw-r--r--kstyles/highcontrast/highcontrast.cpp103
-rw-r--r--kstyles/highcontrast/highcontrast.h10
-rw-r--r--kstyles/keramik/bitmaps.h20
-rw-r--r--kstyles/keramik/genembed.cpp20
-rw-r--r--kstyles/keramik/gradients.cpp2
-rw-r--r--kstyles/keramik/keramik.cpp325
-rw-r--r--kstyles/keramik/keramik.h10
-rw-r--r--kstyles/keramik/pixmaploader.cpp114
-rw-r--r--kstyles/klegacy/klegacystyle.cpp146
-rw-r--r--kstyles/kthemestyle/kthemebase.cpp212
-rw-r--r--kstyles/kthemestyle/kthemebase.h36
-rw-r--r--kstyles/kthemestyle/kthemestyle.cpp328
-rw-r--r--kstyles/kthemestyle/kthemestyle.h12
-rw-r--r--kstyles/light/light.cpp5
-rw-r--r--kstyles/light/lightstyle-v2.cpp192
-rw-r--r--kstyles/light/lightstyle-v2.h10
-rw-r--r--kstyles/light/lightstyle-v3.cpp230
-rw-r--r--kstyles/light/lightstyle-v3.h10
-rw-r--r--kstyles/plastik/config/plastikconf.h2
-rw-r--r--kstyles/plastik/misc.cpp6
-rw-r--r--kstyles/plastik/plastik.cpp258
-rw-r--r--kstyles/plastik/plastik.h12
-rw-r--r--kstyles/utils/installtheme/main.cpp2
-rw-r--r--kstyles/web/webstyle.cpp32
28 files changed, 1149 insertions, 1137 deletions
diff --git a/kstyles/highcolor/bitmaps.h b/kstyles/highcolor/bitmaps.h
index 43e96bd8e..f63301818 100644
--- a/kstyles/highcolor/bitmaps.h
+++ b/kstyles/highcolor/bitmaps.h
@@ -31,19 +31,19 @@ static const unsigned char radiomask_bits[] = {
static const unsigned char x_bits[] = {0x63, 0x77, 0x3e, 0x1c, 0x3e, 0x77, 0x63};
// Arrow bitmaps
-static const QCOORD u_arrow[]={-1,-3, 0,-3, -2,-2, 1,-2, -3,-1, 2,-1, -4,0, 3,0, -4,1, 3,1};
-static const QCOORD d_arrow[]={-4,-2, 3,-2, -4,-1, 3,-1, -3,0, 2,0, -2,1, 1,1, -1,2, 0,2};
-static const QCOORD l_arrow[]={-3,-1, -3,0, -2,-2, -2,1, -1,-3, -1,2, 0,-4, 0,3, 1,-4, 1,3};
-static const QCOORD r_arrow[]={-2,-4, -2,3, -1,-4, -1,3, 0,-3, 0,2, 1,-2, 1,1, 2,-1, 2,0};
+static const TQCOORD u_arrow[]={-1,-3, 0,-3, -2,-2, 1,-2, -3,-1, 2,-1, -4,0, 3,0, -4,1, 3,1};
+static const TQCOORD d_arrow[]={-4,-2, 3,-2, -4,-1, 3,-1, -3,0, 2,0, -2,1, 1,1, -1,2, 0,2};
+static const TQCOORD l_arrow[]={-3,-1, -3,0, -2,-2, -2,1, -1,-3, -1,2, 0,-4, 0,3, 1,-4, 1,3};
+static const TQCOORD r_arrow[]={-2,-4, -2,3, -1,-4, -1,3, 0,-3, 0,2, 1,-2, 1,1, 2,-1, 2,0};
namespace B3 {
- const QCOORD u_arrow[]={ 0,-2, 0,-2, -1,-1, 1,-1, -2,0, 2,0, -3,1, 3,1 };
- const QCOORD d_arrow[]={ -3,-2, 3,-2, -2,-1, 2,-1, -1,0, 1,0, 0,1, 0,1 };
- const QCOORD l_arrow[]={ 1,-3, 1,-3, 0,-2, 1,-2, -1,-1, 1,-1, -2,0, 1,0, -1,1, 1,1, 0,2, 1,2, 1,3, 1,3 };
- const QCOORD r_arrow[]={ -2,-3, -2,-3, -2,-2, -1,-2, -2,-1, 0,-1, -2,0, 1,0, -2,1, 0,1, -2,2, -1,2, -2,3, -2,3 };
+ const TQCOORD u_arrow[]={ 0,-2, 0,-2, -1,-1, 1,-1, -2,0, 2,0, -3,1, 3,1 };
+ const TQCOORD d_arrow[]={ -3,-2, 3,-2, -2,-1, 2,-1, -1,0, 1,0, 0,1, 0,1 };
+ const TQCOORD l_arrow[]={ 1,-3, 1,-3, 0,-2, 1,-2, -1,-1, 1,-1, -2,0, 1,0, -1,1, 1,1, 0,2, 1,2, 1,3, 1,3 };
+ const TQCOORD r_arrow[]={ -2,-3, -2,-3, -2,-2, -1,-2, -2,-1, 0,-1, -2,0, 1,0, -2,1, 0,1, -2,2, -1,2, -2,3, -2,3 };
}
-#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
+#define TQCOORDARRLEN(x) sizeof(x)/(sizeof(TQCOORD)*2)
// Fix Qt's wacky image positions
diff --git a/kstyles/highcolor/highcolor.cpp b/kstyles/highcolor/highcolor.cpp
index a3a520f84..bd3d25822 100644
--- a/kstyles/highcolor/highcolor.cpp
+++ b/kstyles/highcolor/highcolor.cpp
@@ -41,6 +41,9 @@
#include <tqtoolbar.h>
#include <tqpopupmenu.h>
+#include <tqimage.h>
+#include <tqapplication.h>
+
#include <kdrawutil.h>
#include <kpixmapeffect.h>
@@ -50,7 +53,7 @@
// -- Style Plugin Interface -------------------------
-class HighColorStylePlugin : public QStylePlugin
+class HighColorStylePlugin : public TQStylePlugin
{
public:
HighColorStylePlugin() {}
@@ -314,7 +317,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
if ( sunken )
kDrawBeButton( p, x, y, w, h, cg, true,
- &cg.brush(TQColorGroup::Mid) );
+ &cg.tqbrush(TQColorGroup::Mid) );
else if ( flags & Style_MouseOver && !flat ) {
TQBrush brush(cg.button().light(110));
@@ -364,7 +367,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
cg.button(), false);
} else
kDrawBeButton(p, x, y, w, h, cg, false,
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
break;
}
@@ -417,7 +420,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
if (p && p->device()->devType() == TQInternal::Widget) {
TQHeader* hdr = dynamic_cast<TQHeader*>(p->device());
if (hdr)
- horizontal = hdr->orientation() == Horizontal;
+ horizontal = hdr->orientation() == Qt::Horizontal;
}
int x,y,w,h;
@@ -760,7 +763,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
case PE_WindowFrame:
case PE_PanelLineEdit: {
bool sunken = flags & Style_Sunken;
- int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth)
: opt.lineWidth();
if (lw == 2)
{
@@ -783,7 +786,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine(x+1, y+1, x+1, y2-1);
p->setPen(oldPen);
} else
- KStyle::drawPrimitive(pe, p, r, cg, flags, opt);
+ KStyle::tqdrawPrimitive(pe, p, r, cg, flags, opt);
break;
}
@@ -795,7 +798,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
case PE_PanelDockWindow: { // Toolbar
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)
@@ -853,44 +856,44 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
// HighColor & Default arrows
switch(pe) {
case PE_ArrowUp:
- a.setPoints(QCOORDARRLEN(u_arrow), u_arrow);
+ a.setPoints(TQCOORDARRLEN(u_arrow), u_arrow);
break;
case PE_ArrowDown:
- a.setPoints(QCOORDARRLEN(d_arrow), d_arrow);
+ a.setPoints(TQCOORDARRLEN(d_arrow), d_arrow);
break;
case PE_ArrowLeft:
- a.setPoints(QCOORDARRLEN(l_arrow), l_arrow);
+ a.setPoints(TQCOORDARRLEN(l_arrow), l_arrow);
break;
default:
- a.setPoints(QCOORDARRLEN(r_arrow), r_arrow);
+ a.setPoints(TQCOORDARRLEN(r_arrow), r_arrow);
}
} else {
// B3 arrows
switch(pe) {
case PE_ArrowUp:
- a.setPoints(QCOORDARRLEN(B3::u_arrow), B3::u_arrow);
+ a.setPoints(TQCOORDARRLEN(B3::u_arrow), B3::u_arrow);
break;
case PE_ArrowDown:
- a.setPoints(QCOORDARRLEN(B3::d_arrow), B3::d_arrow);
+ a.setPoints(TQCOORDARRLEN(B3::d_arrow), B3::d_arrow);
break;
case PE_ArrowLeft:
- a.setPoints(QCOORDARRLEN(B3::l_arrow), B3::l_arrow);
+ a.setPoints(TQCOORDARRLEN(B3::l_arrow), B3::l_arrow);
break;
default:
- a.setPoints(QCOORDARRLEN(B3::r_arrow), B3::r_arrow);
+ a.setPoints(TQCOORDARRLEN(B3::r_arrow), B3::r_arrow);
}
}
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 ) {
a.translate( r.x() + r.width() / 2, r.y() + r.height() / 2 );
@@ -907,7 +910,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
p->restore();
} else
- KStyle::drawPrimitive( pe, p, r, cg, flags, opt );
+ KStyle::tqdrawPrimitive( pe, p, r, cg, flags, opt );
}
}
}
@@ -1001,7 +1004,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
// -------------------------------------------------------------------
case KPE_SliderGroove: {
const TQSlider* slider = (const TQSlider*)widget;
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
int gcenter = (horizontal ? r.height() : r.width()) / 2;
TQRect gr;
@@ -1035,7 +1038,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
// -------------------------------------------------------------------
case KPE_SliderHandle: {
const TQSlider* slider = (const TQSlider*)widget;
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
int x,y,w,h;
r.rect(&x, &y, &w, &h);
int x2 = x+w-1;
@@ -1092,7 +1095,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
}
-void HighColorStyle::drawControl( ControlElement element,
+void HighColorStyle::tqdrawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1115,7 +1118,7 @@ void HighColorStyle::drawControl( ControlElement element,
if ( btnDefault || button->autoDefault() ) {
// Compensate for default indicator
- static int di = pixelMetric( PM_ButtonDefaultIndicator );
+ static int di = tqpixelMetric( PM_ButtonDefaultIndicator );
br.addCoords( di, di, -di, -di );
}
@@ -1141,14 +1144,14 @@ void HighColorStyle::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 );
drawPrimitive( PE_ArrowDown, p, TQRect(x + w - dx - 2, y + 2, dx, h - 4),
cg, flags, opt );
w -= dx;
@@ -1181,7 +1184,7 @@ void HighColorStyle::drawControl( ControlElement element,
// Make the label indicate if the button is a default button or not
if ( active || button->isDefault() ) {
// Draw "fake" bold text - this enables the font metrics to remain
- // the same as computed in TQPushButton::sizeHint(), but gives
+ // the same as computed in TQPushButton::tqsizeHint(), but gives
// a reasonable bold effect.
int i;
@@ -1189,25 +1192,25 @@ void HighColorStyle::drawControl( ControlElement element,
if (button->isEnabled()) // Don't draw double-shadow when disabled
for(i=0; i<2; i++)
drawItem( p, TQRect(x+i+1, y+1, w, h), AlignCenter | ShowPrefix,
- button->colorGroup(), button->isEnabled(), NULL,
+ button->tqcolorGroup(), button->isEnabled(), NULL,
button->text(), -1,
- active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
+ active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() );
// Normal Text
for(i=0; i<2; i++)
drawItem( p, TQRect(x+i, y, w, h), AlignCenter | ShowPrefix,
- button->colorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL,
+ button->tqcolorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL,
button->text(), -1,
- active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
+ active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
} else
- 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,
- active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
+ active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
// Draw a focus rect if the button has focus
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- TQStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget),
+ TQStyle::tqvisualRect(subRect(SR_PushButtonFocusRect, widget), widget),
cg, flags );
break;
}
@@ -1293,7 +1296,7 @@ void HighColorStyle::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();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1324,7 +1327,7 @@ void HighColorStyle::drawControl( ControlElement element,
// Do we have an icon?
if ( mi->iconSet() ) {
TQIconSet::Mode mode;
- TQRect cr = visualRect( TQRect(x, y, checkcol, h), r );
+ TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r );
// Select the correct icon from the iconset
if ( active )
@@ -1404,7 +1407,7 @@ void HighColorStyle::drawControl( ControlElement element,
// 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;
@@ -1445,22 +1448,22 @@ void HighColorStyle::drawControl( ControlElement element,
// Draw the pixmap
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( OpaqueMode );
+ p->setBackgroundMode( Qt::OpaqueMode );
int diffw = ( ( w - pixmap->width() ) / 2 )
+ ( ( w - pixmap->width() ) % 2 );
p->drawPixmap( x+diffw, y+itemFrame, *pixmap );
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( TransparentMode );
+ p->setBackgroundMode( Qt::TransparentMode );
}
}
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
- int dim = pixelMetric(PM_MenuButtonIndicator);
- TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
+ int dim = tqpixelMetric(PM_MenuButtonIndicator);
+ TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -1480,12 +1483,12 @@ void HighColorStyle::drawControl( ControlElement element,
}
default:
- KStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
}
}
-void HighColorStyle::drawControlMask( ControlElement element,
+void HighColorStyle::tqdrawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1498,7 +1501,7 @@ void HighColorStyle::drawControlMask( ControlElement element,
case CE_PushButton: {
int x1, y1, x2, y2;
r.coords( &x1, &y1, &x2, &y2 );
- QCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
+ TQCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
p->fillRect( r, color1 );
p->setPen( color0 );
p->drawPoints( TQPointArray(4, corners) );
@@ -1506,12 +1509,12 @@ void HighColorStyle::drawControlMask( ControlElement element,
}
default:
- KStyle::drawControlMask(element, p, widget, r, opt);
+ KStyle::tqdrawControlMask(element, p, widget, r, opt);
}
}
-void HighColorStyle::drawComplexControl( ComplexControl control,
+void HighColorStyle::tqdrawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1562,7 +1565,7 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
p->drawLine(x+1, y+2, x+1, y2-2);
// Get the button bounding box
- TQRect ar = TQStyle::visualRect(
+ TQRect ar = TQStyle::tqvisualRect(
querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow),
widget );
@@ -1581,7 +1584,7 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
if ( controls & SC_ComboBoxEditField )
{
const TQComboBox * cb = (const TQComboBox *) widget;
- TQRect re = TQStyle::visualRect(
+ TQRect re = TQStyle::tqvisualRect(
querySubControlMetrics( CC_ComboBox, widget,
SC_ComboBoxEditField), widget );
@@ -1605,7 +1608,7 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
p->fillRect( re.x(), re.y(), re.width(), re.height(),
cg.brush( TQColorGroup::Highlight ) );
- TQRect re = TQStyle::visualRect(
+ TQRect re = TQStyle::tqvisualRect(
subRect(SR_ComboBoxFocusRect, cb), widget);
drawPrimitive( PE_FocusRect, p, re, cg,
@@ -1639,11 +1642,11 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
drawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
// 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 (widget->parent())
@@ -1693,14 +1696,14 @@ void HighColorStyle::drawComplexControl( ComplexControl control,
default:
- KStyle::drawComplexControl(control, p, widget,
+ KStyle::tqdrawComplexControl(control, p, widget,
r, cg, flags, controls, active, opt);
break;
}
}
-void HighColorStyle::drawComplexControlMask( ComplexControl control,
+void HighColorStyle::tqdrawComplexControlMask( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1714,7 +1717,7 @@ void HighColorStyle::drawComplexControlMask( ComplexControl control,
case CC_ToolButton: {
int x1, y1, x2, y2;
r.coords( &x1, &y1, &x2, &y2 );
- QCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
+ TQCOORD corners[] = { x1,y1, x2,y1, x1,y2, x2,y2 };
p->fillRect( r, color1 );
p->setPen( color0 );
p->drawPoints( TQPointArray(4, corners) );
@@ -1722,7 +1725,7 @@ void HighColorStyle::drawComplexControlMask( ComplexControl control,
}
default:
- KStyle::drawComplexControlMask(control, p, widget, r, opt);
+ KStyle::tqdrawComplexControlMask(control, p, widget, r, opt);
}
}
@@ -1765,11 +1768,11 @@ TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const
int dbw1 = 0, dbw2 = 0;
if (button->isDefault() || button->autoDefault()) {
- dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget);
+ dbw1 = tqpixelMetric(PM_ButtonDefaultIndicator, widget);
dbw2 = dbw1 * 2;
}
- int dfw1 = pixelMetric(PM_DefaultFrameWidth, widget) * 2,
+ int dfw1 = tqpixelMetric(PM_DefaultFrameWidth, widget) * 2,
dfw2 = dfw1 * 2;
return TQRect(wrect.x() + dfw1 + dbw1 + 1,
@@ -1781,7 +1784,7 @@ TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const
}
-int HighColorStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
+int HighColorStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m)
{
@@ -1814,7 +1817,7 @@ int HighColorStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
}
default:
- return KStyle::pixelMetric(m, widget);
+ return KStyle::tqpixelMetric(m, widget);
}
}
@@ -1832,8 +1835,8 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
const TQPushButton* button = (const TQPushButton*) widget;
int w = contentSize.width();
int h = contentSize.height();
- int bm = pixelMetric( PM_ButtonMargin, widget );
- int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int bm = tqpixelMetric( PM_ButtonMargin, widget );
+ int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
w += bm + fw + 6; // ### Add 6 to make way for bold font.
h += bm + fw;
@@ -1845,7 +1848,7 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
if ( type != HighColor ) {
// Compensate for default indicator
- int di = pixelMetric( PM_ButtonDefaultIndicator );
+ int di = tqpixelMetric( PM_ButtonDefaultIndicator );
w += di * 2;
h += di * 2;
}
@@ -1871,8 +1874,8 @@ TQSize HighColorStyle::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;
}
@@ -1898,7 +1901,7 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
2 * itemFrame );
}
- if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 )
+ if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 )
w += 12;
else if ( mi->popup() )
w += 2 * arrowHMargin;
@@ -1917,12 +1920,12 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
default:
- return KStyle::sizeFromContents( contents, widget, contentSize, opt );
+ return KStyle::tqsizeFromContents( contents, widget, contentSize, opt );
}
}
-// Fix Qt's wacky image alignment
+// Fix Qt's wacky image tqalignment
TQPixmap HighColorStyle::stylePixmap(StylePixmap stylepixmap,
const TQWidget* widget,
const TQStyleOption& opt) const
@@ -1954,12 +1957,12 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
if ( (event->type() == TQEvent::Enter) &&
(button->isEnabled()) ) {
hoverWidget = button;
- button->repaint( false );
+ button->tqrepaint( false );
}
else if ( (event->type() == TQEvent::Leave) &&
- (object == hoverWidget) ) {
+ (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget)) ) {
hoverWidget = 0L;
- button->repaint( false );
+ button->tqrepaint( false );
}
} else if ( object->parent() && !qstrcmp( object->name(), kdeToolbarWidget ) )
{
@@ -1969,8 +1972,8 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
if (event->type() == TQEvent::Paint ) {
// Find the top-level toolbar of this widget, since it may be nested in other
// widgets that are on the toolbar.
- TQWidget *widget = static_cast<TQWidget*>(object);
- TQWidget *parent = static_cast<TQWidget*>(object->parent());
+ TQWidget *widget = TQT_TQWIDGET(object);
+ TQWidget *parent = TQT_TQWIDGET(object->parent());
int x_offset = widget->x(), y_offset = widget->y();
while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) )
{
@@ -1988,7 +1991,7 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
if (tb) horiz_grad = tb->orientation() == Qt::Vertical;
TQPainter p( widget );
- renderGradient(&p, r, parent->colorGroup().button(), horiz_grad,
+ renderGradient(&p, r, parent->tqcolorGroup().button(), horiz_grad,
x_offset, y_offset, pr.width(), pr.height());
return false; // Now draw the contents
@@ -1999,14 +2002,14 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
// We need to override the paint event to draw a
// gradient on a QToolBarExtensionWidget.
if ( event->type() == TQEvent::Paint ) {
- TQWidget *widget = static_cast<TQWidget*>(object);
+ TQWidget *widget = TQT_TQWIDGET(object);
TQRect wr = widget->rect(), tr = toolbar->rect();
TQPainter p( widget );
- renderGradient(&p, wr, toolbar->colorGroup().button(),
+ renderGradient(&p, wr, toolbar->tqcolorGroup().button(),
toolbar->orientation() == Qt::Vertical,
wr.x(), wr.y(), tr.width() - 2, tr.height() - 2);
- p.setPen( toolbar->colorGroup().dark() );
+ p.setPen( toolbar->tqcolorGroup().dark() );
if ( toolbar->orientation() == Qt::Horizontal )
p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 );
else
@@ -2034,7 +2037,7 @@ void HighColorStyle::renderGradient( TQPainter* p, const TQRect& r,
// We use these to draw parent-relative pixmaps for toolbar buttons
// and menubar items.
- GradientSet* grSet = gDict.find( clr.rgb() );
+ GradientSet* grSet = gDict.tqfind( clr.rgb() );
if (!grSet) {
grSet = new GradientSet(clr);
diff --git a/kstyles/highcolor/highcolor.h b/kstyles/highcolor/highcolor.h
index f1fc44c33..98fe2f651 100644
--- a/kstyles/highcolor/highcolor.h
+++ b/kstyles/highcolor/highcolor.h
@@ -86,7 +86,7 @@ class HighColorStyle : public KStyle
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,
@@ -94,13 +94,13 @@ class HighColorStyle : public KStyle
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- void drawControlMask( ControlElement element,
+ void tqdrawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default ) const;
- void drawComplexControl( ComplexControl control,
+ void tqdrawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -110,7 +110,7 @@ class HighColorStyle : public KStyle
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,
@@ -126,7 +126,7 @@ class HighColorStyle : public KStyle
int len = -1,
const TQColor *penColor = 0 ) const;
- int pixelMetric( PixelMetric m,
+ int tqpixelMetric( PixelMetric m,
const TQWidget *widget = 0 ) const;
TQSize sizeFromContents( ContentsType contents,
diff --git a/kstyles/highcontrast/config/highcontrastconfig.h b/kstyles/highcontrast/config/highcontrastconfig.h
index d9512cef3..d52a22b47 100644
--- a/kstyles/highcontrast/config/highcontrastconfig.h
+++ b/kstyles/highcontrast/config/highcontrastconfig.h
@@ -29,7 +29,7 @@ DEALINGS IN THE SOFTWARE.
class TQCheckBox;
-class HighContrastStyleConfig: public QWidget
+class HighContrastStyleConfig: public TQWidget
{
Q_OBJECT
public:
diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp
index 0b9c0cfcf..a9b242f22 100644
--- a/kstyles/highcontrast/highcontrast.cpp
+++ b/kstyles/highcontrast/highcontrast.cpp
@@ -44,6 +44,9 @@
#include <tqlistview.h>
#include <tqsettings.h>
+#include <tqimage.h>
+#include <tqapplication.h>
+
#include <kdrawutil.h>
#include <kpixmapeffect.h>
@@ -51,7 +54,7 @@
#include "highcontrast.moc"
// -- Style Plugin Interface -------------------------
-class HighContrastStylePlugin : public QStylePlugin
+class HighContrastStylePlugin : public TQStylePlugin
{
public:
HighContrastStylePlugin() {}
@@ -630,7 +633,7 @@ void HighContrastStyle::drawPrimitive (PrimitiveElement pe,
}
default: {
- KStyle::drawPrimitive( pe, p, r, cg, flags, opt );
+ KStyle::tqdrawPrimitive( pe, p, r, cg, flags, opt );
}
}
}
@@ -702,13 +705,13 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe,
}
case KPE_ListViewExpander: {
- // TODO There is no pixelMetric associated with the
+ // TODO There is no tqpixelMetric associated with the
// ListViewExpander in KStyle.
// To have a properly large expander, the CC_ListView case of
- // drawComplexControl should be handled.
+ // tqdrawComplexControl should be handled.
// Probably it would be better to add a KPM_ListViewExpander metric
// to the KStyle KStylePixelMetric enum, and have the KStyle
- // drawComplexControl handle it.
+ // tqdrawComplexControl handle it.
PrimitiveElement direction;
if (flags & Style_On) { // Collapsed = On
direction = PE_ArrowRight;
@@ -729,7 +732,7 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe,
}
-void HighContrastStyle::drawControl (ControlElement element,
+void HighContrastStyle::tqdrawControl (ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -755,9 +758,9 @@ void HighContrastStyle::drawControl (ControlElement element,
drawRoundRect (p, r);
const TQTabBar *tb = static_cast< const TQTabBar * >(widget);
- TQTabBar::Shape shape = tb->shape();
- if (shape == TQTabBar::TriangularBelow ||
- shape == TQTabBar::RoundedBelow) {
+ TQTabBar::Shape tqshape = tb->tqshape();
+ if (tqshape == TQTabBar::TriangularBelow ||
+ tqshape == TQTabBar::RoundedBelow) {
p->fillRect (r.left(), r.top(),
r.width(), 2*basicLineWidth,
p->pen().color());
@@ -789,7 +792,7 @@ void HighContrastStyle::drawControl (ControlElement element,
if (( btnDefault || button->autoDefault() ) && (button->isEnabled())) {
// Compensate for default indicator
- static int di = pixelMetric( PM_ButtonDefaultIndicator );
+ static int di = tqpixelMetric( PM_ButtonDefaultIndicator );
addOffset (&br, di);
}
@@ -860,7 +863,7 @@ void HighContrastStyle::drawControl (ControlElement element,
// Does the button have a popup menu?
if (popup) {
- int dx = pixelMetric (PM_MenuButtonIndicator, widget);
+ int dx = tqpixelMetric (PM_MenuButtonIndicator, widget);
drawArrow (p, TQRect(x + w - dx - 2, y + 2, dx, h - 4), PE_ArrowDown);
w -= dx;
}
@@ -934,7 +937,7 @@ void HighContrastStyle::drawControl (ControlElement element,
// RADIOBUTTON
// -------------------------------------------------------------------
case CE_RadioButton: {
- drawPrimitive (PE_ExclusiveIndicator, p, r, cg, flags);
+ tqdrawPrimitive (PE_ExclusiveIndicator, p, r, cg, flags);
break;
}
@@ -1009,7 +1012,7 @@ void HighContrastStyle::drawControl (ControlElement element,
// Do we have an icon?
if ( mi->iconSet() && !mi->iconSet()->isNull() ) {
TQIconSet::Mode mode;
- TQRect cr = visualRect( TQRect(x, y, checkcol, h), r );
+ TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r );
// Select the correct icon from the iconset
if (!(flags & Style_Enabled))
@@ -1075,7 +1078,7 @@ void HighContrastStyle::drawControl (ControlElement element,
// 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;
@@ -1104,22 +1107,22 @@ void HighContrastStyle::drawControl (ControlElement element,
// Draw the pixmap
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( OpaqueMode );
+ p->setBackgroundMode( Qt::OpaqueMode );
int diffw = ( ( w - pixmap->width() ) / 2 )
+ ( ( w - pixmap->width() ) % 2 );
p->drawPixmap( x+diffw, y+itemFrame, *pixmap );
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( TransparentMode );
+ p->setBackgroundMode( Qt::TransparentMode );
}
}
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
- int dim = pixelMetric(PM_MenuButtonIndicator);
- TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
+ int dim = tqpixelMetric(PM_MenuButtonIndicator);
+ TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -1129,11 +1132,11 @@ void HighContrastStyle::drawControl (ControlElement element,
}
default:
- KStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
}
}
-void HighContrastStyle::drawControlMask (ControlElement element,
+void HighContrastStyle::tqdrawControlMask (ControlElement element,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -1157,7 +1160,7 @@ void HighContrastStyle::drawControlMask (ControlElement element,
}
default: {
- KStyle::drawControlMask (element, p, w, r, opt);
+ KStyle::tqdrawControlMask (element, p, w, r, opt);
}
}
}
@@ -1176,7 +1179,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
return sibling;
}
-void HighContrastStyle::drawComplexControl (ComplexControl control,
+void HighContrastStyle::tqdrawComplexControl (ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1197,7 +1200,7 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
setColorsText (p, cg, flags);
drawRoundRect (p, r);
- TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget);
+ TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget);
if (flags & Style_HasFocus) {
TQRect r3 (r);
if (r2.left() > 0)
@@ -1232,12 +1235,12 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
setColorsButton (p, cg, flags);
// Draw arrows if required
if (controls & SC_SpinWidgetDown) {
- TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetDown), widget);
+ TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics ((QStyle::ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetDown), widget);
drawRoundRect (p, r2);
drawArrow (p, r2, PE_SpinWidgetDown, 2*basicLineWidth);
}
if (controls & SC_SpinWidgetUp) {
- TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetUp), widget);
+ TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics ((QStyle::ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetUp), widget);
drawRoundRect (p, r2);
drawArrow (p, r2, PE_SpinWidgetUp, 2*basicLineWidth);
}
@@ -1273,11 +1276,11 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
drawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
// 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() );
}
}
@@ -1312,7 +1315,7 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
// Paint the icon and text.
if ( controls & SC_ListView )
- TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
// If we're have a branch or are expanded...
if ( controls & (SC_ListViewBranch | SC_ListViewExpand) )
@@ -1458,13 +1461,13 @@ void HighContrastStyle::drawComplexControl (ComplexControl control,
}
default:
- KStyle::drawComplexControl(control, p, widget,
+ KStyle::tqdrawComplexControl(control, p, widget,
r, cg, flags, controls, active, opt);
break;
}
}
-void HighContrastStyle::drawComplexControlMask(ComplexControl c,
+void HighContrastStyle::tqdrawComplexControlMask(ComplexControl c,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -1478,7 +1481,7 @@ void HighContrastStyle::drawComplexControlMask(ComplexControl c,
break;
}
default: {
- KStyle::drawComplexControlMask (c, p, w, r, o);
+ KStyle::tqdrawComplexControlMask (c, p, w, r, o);
}
}
}
@@ -1515,7 +1518,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
switch (control)
{
case CC_ComboBox : {
- int arrow = pixelMetric (PM_ScrollBarExtent, widget);
+ int arrow = tqpixelMetric (PM_ScrollBarExtent, widget);
switch (subcontrol)
{
case SC_ComboBoxFrame:
@@ -1531,7 +1534,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
break;
}
case CC_SpinWidget : {
- int arrow = pixelMetric (PM_ScrollBarExtent, 0);
+ int arrow = tqpixelMetric (PM_ScrollBarExtent, 0);
switch (subcontrol)
{
case SC_SpinWidgetFrame:
@@ -1559,7 +1562,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
}
-int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
+int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
{
//### TODO: Use the tab metrics changes from Ker.
switch(m)
@@ -1643,7 +1646,7 @@ int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
}
default:
- return KStyle::pixelMetric(m, widget);
+ return KStyle::tqpixelMetric(m, widget);
}
}
@@ -1672,8 +1675,8 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
const TQPushButton* button = (const TQPushButton*) widget;
int w = contentSize.width();
int h = contentSize.height();
- int bm = pixelMetric( PM_ButtonMargin, widget );
- int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int bm = tqpixelMetric( PM_ButtonMargin, widget );
+ int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
w += bm + fw + 6; // ### Add 6 to make way for bold font.
h += bm + fw;
@@ -1684,7 +1687,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
w = 80;
// Compensate for default indicator
- int di = pixelMetric( PM_ButtonDefaultIndicator );
+ int di = tqpixelMetric( PM_ButtonDefaultIndicator );
w += di * 2;
h += di * 2;
}
@@ -1709,7 +1712,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
case CT_ComboBox: {
const TQComboBox *cb = static_cast< const TQComboBox* > (widget);
int borderSize = (cb->editable() ? 4 : 2) * basicLineWidth;
- int arrowSize = pixelMetric (PM_ScrollBarExtent, cb);
+ int arrowSize = tqpixelMetric (PM_ScrollBarExtent, cb);
return TQSize(borderSize + basicLineWidth + arrowSize, borderSize) + contentSize;
}
@@ -1726,8 +1729,8 @@ TQSize HighContrastStyle::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;
}
@@ -1753,7 +1756,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
2 * itemFrame );
}
- if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 )
+ if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 )
w += 12;
else if ( mi->popup() )
w += 2 * arrowHMargin;
@@ -1779,7 +1782,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
default:
- return KStyle::sizeFromContents( contents, widget, contentSize, opt );
+ return KStyle::tqsizeFromContents( contents, widget, contentSize, opt );
}
}
@@ -1807,16 +1810,16 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
|| widget->inherits ("QSpinWidget")))
{
hoverWidget = widget;
- widget->repaint (false);
+ widget->tqrepaint (false);
}
else if (event->type() == TQEvent::Leave
&& (widget->inherits ("QButton")
|| widget->inherits ("QComboBox")
|| widget->inherits ("QSpinWidget")))
{
- if (object == hoverWidget)
+ if (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget))
hoverWidget = 0L;
- widget->repaint (false);
+ widget->tqrepaint (false);
}
// Make sure the focus rectangle is shown correctly.
else if (event->type() == TQEvent::FocusIn || event->type() == TQEvent::FocusOut)
@@ -1830,9 +1833,9 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
}
if (widgetparent)
- widgetparent->repaint (false);
+ widgetparent->tqrepaint (false);
else
- widget->repaint (false);
+ widget->tqrepaint (false);
}
}
diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h
index fb3db68b1..39b981d29 100644
--- a/kstyles/highcontrast/highcontrast.h
+++ b/kstyles/highcontrast/highcontrast.h
@@ -74,7 +74,7 @@ class HighContrastStyle : public KStyle
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- void drawControl( ControlElement element,
+ void tqdrawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -82,13 +82,13 @@ class HighContrastStyle : public KStyle
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- void drawControlMask( ControlElement element,
+ void tqdrawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default ) const;
- void drawComplexControl( ComplexControl control,
+ void tqdrawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -98,7 +98,7 @@ class HighContrastStyle : public KStyle
SCFlags active = SC_None,
const TQStyleOption& = TQStyleOption::Default ) const;
- void drawComplexControlMask( ComplexControl control,
+ void tqdrawComplexControlMask( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -120,7 +120,7 @@ class HighContrastStyle : public KStyle
int len = -1,
const TQColor *penColor = 0 ) const;
- int pixelMetric( PixelMetric m,
+ int tqpixelMetric( PixelMetric m,
const TQWidget *widget = 0 ) const;
int kPixelMetric( KStylePixelMetric m,
diff --git a/kstyles/keramik/bitmaps.h b/kstyles/keramik/bitmaps.h
index fd5dcf327..54c30dd8d 100644
--- a/kstyles/keramik/bitmaps.h
+++ b/kstyles/keramik/bitmaps.h
@@ -3,12 +3,12 @@
/* Image bits processed by KPixmap2Bitmaps */
// Arrow bitmaps
-static const QCOORD u_arrow[]={-1,-3, 0,-3, -2,-2, 1,-2, -3,-1, 2,-1, -4,0, 3,0, -4,1, 3,1};
-static const QCOORD d_arrow[]={-4,-2, 3,-2, -4,-1, 3,-1, -3,0, 2,0, -2,1, 1,1, -1,2, 0,2};
-static const QCOORD l_arrow[]={-3,-1, -3,0, -2,-2, -2,1, -1,-3, -1,2, 0,-4, 0,3, 1,-4, 1,3};
-static const QCOORD r_arrow[]={-2,-4, -2,3, -1,-4, -1,3, 0,-3, 0,2, 1,-2, 1,1, 2,-1, 2,0};
+static const TQCOORD u_arrow[]={-1,-3, 0,-3, -2,-2, 1,-2, -3,-1, 2,-1, -4,0, 3,0, -4,1, 3,1};
+static const TQCOORD d_arrow[]={-4,-2, 3,-2, -4,-1, 3,-1, -3,0, 2,0, -2,1, 1,1, -1,2, 0,2};
+static const TQCOORD l_arrow[]={-3,-1, -3,0, -2,-2, -2,1, -1,-3, -1,2, 0,-4, 0,3, 1,-4, 1,3};
+static const TQCOORD r_arrow[]={-2,-4, -2,3, -1,-4, -1,3, 0,-3, 0,2, 1,-2, 1,1, 2,-1, 2,0};
-static const QCOORD keramik_combo_arrow[] =
+static const TQCOORD keramik_combo_arrow[] =
{-4,-5, 4, -5,
-2 ,-2, 2, -2,
-2 ,-1, 2, -1,
@@ -21,7 +21,7 @@ static const QCOORD keramik_combo_arrow[] =
};
-static const QCOORD keramik_up_arrow[] =
+static const TQCOORD keramik_up_arrow[] =
{
0, -4, 0, -4,
-1, -3, 1, -3,
@@ -34,7 +34,7 @@ static const QCOORD keramik_up_arrow[] =
-2, 4, 2, 4
};
-static const QCOORD keramik_down_arrow[] =
+static const TQCOORD keramik_down_arrow[] =
{
0, 4, 0, 4,
-1, 3, 1, 3,
@@ -48,7 +48,7 @@ static const QCOORD keramik_down_arrow[] =
};
- static const QCOORD keramik_right_arrow[] =
+ static const TQCOORD keramik_right_arrow[] =
{
4, 0, 4, 0,
3, -1, 3, 1,
@@ -61,7 +61,7 @@ static const QCOORD keramik_down_arrow[] =
-4, -2, -4, 2
};
- static const QCOORD keramik_left_arrow[] =
+ static const TQCOORD keramik_left_arrow[] =
{
-4, 0, -4, 0,
-3, -1, -3, 1,
@@ -76,7 +76,7 @@ static const QCOORD keramik_down_arrow[] =
-#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
+#define TQCOORDARRLEN(x) sizeof(x)/(sizeof(TQCOORD)*2)
diff --git a/kstyles/keramik/genembed.cpp b/kstyles/keramik/genembed.cpp
index 2fecf94d1..b79147dda 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,7 +156,7 @@ int main(int argc, char** argv)
}
}
- if (!assignID.contains(id))
+ if (!assignID.tqcontains(id))
{
assignID[id] = nextID;
nextID += 256;
@@ -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";
@@ -346,7 +346,7 @@ int main(int argc, char** argv)
cout<<"\t\t\timages.insert(image_db[c].id, &image_db[c]);\n";
cout<<"\t}\n";
cout<<"\tstatic KeramikImageDb* instance;\n";
- cout<<"\tQIntDict<KeramikEmbedImage> images;\n";
+ cout<<"\tTQIntDict<KeramikEmbedImage> images;\n";
cout<<"};\n\n";
cout<<"KeramikImageDb* KeramikImageDb::instance = 0;\n\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..9ba8cb6a2 100644
--- a/kstyles/keramik/keramik.cpp
+++ b/kstyles/keramik/keramik.cpp
@@ -33,6 +33,7 @@
// $Id$
+#include <tqapplication.h>
#include <tqbitmap.h>
#include <tqcheckbox.h>
#include <tqcombobox.h>
@@ -71,7 +72,7 @@
#define loader Keramik::PixmapLoader::the()
// -- Style Plugin Interface -------------------------
-class KeramikStylePlugin : public QStylePlugin
+class KeramikStylePlugin : public TQStylePlugin
{
public:
KeramikStylePlugin() {}
@@ -129,25 +130,25 @@ namespace
switch(pe)
{
case TQStyle::PE_ArrowUp:
- a.setPoints(QCOORDARRLEN(keramik_up_arrow), keramik_up_arrow);
+ a.setPoints(TQCOORDARRLEN(keramik_up_arrow), keramik_up_arrow);
break;
case TQStyle::PE_ArrowDown:
- a.setPoints(QCOORDARRLEN(keramik_down_arrow), keramik_down_arrow);
+ a.setPoints(TQCOORDARRLEN(keramik_down_arrow), keramik_down_arrow);
break;
case TQStyle::PE_ArrowLeft:
- a.setPoints(QCOORDARRLEN(keramik_left_arrow), keramik_left_arrow);
+ a.setPoints(TQCOORDARRLEN(keramik_left_arrow), keramik_left_arrow);
break;
default:
- a.setPoints(QCOORDARRLEN(keramik_right_arrow), keramik_right_arrow);
+ a.setPoints(TQCOORDARRLEN(keramik_right_arrow), keramik_right_arrow);
}
p->save();
/*if ( down )
- p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
- pixelMetric( PM_ButtonShiftVertical ) );
+ p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ),
+ tqpixelMetric( PM_ButtonShiftVertical ) );
*/
if ( enabled ) {
@@ -346,8 +347,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 );
@@ -363,7 +364,7 @@ void KeramikStyle::polish(TQWidget* widget)
widget->installEventFilter(this);
}
- if (animateProgressBar && ::qt_cast<TQProgressBar*>(widget))
+ if (animateProgressBar && ::tqqt_cast<TQProgressBar*>(widget))
{
widget->installEventFilter(this);
progAnimWidgets[static_cast<TQProgressBar*>(widget)] = 0;
@@ -387,8 +388,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 );
@@ -402,7 +403,7 @@ void KeramikStyle::unPolish(TQWidget* widget)
widget->setBackgroundMode( PaletteBackground );
widget->removeEventFilter(this);
}
- else if ( ::qt_cast<TQProgressBar*>(widget) )
+ else if ( ::tqqt_cast<TQProgressBar*>(widget) )
{
progAnimWidgets.remove(static_cast<TQProgressBar*>(widget));
}
@@ -412,7 +413,7 @@ void KeramikStyle::unPolish(TQWidget* widget)
void KeramikStyle::progressBarDestroyed(TQObject* obj)
{
- progAnimWidgets.remove(static_cast<TQProgressBar*>(obj));
+ progAnimWidgets.remove(static_cast<TQProgressBar*>(TQT_TQWIDGET(obj)));
}
@@ -476,13 +477,13 @@ 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 = TQT_TQWIDGET(widget->tqparentWidget());
int x_offset = widget->x(), y_offset = widget->y();
while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) )
{
x_offset += parent->x();
y_offset += parent->y();
- parent = static_cast<TQWidget*>(parent->parent());
+ parent = TQT_TQWIDGET(parent->parent());
}
TQRect pr = parent->rect();
@@ -519,14 +520,14 @@ 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);
}
}
@@ -748,8 +749,8 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
case PE_HeaderArrow:
if ( flags & Style_Up )
- drawPrimitive( PE_ArrowUp, p, r, cg, Style_Enabled );
- else drawPrimitive( PE_ArrowDown, p, r, cg, Style_Enabled );
+ tqdrawPrimitive( PE_ArrowUp, p, r, cg, Style_Enabled );
+ else tqdrawPrimitive( PE_ArrowDown, p, r, cg, Style_Enabled );
break;
@@ -944,7 +945,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
@@ -954,7 +955,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
if (kickerMode)
{
if (p->device() && p->device()->devType() == TQInternal::Widget &&
- TQCString(static_cast<TQWidget*>(p->device())->className()) == "FittsLawFrame" )
+ TQCString(static_cast<TQWidget*>(static_cast<QWidget*>(static_cast<QPaintDevice*>(p->tqdevice())))->className()) == "FittsLawFrame" )
{
int x2 = x + r.width() - 1;
int y2 = y + r.height() - 1;
@@ -970,13 +971,13 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
return;
}
}
- KStyle::drawPrimitive(pe, p, r, cg, flags, opt);
+ KStyle::tqdrawPrimitive(pe, p, r, cg, flags, opt);
break;
}
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)
{
@@ -999,7 +1000,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
p->drawLine(x+1, y+1, x+1, y2-1);
p->setPen(oldPen);
} else
- KStyle::drawPrimitive(pe, p, r, cg, flags, opt);
+ KStyle::tqdrawPrimitive(pe, p, r, cg, flags, opt);
break;
}
@@ -1014,7 +1015,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 +1035,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 +1093,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 = ::tqqt_cast<TQToolBar*>(paintWidget->tqparentWidget());
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal) );
if ( !(flags & Style_Horizontal) )
@@ -1123,25 +1124,25 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
switch(pe)
{
case PE_ArrowUp:
- a.setPoints(QCOORDARRLEN(u_arrow), u_arrow);
+ a.setPoints(TQCOORDARRLEN(u_arrow), u_arrow);
break;
case PE_ArrowDown:
- a.setPoints(QCOORDARRLEN(d_arrow), d_arrow);
+ a.setPoints(TQCOORDARRLEN(d_arrow), d_arrow);
break;
case PE_ArrowLeft:
- a.setPoints(QCOORDARRLEN(l_arrow), l_arrow);
+ a.setPoints(TQCOORDARRLEN(l_arrow), l_arrow);
break;
default:
- a.setPoints(QCOORDARRLEN(r_arrow), r_arrow);
+ a.setPoints(TQCOORDARRLEN(r_arrow), r_arrow);
}
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 )
{
@@ -1162,7 +1163,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
}
else
- KStyle::drawPrimitive( pe, p, r, cg, flags, opt );
+ KStyle::tqdrawPrimitive( pe, p, r, cg, flags, opt );
}
}
}
@@ -1186,7 +1187,7 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
case KPE_SliderGroove:
{
const TQSlider* slider = static_cast< const TQSlider* >( widget );
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
Keramik::TilePainter::PaintMode pmod = Keramik::TilePainter::PaintNormal;
@@ -1206,7 +1207,7 @@ void KeramikStyle::drawKStylePrimitive( KStylePrimitive kpe,
case KPE_SliderHandle:
{
const TQSlider* slider = static_cast< const TQSlider* >( widget );
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
TQColor hl = cg.highlight();
if (!disabled && flags & Style_Active)
@@ -1305,16 +1306,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 +1324,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,
@@ -1354,14 +1355,14 @@ void KeramikStyle::drawControl( ControlElement element,
if ( btn->isDefault( ) && !flatMode )
{
- drawPrimitive( PE_ButtonDefault, p, r, cg, flags );
+ tqdrawPrimitive( PE_ButtonDefault, p, r, cg, flags );
}
else
{
if (widget->parent() && widget->parent()->inherits("QToolBar"))
toolbarBlendWidget = widget;
- drawPrimitive( PE_ButtonCommand, p, r, cg, flags );
+ tqdrawPrimitive( PE_ButtonCommand, p, r, cg, flags );
toolbarBlendWidget = 0;
}
@@ -1381,15 +1382,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 +1398,7 @@ void KeramikStyle::drawControl( ControlElement element,
}
else
{
- drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ tqdrawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
cg, flags, opt );
w -= dx;
}
@@ -1446,18 +1447,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 ),
+ tqdrawPrimitive( 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 ),
+ tqdrawPrimitive( PE_FocusRect, p,
+ tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, flags );
break;
}
@@ -1465,13 +1466,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 +1487,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 +1495,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 +1552,7 @@ void KeramikStyle::drawControl( ControlElement element,
tb->orientation() == Qt::Horizontal);
}
else
- KStyle::drawControl( CE_DockWindowEmptyArea, p,
+ KStyle::tqdrawControl( (QStyle::ControlElement)CE_DockWindowEmptyArea, p,
widget, r, cg, flags, opt );
break;
}
@@ -1607,7 +1608,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 +1642,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() )
{
@@ -1680,7 +1681,7 @@ void KeramikStyle::drawControl( ControlElement element,
SFlags cflags = Style_Default;
cflags |= active ? Style_Enabled : Style_On;
- drawPrimitive( PE_CheckMark, p, cr, cg, cflags );
+ tqdrawPrimitive( PE_CheckMark, p, cr, cg, cflags );
}
// Time to draw the menu item label...
@@ -1724,7 +1725,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;
@@ -1773,22 +1774,22 @@ void KeramikStyle::drawControl( ControlElement element,
// Draw the pixmap
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( OpaqueMode );
+ p->setBackgroundMode( Qt::OpaqueMode );
int diffw = ( ( w - pixmap->width() ) / 2 )
+ ( ( w - pixmap->width() ) % 2 );
p->drawPixmap( x+diffw, y+itemFrame, *pixmap );
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( TransparentMode );
+ p->setBackgroundMode( Qt::TransparentMode );
}
}
// 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
@@ -1799,9 +1800,9 @@ void KeramikStyle::drawControl( ControlElement element,
TQColorGroup g2( discol, cg.highlight(), white, white,
enabled ? white : discol, discol, white );
- drawPrimitive( arrow, p, vr, g2, Style_Enabled );
+ tqdrawPrimitive( arrow, p, vr, g2, Style_Enabled );
} else
- drawPrimitive( arrow, p, vr, cg,
+ tqdrawPrimitive( arrow, p, vr, cg,
enabled ? Style_Enabled : Style_Default );
}
break;
@@ -1914,11 +1915,11 @@ 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,
@@ -1926,7 +1927,7 @@ void KeramikStyle::drawControlMask( ControlElement element,
{
p->fillRect(r, color1);
maskMode = true;
- drawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt);
+ tqdrawControl( element, p, widget, r, TQApplication::tqpalette().active(), TQStyle::Style_Default, opt);
maskMode = false;
}
@@ -1934,7 +1935,7 @@ 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 +1943,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,
@@ -1975,7 +1976,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
{
//Double-buffer only when we are in the slower full-blend mode
if (widget->parent() &&
- ( widget->parent()->inherits("QToolBar")|| !qstrcmp(widget->parent()->name(), kdeToolbarWidget) ) )
+ ( widget->tqparent()->inherits("QToolBar")|| !qstrcmp(widget->tqparent()->name(), kdeToolbarWidget) ) )
{
buf = new TQPixmap( r.width(), r.height() );
br.setX(0);
@@ -1997,7 +1998,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
//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.
+ //will take care of the overall tqshape.
if ( compact )
{
forceSmallMode = true;
@@ -2014,7 +2015,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
if ( widget == hoverWidget )
flags |= Style_MouseOver;
- drawPrimitive( PE_ButtonCommand, p2, br, cg, flags );
+ tqdrawPrimitive( PE_ButtonCommand, p2, br, cg, flags );
toolbarBlendWidget = 0;
}
@@ -2033,17 +2034,17 @@ 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 );
TQPointArray a;
- a.setPoints(QCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow);
+ a.setPoints(TQCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow);
a.translate( ar.x() + ar.width() / 2, ar.y() + ar.height() / 2 );
p2->setPen( cg.buttonText() );
@@ -2054,10 +2055,10 @@ 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);
+ a.setPoints(TQCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow);
a.translate( ar.x() + ar.width() / 2, ar.y() + ar.height() / 2 );
p2->setPen( cg.buttonText() );
@@ -2069,20 +2070,20 @@ 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 );
+ tqdrawPrimitive( PE_PanelLineEdit, p2, er, cg );
Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( p2, er, cg.button(),
Qt::black, false, pmodeFullBlend() );
}
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 ) );
- drawPrimitive( PE_FocusRect, p2, re, cg,
+ tqdrawPrimitive( PE_FocusRect, p2, re, cg,
Style_FocusAtBorder, TQStyleOption( cg.highlight() ) );
}
// TQComboBox draws the text on its own and uses the painter's current colors
@@ -2113,7 +2114,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( (QStyle::ComplexControl)CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget );
if ( controls & SC_SpinWidgetButtonField )
{
Keramik::SpinBoxPainter().draw( p, br, cg.button(), cg.background(), !sw->isEnabled() );
@@ -2128,19 +2129,19 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
}
if ( controls & SC_SpinWidgetFrame )
- drawPrimitive( PE_PanelLineEdit, p, r, cg );
+ tqdrawPrimitive( PE_PanelLineEdit, p, r, cg );
break;
}
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;
+ bool horizontal = sb->orientation() == Qt::Horizontal;
TQRect slider, subpage, addpage, subline, addline;
if ( sb->minValue() == sb->maxValue() ) flags &= ~Style_Enabled;
@@ -2151,7 +2152,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
addline = querySubControlMetrics( control, widget, SC_ScrollBarAddLine, opt );
if ( controls & SC_ScrollBarSubLine )
- drawPrimitive( PE_ScrollBarSubLine, p, subline, cg,
+ tqdrawPrimitive( PE_ScrollBarSubLine, p, subline, cg,
flags | ( ( active & SC_ScrollBarSubLine ) ? Style_Down : 0 ) );
TQRegion clip;
@@ -2172,21 +2173,21 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
p->setClipRect( slider.x(), slider.y(), addpage.right() - slider.x() + 1, slider.height() );
else
p->setClipRect( slider.x(), slider.y(), slider.width(), addpage.bottom() - slider.y() + 1 );
- drawPrimitive( PE_ScrollBarSlider, p, slider, cg,
+ tqdrawPrimitive( PE_ScrollBarSlider, p, slider, cg,
flags | ( ( active == SC_ScrollBarSlider ) ? Style_Down : 0 ) );
}
p->setClipping( false );
if ( controls & ( SC_ScrollBarSubLine | SC_ScrollBarAddLine ) )
{
- drawPrimitive( PE_ScrollBarAddLine, p, addline, cg, flags );
+ tqdrawPrimitive( PE_ScrollBarAddLine, p, addline, cg, flags );
if ( active & SC_ScrollBarSubLine )
{
if ( horizontal )
p->setClipRect( TQRect( addline.x(), addline.y(), addline.width() / 2, addline.height() ) );
else
p->setClipRect( TQRect( addline.x(), addline.y(), addline.width(), addline.height() / 2 ) );
- drawPrimitive( PE_ScrollBarAddLine, p, addline, cg, flags | Style_Down );
+ tqdrawPrimitive( PE_ScrollBarAddLine, p, addline, cg, flags | Style_Down );
}
else if ( active & SC_ScrollBarAddLine )
{
@@ -2194,7 +2195,7 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
p->setClipRect( TQRect( addline.x() + addline.width() / 2, addline.y(), addline.width() / 2, addline.height() ) );
else
p->setClipRect( TQRect( addline.x(), addline.y() + addline.height() / 2, addline.width(), addline.height() / 2 ) );
- drawPrimitive( PE_ScrollBarAddLine, p, addline, cg, flags | Style_Down );
+ tqdrawPrimitive( PE_ScrollBarAddLine, p, addline, cg, flags | Style_Down );
}
}
@@ -2208,14 +2209,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;
@@ -2249,16 +2250,16 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
if (!onToolbar && !onControlButtons)
bflags |= Style_Horizontal;
- drawPrimitive( PE_ButtonTool, p, button, cg,
+ tqdrawPrimitive( PE_ButtonTool, p, button, cg,
bflags, opt);
}
// 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)
@@ -2293,14 +2294,14 @@ void KeramikStyle::drawComplexControl( ComplexControl control,
if (controls & SC_ToolButtonMenu)
{
if (mflags & (Style_Down | Style_On | Style_Raised))
- drawPrimitive(PE_ButtonDropDown, p, menuarea, cg, mflags, opt);
- drawPrimitive(PE_ArrowDown, p, menuarea, cg, mflags, opt);
+ tqdrawPrimitive(PE_ButtonDropDown, p, menuarea, cg, mflags, opt);
+ tqdrawPrimitive(PE_ArrowDown, p, menuarea, cg, mflags, opt);
}
if (toolbutton->hasFocus() && !toolbutton->focusProxy()) {
TQRect fr = toolbutton->rect();
fr.addCoords(3, 3, -3, -3);
- drawPrimitive(PE_FocusRect, p, fr, cg);
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg);
}
titleBarMode = None;
@@ -2311,14 +2312,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,
@@ -2327,8 +2328,8 @@ void KeramikStyle::drawComplexControlMask( ComplexControl control,
if (control == CC_ComboBox)
{
maskMode = true;
- drawComplexControl(CC_ComboBox, p, widget, r,
- TQApplication::palette().active(), Style_Default,
+ tqdrawComplexControl(CC_ComboBox, p, widget, r,
+ TQApplication::tqpalette().active(), Style_Default,
SC_ComboBoxFrame,SC_None, opt);
maskMode = false;
@@ -2338,7 +2339,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)
{
@@ -2392,11 +2393,11 @@ int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
case PM_TabBarTabShiftVertical:
{
- const TQTabBar* tb = ::qt_cast<const TQTabBar*>(widget);
+ const TQTabBar* tb = ::tqqt_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 +2409,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 +2427,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 +2441,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();
@@ -2449,7 +2450,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents,
}
else
{
- return KStyle::sizeFromContents( contents, widget, contentSize, opt );
+ return KStyle::tqsizeFromContents( contents, widget, contentSize, opt );
}
}
@@ -2473,8 +2474,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 +2501,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;
@@ -2518,7 +2519,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents,
}
default:
- return KStyle::sizeFromContents( contents, widget, contentSize, opt );
+ return KStyle::tqsizeFromContents( contents, widget, contentSize, opt );
}
}
@@ -2532,7 +2533,7 @@ TQStyle::SubControl KeramikStyle::querySubControl( ComplexControl control,
if ( control == CC_ScrollBar && result == SC_ScrollBarAddLine )
{
TQRect addline = querySubControlMetrics( control, widget, result, opt );
- if ( static_cast< const TQScrollBar* >( widget )->orientation() == Horizontal )
+ if ( static_cast< const TQScrollBar* >( widget )->orientation() == Qt::Horizontal )
{
if ( point.x() < addline.center().x() ) result = SC_ScrollBarSubLine;
}
@@ -2584,7 +2585,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 );
@@ -2602,7 +2603,7 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control,
case CC_ScrollBar:
{
const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget );
- bool horizontal = sb->orientation() == Horizontal;
+ bool horizontal = sb->orientation() == Qt::Horizontal;
int addline, subline, sliderpos, sliderlen, maxlen, slidermin;
if ( horizontal )
{
@@ -2621,7 +2622,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;
}
@@ -2661,12 +2662,12 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control,
case CC_Slider:
{
const TQSlider* sl = static_cast< const TQSlider* >( widget );
- bool horizontal = sl->orientation() == Horizontal;
+ bool horizontal = sl->orientation() == Qt::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.
@@ -2745,53 +2746,53 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
if ( !object->isWidgetType() ) return false;
//Clear hover highlight when needed
- if ( (event->type() == TQEvent::Leave) && (object == hoverWidget) )
+ if ( (event->type() == TQEvent::Leave) && (TQT_BASE_OBJECT(object) == TQT_BASE_OBJECT(hoverWidget)) )
{
- TQWidget* button = static_cast<TQWidget*>(object);
+ TQWidget* button = TQT_TQWIDGET(object);
hoverWidget = 0;
- button->repaint( false );
+ button->tqrepaint( false );
return false;
}
//Hover highlight on buttons, toolbuttons and combos
- if ( ::qt_cast<TQPushButton*>(object) || ::qt_cast<TQComboBox*>(object) || ::qt_cast<TQToolButton*>(object) )
+ if ( ::tqqt_cast<TQPushButton*>(object) || ::tqqt_cast<TQComboBox*>(object) || ::tqqt_cast<TQToolButton*>(object) )
{
- if (event->type() == TQEvent::Enter && static_cast<TQWidget*>(object)->isEnabled() )
+ if (event->type() == TQEvent::Enter && TQT_TQWIDGET(object)->isEnabled() )
{
- hoverWidget = static_cast<TQWidget*>(object);
- hoverWidget->repaint( false );
+ hoverWidget = TQT_TQWIDGET(object);
+ hoverWidget->tqrepaint( false );
}
return false;
}
//Combo line edits get special frames
- if ( event->type() == TQEvent::Paint && ::qt_cast<TQLineEdit*>(object) )
+ if ( event->type() == TQEvent::Paint && ::tqqt_cast<TQLineEdit*>(object) )
{
static bool recursion = false;
if (recursion )
return false;
recursion = true;
- object->event( static_cast< TQPaintEvent* >( event ) );
- TQWidget* widget = static_cast< TQWidget* >( object );
+ object->event( TQT_TQPAINTEVENT( event ) );
+ TQWidget* widget = TQT_TQWIDGET( object );
TQPainter p( widget );
Keramik::RectTilePainter( keramik_frame_shadow, false, false, 2, 2 ).draw( &p, widget->rect(),
- widget->palette().color( TQPalette::Normal, TQColorGroup::Button ),
+ widget->tqpalette().color( TQPalette::Normal, TQColorGroup::Button ),
Qt::black, false, Keramik::TilePainter::PaintFullBlend);
recursion = false;
return true;
}
- else if ( ::qt_cast<TQListBox*>(object) )
+ else if ( ::tqqt_cast<TQListBox*>(object) )
{
//Handle combobox drop downs
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);
- TQResizeEvent* resize = static_cast<TQResizeEvent*>(event);
+ TQListBox* listbox = static_cast<TQListBox*>(TQT_TQWIDGET(object));
+ TQResizeEvent* resize = TQT_TQRESIZEEVENT(event);
if (resize->size().height() < 6)
return false;
@@ -2823,8 +2824,8 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
{
TQPainter p( listbox );
Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(),
- listbox->palette().color( TQPalette::Normal, TQColorGroup::Button ),
- listbox->palette().color( TQPalette::Normal, TQColorGroup::Background ) );
+ listbox->tqpalette().color( TQPalette::Normal, TQColorGroup::Button ),
+ listbox->tqpalette().color( TQPalette::Normal, TQColorGroup::Background ) );
TQPaintEvent newpaint( paint->region().intersect( listbox->contentsRect() ), paint->erased() );
recursion = true;
@@ -2855,10 +2856,10 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
{
firstComboPopupRelease = false;
- TQMouseEvent* mev = static_cast<TQMouseEvent*>(event);
- TQListBox* box = static_cast<TQListBox*> (object);
+ TQMouseEvent* mev = TQT_TQMOUSEEVENT(event);
+ TQListBox* box = static_cast<TQListBox*>(TQT_TQWIDGET(object));
- TQWidget* parent = box->parentWidget();
+ TQWidget* parent = box->tqparentWidget();
if (!parent)
return false;
@@ -2883,36 +2884,36 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
{
// Draw a gradient background for custom widgets in the toolbar
// that have specified a "kde toolbar widget" name.
- renderToolbarWidgetBackground(0, static_cast<TQWidget*>(object));
+ renderToolbarWidgetBackground(0, TQT_TQWIDGET(object));
return false; // Now draw the contents
}
- else if (event->type() == TQEvent::Paint && object->parent() && ::qt_cast<TQToolBar*>(object->parent())
- && !::qt_cast<TQPopupMenu*>(object) )
+ else if (event->type() == TQEvent::Paint && object->parent() && ::tqqt_cast<TQToolBar*>(object->parent())
+ && !::tqqt_cast<TQPopupMenu*>(object) )
{
// We need to override the paint event to draw a
// gradient on a QToolBarExtensionWidget.
TQToolBar* toolbar = static_cast<TQToolBar*>(object->parent());
- TQWidget* widget = static_cast<TQWidget*>(object);
+ TQWidget* widget = TQT_TQWIDGET(object);
TQRect wr = widget->rect (), tr = toolbar->rect();
TQPainter p( widget );
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
@@ -2921,7 +2922,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
}
// Track show events for progress bars
- if ( animateProgressBar && ::qt_cast<TQProgressBar*>(object) )
+ if ( animateProgressBar && ::tqqt_cast<TQProgressBar*>(object) )
{
if ((event->type() == TQEvent::Show) && !animationTimer->isActive())
{
diff --git a/kstyles/keramik/keramik.h b/kstyles/keramik/keramik.h
index 03d97ee3a..746626b70 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,
diff --git a/kstyles/keramik/pixmaploader.cpp b/kstyles/keramik/pixmaploader.cpp
index 01cdf5fc6..79d26955e 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,7 +422,7 @@ 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();
+ const TQBitmap* mask = scale( col, row, w, h, color, bg, disabled, false ).tqmask();
if (mask)
{
p->setBackgroundColor(Qt::color0);
@@ -442,7 +442,7 @@ 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();
+ const TQBitmap* mask = tile( col, row, color, bg, disabled, false ).tqmask();
if (mask)
{
p->setBackgroundColor(Qt::color0);
diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp
index 0f998b2db..9035f3b08 100644
--- a/kstyles/klegacy/klegacystyle.cpp
+++ b/kstyles/klegacy/klegacystyle.cpp
@@ -186,12 +186,12 @@ public:
struct KLegacyImageDataKeyField {
- Q_INT8 function : 8;
- Q_INT8 state : 8;
- Q_INT8 shadow : 4;
- Q_INT8 orientation : 4;
- Q_INT8 arrowDirection : 4;
- Q_INT8 gapSide : 4;
+ TQ_INT8 function : 8;
+ TQ_INT8 state : 8;
+ TQ_INT8 shadow : 4;
+ TQ_INT8 orientation : 4;
+ TQ_INT8 arrowDirection : 4;
+ TQ_INT8 gapSide : 4;
};
@@ -866,7 +866,7 @@ GtkObject *GtkObject::find(TQRegExp &r) const {
while ((o = ot.current()) != 0) {
++ot;
- // this would be nice if moc could parse this file :/
+ // this would be nice if tqmoc could parse this file :/
//
// if (o->className() != "GtkObject") {
// qDebug("object is not a GtkObject (className = '%s')",
@@ -1156,7 +1156,7 @@ bool KLegacyStylePrivate::parseClass() {
return false;
}
- KLegacyStyleData *styledata = styleDict.find(stylename);
+ KLegacyStyleData *styledata = styleDict.tqfind(stylename);
if (! styledata) {
qWarning("no such style '%s' for class '%s' (%p)", stylename.latin1(),
@@ -1227,10 +1227,10 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
TQString border =filestream.readLine();
int lp, rp, tp, bp, l, r, t, b;
- lp = border.find(',');
- rp = border.find(',', lp + 1);
- tp = border.find(',', rp + 1);
- bp = border.find('}', tp + 1);
+ lp = border.tqfind(',');
+ rp = border.tqfind(',', lp + 1);
+ tp = border.tqfind(',', rp + 1);
+ bp = border.tqfind('}', tp + 1);
l = border.left(lp).toUInt();
r = border.mid(lp + 1, rp - lp - 1).toUInt();
@@ -1336,10 +1336,10 @@ bool KLegacyStylePrivate::parseImage(KLegacyStyleData *styledata) {
TQString border = filestream.readLine();
int lp, rp, tp, bp, l, r, t, b;
- lp = border.find(',');
- rp = border.find(',', lp + 1);
- tp = border.find(',', rp + 1);
- bp = border.find('}', tp + 1);
+ lp = border.tqfind(',');
+ rp = border.tqfind(',', lp + 1);
+ tp = border.tqfind(',', rp + 1);
+ bp = border.tqfind('}', tp + 1);
l = border.left(lp).toUInt();
r = border.mid(lp + 1, rp - lp - 1).toUInt();
@@ -1486,7 +1486,7 @@ bool KLegacyStylePrivate::parsePixmapPath() {
next = next.mid(1, next.length() - 2);
- int start = 0, end = next.find(":");
+ int start = 0, end = next.tqfind(":");
while (end != -1) {
TQString path(next.mid(start, end - start));
@@ -1500,7 +1500,7 @@ bool KLegacyStylePrivate::parsePixmapPath() {
}
start = end + 1;
- end = next.find(":", start);
+ end = next.tqfind(":", start);
}
// get the straggler
@@ -1543,7 +1543,7 @@ bool KLegacyStylePrivate::parseStyle() {
newstylename = newstylename.mid(1, newstylename.length() - 2);
- KLegacyStyleData *styledata = styleDict.find(stylename);
+ KLegacyStyleData *styledata = styleDict.tqfind(stylename);
if (! styledata) return false;
@@ -1573,7 +1573,7 @@ bool KLegacyStylePrivate::parseStyle() {
}
if (next.left(5) == "base[") {
- int l = next.find('['), r = next.find(']'), state;
+ int l = next.tqfind('['), r = next.tqfind(']'), state;
if (l < 1 || r < 1 || r < l) continue;
@@ -1605,9 +1605,9 @@ bool KLegacyStylePrivate::parseStyle() {
int rp, gp, bp;
float ri, gi, bi;
- rp = color.find(',');
- gp = color.find(',', rp + 1);
- bp = color.find('}', gp + 1);
+ rp = color.tqfind(',');
+ gp = color.tqfind(',', rp + 1);
+ bp = color.tqfind('}', gp + 1);
ri = color.left(rp).toFloat();
gi = color.mid(rp + 1, gp - rp - 1).toFloat();
@@ -1619,7 +1619,7 @@ bool KLegacyStylePrivate::parseStyle() {
styledata->base[state].setRgb(red, green, blue);
}
} else if (next.left(3) == "bg[") {
- int l = next.find('['), r = next.find(']'), state;
+ int l = next.tqfind('['), r = next.tqfind(']'), state;
if (l < 1 || r < 1 || r < l) continue;
@@ -1651,9 +1651,9 @@ bool KLegacyStylePrivate::parseStyle() {
int rp, gp, bp;
float ri, gi, bi;
- rp = color.find(',');
- gp = color.find(',', rp + 1);
- bp = color.find('}', gp + 1);
+ rp = color.tqfind(',');
+ gp = color.tqfind(',', rp + 1);
+ bp = color.tqfind('}', gp + 1);
ri = color.left(rp).toFloat();
gi = color.mid(rp + 1, gp - rp - 1).toFloat();
@@ -1668,7 +1668,7 @@ bool KLegacyStylePrivate::parseStyle() {
if (! parseEngine(styledata))
fprintf(stderr, "engine parse error\n");
} else if (next.left(3) == "fg[") {
- int l = next.find('['), r = next.find(']'), state;
+ int l = next.tqfind('['), r = next.tqfind(']'), state;
if (l < 1 || r < 1 || r < l) continue;
@@ -1700,9 +1700,9 @@ bool KLegacyStylePrivate::parseStyle() {
int rp, gp, bp;
float ri, gi, bi;
- rp = color.find(',');
- gp = color.find(',', rp + 1);
- bp = color.find('}', gp + 1);
+ rp = color.tqfind(',');
+ gp = color.tqfind(',', rp + 1);
+ bp = color.tqfind('}', gp + 1);
ri = color.left(rp).toFloat();
gi = color.mid(rp + 1, gp - rp - 1).toFloat();
@@ -1767,7 +1767,7 @@ void KLegacyStyle::polish(TQApplication *app) {
priv->oldfont = app->font();
priv->oldpalette = app->palette();
- GtkObject *gobj = priv->gtkDict.find(TQMainWindow::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQMainWindow::staticMetaObject());
if (gobj) {
if (gobj->font()) {
@@ -1974,8 +1974,8 @@ void KLegacyStyle::polish(TQWidget *widget) {
widget->setBackgroundMode(TQWidget::PaletteBackground);
}
- GtkObject *gobj = gobj = priv->gtkDict.find(((metaobject) ? metaobject :
- widget->metaObject()));
+ GtkObject *gobj = gobj = priv->gtkDict.tqfind(((metaobject) ? metaobject :
+ widget->tqmetaObject()));
if (gobj) {
if (gobj->font() && (*gobj->font() != TQApplication::font()))
@@ -2115,7 +2115,7 @@ void KLegacyStyle::drawMenuBarItem(TQPainter *p, int x, int y, int w, int h, TQM
TQColorGroup &g, bool enabled, bool active)
{
if (enabled && active) {
- GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr);
+ GtkObject *gobj = priv->gtkDict.tqfind(&menuitem_ptr);
if (gobj) {
KLegacyImageDataKey key;
@@ -2147,7 +2147,7 @@ void KLegacyStyle::drawBevelButton(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup & g, bool sunken,
const TQBrush *fill)
{
- GtkObject *gobj = priv->gtkDict.find(TQButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQButton::staticMetaObject());
if (! gobj) {
KStyle::drawBevelButton(p, x, y, w, h, g, sunken, fill);
@@ -2170,7 +2170,7 @@ void KLegacyStyle::drawBevelButton(TQPainter *p, int x, int y, int w, int h,
void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) {
- GtkObject *gobj = priv->gtkDict.find(TQPushButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQPushButton::staticMetaObject());
if (! gobj) {
KStyle::drawPushButton(btn, p);
@@ -2181,7 +2181,7 @@ void KLegacyStyle::drawPushButton(TQPushButton *btn, TQPainter *p) {
key.cachekey = 0;
key.data.function = KLegacy::Box;
- TQColorGroup g = btn->colorGroup();
+ TQColorGroup g = btn->tqcolorGroup();
TQBrush fill = g.brush(TQColorGroup::Button);
int x1, y1, x2, y2;
btn->rect().coords(&x1, &y1, &x2, &y2);
@@ -2237,7 +2237,7 @@ void KLegacyStyle::drawIndicator(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, int state,
bool down, bool enabled)
{
- GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject());
if (! gobj) {
KStyle::drawIndicator(p, x, y, w, h, g, state, down, enabled);
@@ -2260,7 +2260,7 @@ void KLegacyStyle::drawIndicator(TQPainter *p, int x, int y, int w, int h,
void KLegacyStyle::drawIndicatorMask(TQPainter *p, int x, int y, int w, int h, int state) {
- GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject());
if (! gobj) {
KStyle::drawIndicatorMask(p, x, y, w, h, state);
@@ -2283,7 +2283,7 @@ void KLegacyStyle::drawIndicatorMask(TQPainter *p, int x, int y, int w, int h, i
TQSize KLegacyStyle::indicatorSize(void) const {
- GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject());
if (! gobj) return KStyle::indicatorSize();
@@ -2320,7 +2320,7 @@ void KLegacyStyle::drawExclusiveIndicator(TQPainter *p, int x, int y, int w, int
const TQColorGroup &g, bool on,
bool down, bool enabled)
{
- GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject());
if (! gobj) {
drawExclusiveIndicator(p, x, y, w, h, g, on, down, enabled);
@@ -2345,7 +2345,7 @@ void KLegacyStyle::drawExclusiveIndicator(TQPainter *p, int x, int y, int w, int
void KLegacyStyle::drawExclusiveIndicatorMask(TQPainter *p, int x, int y, int w, int h,
bool on)
{
- GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject());
if (! gobj) {
KStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on);
@@ -2368,7 +2368,7 @@ void KLegacyStyle::drawExclusiveIndicatorMask(TQPainter *p, int x, int y, int w,
TQSize KLegacyStyle::exclusiveIndicatorSize(void) const {
- GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject());
if (! gobj) {
return KStyle::indicatorSize();
@@ -2427,7 +2427,7 @@ void KLegacyStyle::drawPopupMenuItem(TQPainter *p, bool checkable, int maxpmw, i
}
if ( act && enabled ) {
- GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr);
+ GtkObject *gobj = priv->gtkDict.tqfind(&menuitem_ptr);
if (gobj) {
KLegacyImageDataKey key;
@@ -2501,7 +2501,7 @@ void KLegacyStyle::drawPopupMenuItem(TQPainter *p, bool checkable, int maxpmw, i
TQString s = mi->text();
if ( !s.isNull() ) { // draw text
- int t = s.find( '\t' );
+ int t = s.tqfind( '\t' );
int m = 2;
const int text_flags = AlignVCenter|ShowPrefix | DontClip | SingleLine;
if ( t >= 0 ) { // draw tab text
@@ -2531,7 +2531,7 @@ void KLegacyStyle::drawComboButton(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, bool sunken, bool editable,
bool enabled, const TQBrush *b)
{
- GtkObject *gobj = priv->gtkDict.find(TQComboBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQComboBox::staticMetaObject());
if (! gobj) {
KStyle::drawComboButton(p, x, y, w, h, g, sunken, editable, enabled, b);
@@ -2571,7 +2571,7 @@ void KLegacyStyle::drawComboButton(TQPainter *p, int x, int y, int w, int h,
TQRect KLegacyStyle::comboButtonRect(int x, int y, int w, int h) {
- GtkObject *gobj = priv->gtkDict.find(TQComboBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQComboBox::staticMetaObject());
if (! gobj) {
return KStyle::comboButtonRect(x, y, w, h);
@@ -2648,7 +2648,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll
{
if (! scrollbar->isVisible()) return;
- GtkObject *gobj = priv->gtkDict.find(TQScrollBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQScrollBar::staticMetaObject());
if (! gobj) {
KStyle::drawScrollBarControls(p, scrollbar, start, controls, active);
@@ -2741,7 +2741,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll
(active & SubLine), x, y,
buttonDim,
buttonDim,
- scrollbar->colorGroup(), true);
+ scrollbar->tqcolorGroup(), true);
if (scrollbar->orientation() == Vertical)
y = scrollbar->height() - buttonDim - defaultFrameWidth();
@@ -2753,7 +2753,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll
(active & AddLine), x, y,
buttonDim,
buttonDim,
- scrollbar->colorGroup(), true);
+ scrollbar->tqcolorGroup(), true);
}
p->drawPixmap(0, 0, buf);
}
@@ -2762,7 +2762,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll
void KLegacyStyle::drawSlider(TQPainter *p, int x, int y, int w, int h, const TQColorGroup &g,
Orientation orientation, bool tickAbove, bool tickBelow)
{
- GtkObject *gobj = priv->gtkDict.find(TQSlider::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQSlider::staticMetaObject());
if (! gobj) {
KStyle::drawSlider(p, x, y, w, h, g, orientation, tickAbove, tickBelow);
@@ -2789,7 +2789,7 @@ void KLegacyStyle::drawSlider(TQPainter *p, int x, int y, int w, int h, const TQ
void KLegacyStyle::drawSliderGroove(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, QCOORD c, Orientation o)
{
- GtkObject *gobj = priv->gtkDict.find(TQSlider::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQSlider::staticMetaObject());
if (! gobj) {
KStyle::drawSliderGroove(p, x, y, w, h, g, c, o);
@@ -2816,7 +2816,7 @@ void KLegacyStyle::drawArrow(TQPainter *p, ArrowType type, bool down,
int x, int y, int w, int h,
const TQColorGroup &g, bool enabled, const TQBrush *b)
{
- GtkObject *gobj = priv->gtkDict.find(&arrow_ptr);
+ GtkObject *gobj = priv->gtkDict.tqfind(&arrow_ptr);
if (! gobj) {
KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b);
@@ -2848,7 +2848,7 @@ void KLegacyStyle::drawMenuArrow(TQPainter *p, ArrowType type, bool down,
int x, int y, int w, int h,
const TQColorGroup &g, bool enabled, const TQBrush *b)
{
- GtkObject *gobj = priv->gtkDict.find(&menuitem_ptr);
+ GtkObject *gobj = priv->gtkDict.tqfind(&menuitem_ptr);
if (! gobj) {
KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b);
@@ -2891,7 +2891,7 @@ void KLegacyStyle::drawPopupPanel(TQPainter *p, int x, int y, int w, int h,
void KLegacyStyle::drawCheckMark(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, bool activated, bool disabled)
{
- GtkObject *gobj = priv->gtkDict.find(&checkmenuitem_ptr);
+ GtkObject *gobj = priv->gtkDict.tqfind(&checkmenuitem_ptr);
if (! gobj) {
KStyle::drawCheckMark(p, x, y, w, h, g, activated, disabled);
@@ -2942,7 +2942,7 @@ void KLegacyStyle::drawSplitter(TQPainter *p, int x, int y, int w, int h,
void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, bool selected)
{
- GtkObject *gobj = priv->gtkDict.find(TQTabBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQTabBar::staticMetaObject());
if (! gobj) {
KStyle::drawTab(p, tabbar, tab, selected);
@@ -2954,8 +2954,8 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo
key.data.function = KLegacy::Extension;
key.data.state = (! selected) ? KLegacy::Active : KLegacy::Normal;
key.data.shadow = KLegacy::Out;
- key.data.gapSide = (tabbar->shape() == TQTabBar::RoundedAbove ||
- tabbar->shape() == TQTabBar::TriangularAbove) ?
+ key.data.gapSide = (tabbar->tqshape() == TQTabBar::RoundedAbove ||
+ tabbar->tqshape() == TQTabBar::TriangularAbove) ?
KLegacy::Bottom : KLegacy::Top;
int ry = tab->r.top(), rh = tab->r.height();
@@ -2963,8 +2963,8 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo
if (! selected) {
rh -= 2;
- if (tabbar->shape() == TQTabBar::RoundedAbove ||
- tabbar->shape() == TQTabBar::TriangularAbove)
+ if (tabbar->tqshape() == TQTabBar::RoundedAbove ||
+ tabbar->tqshape() == TQTabBar::TriangularAbove)
ry += 2;
}
@@ -2981,7 +2981,7 @@ void KLegacyStyle::drawTab(TQPainter *p, const TQTabBar *tabbar, TQTab *tab, boo
void KLegacyStyle::drawKBarHandle(TQPainter *p, int x, int y, int w, int h,
const TQColorGroup &g, KToolBarPos type, TQBrush *fill)
{
- GtkObject *gobj = priv->gtkDict.find(TQToolBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQToolBar::staticMetaObject());
if (! gobj) {
KStyle::drawKBarHandle(p, x, y, w, h, g, type, fill);
@@ -3043,7 +3043,7 @@ void KLegacyStyle::drawKickerTaskButton(TQPainter *p, int x, int y, int w, int h
static const TQString &modStr = KGlobal::staticQString(
TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]"));
- int modStrPos = s.find(modStr);
+ int modStrPos = s.tqfind(modStr);
if (modStrPos != -1) {
s.remove(modStrPos, modStr.length()+1);
@@ -3082,7 +3082,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
TQWidget *w = (TQWidget *) obj;
if (w->inherits("QPopupMenu") && w->width() < 700) {
- GtkObject *gobj = priv->gtkDict.find(TQPopupMenu::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQPopupMenu::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3139,7 +3139,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
}
}
} else if (w->isTopLevel() || w->inherits("QWorkspaceChild")) {
- GtkObject *gobj = priv->gtkDict.find(TQMainWindow::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQMainWindow::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3152,7 +3152,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
w->setBackgroundPixmap(*p);
}
} else if (w->inherits("QLineEdit")) {
- GtkObject *gobj = priv->gtkDict.find(TQLineEdit::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQLineEdit::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3193,7 +3193,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
}
} else if (w->inherits("QMenuBar") ||
w->inherits("QToolBar")) {
- GtkObject *gobj = priv->gtkDict.find(TQMenuBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQMenuBar::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3261,12 +3261,12 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
obj->inherits("QSlider") ||
obj->inherits("QScrollbar")) {
priv->lastWidget = (TQWidget *) obj;
- priv->lastWidget->repaint(false);
+ priv->lastWidget->tqrepaint(false);
} else if (obj->inherits("QRadioButton")) {
TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel() && w->isEnabled()) {
- GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3294,7 +3294,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel() && w->isEnabled()) {
- GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject());
if (gobj) {
KLegacyImageDataKey key;
@@ -3327,7 +3327,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
{
if (obj == priv->lastWidget) {
priv->lastWidget = 0;
- ((TQWidget *) obj)->repaint(false);
+ ((TQWidget *) obj)->tqrepaint(false);
} else if (obj->inherits("QRadioButton") ||
obj->inherits("QCheckBox")) {
TQWidget *w = (TQWidget *) obj;
@@ -3335,7 +3335,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
if (! w->isTopLevel()) {
w->setBackgroundMode(TQWidget::X11ParentRelative);
w->setBackgroundOrigin(TQWidget::WidgetOrigin);
- w->repaint(true);
+ w->tqrepaint(true);
}
}
@@ -3349,7 +3349,7 @@ bool KLegacyStyle::eventFilter(TQObject *obj, TQEvent *e) {
if (obj->inherits("QScrollBar") &&
(! (me->state() & (LeftButton | MidButton | RightButton)))) {
priv->hovering = true;
- ((TQWidget *) obj)->repaint(false);
+ ((TQWidget *) obj)->tqrepaint(false);
priv->hovering = false;
}
diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp
index 6b5c0961d..37bd51f15 100644
--- a/kstyles/kthemestyle/kthemebase.cpp
+++ b/kstyles/kthemestyle/kthemebase.cpp
@@ -78,7 +78,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
{
bool bOK;
// find first part (red)
- int nIndex = aValue.find( ',' );
+ int nIndex = aValue.tqfind( ',' );
if ( nIndex == -1 )
{
// return a sensible default -- Bernd
@@ -91,7 +91,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
// find second part (green)
int nOldIndex = nIndex;
- nIndex = aValue.find( ',', nOldIndex + 1 );
+ nIndex = aValue.tqfind( ',', nOldIndex + 1 );
if ( nIndex == -1 )
{
@@ -176,7 +176,7 @@ public:
*/
TQColor pixmapAveColor( const TQPixmap* p )
{
- if ( colorCache.contains( p ) )
+ if ( colorCache.tqcontains( p ) )
return colorCache[ p ];
TQImage to_ave = p->convertToImage();
@@ -231,104 +231,106 @@ union kthemeKey{
unsigned int cacheKey;
};
+#define KDE_TQBITMAP_TO_TQPAINTDEVICE(x) static_cast<const TQPaintDevice*>(static_cast<const QPaintDevice*>(static_cast<const QPixmap*>(static_cast<const QBitmap*>(x))))
+
void KThemeBase::generateBorderPix( int i )
{
// separate pixmap into separate components
if ( pbPixmaps[ i ] )
{
// evidently I have to do masks manually...
- const TQBitmap * srcMask = pbPixmaps[ i ] ->mask();
+ const TQBitmap * srcMask = pbPixmaps[ i ] ->tqmask();
TQBitmap destMask( pbWidth[ i ], pbWidth[ i ] );
TQPixmap tmp( pbWidth[ i ], pbWidth[ i ] );
- bitBlt( &tmp, 0, 0, pbPixmaps[ i ], 0, 0, pbWidth[ i ], pbWidth[ i ],
- Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), 0, 0, pbWidth[ i ], pbWidth[ i ],
+ TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( &destMask, 0, 0, srcMask, 0, 0, pbWidth[ i ], pbWidth[ i ],
- Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, pbWidth[ i ], pbWidth[ i ],
+ TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::TopLeft, tmp );
- bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbPixmaps[ i ] ->width() - pbWidth[ i ], 0,
- pbWidth[ i ], pbWidth[ i ], Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbPixmaps[ i ] ->width() - pbWidth[ i ], 0,
+ pbWidth[ i ], pbWidth[ i ], TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( &destMask, 0, 0, srcMask, pbPixmaps[ i ] ->width() - pbWidth[ i ],
- 0, pbWidth[ i ], pbWidth[ i ], Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ 0, pbWidth[ i ], pbWidth[ i ], TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::TopRight, tmp );
- bitBlt( &tmp, 0, 0, pbPixmaps[ i ], 0, pbPixmaps[ i ] ->height() - pbWidth[ i ],
- pbWidth[ i ], pbWidth[ i ], Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), 0, pbPixmaps[ i ] ->height() - pbWidth[ i ],
+ pbWidth[ i ], pbWidth[ i ], TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( &destMask, 0, 0, srcMask, 0, pbPixmaps[ i ] ->height() - pbWidth[ i ],
- pbWidth[ i ], pbWidth[ i ], Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, pbPixmaps[ i ] ->height() - pbWidth[ i ],
+ pbWidth[ i ], pbWidth[ i ], TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::BottomLeft, tmp );
- bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbPixmaps[ i ] ->width() - pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ], pbWidth[ i ], pbWidth[ i ],
- Qt::CopyROP, false );
+ TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( &destMask, 0, 0, srcMask, pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ], pbWidth[ i ], pbWidth[ i ],
- Qt::CopyROP, false );
+ TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::BottomRight, tmp );
tmp.resize( pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ] );
destMask.resize( pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ] );
- bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbWidth[ i ], 0,
- pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbWidth[ i ], 0,
+ pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( &destMask, 0, 0, srcMask, pbWidth[ i ], 0,
+ bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbWidth[ i ], 0,
pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ],
- Qt::CopyROP, false );
+ TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::Top, tmp );
- bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbWidth[ i ],
+ bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ],
- pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], Qt::CopyROP, false );
+ pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( &destMask, 0, 0, srcMask, pbWidth[ i ],
+ bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbWidth[ i ],
pbPixmaps[ i ] ->height() - pbWidth[ i ],
- pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], Qt::CopyROP, false );
+ pbPixmaps[ i ] ->width() - pbWidth[ i ] * 2, pbWidth[ i ], TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::Bottom, tmp );
tmp.resize( pbWidth[ i ], pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2 );
destMask.resize( pbWidth[ i ], pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2 );
- bitBlt( &tmp, 0, 0, pbPixmaps[ i ], 0, pbWidth[ i ], pbWidth[ i ],
- pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), 0, pbWidth[ i ], pbWidth[ i ],
+ pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2, TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( &destMask, 0, 0, srcMask, 0, pbWidth[ i ], pbWidth[ i ],
- pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, pbWidth[ i ], pbWidth[ i ],
+ pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2, TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::Left, tmp );
- bitBlt( &tmp, 0, 0, pbPixmaps[ i ], pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( TQT_TQPAINTDEVICE(&tmp), 0, 0, TQT_TQPAINTDEVICE(pbPixmaps[ i ]), pbPixmaps[ i ] ->width() - pbWidth[ i ],
pbWidth[ i ], pbWidth[ i ], pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2,
- Qt::CopyROP, false );
+ TQt::CopyROP, false );
if ( srcMask )
{
- bitBlt( &destMask, 0, 0, srcMask, pbPixmaps[ i ] ->width() - pbWidth[ i ],
+ bitBlt( TQT_TQPAINTDEVICE(&destMask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), pbPixmaps[ i ] ->width() - pbWidth[ i ],
pbWidth[ i ], pbWidth[ i ], pbPixmaps[ i ] ->height() - pbWidth[ i ] * 2,
- Qt::CopyROP, false );
+ TQt::CopyROP, false );
tmp.setMask( destMask );
}
pbPixmaps[ i ] ->setBorder( KThemePixmap::Right, tmp );
@@ -402,7 +404,7 @@ void KThemeBase::copyWidgetConfig( int sourceID, int destID, TQString *pixnames,
iTabLine = aTabLine;
}
-void KThemeBase::readConfig( Qt::GUIStyle /*style*/ )
+void KThemeBase::readConfig( TQt::GUIStyle /*style*/ )
{
#define PREBLEND_ITEMS 12
static const WidgetType preBlend[] =
@@ -541,7 +543,7 @@ KThemeBase::KThemeBase( const TQString& dir, const TQString & configFile )
configFileName = "/" + configFileName + "/";
- readConfig( Qt::WindowsStyle );
+ readConfig( TQt::WindowsStyle );
cache = new KThemeCache( cacheSize );
switch ( scrollBarLayout() )
@@ -563,7 +565,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
{
TQStringList keys = config.entryList( configFileName );
- if ( keys.contains( "foreground" ) )
+ if ( keys.tqcontains( "foreground" ) )
{
d->overrideForeground = true;
d->overrideForegroundCol = readColorEntry( &config, ( configFileName + "foreground" ).latin1(), 0 );
@@ -571,7 +573,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideForeground = false;
- if ( keys.contains( "background" ) )
+ if ( keys.tqcontains( "background" ) )
{
d->overrideBackground = true;
d->overrideBackgroundCol = readColorEntry( &config, ( configFileName + "background" ).latin1(), 0 );
@@ -581,7 +583,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
- if ( keys.contains( "selectForeground" ) )
+ if ( keys.tqcontains( "selectForeground" ) )
{
d->overrideSelectForeground = true;
d->overrideSelectForegroundCol = readColorEntry( &config, ( configFileName + "selectForeground" ).latin1(), 0 );
@@ -589,7 +591,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideSelectForeground = false;
- if ( keys.contains( "selectBackground" ) )
+ if ( keys.tqcontains( "selectBackground" ) )
{
d->overrideSelectBackground = true;
d->overrideSelectBackgroundCol = readColorEntry( &config, ( configFileName + "selectBackground" ).latin1(), 0 );
@@ -597,7 +599,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideSelectBackground = false;
- if ( keys.contains( "windowBackground" ) )
+ if ( keys.tqcontains( "windowBackground" ) )
{
d->overrideWindowBackground = true;
d->overrideWindowBackgroundCol = readColorEntry( &config, ( configFileName + "windowBackground" ).latin1(), 0 );
@@ -606,7 +608,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
d->overrideWindowBackground = false;
- if ( keys.contains( "windowForeground" ) )
+ if ( keys.tqcontains( "windowForeground" ) )
{
d->overrideWindowForeground = true;
d->overrideWindowForegroundCol = readColorEntry( &config, ( configFileName + "windowForeground" ).latin1(), 0 );
@@ -808,45 +810,45 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
mPainter.begin( &mask );
TQPixmap *tmp = borderPixmap( widget ) ->border( KThemePixmap::TopLeft );
- const TQBitmap *srcMask = tmp->mask();
+ const TQBitmap *srcMask = tmp->tqmask();
int bdWidth = tmp->width();
- bitBlt( pixmap, 0, 0, tmp, 0, 0, bdWidth, bdWidth,
- Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(pixmap), 0, 0, TQT_TQPAINTDEVICE(tmp), 0, 0, bdWidth, bdWidth,
+ TQt::CopyROP, false );
if ( srcMask )
- bitBlt( &mask, 0, 0, srcMask, 0, 0, bdWidth, bdWidth,
- Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&mask), 0, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth, bdWidth,
+ TQt::CopyROP, false );
else
mPainter.fillRect( 0, 0, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::TopRight );
- srcMask = tmp->mask();
- bitBlt( pixmap, w - bdWidth, 0, tmp, 0, 0, bdWidth,
- bdWidth, Qt::CopyROP, false );
+ srcMask = tmp->tqmask();
+ bitBlt( TQT_TQPAINTDEVICE(pixmap), w - bdWidth, 0, TQT_TQPAINTDEVICE(tmp), 0, 0, bdWidth,
+ bdWidth, TQt::CopyROP, false );
if ( srcMask )
- bitBlt( &mask, w - bdWidth, 0, srcMask, 0, 0, bdWidth,
- bdWidth, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&mask), w - bdWidth, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth,
+ bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, 0, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::BottomLeft );
- srcMask = tmp->mask();
- bitBlt( pixmap, 0, h - bdWidth, tmp, 0, 0, bdWidth,
- bdWidth, Qt::CopyROP, false );
+ srcMask = tmp->tqmask();
+ bitBlt( TQT_TQPAINTDEVICE(pixmap), 0, h - bdWidth, TQT_TQPAINTDEVICE(tmp), 0, 0, bdWidth,
+ bdWidth, TQt::CopyROP, false );
if ( srcMask )
- bitBlt( &mask, 0, h - bdWidth, srcMask, 0, 0, bdWidth,
- bdWidth, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&mask), 0, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0, bdWidth,
+ bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( 0, h - bdWidth, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::BottomRight );
- srcMask = tmp->mask();
- bitBlt( pixmap, w - bdWidth, h - bdWidth, tmp, 0, 0,
- bdWidth, bdWidth, Qt::CopyROP, false );
+ srcMask = tmp->tqmask();
+ bitBlt( TQT_TQPAINTDEVICE(pixmap), w - bdWidth, h - bdWidth, TQT_TQPAINTDEVICE(tmp), 0, 0,
+ bdWidth, bdWidth, TQt::CopyROP, false );
if ( srcMask )
- bitBlt( &mask, w - bdWidth, h - bdWidth, srcMask, 0, 0,
- bdWidth, bdWidth, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&mask), w - bdWidth, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ bdWidth, bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, h - bdWidth, bdWidth, bdWidth, color1 );
@@ -855,21 +857,21 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
if ( w - bdWidth * 2 > 0 )
{
tmp = borderPixmap( widget ) ->border( KThemePixmap::Top );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
p.drawTiledPixmap( bdWidth, 0, w - bdWidth * 2, bdWidth, *tmp );
if ( srcMask )
- bitBlt( &mask, bdWidth, 0, srcMask, 0, 0,
- w - bdWidth * 2, bdWidth, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&mask), bdWidth, 0, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ w - bdWidth * 2, bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( bdWidth, 0, w - bdWidth * 2, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::Bottom );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
p.drawTiledPixmap( bdWidth, h - bdWidth, w - bdWidth * 2, bdWidth,
*tmp );
if ( srcMask )
- bitBlt( &mask, bdWidth, h - bdWidth, srcMask, 0, 0,
- w - bdWidth * 2, bdWidth, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&mask), bdWidth, h - bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ w - bdWidth * 2, bdWidth, TQt::CopyROP, false );
else
mPainter.fillRect( bdWidth, h - bdWidth, w - bdWidth * 2, bdWidth,
color1 );
@@ -877,21 +879,21 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
if ( h - bdWidth * 2 > 0 )
{
tmp = borderPixmap( widget ) ->border( KThemePixmap::Left );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
p.drawTiledPixmap( 0, bdWidth, bdWidth, h - bdWidth * 2, *tmp );
if ( srcMask )
- bitBlt( &mask, 0, bdWidth, srcMask, 0, 0,
- bdWidth, h - bdWidth * 2, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&mask), 0, bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ bdWidth, h - bdWidth * 2, TQt::CopyROP, false );
else
mPainter.fillRect( 0, bdWidth, bdWidth, h - bdWidth * 2, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::Right );
- srcMask = tmp->mask();
+ srcMask = tmp->tqmask();
p.drawTiledPixmap( w - bdWidth, bdWidth, bdWidth, h - bdWidth * 2,
*tmp );
if ( srcMask )
- bitBlt( &mask, w - bdWidth, bdWidth, srcMask, 0, 0,
- bdWidth, h - bdWidth * 2, Qt::CopyROP, false );
+ bitBlt( TQT_TQPAINTDEVICE(&mask), w - bdWidth, bdWidth, KDE_TQBITMAP_TO_TQPAINTDEVICE(srcMask), 0, 0,
+ bdWidth, h - bdWidth * 2, TQt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, bdWidth, bdWidth, h - bdWidth * 2, color1 );
}
@@ -1030,7 +1032,7 @@ KThemePixmap* KThemeBase::gradient( int w, int h, WidgetType widget ) const
*grLowColors[ widget ],
KPixmapEffect::DiagonalGradient );
bitBlt( pixmaps[ widget ], offset, offset, &s, 0, 0, w - offset * 2,
- h - offset * 2, Qt::CopyROP );
+ h - offset * 2, TQt::CopyROP );
}
}
}
@@ -1089,7 +1091,7 @@ KThemePixmap* KThemeBase::scalePixmap( int w, int h, WidgetType widget ) const
}
TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg,
- Qt::GUIStyle )
+ TQt::GUIStyle )
{
if ( shading == Motif )
{
@@ -1098,12 +1100,12 @@ TQColorGroup* KThemeBase::makeColorGroup( const TQColor &fg, const TQColor &bg,
lowlightVal = 100 + ( ( 2 * d->contrast + 4 ) * 10 );
return ( new TQColorGroup( fg, bg, bg.light( highlightVal ),
bg.dark( lowlightVal ), bg.dark( 120 ),
- fg, TQApplication::palette().active().base() ) );
+ fg, TQApplication::tqpalette().active().base() ) );
}
else
return ( new TQColorGroup( fg, bg, bg.light( 150 ), bg.dark(),
bg.dark( 120 ), fg,
- TQApplication::palette().active().base() ) );
+ TQApplication::tqpalette().active().base() ) );
}
@@ -1269,22 +1271,22 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
TQStringList keys = config->entryList( base );
// Gradient low color or blend background
- if ( keys.contains( "GradientLow" ) )
+ if ( keys.tqcontains( "GradientLow" ) )
prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(),
- &TQApplication::palette().active().background() ).name();
+ &TQApplication::tqpalette().active().background() ).name();
// Gradient high color
- if ( keys.contains( "GradientHigh" ) )
+ if ( keys.tqcontains( "GradientHigh" ) )
prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(),
- &TQApplication::palette().active().foreground() ).name();
+ &TQApplication::tqpalette().active().foreground() ).name();
// Extended color attributes
- if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) )
+ if ( keys.tqcontains( "Foreground" ) || keys.tqcontains( "Background" ) )
{
TQColor fg, bg;
- if ( keys.contains( "Background" ) )
+ if ( keys.tqcontains( "Background" ) )
bg = readColorEntry( config, TQString( base + "Background" ).latin1(), &bg );
- if ( keys.contains( "Foreground" ) )
+ if ( keys.tqcontains( "Foreground" ) )
fg = readColorEntry( config, TQString( base + "Foreground" ).latin1(), &fg );
prop[ "Foreground" ] = fg.name();
prop[ "Background" ] = bg.name();
@@ -1318,7 +1320,7 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
prop[ "Width" ] = TQString::number( config->readNumEntry( base + "Width", 10 ) );
else if ( i == ComboBox || i == ComboBoxDown )
{
- if ( keys.contains( "Round" ) )
+ if ( keys.tqcontains( "Round" ) )
prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000"; // invalid, used w/multiple groups
@@ -1326,25 +1328,25 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
}
else if ( i == PushButton || i == PushButtonDown )
{
- if ( keys.contains( "XShift" ) )
+ if ( keys.tqcontains( "XShift" ) )
prop[ "XShift" ] = TQString::number( config->readNumEntry( base + "XShift", 0 ) );
else
prop[ "XShift" ] = "5000";
- if ( keys.contains( "YShift" ) )
+ if ( keys.tqcontains( "YShift" ) )
prop[ "YShift" ] = TQString::number( config->readNumEntry( base + "YShift", 0 ) );
else
prop[ "YShift" ] = "5000";
- if ( keys.contains( "3DFocusRect" ) )
+ if ( keys.tqcontains( "3DFocusRect" ) )
prop[ "3DFRect" ] = TQString::number( config->
readBoolEntry( base + "3DFocusRect", false ) );
else
prop[ "3DFRect" ] = "5000";
- if ( keys.contains( "3DFocusOffset" ) )
+ if ( keys.tqcontains( "3DFocusOffset" ) )
prop[ "3DFOffset" ] = TQString::number( config->
readBoolEntry( base + "3DFocusOffset", 0 ) );
else
prop[ "3DFOffset" ] = "5000";
- if ( keys.contains( "Round" ) )
+ if ( keys.tqcontains( "Round" ) )
prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000";
@@ -1411,7 +1413,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
// Blend intensity
tmpStr = prop[ "Blend" ];
if ( tmpStr.isEmpty() )
- tmpStr = TQString::fromLatin1( "0.0" );
+ tmpStr = TQString::tqfromLatin1( "0.0" );
blends[ i ] = tmpStr.toFloat();
// Bevel contrast
@@ -1427,7 +1429,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( gradients[ i ] != GrNone || blends[ i ] != 0.0 )
grLowColors[ i ] =
new TQColor( readColorEntry( prop, "GrLow",
- TQApplication::palette().active().
+ TQApplication::tqpalette().active().
background() ) );
else
grLowColors[ i ] = NULL;
@@ -1436,7 +1438,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( gradients[ i ] != GrNone )
grHighColors[ i ] =
new TQColor( readColorEntry( prop, "GrHigh",
- TQApplication::palette().active().
+ TQApplication::tqpalette().active().
background() ) );
else
grHighColors[ i ] = NULL;
@@ -1448,10 +1450,10 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
if ( fg.isValid() || bg.isValid() )
{
if ( !fg.isValid() )
- fg = TQApplication::palette().active().foreground();
+ fg = TQApplication::tqpalette().active().foreground();
if ( !bg.isValid() )
- bg = TQApplication::palette().active().background();
- colors[ i ] = makeColorGroup( fg, bg, Qt::WindowsStyle );
+ bg = TQApplication::tqpalette().active().background();
+ colors[ i ] = makeColorGroup( fg, bg, TQt::WindowsStyle );
}
else
colors[ i ] = NULL;
@@ -1607,7 +1609,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
{
if ( isColor( Background ) )
{
- background = colorGroup( pal.active(), Background )
+ background = tqcolorGroup( pal.active(), Background )
->background();
}
if ( isPixmap( Background ) )
@@ -1620,7 +1622,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
background.dark( lowlightVal ), background.dark( 120 ),
baseText, buttonText /*CHECKME: BrightText*/, base, background );
- buttonText = colorGroup( pre, PushButton ) ->foreground();
+ buttonText = tqcolorGroup( pre, PushButton ) ->foreground();
}
TQColor disfg = foreground;
@@ -1763,7 +1765,7 @@ KThemePixmap* KThemeCache::pixmap( int w, int h, int widgetID, bool border,
key.data.border = border;
key.data.mask = mask;
- KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
+ KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
@@ -1778,7 +1780,7 @@ KThemePixmap* KThemeCache::horizontalPixmap( int w, int widgetID )
key.data.height = 0;
key.data.border = false;
key.data.mask = false;
- KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
+ KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
@@ -1793,7 +1795,7 @@ KThemePixmap* KThemeCache::verticalPixmap( int h, int widgetID )
key.data.height = h;
key.data.border = false;
key.data.mask = false;
- KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
+ KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
@@ -1812,7 +1814,7 @@ bool KThemeCache::insert( KThemePixmap *pixmap, ScaleHint scale, int widgetID,
key.data.border = border;
key.data.mask = mask;
- if ( cache.find( ( unsigned long ) key.cacheKey, true ) != NULL )
+ if ( cache.tqfind( ( unsigned long ) key.cacheKey, true ) != NULL )
{
return ( true ); // a pixmap of this scale is already in there
}
diff --git a/kstyles/kthemestyle/kthemebase.h b/kstyles/kthemestyle/kthemebase.h
index 6da89cc3e..3f0c59bab 100644
--- a/kstyles/kthemestyle/kthemebase.h
+++ b/kstyles/kthemestyle/kthemebase.h
@@ -120,7 +120,7 @@ inline bool KThemePixmap::isOld()
* @author Daniel M. Duley <mosfet@kde.org>
*
*/
-class KThemeCache : public QObject
+class KThemeCache : public TQObject
{
Q_OBJECT
public:
@@ -300,12 +300,12 @@ public:
* If a color group is set in the theme configuration
* that is used, otherwise defaultColor is returned.
*
- * @param defaultGroup The colorGroup to set if one is available.
+ * @param defaultGroup The tqcolorGroup to set if one is available.
*
* @param widget The widget whose color group to retrieve.
*
*/
- const TQColorGroup* colorGroup( const TQColorGroup &defaultGroup,
+ const TQColorGroup* tqcolorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const;
TQBrush pixmapBrush( const TQColorGroup &group, TQColorGroup::ColorRole role,
@@ -473,7 +473,7 @@ protected:
* calculated a little differently for Motif vs Windows styles. This
* is obsolete.
*/
- void readConfig( Qt::GUIStyle colorStyle = Qt::WindowsStyle );
+ void readConfig( TQt::GUIStyle colorStyle = TQt::WindowsStyle );
void readWidgetConfig( int i, TQSettings *config, TQString *pixnames,
TQString *brdnames, bool *loadArray );
void copyWidgetConfig( int sourceID, int destID, TQString *pixnames,
@@ -484,7 +484,7 @@ protected:
* versions.
*/
TQColorGroup* makeColorGroup( const TQColor &fg, const TQColor &bg,
- Qt::GUIStyle style = Qt::WindowsStyle );
+ TQt::GUIStyle style = TQt::WindowsStyle );
KThemePixmap* scale( int w, int h, WidgetType widget ) const;
KThemePixmap* scaleBorder( int w, int h, WidgetType type ) const;
KThemePixmap* gradient( int w, int h, WidgetType widget ) const ;
@@ -508,21 +508,21 @@ protected:
/**
These are included for fuuture extension purposes..
*/
- virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const
+ virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const
{
- return KStyle::pixelMetric( metric, widget );
+ return KStyle::tqpixelMetric( metric, widget );
}
virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
SFlags flags = Style_Default,
const TQStyleOption& option = TQStyleOption::Default ) const
{
- KStyle::drawPrimitive ( pe, p, r, cg,
+ KStyle::tqdrawPrimitive ( pe, p, r, cg,
flags, option );
}
- virtual void drawControl( ControlElement element,
+ virtual void tqdrawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -530,21 +530,21 @@ protected:
SFlags how = Style_Default,
const TQStyleOption& opt = TQStyleOption::Default ) const
{
- KStyle::drawControl( element, p, widget,
+ KStyle::tqdrawControl( element, p, widget,
r, cg, how, opt );
}
- virtual void drawControlMask( ControlElement element,
+ virtual void tqdrawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& opt = TQStyleOption::Default ) const
{
- KStyle::drawControlMask( element, p, widget, r, opt );
+ KStyle::tqdrawControlMask( element, p, widget, r, opt );
}
- virtual void drawComplexControl( ComplexControl control,
+ virtual void tqdrawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget* widget,
const TQRect &r,
@@ -554,7 +554,7 @@ protected:
SCFlags active = SC_None,
const TQStyleOption& opt = TQStyleOption::Default ) const
{
- KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ KStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
}
@@ -572,12 +572,12 @@ protected:
}
- virtual int styleHint( StyleHint sh,
+ virtual int tqstyleHint( StyleHint sh,
const TQWidget *widget = 0,
const TQStyleOption& opt = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const
{
- return KStyle::styleHint( sh,
+ return KStyle::tqstyleHint( sh,
widget,
opt,
returnData );
@@ -588,7 +588,7 @@ protected:
const TQSize &contentsSize,
const TQStyleOption& opt = TQStyleOption::Default ) const
{
- return KStyle::sizeFromContents( contents,
+ return KStyle::tqsizeFromContents( contents,
widget, contentsSize, opt );
}
@@ -731,7 +731,7 @@ inline TQBrush KThemeBase::pixmapBrush( const TQColorGroup &group,
return ( group.color( role ) );
}
-inline const TQColorGroup* KThemeBase::colorGroup( const TQColorGroup &defaultGroup,
+inline const TQColorGroup* KThemeBase::tqcolorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const
{
return ( ( colors[ widget ] ) ? colors[ widget ] : &defaultGroup );
diff --git a/kstyles/kthemestyle/kthemestyle.cpp b/kstyles/kthemestyle/kthemestyle.cpp
index 4927c67bc..6b1e18e82 100644
--- a/kstyles/kthemestyle/kthemestyle.cpp
+++ b/kstyles/kthemestyle/kthemestyle.cpp
@@ -76,18 +76,18 @@ Port version 0.9.7
#include <dlfcn.h>
#endif
-static const QCOORD u_arrow[] = { -1, -3, 0, -3, -2, -2, 1, -2, -3, -1, 2, -1, -4, 0, 3, 0, -4, 1, 3, 1};
-static const QCOORD d_arrow[] = { -4, -2, 3, -2, -4, -1, 3, -1, -3, 0, 2, 0, -2, 1, 1, 1, -1, 2, 0, 2};
-static const QCOORD l_arrow[] = { -3, -1, -3, 0, -2, -2, -2, 1, -1, -3, -1, 2, 0, -4, 0, 3, 1, -4, 1, 3};
-static const QCOORD r_arrow[] = { -2, -4, -2, 3, -1, -4, -1, 3, 0, -3, 0, 2, 1, -2, 1, 1, 2, -1, 2, 0};
+static const TQCOORD u_arrow[] = { -1, -3, 0, -3, -2, -2, 1, -2, -3, -1, 2, -1, -4, 0, 3, 0, -4, 1, 3, 1};
+static const TQCOORD d_arrow[] = { -4, -2, 3, -2, -4, -1, 3, -1, -3, 0, 2, 0, -2, 1, 1, 1, -1, 2, 0, 2};
+static const TQCOORD l_arrow[] = { -3, -1, -3, 0, -2, -2, -2, 1, -1, -3, -1, 2, 0, -4, 0, 3, 1, -4, 1, 3};
+static const TQCOORD r_arrow[] = { -2, -4, -2, 3, -1, -4, -1, 3, 0, -3, 0, 2, 1, -2, 1, 1, 2, -1, 2, 0};
-const QCOORD win_style_u_arrow[] = { 0, -2, 0, -2, -1, -1, 1, -1, -2, 0, 2, 0, -3, 1, 3, 1 };
-const QCOORD win_style_d_arrow[] = { -3, -2, 3, -2, -2, -1, 2, -1, -1, 0, 1, 0, 0, 1, 0, 1 };
-const QCOORD win_style_l_arrow[] = { 1, -3, 1, -3, 0, -2, 1, -2, -1, -1, 1, -1, -2, 0, 1, 0, -1, 1, 1, 1, 0, 2, 1, 2, 1, 3, 1, 3 };
-const QCOORD win_style_r_arrow[] = { -2, -3, -2, -3, -2, -2, -1, -2, -2, -1, 0, -1, -2, 0, 1, 0, -2, 1, 0, 1, -2, 2, -1, 2, -2, 3, -2, 3 };
+const TQCOORD win_style_u_arrow[] = { 0, -2, 0, -2, -1, -1, 1, -1, -2, 0, 2, 0, -3, 1, 3, 1 };
+const TQCOORD win_style_d_arrow[] = { -3, -2, 3, -2, -2, -1, 2, -1, -1, 0, 1, 0, 0, 1, 0, 1 };
+const TQCOORD win_style_l_arrow[] = { 1, -3, 1, -3, 0, -2, 1, -2, -1, -1, 1, -1, -2, 0, 1, 0, -1, 1, 1, 1, 0, 2, 1, 2, 1, 3, 1, 3 };
+const TQCOORD win_style_r_arrow[] = { -2, -3, -2, -3, -2, -2, -1, -2, -2, -1, 0, -1, -2, 0, 1, 0, -2, 1, 0, 1, -2, 2, -1, 2, -2, 3, -2, 3 };
-#define QCOORDARRLEN(x) sizeof(x)/(sizeof(QCOORD)*2)
+#define TQCOORDARRLEN(x) sizeof(x)/(sizeof(TQCOORD)*2)
static const int itemFrame = 2;
@@ -107,7 +107,7 @@ Sliders are not disabled properly
*/
-class KThemeStylePlugin : public QStylePlugin
+class KThemeStylePlugin : public TQStylePlugin
{
public:
@@ -169,25 +169,25 @@ void kDrawWindowsArrow ( TQPainter *p, const TQStyle* style, TQStyle::PrimitiveE
switch ( pe )
{
case TQStyle::PE_ArrowUp:
- a.setPoints( QCOORDARRLEN( win_style_u_arrow ), win_style_u_arrow );
+ a.setPoints( TQCOORDARRLEN( win_style_u_arrow ), win_style_u_arrow );
break;
case TQStyle::PE_ArrowDown:
- a.setPoints( QCOORDARRLEN( win_style_d_arrow ), win_style_d_arrow );
+ a.setPoints( TQCOORDARRLEN( win_style_d_arrow ), win_style_d_arrow );
break;
case TQStyle::PE_ArrowLeft:
- a.setPoints( QCOORDARRLEN( win_style_l_arrow ), win_style_l_arrow );
+ a.setPoints( TQCOORDARRLEN( win_style_l_arrow ), win_style_l_arrow );
break;
default:
- a.setPoints( QCOORDARRLEN( win_style_r_arrow ), win_style_r_arrow );
+ a.setPoints( TQCOORDARRLEN( win_style_r_arrow ), win_style_r_arrow );
}
p->save();
if ( down )
{
- p->translate( style->pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
- style->pixelMetric( TQStyle::PM_ButtonShiftVertical ) );
+ p->translate( style->tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ style->tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) );
}
if ( enabled )
@@ -226,8 +226,8 @@ TQSize KThemeStyle::sizeFromContents( ContentsType contents,
const TQPushButton * button = ( const TQPushButton* ) widget;
int w = contentSize.width();
int h = contentSize.height();
- int bm = pixelMetric( PM_ButtonMargin, widget );
- int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int bm = tqpixelMetric( PM_ButtonMargin, widget );
+ int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
w += bm + fw + 6; // ### Add 6 to make way for bold font.
h += bm + fw;
@@ -260,8 +260,8 @@ TQSize KThemeStyle::sizeFromContents( ContentsType contents,
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;
}
@@ -286,7 +286,7 @@ TQSize KThemeStyle::sizeFromContents( ContentsType contents,
2 * itemFrame );
}
- if ( ! mi->text().isNull() && mi->text().find( '\t' ) >= 0 )
+ if ( ! mi->text().isNull() && mi->text().tqfind( '\t' ) >= 0 )
w += 12;
else if ( mi->popup() )
w += 2 * arrowHMargin;
@@ -320,8 +320,8 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const
{
TQRect bounding = cb->rect();
- int cw = pixelMetric(PM_IndicatorWidth, widget);
- int ch = pixelMetric(PM_IndicatorHeight, widget);
+ int cw = tqpixelMetric(PM_IndicatorWidth, widget);
+ int ch = tqpixelMetric(PM_IndicatorHeight, widget);
TQRect checkbox(bounding.x() + 2, bounding.y() + 2 + (bounding.height() - ch)/2, cw - 4, ch - 4);
@@ -331,7 +331,7 @@ TQRect KThemeStyle::subRect(SubRect sr, const TQWidget* widget) const
return KStyle::subRect(sr, widget);
}
-int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) const
+int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) const
{
switch ( metric )
{
@@ -361,26 +361,26 @@ int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) con
if ( isPixmap( ExIndicatorOn ) )
return ( uncached( ExIndicatorOn ) ->size().width() );
else
- return KThemeBase::pixelMetric ( metric, widget );
+ return KThemeBase::tqpixelMetric ( metric, widget );
case PM_ExclusiveIndicatorHeight:
if ( isPixmap( ExIndicatorOn ) )
return ( uncached( ExIndicatorOn ) ->size().height() );
else
- return KThemeBase::pixelMetric ( metric, widget );
+ return KThemeBase::tqpixelMetric ( metric, widget );
case PM_IndicatorWidth:
if ( isPixmap( IndicatorOn ) )
return ( uncached( IndicatorOn ) ->size().width() );
else
- return KThemeBase::pixelMetric ( metric, widget );
+ return KThemeBase::tqpixelMetric ( metric, widget );
case PM_IndicatorHeight:
if ( isPixmap( IndicatorOn ) )
return ( uncached( IndicatorOn ) ->size().height() );
else
- return KThemeBase::pixelMetric ( metric, widget );
+ return KThemeBase::tqpixelMetric ( metric, widget );
case PM_SliderLength:
return ( sliderButtonLength() );
@@ -389,7 +389,7 @@ int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) con
return ( splitWidth() );
default:
- return KThemeBase::pixelMetric ( metric, widget );
+ return KThemeBase::tqpixelMetric ( metric, widget );
}
}
@@ -458,7 +458,7 @@ void KThemeStyle::paletteChanged()
void KThemeStyle::unPolish( TQApplication *app )
{
- app->setPalette( oldPalette, true );
+ app->tqsetPalette( oldPalette, true );
}
bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
@@ -468,9 +468,9 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
if(event->type() == TQEvent::Move || event->type() == TQEvent::Resize ||
event->type() == TQEvent::Show)
{
- TQWidget *w = static_cast<TQWidget*>(object);
+ TQWidget *w = TQT_TQWIDGET(object);
TQPoint pos(0, 0);
- pos = w->mapTo(w->topLevelWidget(), pos);
+ pos = w->mapTo(w->tqtopLevelWidget(), pos);
TQPixmap pix(uncached( Background )->size());
TQPainter p;
p.begin(&pix);
@@ -490,9 +490,9 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
}
if (!qstrcmp(object->name(), "kde toolbar widget") && object->inherits("QLabel"))
{
- TQWidget* lb = static_cast<TQWidget*>(object);
- if (lb->backgroundMode() == Qt::PaletteButton)
- lb->setBackgroundMode(Qt::PaletteBackground);
+ TQWidget* lb = TQT_TQWIDGET(object);
+ if (lb->backgroundMode() == TQt::PaletteButton)
+ lb->setBackgroundMode(TQt::PaletteBackground);
lb->removeEventFilter(this);
}
@@ -501,10 +501,10 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
void KThemeStyle::polish( TQWidget *w )
{
- if (::qt_cast<TQStatusBar*>(w))
+ if (::tqqt_cast<TQStatusBar*>(w))
w->setPaletteBackgroundColor(TQApplication::palette().color(TQPalette::Normal, TQColorGroup::Background));
- if (::qt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
+ if (::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
w->installEventFilter(this);
if (w->backgroundPixmap() && !w->isTopLevel() &&
@@ -543,7 +543,7 @@ void KThemeStyle::polish( TQWidget *w )
return ;
}
- if ( ::qt_cast<TQMenuBar*>(w) )
+ if ( ::tqqt_cast<TQMenuBar*>(w) )
{
w->setBackgroundMode( TQWidget::NoBackground );
}
@@ -551,7 +551,7 @@ void KThemeStyle::polish( TQWidget *w )
{
w->setBackgroundMode( TQWidget::PaletteBackground );
}
- else if ( ::qt_cast<TQPopupMenu*>(w) )
+ else if ( ::tqqt_cast<TQPopupMenu*>(w) )
{
popupPalette = w->palette();
if ( isColor( MenuItem ) || isColor( MenuItemDown ) )
@@ -559,46 +559,46 @@ void KThemeStyle::polish( TQWidget *w )
TQPalette newPal( w->palette() );
if ( isColor( MenuItem ) )
{
- newPal.setActive( *colorGroup( newPal.active(), MenuItem ) );
- newPal.setDisabled( *colorGroup( newPal.active(), MenuItem ) );
+ newPal.setActive( *tqcolorGroup( newPal.active(), MenuItem ) );
+ newPal.setDisabled( *tqcolorGroup( newPal.active(), MenuItem ) );
}
if ( isColor( MenuItemDown ) )
{
- newPal.setActive( *colorGroup( newPal.active(), MenuItemDown ) );
+ newPal.setActive( *tqcolorGroup( newPal.active(), MenuItemDown ) );
}
w->setPalette( newPal );
}
w->setBackgroundMode( TQWidget::NoBackground );
}
- else if ( ::qt_cast<TQCheckBox*>(w) )
+ else if ( ::tqqt_cast<TQCheckBox*>(w) )
{
if ( isColor( IndicatorOff ) || isColor( IndicatorOn ) )
{
TQPalette newPal( w->palette() );
if ( isColor( IndicatorOff ) )
{
- newPal.setActive( *colorGroup( newPal.active(), IndicatorOff ) );
- newPal.setDisabled( *colorGroup( newPal.active(), IndicatorOff ) );
+ newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOff ) );
+ newPal.setDisabled( *tqcolorGroup( newPal.active(), IndicatorOff ) );
}
if ( isColor( IndicatorOn ) )
- newPal.setActive( *colorGroup( newPal.active(), IndicatorOn ) );
+ newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOn ) );
w->setPalette( newPal );
}
}
- else if ( ::qt_cast<TQRadioButton*>(w) )
+ else if ( ::tqqt_cast<TQRadioButton*>(w) )
{
if ( isColor( ExIndicatorOff ) || isColor( ExIndicatorOn ) )
{
TQPalette newPal( w->palette() );
if ( isColor( ExIndicatorOff ) )
{
- newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOff ) );
- newPal.setDisabled( *colorGroup( newPal.active(),
+ newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOff ) );
+ newPal.setDisabled( *tqcolorGroup( newPal.active(),
ExIndicatorOff ) );
}
if ( isColor( ExIndicatorOn ) )
- newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOn ) );
+ newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOn ) );
w->setPalette( newPal );
}
}
@@ -618,21 +618,21 @@ void KThemeStyle::unPolish( TQWidget* w )
}
//Toolbar labels should nornally be PaletteButton
- if ( ::qt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
+ if ( ::tqqt_cast<TQLabel*>(w) && !qstrcmp(w->name(), "kde toolbar widget"))
w->setBackgroundMode( TQWidget::PaletteButton );
//The same for menu bars, popup menus
- else if ( ::qt_cast<TQMenuBar*>(w) || ::qt_cast<TQPopupMenu*>(w) )
+ else if ( ::tqqt_cast<TQMenuBar*>(w) || ::tqqt_cast<TQPopupMenu*>(w) )
w->setBackgroundMode( TQWidget::PaletteButton );
- //For toolbar internal separators, return to button, too (can't use qt_cast here since don't have access to the class)
+ //For toolbar internal separators, return to button, too (can't use tqqt_cast here since don't have access to the class)
else if ( w->inherits( "KToolBarSeparator" ) || w->inherits( "QToolBarSeparator" ) )
w->setBackgroundMode( TQWidget::PaletteButton );
//For scrollbars, we don't do much, since the widget queries the style on the switch
//Drop some custom palettes. ### this really should check the serial number to be 100% correct.
- if ( ::qt_cast<TQPopupMenu*>(w) || ::qt_cast<TQCheckBox*>(w) || ::qt_cast<TQRadioButton*>(w) || ::qt_cast<TQStatusBar*>(w) )
+ if ( ::tqqt_cast<TQPopupMenu*>(w) || ::tqqt_cast<TQCheckBox*>(w) || ::tqqt_cast<TQRadioButton*>(w) || ::tqqt_cast<TQStatusBar*>(w) )
w->unsetPalette();
KStyle::unPolish( w );
@@ -650,8 +650,8 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h,
if ( gradientHint( type ) == GrReverseBevel )
{
int i;
- bitBlt( p->device(), x, y, scalePixmap( w, h, type ), 0, 0, w, h,
- Qt::CopyROP, true );
+ bitBlt( p->tqdevice(), x, y, TQT_TQPAINTDEVICE(scalePixmap( w, h, type )), 0, 0, w, h,
+ TQt::CopyROP, true );
p->setPen( g.text() );
for ( i = 0; i < borderWidth( type ); ++i, ++x, ++y, w -= 2, h -= 2 )
p->drawRect( x, y, w, h );
@@ -690,8 +690,8 @@ void KThemeStyle::drawBaseButton( TQPainter *p, int x, int y, int w, int h,
}
if ( borderPixmap( type ) )
{
- bitBlt( p->device(), x, y, scaleBorder( w, h, type ), 0, 0, w, h,
- Qt::CopyROP, false );
+ bitBlt( p->tqdevice(), x, y, TQT_TQPAINTDEVICE(scaleBorder( w, h, type )), 0, 0, w, h,
+ TQt::CopyROP, false );
}
else
drawShade( p, x, y, w, h, g, sunken, rounded,
@@ -757,11 +757,11 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
return ;
}
- const TQColorGroup *cg = colorGroup( g, widget );
+ const TQColorGroup *cg = tqcolorGroup( g, widget );
// Standard arrow types
if ( arrowType() == MotifArrow )
{
- mtfstyle->drawPrimitive( pe, p, r, g, flags, opt );
+ mtfstyle->tqdrawPrimitive( pe, p, r, g, flags, opt );
handled = true;
}
@@ -773,26 +773,26 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
switch ( pe )
{
case PE_ArrowUp:
- a.setPoints( QCOORDARRLEN( u_arrow ), u_arrow );
+ a.setPoints( TQCOORDARRLEN( u_arrow ), u_arrow );
break;
case PE_ArrowDown:
- a.setPoints( QCOORDARRLEN( d_arrow ), d_arrow );
+ a.setPoints( TQCOORDARRLEN( d_arrow ), d_arrow );
break;
case PE_ArrowLeft:
- a.setPoints( QCOORDARRLEN( l_arrow ), l_arrow );
+ a.setPoints( TQCOORDARRLEN( l_arrow ), l_arrow );
break;
default:
- a.setPoints( QCOORDARRLEN( r_arrow ), r_arrow );
+ a.setPoints( TQCOORDARRLEN( r_arrow ), r_arrow );
}
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 )
{
@@ -846,7 +846,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
case PE_ButtonBevel:
{
WidgetType type = ( sunken || on || down ) ? BevelDown : Bevel;
- drawBaseButton( p, x, y, w, h, *colorGroup( g, type ), ( sunken || on || down ), false, type );
+ drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, type ), ( sunken || on || down ), false, type );
handled = true;
break;
}
@@ -859,7 +859,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
}
case PE_PanelDockWindow:
{
- drawBaseButton( p, x, y, w, h, *colorGroup( g, ToolBar ), false, false,
+ drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, ToolBar ), false, false,
ToolBar );
handled = true;
break;
@@ -895,7 +895,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
{
if ( isPixmap( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) )
{
- const TQBitmap * mask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->mask();
+ const TQBitmap * mask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->tqmask();
if ( mask )
{
p->setPen( Qt::color1 );
@@ -913,7 +913,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
if ( isPixmap( ( flags & Style_On ) ? IndicatorOn : IndicatorOff ) )
{
const TQBitmap * mask = uncached( ( flags & Style_On ) ? IndicatorOn :
- IndicatorOff ) ->mask();
+ IndicatorOff ) ->tqmask();
if ( mask )
{
p->setPen( Qt::color1 );
@@ -938,7 +938,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
}
case PE_Splitter:
{
- drawBaseButton( p, x, y, w, h, *colorGroup( g, Splitter ), false, false,
+ drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, Splitter ), false, false,
Splitter );
handled = true;
break;
@@ -977,10 +977,10 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
if ( !isPixmap( widget ) )
{
- p->fillRect( r, colorGroup( g, widget ) ->brush( TQColorGroup::Background ) );
+ p->fillRect( r, tqcolorGroup( g, widget ) ->brush( TQColorGroup::Background ) );
// Do the borders and frame
drawShade( p, r.x(), r.y(), r.width(),
- r.height(), *colorGroup( g, widget ), true, false,
+ r.height(), *tqcolorGroup( g, widget ), true, false,
highlightWidth( widget ), borderWidth( widget ), shade() );
}
else
@@ -991,7 +991,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
*scalePixmap( r.width(), r.height(),
widget ) );
drawShade( p, r.x(), r.y(), r.width(),
- r.height(), *colorGroup( g, widget ), true, false,
+ r.height(), *tqcolorGroup( g, widget ), true, false,
highlightWidth( widget ), borderWidth( widget ), shade() );
}
@@ -1002,12 +1002,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
{
bool horizontal = ( flags & Style_Horizontal );
drawBaseButton( p, r.x(), r.y(), r.width(), r.height(),
- *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
down, false, down ? ScrollButtonDown : ScrollButton );
- drawPrimitive( ( horizontal ) ? PE_ArrowRight : PE_ArrowDown, p ,
+ tqdrawPrimitive( ( horizontal ) ? PE_ArrowRight : PE_ArrowDown, p ,
TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
- *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
flags );
handled = true;
@@ -1017,12 +1017,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
{
bool horizontal = ( flags & Style_Horizontal );
drawBaseButton( p, r.x(), r.y(), r.width(), r.height(),
- *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
down, false, down ? ScrollButtonDown : ScrollButton );
- drawPrimitive( ( horizontal ) ? PE_ArrowLeft : PE_ArrowUp, p ,
+ tqdrawPrimitive( ( horizontal ) ? PE_ArrowLeft : PE_ArrowUp, p ,
TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
- *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
flags );
handled = true;
break;
@@ -1038,7 +1038,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
active ? HScrollBarSliderDown : HScrollBarSlider :
active ? VScrollBarSliderDown : VScrollBarSlider;
drawBaseButton( p, r.x()+offsetH, r.y()+offsetV, r.width()-2*offsetH,
- r.height()-2*offsetV, *colorGroup( g, widget ), active, false,
+ r.height()-2*offsetV, *tqcolorGroup( g, widget ), active, false,
widget );
int spaceW = horizontal ? r.width() - decoWidth( widget ) - 4 :
@@ -1086,7 +1086,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
return menuCache;
}
- const TQColorGroup *g = colorGroup( TQApplication::palette().active(), MenuBar);
+ const TQColorGroup *g = tqcolorGroup( TQApplication::tqpalette().active(), MenuBar);
menuCache = new TQPixmap ( w, h );
TQPainter p(menuCache);
@@ -1096,7 +1096,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
}
-void KThemeStyle::drawControl( ControlElement element,
+void KThemeStyle::tqdrawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1115,9 +1115,9 @@ void KThemeStyle::drawControl( ControlElement element,
{
const TQPushButton * btn = ( const TQPushButton* ) widget;
bool sunken = btn->isOn() || btn->isDown();
- int diw = pixelMetric( PM_ButtonDefaultIndicator, btn );
+ int diw = tqpixelMetric( PM_ButtonDefaultIndicator, btn );
drawBaseButton( p, diw, diw, w - 2 * diw, h - 2 * diw,
- *colorGroup( btn->colorGroup(), sunken ? PushButtonDown :
+ *tqcolorGroup( btn->tqcolorGroup(), sunken ? PushButtonDown :
PushButton ), sunken, roundButton(),
sunken ? PushButtonDown : PushButton );
// TODO if diw, draw fancy default button indicator
@@ -1134,16 +1134,16 @@ void KThemeStyle::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 );
how |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() )
{
- int dx = pixelMetric( PM_MenuButtonIndicator, widget );
- drawPrimitive( PE_ArrowDown, p, TQRect( x + w - dx - 2, y + 2, dx, h - 4 ),
+ int dx = tqpixelMetric( PM_MenuButtonIndicator, widget );
+ tqdrawPrimitive( PE_ArrowDown, p, TQRect( x + w - dx - 2, y + 2, dx, h - 4 ),
cg, how, opt );
w -= dx;
}
@@ -1177,49 +1177,49 @@ void KThemeStyle::drawControl( ControlElement element,
if ( active || button->isDefault() && button->isEnabled() )
{
// Draw "fake" bold text - this enables the font metrics to remain
- // the same as computed in TQPushButton::sizeHint(), but gives
+ // the same as computed in TQPushButton::tqsizeHint(), but gives
// a reasonable bold effect.
int i;
// Text shadow
for ( i = 0; i < 2; i++ )
drawItem( p, TQRect( x + i + 1, y + 1, w, h ), AlignCenter | ShowPrefix,
- button->colorGroup(), button->isEnabled(), NULL,
+ button->tqcolorGroup(), button->isEnabled(), NULL,
button->text(), -1,
- active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
+ active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() );
// Normal Text
for ( i = 0; i < 2; i++ )
drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix,
- button->colorGroup(), true, i == 0 ? button->pixmap() : NULL,
+ button->tqcolorGroup(), true, i == 0 ? button->pixmap() : NULL,
button->text(), -1,
- active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
+ active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
}
else
{
if ( button->isEnabled() )
{
- drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
true, button->pixmap(), button->text(), -1,
- active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
+ active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
}
else
{
//TODO: Handle reversed
- drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
true, button->pixmap(), button->text(), -1,
- &button->colorGroup().light() );
+ &button->tqcolorGroup().light() );
- drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
true, button->pixmap(), button->text(), -1,
- &button->colorGroup().buttonText() );
+ &button->tqcolorGroup().buttonText() );
}
}
// Draw a focus rect if the button has focus
if ( how & Style_HasFocus )
- drawPrimitive( PE_FocusRect, p,
- TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ tqdrawPrimitive( PE_FocusRect, p,
+ TQStyle::tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, how );
handled = true;
break;
@@ -1228,7 +1228,7 @@ void KThemeStyle::drawControl( ControlElement element,
case CE_MenuBarEmptyArea:
{
//Expand to cover entire region
- drawPrimitive(PE_PanelMenuBar, p,
+ tqdrawPrimitive(PE_PanelMenuBar, p,
TQRect(0,0,r.width()+r.x()*2, r.height()+r.y()*2),
cg, Style_Default);
handled = true;
@@ -1238,10 +1238,10 @@ void KThemeStyle::drawControl( ControlElement element,
case CE_TabBarTab:
{
const TQTabBar* tb = ( const TQTabBar* ) widget;
- TQTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = tb->tqshape();
bool selected = how & Style_Selected;
WidgetType widget = selected ? ActiveTab : InactiveTab;
- const TQColorGroup *cg = colorGroup( tb->colorGroup(), widget );
+ const TQColorGroup *cg = tqcolorGroup( tb->tqcolorGroup(), widget );
int i;
int x2 = x + w - 1, y2 = y + h - 1;
int bWidth = borderWidth( widget );
@@ -1252,7 +1252,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( !selected )
{
p->fillRect( x, y, x2 - x + 1, 2,
- tb->palette().active().brush( TQColorGroup::Background ) );
+ tb->tqpalette().active().brush( TQColorGroup::Background ) );
y += 2;
}
p->setPen( cg->text() );
@@ -1314,8 +1314,8 @@ void KThemeStyle::drawControl( ControlElement element,
else
p->fillRect( x, y, x2 - x + 1, y2 - y + 1, cg->background() );
}
- else if ( tb->shape() == TQTabBar::RoundedBelow ||
- tb->shape() == TQTabBar::TriangularBelow )
+ else if ( tb->tqshape() == TQTabBar::RoundedBelow ||
+ tb->tqshape() == TQTabBar::TriangularBelow )
{
if ( widget == ActiveTab )
widget = RotActiveTab;
@@ -1325,7 +1325,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( !selected )
{
p->fillRect( x, y2 - 2, x2 - x + 1, 2,
- tb->palette().active().brush( TQColorGroup::Background ) );
+ tb->tqpalette().active().brush( TQColorGroup::Background ) );
y2 -= 2;
}
p->setPen( cg->text() );
@@ -1397,7 +1397,7 @@ void KThemeStyle::drawControl( ControlElement element,
TQRect pr = mb->rect();
bool active = how & Style_Active;
//bool focused = how & Style_HasFocus;
- const TQColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar );
+ const TQColorGroup *g = tqcolorGroup( cg, active ? MenuBarItem : MenuBar );
TQColor btext = g->buttonText();
TQPixmap* cache = makeMenuBarCache(pr.width(), pr.height());
@@ -1439,10 +1439,10 @@ void KThemeStyle::drawControl( ControlElement element,
bool enabled = (mi? mi->isEnabled():true);
bool checkable = popupmenu->isCheckable();
bool active = how & Style_Active;
- bool etchtext = styleHint( SH_EtchDisabledText, 0 );
+ bool etchtext = tqstyleHint( SH_EtchDisabledText, 0 );
bool reverse = TQApplication::reverseLayout();
- const TQColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem );
+ const TQColorGroup& cg_ours = *tqcolorGroup( cg, active ? MenuItemDown : MenuItem );
//TQColor btext = cg_ours.buttonText();
@@ -1464,7 +1464,7 @@ void KThemeStyle::drawControl( ControlElement element,
drawBaseButton( p, x, y, w, h, cg_ours, true, false, MenuItemDown );
else
{
- drawShade( p, x, y, w, h, *colorGroup( cg_ours, MenuItem ), false, false,
+ drawShade( p, x, y, w, h, *tqcolorGroup( cg_ours, MenuItem ), false, false,
highlightWidth( MenuItem ), borderWidth( MenuItem ),
shade() );
int dw = decoWidth( MenuItem );
@@ -1474,7 +1474,7 @@ void KThemeStyle::drawControl( ControlElement element,
x + dw, y + dw, w - dw * 2, h - dw * 2,
cg_ours.brush( TQColorGroup::Background ) );
//cg.brush( TQColorGroup::Background ));
- //colorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) );
+ //tqcolorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) );
}
else
{
@@ -1492,7 +1492,7 @@ void KThemeStyle::drawControl( ControlElement element,
if ( mi->iconSet() )
{
TQIconSet::Mode mode;
- TQRect cr = visualRect( TQRect( x, y, checkcol, h ), r );
+ TQRect cr = tqvisualRect( TQRect( x, y, checkcol, h ), r );
// Select the correct icon from the iconset
if ( active )
@@ -1503,7 +1503,7 @@ void KThemeStyle::drawControl( ControlElement element,
// Do we have an icon and are checked at the same time?
// Then draw a "pressed" background behind the icon
if ( checkable && mi->isChecked() ) //!active && -- ??
- drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *colorGroup( cg_ours, BevelDown ), true, false, BevelDown );
+ drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *tqcolorGroup( cg_ours, BevelDown ), true, false, BevelDown );
// Draw the icon
TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode );
@@ -1530,7 +1530,7 @@ void KThemeStyle::drawControl( ControlElement element,
SFlags cflags = Style_Default;
cflags |= active ? Style_Enabled : Style_On;
- drawPrimitive( PE_CheckMark, p, TQRect( cx + itemFrame, y + itemFrame,
+ tqdrawPrimitive( PE_CheckMark, p, TQRect( cx + itemFrame, y + itemFrame,
checkcol - itemFrame * 2, h - itemFrame * 2 ), cg_ours, cflags );
}
@@ -1580,7 +1580,7 @@ void KThemeStyle::drawControl( ControlElement element,
// 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;
@@ -1627,14 +1627,14 @@ void KThemeStyle::drawControl( ControlElement element,
// Draw the pixmap
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( OpaqueMode );
+ p->setBackgroundMode( Qt::OpaqueMode );
int diffw = ( ( w - pixmap->width() ) / 2 )
+ ( ( w - pixmap->width() ) % 2 );
p->drawPixmap( x + diffw, y + itemFrame, *pixmap );
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( TransparentMode );
+ p->setBackgroundMode( Qt::TransparentMode );
}
}
@@ -1643,7 +1643,7 @@ void KThemeStyle::drawControl( ControlElement element,
{
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
int dim = 10 - itemFrame; //We're not very useful to inherit off, so just hardcode..
- TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
+ 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
@@ -1655,10 +1655,10 @@ void KThemeStyle::drawControl( ControlElement element,
TQColorGroup g2( discol, cg_ours.highlight(), white, white,
enabled ? white : discol, discol, white );
- drawPrimitive( arrow, p, vr, g2, Style_Enabled | Style_Down );
+ tqdrawPrimitive( arrow, p, vr, g2, Style_Enabled | Style_Down );
}
else
- drawPrimitive( arrow, p, vr, cg_ours,
+ tqdrawPrimitive( arrow, p, vr, cg_ours,
enabled ? Style_Enabled : Style_Default );
}
handled = true;
@@ -1667,7 +1667,7 @@ void KThemeStyle::drawControl( ControlElement element,
case CE_ProgressBarGroove:
{
TQBrush bg;
- const TQColorGroup * cg2 = colorGroup( cg, ProgressBg );
+ const TQColorGroup * cg2 = tqcolorGroup( cg, ProgressBg );
qDrawWinPanel( p, r, *cg2, true );
bg.setColor( cg2->color( TQColorGroup::Background ) );
if ( isPixmap( ProgressBg ) )
@@ -1714,15 +1714,15 @@ void KThemeStyle::drawControl( ControlElement element,
}
if ( !reverse )
- drawBaseButton( p, x + pstep, y, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar );
+ drawBaseButton( p, x + pstep, y, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar );
else
{
//TODO:Optimize
TQPixmap buf( width, h );
TQPainter p2( &buf );
- drawBaseButton( &p2, 0, 0, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar );
+ drawBaseButton( &p2, 0, 0, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar );
p2.end();
- TQPixmap mirroredPix = TQPixmap( buf.convertToImage().mirror( true, false ) );
+ TQPixmap mirroredPix = TQPixmap( TQImage(buf.convertToImage()).mirror( true, false ) );
bitBlt( p->device(), x + w - width - pstep, y, &mirroredPix );
}
}
@@ -1735,12 +1735,12 @@ void KThemeStyle::drawControl( ControlElement element,
};
if ( !handled )
- KThemeBase::drawControl( element,
+ KThemeBase::tqdrawControl( element,
p, widget, r, cg, how, opt );
}
-void KThemeStyle::drawControlMask( ControlElement element,
+void KThemeStyle::tqdrawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1764,7 +1764,7 @@ void KThemeStyle::drawControlMask( ControlElement element,
};
if ( !handled )
- KThemeBase::drawControlMask( element,
+ KThemeBase::tqdrawControlMask( element,
p, widget, r, opt );
}
@@ -1788,15 +1788,15 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
if ( !roundSlider() )
{
const TQSlider * slider = ( const TQSlider* ) widget;
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
if ( horizontal )
{
- drawBaseButton( p, x, y, w, h, *colorGroup( cg, SliderGroove ), true,
+ drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, SliderGroove ), true,
false, SliderGroove );
}
else
{
- drawBaseButton( p, x, y, w, h, *colorGroup( cg, RotSliderGroove ), true,
+ drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, RotSliderGroove ), true,
false, RotSliderGroove );
}
}
@@ -1804,7 +1804,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
{
//This code is from HighColorDefault..
const TQSlider* slider = ( const TQSlider* ) widget;
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
int gcenter = ( horizontal ? r.height() : r.width() ) / 2;
TQRect gr;
@@ -1840,7 +1840,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
if ( isPixmap( Slider ) )
{
const TQSlider * slider = ( const TQSlider* ) widget;
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
if ( horizontal )
{
bitBlt( p->device(), x, y + ( h - uncached( Slider ) ->height() ) / 2,
@@ -1853,8 +1853,8 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
TQWMatrix r270;
r270.rotate( 270 );
vsliderCache = new TQPixmap( uncached( Slider ) ->xForm( r270 ) );
- if ( uncached( Slider ) ->mask() )
- vsliderCache->setMask( uncached( Slider ) ->mask() ->xForm( r270 ) );
+ if ( uncached( Slider ) ->tqmask() )
+ vsliderCache->setMask( uncached( Slider ) ->tqmask() ->xForm( r270 ) );
}
bitBlt( p->device(), x + ( w - vsliderCache->width() ) / 2, y,
vsliderCache );
@@ -1865,7 +1865,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
//This code again from HighColor..
//...except sans the gradient..
const TQSlider* slider = ( const TQSlider* ) widget;
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
int x, y, w, h;
r.rect( &x, &y, &w, &h );
int x2 = x + w - 1;
@@ -1925,10 +1925,10 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
case KPE_GeneralHandle:
{
if ( w > h )
- drawBaseButton( p, x, y, w, h, *colorGroup( cg, HBarHandle ), false, false,
+ drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, HBarHandle ), false, false,
HBarHandle );
else
- drawBaseButton( p, x, y, w, h, *colorGroup( cg, VBarHandle ), false, false,
+ drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, VBarHandle ), false, false,
VBarHandle );
handled = true;
@@ -1950,7 +1950,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
-void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget,
+void KThemeStyle::tqdrawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget,
const TQRect & r, const TQColorGroup & g, SFlags how ,
SCFlags controls, SCFlags active,
const TQStyleOption & opt ) const
@@ -1977,7 +1977,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
{
WidgetType widget = ( down || on ) ? ToolButtonDown : ToolButton;
- drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *colorGroup( g, widget ), down || on, false,
+ drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *tqcolorGroup( g, widget ), down || on, false,
widget );
// int m = decoWidth( widget );
@@ -1985,7 +1985,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
if ( controls & SC_ToolButtonMenu )
{
- drawPrimitive( PE_ArrowDown, p, menu, g, how );
+ tqdrawPrimitive( PE_ArrowDown, p, menu, g, how );
/* if ( enabled )
kDrawWindowsArrow(p, this, PE_ArrowDown, false, menu.x(), menu.y(), menu.width(), menu.height(),
g, true );
@@ -1998,7 +1998,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
{
TQRect fr = toolbutton->rect();
fr.addCoords( 3, 3, -3, -3 );
- drawPrimitive( PE_FocusRect, p, fr, g );
+ tqdrawPrimitive( PE_FocusRect, p, fr, g );
}
handled = true;
@@ -2013,7 +2013,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
bool sunken = ( active == SC_ComboBoxArrow );
//No frame, edit box and button for now?
WidgetType widget = sunken ? ComboBoxDown : ComboBox;
- drawBaseButton( p, x, y, w, h, *colorGroup( g, widget ), sunken,
+ drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, widget ), sunken,
roundComboBox(), widget );
controls ^= SC_ComboBoxFrame;
@@ -2022,7 +2022,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
if ( controls & SC_ComboBoxArrow )
{
bool sunken = ( active == SC_ComboBoxArrow );
- TQRect ar = TQStyle::visualRect(
+ TQRect ar = TQStyle::tqvisualRect(
querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxArrow ),
widget );
ar.rect( &x, &y, &w, &h );
@@ -2041,8 +2041,8 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
else
{
- mtfstyle->drawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *colorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt );
- qDrawShadeRect( p, x, y, w, h, *colorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3,
+ mtfstyle->tqdrawPrimitive( PE_ArrowDown, p, TQRect( x, y, w, h ), *tqcolorGroup( g, widget ), sunken ? ( how | Style_Sunken ) : how, opt );
+ qDrawShadeRect( p, x, y, w, h, *tqcolorGroup( g, widget ) ); //w-14, y+7+(h-15), 10, 3,
}
controls ^= SC_ComboBoxArrow;
}
@@ -2071,7 +2071,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
if ( groove.isValid() )
{
p2.fillRect( groove, TQColor( 255, 0, 0 ) );
- drawPrimitive( PE_ScrollBarSubPage, &p2, groove, g,
+ tqdrawPrimitive( PE_ScrollBarSubPage, &p2, groove, g,
sflags | ( ( active == SC_ScrollBarSubPage ) ?
Style_Down : Style_Default ) );
}
@@ -2080,19 +2080,19 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
// Draw the up/left button set
if ( subline.isValid() )
{
- drawPrimitive( PE_ScrollBarSubLine, &p2, subline, g,
+ tqdrawPrimitive( PE_ScrollBarSubLine, &p2, subline, g,
sflags | ( active == SC_ScrollBarSubLine ?
Style_Down : Style_Default ) );
}
if ( addline.isValid() )
- drawPrimitive( PE_ScrollBarAddLine, &p2, addline, g,
+ tqdrawPrimitive( PE_ScrollBarAddLine, &p2, addline, g,
sflags | ( ( active == SC_ScrollBarAddLine ) ?
Style_Down : Style_Default ) );
if ( slider.isValid() )
{ //(controls & SC_ScrollBarSlider) &&
- drawPrimitive( PE_ScrollBarSlider, &p2, slider, g,
+ tqdrawPrimitive( PE_ScrollBarSlider, &p2, slider, g,
sflags | ( ( active == SC_ScrollBarSlider ) ?
Style_Down : Style_Default ) );
// Draw focus rect
@@ -2100,7 +2100,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
{
TQRect fr( slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5 );
- drawPrimitive( PE_FocusRect, &p2, fr, g, Style_Default );
+ tqdrawPrimitive( PE_FocusRect, &p2, fr, g, Style_Default );
}
p2.end();
bitBlt( p->device(), x, y, &buf );
@@ -2115,7 +2115,7 @@ void KThemeStyle::drawComplexControl ( ComplexControl control, TQPainter * p, co
if ( !handled )
{
- KThemeBase::drawComplexControl ( control, p, widget,
+ KThemeBase::tqdrawComplexControl ( control, p, widget,
r, g, how ,
controls, active,
opt );
@@ -2128,25 +2128,25 @@ void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h,
bool round ) const
{
// round edge fills
- static const QCOORD btm_left_fill[] =
+ static const TQCOORD btm_left_fill[] =
{
0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 0, 1, 1, 1, 2, 1, 3, 1, 4, 1,
1, 2, 2, 2, 3, 2, 4, 2, 2, 3, 3, 3, 4, 3, 3, 4, 4, 4
};
- static const QCOORD btm_right_fill[] =
+ static const TQCOORD btm_right_fill[] =
{
0, 0, 1, 0, 2, 0, 3, 0, 4, 0, 0, 1, 1, 1, 2, 1, 3, 1, 4,
1, 0, 2, 1, 2, 2, 2, 3, 2, 0, 3, 1, 3, 2, 3, 0, 4, 1, 4
};
- static const QCOORD top_left_fill[] =
+ static const TQCOORD top_left_fill[] =
{
3, 0, 4, 0, 2, 1, 3, 1, 4, 1, 1, 2, 2, 2, 3, 2, 4, 2, 0, 3,
1, 3, 2, 3, 3, 3, 4, 3, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4
};
- static const QCOORD top_right_fill[] =
+ static const TQCOORD top_right_fill[] =
{
0, 0, 1, 0, 0, 1, 1, 1, 2, 1, 0, 2, 1, 2, 2, 2, 3, 2, 0,
3, 1, 3, 2, 3, 3, 3, 4, 3, 0, 4, 1, 4, 2, 4, 3, 4, 4, 4
@@ -2158,16 +2158,16 @@ void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h,
{
int x2 = x + w - 1;
int y2 = y + h - 1;
- TQPointArray a( QCOORDARRLEN( top_left_fill ), top_left_fill );
+ TQPointArray a( TQCOORDARRLEN( top_left_fill ), top_left_fill );
a.translate( 1, 1 );
p->drawPoints( a );
- a.setPoints( QCOORDARRLEN( btm_left_fill ), btm_left_fill );
+ a.setPoints( TQCOORDARRLEN( btm_left_fill ), btm_left_fill );
a.translate( 1, h - 6 );
p->drawPoints( a );
- a.setPoints( QCOORDARRLEN( top_right_fill ), top_right_fill );
+ a.setPoints( TQCOORDARRLEN( top_right_fill ), top_right_fill );
a.translate( w - 6, 1 );
p->drawPoints( a );
- a.setPoints( QCOORDARRLEN( btm_right_fill ), btm_right_fill );
+ a.setPoints( TQCOORDARRLEN( btm_right_fill ), btm_right_fill );
a.translate( w - 6, h - 6 );
p->drawPoints( a );
@@ -2184,7 +2184,7 @@ void KThemeStyle::drawBaseMask( TQPainter *p, int x, int y, int w, int h,
p->fillRect( x, y, w, h, fillBrush );
}
-int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, QStyleHintReturn *shr ) const
+int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, QStyleHintReturn *shr ) const
{
switch ( sh )
{
@@ -2206,7 +2206,7 @@ int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption
return NoBackground;
default:
- return KThemeBase::styleHint( sh, w, opt, shr );
+ return KThemeBase::tqstyleHint( sh, w, opt, shr );
};
}
diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h
index 00d6256e7..b0b9bdd97 100644
--- a/kstyles/kthemestyle/kthemestyle.h
+++ b/kstyles/kthemestyle/kthemestyle.h
@@ -79,13 +79,13 @@ public:
KThemeStyle( const TQString& configDir, const TQString &configFile = TQString::null );
~KThemeStyle();
- virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const;
+ virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const;
virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual void drawControl( ControlElement element,
+ virtual void tqdrawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -93,14 +93,14 @@ public:
SFlags how = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual void drawControlMask( ControlElement element,
+ virtual void tqdrawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual void drawComplexControl( ComplexControl control,
+ virtual void tqdrawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget* widget,
const TQRect &r,
@@ -119,7 +119,7 @@ public:
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual int styleHint( StyleHint sh,
+ virtual int tqstyleHint( StyleHint sh,
const TQWidget *widget = 0,
const TQStyleOption& = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const;
@@ -192,7 +192,7 @@ public:
* @param w The rectangle width.
* @param h The rectangle height.
* @param sunken Draws a sunken style if @p true.
- * @param rounded Draws a rounded shape if @p true. Requires bWidth to be
+ * @param rounded Draws a rounded tqshape if @p true. Requires bWidth to be
* at least 1.
* @param hWidth The highlight width.
* @param bWidth The border width.
diff --git a/kstyles/light/light.cpp b/kstyles/light/light.cpp
index caa1d3e8f..17ecde9fc 100644
--- a/kstyles/light/light.cpp
+++ b/kstyles/light/light.cpp
@@ -21,10 +21,13 @@
*/
#include <tqstyleplugin.h>
+#include <tqimage.h>
+#include <tqapplication.h>
+
#include "lightstyle-v2.h"
#include "lightstyle-v3.h"
-class LightStylePlugin : public QStylePlugin
+class LightStylePlugin : public TQStylePlugin
{
public:
LightStylePlugin();
diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp
index 8f673a707..6fde9549d 100644
--- a/kstyles/light/lightstyle-v2.cpp
+++ b/kstyles/light/lightstyle-v2.cpp
@@ -159,11 +159,11 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (flags & (TQStyle::Style_Down |
TQStyle::Style_On |
TQStyle::Style_Sunken))
- fill = &cg.brush(TQColorGroup::Midlight);
+ fill = &cg.tqbrush(TQColorGroup::Midlight);
else
- fill = &cg.brush(TQColorGroup::Button);
+ fill = &cg.tqbrush(TQColorGroup::Button);
} else
- fill = &cg.brush(TQColorGroup::Background);
+ fill = &cg.tqbrush(TQColorGroup::Background);
drawLightBevel(p, r, cg, flags, fill);
break;
}
@@ -176,11 +176,11 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (flags & TQStyle::Style_Enabled) {
if (sunken)
- thefill = cg.brush(TQColorGroup::Midlight);
+ thefill = cg.tqbrush(TQColorGroup::Midlight);
else
- thefill = cg.brush(TQColorGroup::Button);
+ thefill = cg.tqbrush(TQColorGroup::Button);
} else
- thefill = cg.brush(TQColorGroup::Background);
+ thefill = cg.tqbrush(TQColorGroup::Background);
p->setPen(cg.dark());
p->drawLine(r.topLeft(), r.topRight());
@@ -224,11 +224,11 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_Indicator:
const TQBrush *fill;
if (! (flags & Style_Enabled))
- fill = &cg.brush(TQColorGroup::Background);
+ fill = &cg.tqbrush(TQColorGroup::Background);
else if (flags & Style_Down)
- fill = &cg.brush(TQColorGroup::Mid);
+ fill = &cg.tqbrush(TQColorGroup::Mid);
else
- fill = &cg.brush(TQColorGroup::Base);
+ fill = &cg.tqbrush(TQColorGroup::Base);
drawLightBevel(p, r, cg, flags | Style_Sunken, fill);
p->setPen(cg.text());
@@ -265,7 +265,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
cr.addCoords(2, 2, -2, -2);
ir.addCoords(3, 3, -3, -3);
- p->fillRect(r, cg.brush(TQColorGroup::Background));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Background));
p->setPen(cg.dark());
p->drawArc(r, 0, 16*360);
@@ -294,7 +294,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
bool drawTitle = false;
if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device();
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
drawTitle = true;
title = p->caption();
@@ -307,7 +307,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
TQPixmap pm(r.height(), r.width());
TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(),
- cg.brush(TQColorGroup::Highlight));
+ cg.tqbrush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end();
@@ -331,7 +331,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
} else {
if (drawTitle) {
- p->fillRect(r, cg.brush(TQColorGroup::Highlight));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title);
} else {
@@ -366,7 +366,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
p->drawLine(r.left() + 6, r.top() + 2, r.right() - 6, r.top() + 2);
}
} else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -405,39 +405,39 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_WindowFrame:
{
int lw = data.isDefault() ?
- pixelMetric(PM_DefaultFrameWidth) : data.lineWidth();
+ tqpixelMetric(PM_DefaultFrameWidth) : data.lineWidth();
if ( ! ( flags & Style_Sunken ) )
flags |= Style_Raised;
if (lw == 2)
drawLightBevel(p, r, cg, flags);
else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
case PE_PanelDockWindow:
{
int lw = data.isDefault() ?
- pixelMetric(PM_DockWindowFrameWidth) : data.lineWidth();
+ tqpixelMetric(PM_DockWindowFrameWidth) : data.lineWidth();
if (lw == 2)
drawLightBevel(p, r, cg, flags | Style_Raised,
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
case PE_PanelMenuBar:
{
int lw = data.isDefault() ?
- pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
+ tqpixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
if (lw == 2)
- drawLightBevel(p, r, cg, flags, &cg.brush(TQColorGroup::Button));
+ drawLightBevel(p, r, cg, flags, &cg.tqbrush(TQColorGroup::Button));
else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -459,10 +459,10 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
pe = PE_ArrowUp;
}
- p->fillRect(fr, cg.brush((flags & Style_Down) ?
+ p->fillRect(fr, cg.tqbrush((flags & Style_Down) ?
TQColorGroup::Midlight :
TQColorGroup::Background));
- drawPrimitive(pe, p, ar, cg, flags);
+ tqdrawPrimitive(pe, p, ar, cg, flags);
break;
}
@@ -484,10 +484,10 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
pe = PE_ArrowDown;
}
- p->fillRect(fr, cg.brush((flags & Style_Down) ?
+ p->fillRect(fr, cg.tqbrush((flags & Style_Down) ?
TQColorGroup::Midlight :
TQColorGroup::Background));
- drawPrimitive(pe, p, ar, cg, flags);
+ tqdrawPrimitive(pe, p, ar, cg, flags);
break;
}
@@ -509,7 +509,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
fr.addCoords(2, 0, 0, 0);
}
- p->fillRect(fr, cg.brush((flags & Style_Down) ?
+ p->fillRect(fr, cg.tqbrush((flags & Style_Down) ?
TQColorGroup::Midlight :
TQColorGroup::Mid));
break;
@@ -534,7 +534,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
drawLightBevel(p, fr, cg, ((flags | Style_Down) ^ Style_Down) |
((flags & Style_Enabled) ? Style_Raised : Style_Default),
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
break;
}
@@ -607,12 +607,12 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->restore();
} else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
}
-void LightStyleV2::drawControl( ControlElement control,
+void LightStyleV2::tqdrawControl( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -631,7 +631,7 @@ void LightStyleV2::drawControl( ControlElement control,
tr.addCoords(0, 0, 0, -1);
fr.addCoords(2, 2, -2, -2);
- if ( tb->shape() == TQTabBar::RoundedBelow || tb->shape() == TQTabBar::TriangularBelow) {
+ if ( tb->tqshape() == TQTabBar::RoundedBelow || tb->tqshape() == TQTabBar::TriangularBelow) {
tr = r; tr.addCoords(0, 1, 0, 0);
fr = r; fr.addCoords(2, 2,-2, -4);
below = true;
@@ -786,7 +786,7 @@ void LightStyleV2::drawControl( ControlElement control,
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
p->setPen(cg.mid().dark(120));
p->drawLine(r.left() + 12, r.top() + 1,
@@ -799,11 +799,11 @@ void LightStyleV2::drawControl( ControlElement control,
if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1,
- &cg.brush(TQColorGroup::Midlight));
+ &cg.tqbrush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
if ( !mi )
break;
@@ -822,16 +822,16 @@ void LightStyleV2::drawControl( ControlElement control,
bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
- cr = visualRect( cr, r );
- sr = visualRect( sr, r );
- tr = visualRect( tr, r );
- ir = visualRect( ir, r );
+ cr = tqvisualRect( cr, r );
+ sr = tqvisualRect( sr, r );
+ tr = tqvisualRect( tr, r );
+ ir = tqvisualRect( ir, r );
}
if (mi->isChecked() &&
! (flags & Style_Active) &
(flags & Style_Enabled))
- qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
+ qDrawShadePanel(p, cr, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight));
if (mi->iconSet()) {
TQIconSet::Mode mode =
@@ -850,7 +850,7 @@ void LightStyleV2::drawControl( ControlElement control,
p->setPen(cg.text());
p->drawPixmap(pmr.topLeft(), pixmap);
} else if (popupmenu->isCheckable() && mi->isChecked())
- drawPrimitive(PE_CheckMark, p, cr, cg,
+ tqdrawPrimitive(PE_CheckMark, p, cr, cg,
(flags & Style_Enabled) | Style_On);
TQColor textcolor;
@@ -887,7 +887,7 @@ void LightStyleV2::drawControl( ControlElement control,
TQString text = mi->text();
if (! text.isNull()) {
- int t = text.find('\t');
+ int t = text.tqfind('\t');
// draw accelerator/tab-text
if (t >= 0) {
@@ -919,26 +919,26 @@ void LightStyleV2::drawControl( ControlElement control,
} else if (mi->pixmap()) {
TQPixmap pixmap = *mi->pixmap();
if (pixmap.depth() == 1)
- p->setBackgroundMode(OpaqueMode);
+ p->setBackgroundMode(Qt::OpaqueMode);
p->drawPixmap(ir.x(), ir.y() + (ir.height() - pixmap.height()) / 2, pixmap);
if (pixmap.depth() == 1)
- p->setBackgroundMode(TransparentMode);
+ p->setBackgroundMode(Qt::TransparentMode);
}
if (mi->popup())
- drawPrimitive( (reverse ? PE_ArrowLeft : PE_ArrowRight), p, sr, cg, flags);
+ tqdrawPrimitive( (reverse ? PE_ArrowLeft : PE_ArrowRight), p, sr, cg, flags);
break;
}
case CE_MenuBarEmptyArea:
{
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
break;
}
case CE_DockWindowEmptyArea:
{
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
break;
}
@@ -946,9 +946,9 @@ void LightStyleV2::drawControl( ControlElement control,
case CE_MenuBarItem:
{
if (flags & Style_Active)
- qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight));
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
if (data.isDefault())
break;
@@ -961,16 +961,16 @@ void LightStyleV2::drawControl( ControlElement control,
}
case CE_ProgressBarGroove:
- drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(TQColorGroup::Background));
+ drawLightBevel(p, r, cg, Style_Sunken, &cg.tqbrush(TQColorGroup::Background));
break;
default:
- TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data);
break;
}
}
-void LightStyleV2::drawControlMask( ControlElement control,
+void LightStyleV2::tqdrawControlMask( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -982,7 +982,7 @@ void LightStyleV2::drawControlMask( ControlElement control,
break;
default:
- TQCommonStyle::drawControlMask(control, p, widget, r, data);
+ TQCommonStyle::tqdrawControlMask(control, p, widget, r, data);
break;
}
}
@@ -997,7 +997,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const
const TQPushButton *button = (const TQPushButton *) widget;
int dbw1 = 0, dbw2 = 0;
if (button->isDefault() || button->autoDefault()) {
- dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget);
+ dbw1 = tqpixelMetric(PM_ButtonDefaultIndicator, widget);
dbw2 = dbw1 * 2;
}
@@ -1015,7 +1015,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const
return rect;
}
-void LightStyleV2::drawComplexControl( ComplexControl control,
+void LightStyleV2::tqdrawComplexControl( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
@@ -1031,27 +1031,27 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
const TQComboBox *combobox = (const TQComboBox *) widget;
TQRect frame, arrow, field;
frame =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
if ((controls & SC_ComboBoxFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Raised,
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
if (active == SC_ComboBoxArrow)
- p->fillRect(arrow, cg.brush(TQColorGroup::Mid));
+ p->fillRect(arrow, cg.tqbrush(TQColorGroup::Mid));
arrow.addCoords(4, 2, -2, -2);
- drawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
+ tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
}
if ((controls & SC_ComboBoxEditField) && field.isValid()) {
@@ -1065,11 +1065,11 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
- p->fillRect( field, cg.brush( TQColorGroup::Highlight ) );
+ p->fillRect( field, cg.tqbrush( TQColorGroup::Highlight ) );
TQRect fr =
- TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
- drawPrimitive( PE_FocusRect, p, fr, cg,
+ tqdrawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
TQStyleOption(cg.highlight()));
}
@@ -1087,14 +1087,14 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
const TQSpinWidget *spinwidget = (const TQSpinWidget *) widget;
TQRect frame, up, down;
- frame = querySubControlMetrics(CC_SpinWidget, widget,
+ frame = querySubControlMetrics((QStyle::ComplexControl)CC_SpinWidget, widget,
SC_SpinWidgetFrame, data);
up = spinwidget->upRect();
down = spinwidget->downRect();
if ((controls & SC_SpinWidgetFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Sunken,
- &cg.brush(TQColorGroup::Base));
+ &cg.tqbrush(TQColorGroup::Base));
if ((controls & SC_SpinWidgetUp) && up.isValid()) {
PrimitiveElement pe = PE_SpinWidgetUp;
@@ -1105,7 +1105,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
p->drawLine(up.topLeft(), up.bottomLeft());
up.addCoords(1, 0, 0, 0);
- p->fillRect(up, cg.brush(TQColorGroup::Button));
+ p->fillRect(up, cg.tqbrush(TQColorGroup::Button));
if (active == SC_SpinWidgetUp)
p->setPen(cg.mid());
else
@@ -1124,7 +1124,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
up.right() - 1, up.bottom());
up.addCoords(1, 0, 0, 0);
- drawPrimitive(pe, p, up, cg, flags |
+ tqdrawPrimitive(pe, p, up, cg, flags |
((active == SC_SpinWidgetUp) ?
Style_On | Style_Sunken : Style_Raised));
}
@@ -1138,7 +1138,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
p->drawLine(down.topLeft(), down.bottomLeft());
down.addCoords(1, 0, 0, 0);
- p->fillRect(down, cg.brush(TQColorGroup::Button));
+ p->fillRect(down, cg.tqbrush(TQColorGroup::Button));
if (active == SC_SpinWidgetDown)
p->setPen(cg.mid());
else
@@ -1157,7 +1157,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
down.right() - 1, down.bottom());
down.addCoords(1, 0, 0, 0);
- drawPrimitive(pe, p, down, cg, flags |
+ tqdrawPrimitive(pe, p, down, cg, flags |
((active == SC_SpinWidgetDown) ?
Style_On | Style_Sunken : Style_Raised));
}
@@ -1186,52 +1186,52 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
subline2.moveBy(0, -addline.height());
if ((controls & SC_ScrollBarSubLine) && subline.isValid()) {
- drawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
Style_Enabled | ((active == SC_ScrollBarSubLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if (subline2.isValid())
- drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
Style_Enabled | ((active == SC_ScrollBarSubLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
}
if ((controls & SC_ScrollBarAddLine) && addline.isValid())
- drawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
+ tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
Style_Enabled | ((active == SC_ScrollBarAddLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSubPage) && subpage.isValid())
- drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
+ tqdrawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
Style_Enabled | ((active == SC_ScrollBarSubPage) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarAddPage) && addpage.isValid())
- drawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
+ tqdrawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
((maxedOut) ? Style_Default : Style_Enabled) |
((active == SC_ScrollBarAddPage) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarFirst) && first.isValid())
- drawPrimitive(PE_ScrollBarFirst, p, first, cg,
+ tqdrawPrimitive(PE_ScrollBarFirst, p, first, cg,
Style_Enabled | ((active == SC_ScrollBarFirst) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarLast) && last.isValid())
- drawPrimitive(PE_ScrollBarLast, p, last, cg,
+ tqdrawPrimitive(PE_ScrollBarLast, p, last, cg,
Style_Enabled | ((active == SC_ScrollBarLast) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSlider) && slider.isValid()) {
- drawPrimitive(PE_ScrollBarSlider, p, slider, cg,
+ tqdrawPrimitive(PE_ScrollBarSlider, p, slider, cg,
Style_Enabled | ((active == SC_ScrollBarSlider) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
@@ -1241,7 +1241,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if (scrollbar->hasFocus()) {
TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
- drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
}
@@ -1258,7 +1258,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if ((controls & SC_SliderGroove) && groove.isValid()) {
if (flags & Style_HasFocus)
- drawPrimitive( PE_FocusRect, p, groove, cg );
+ tqdrawPrimitive( PE_FocusRect, p, groove, cg );
if (slider->orientation() == Qt::Horizontal) {
int dh = (groove.height() - 5) / 2;
@@ -1270,30 +1270,30 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
drawLightBevel(p, groove, cg, ((flags | Style_Raised) ^ Style_Raised) |
((flags & Style_Enabled) ? Style_Sunken : Style_Default),
- &cg.brush(TQColorGroup::Midlight));
+ &cg.tqbrush(TQColorGroup::Midlight));
}
if ((controls & SC_SliderHandle) && handle.isValid()) {
drawLightBevel(p, handle, cg, ((flags | Style_Down) ^ Style_Down) |
((flags & Style_Enabled) ? Style_Raised : Style_Default),
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
}
if (controls & SC_SliderTickmarks)
- TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
case CC_ListView:
// use the base style for CC_ListView
- singleton->basestyle->drawComplexControl(control, p, widget, r, cg, flags,
+ singleton->basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
default:
- TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
}
@@ -1311,7 +1311,7 @@ TQRect LightStyleV2::querySubControlMetrics( ComplexControl control,
{
const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
int sliderstart = scrollbar->sliderStart();
- int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
+ int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget);
int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ?
scrollbar->width() : scrollbar->height()) - (sbextent * 3);
int sliderlen;
@@ -1322,7 +1322,7 @@ TQRect LightStyleV2::querySubControlMetrics( ComplexControl control,
sliderlen = (scrollbar->pageStep() * maxlen) /
(range + scrollbar->pageStep());
- int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -1409,7 +1409,7 @@ TQStyle::SubControl LightStyleV2::querySubControl( ComplexControl control,
return ret;
}
-int LightStyleV2::pixelMetric( PixelMetric metric,
+int LightStyleV2::tqpixelMetric( PixelMetric metric,
const TQWidget *widget ) const
{
int ret;
@@ -1464,7 +1464,7 @@ int LightStyleV2::pixelMetric( PixelMetric metric,
case PM_SliderLength:
case PM_SliderControlThickness:
- ret = singleton->basestyle->pixelMetric( metric, widget );
+ ret = singleton->basestyle->tqpixelMetric( metric, widget );
break;
case PM_MaximumDragDistance:
@@ -1472,7 +1472,7 @@ int LightStyleV2::pixelMetric( PixelMetric metric,
break;
default:
- ret = TQCommonStyle::pixelMetric(metric, widget);
+ ret = TQCommonStyle::tqpixelMetric(metric, widget);
break;
}
@@ -1490,7 +1490,7 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
case CT_PushButton:
{
const TQPushButton *button = (const TQPushButton *) widget;
- ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
+ ret = TQCommonStyle::tqsizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
// only expand the button if we are displaying text...
@@ -1525,8 +1525,8 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
int w = contentsSize.width(), h = contentsSize.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 < 22)
h = 22;
} else if(mi->widget()) {
@@ -1553,7 +1553,7 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
maxpmw = QMAX(maxpmw, 16);
w += (maxpmw * 2) + 8;
- if (! mi->text().isNull() && mi->text().find('\t') >= 0)
+ if (! mi->text().isNull() && mi->text().tqfind('\t') >= 0)
w += 8;
ret = TQSize(w, h);
@@ -1579,14 +1579,14 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
}
default:
- ret = TQCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
+ ret = TQCommonStyle::tqsizeFromContents(contents, widget, contentsSize, data);
break;
}
return ret;
}
-int LightStyleV2::styleHint( StyleHint stylehint,
+int LightStyleV2::tqstyleHint( StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
QStyleHintReturn* returnData ) const
@@ -1611,7 +1611,7 @@ int LightStyleV2::styleHint( StyleHint stylehint,
break;
default:
- ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData);
break;
}
diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h
index e5a3fffac..292984811 100644
--- a/kstyles/light/lightstyle-v2.h
+++ b/kstyles/light/lightstyle-v2.h
@@ -48,15 +48,15 @@ public:
SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQStyleOption & = TQStyleOption::Default) const;
TQRect subRect(SubRect, const TQWidget *) const;
- void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
SCFlags = SC_All, SCFlags = SC_None,
const TQStyleOption & = TQStyleOption::Default ) const;
@@ -67,12 +67,12 @@ public:
SubControl querySubControl(ComplexControl, const TQWidget *, const TQPoint &,
const TQStyleOption &data = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
+ int tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const;
TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint(StyleHint, const TQWidget * = 0,
+ int tqstyleHint(StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp
index 5a902d7f5..b7da954c9 100644
--- a/kstyles/light/lightstyle-v3.cpp
+++ b/kstyles/light/lightstyle-v3.cpp
@@ -248,7 +248,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
// fill the header
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight : TQColorGroup::Button ) );
// the taskbuttons in kicker seem to allow the style to set the pencolor
@@ -265,11 +265,11 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if (flags & (TQStyle::Style_Down |
TQStyle::Style_On |
TQStyle::Style_Sunken))
- fill = &cg.brush(TQColorGroup::Midlight);
+ fill = &cg.tqbrush(TQColorGroup::Midlight);
else
- fill = &cg.brush(TQColorGroup::Button);
+ fill = &cg.tqbrush(TQColorGroup::Button);
} else
- fill = &cg.brush(TQColorGroup::Background);
+ fill = &cg.tqbrush(TQColorGroup::Background);
bool etch = true;
if ( flags & Style_ButtonDefault ) {
@@ -277,7 +277,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
br.addCoords( 1, 1, -1, -1 );
}
drawLightBevel( p, br, cg, flags,
- pixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ),
+ tqpixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ),
etch, true, fill );
break;
}
@@ -288,12 +288,12 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if (flags & (TQStyle::Style_Down |
TQStyle::Style_On |
TQStyle::Style_Sunken))
- fill = &cg.brush(TQColorGroup::Midlight);
+ fill = &cg.tqbrush(TQColorGroup::Midlight);
else
- fill = &cg.brush(TQColorGroup::Button);
+ fill = &cg.tqbrush(TQColorGroup::Button);
} else
- fill = &cg.brush(TQColorGroup::Background);
- drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ),
+ fill = &cg.tqbrush(TQColorGroup::Background);
+ drawLightBevel( p, r, cg, flags, tqpixelMetric( PM_DefaultFrameWidth ),
false, true, fill );
break;
@@ -305,11 +305,11 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if (flags & TQStyle::Style_Enabled) {
if (sunken)
- thefill = cg.brush(TQColorGroup::Midlight);
+ thefill = cg.tqbrush(TQColorGroup::Midlight);
else
- thefill = cg.brush(TQColorGroup::Button);
+ thefill = cg.tqbrush(TQColorGroup::Button);
} else
- thefill = cg.brush(TQColorGroup::Background);
+ thefill = cg.tqbrush(TQColorGroup::Background);
p->setPen( cg.dark() );
p->drawLine(r.topLeft(), r.topRight());
@@ -352,11 +352,11 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_Indicator:
const TQBrush *fill;
if (! (flags & Style_Enabled))
- fill = &cg.brush(TQColorGroup::Background);
+ fill = &cg.tqbrush(TQColorGroup::Background);
else if (flags & Style_Down)
- fill = &cg.brush(TQColorGroup::Mid);
+ fill = &cg.tqbrush(TQColorGroup::Mid);
else
- fill = &cg.brush(TQColorGroup::Base);
+ fill = &cg.tqbrush(TQColorGroup::Base);
drawLightBevel( p, r, cg, flags | Style_Sunken, 2, true, true, fill );
p->setPen(cg.text());
@@ -394,7 +394,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
cr.addCoords( 2, 2, -2, -2 );
ir.addCoords( 3, 3, -3, -3 );
- p->fillRect( r, cg.brush( TQColorGroup::Background ) );
+ p->fillRect( r, cg.tqbrush( TQColorGroup::Background ) );
p->setPen( flags & Style_Down ? cg.mid() :
( flags & Style_Enabled ? cg.base() : cg.background() ) );
@@ -426,7 +426,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
bool drawTitle = false;
if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device();
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
drawTitle = true;
title = p->caption();
@@ -439,7 +439,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
TQPixmap pm(r.height(), r.width());
TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(),
- cg.brush(TQColorGroup::Highlight));
+ cg.tqbrush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end();
@@ -460,7 +460,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
} else {
if (drawTitle) {
- p->fillRect(r, cg.brush(TQColorGroup::Highlight));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title);
} else {
@@ -525,13 +525,13 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( br, cg.tqbrush( TQColorGroup::Button ) );
break;
}
case PE_PanelPopup:
drawLightBevel( p, r, cg, flags,
- ( data.isDefault() ? pixelMetric(PM_DefaultFrameWidth) :
+ ( data.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, true );
break;
@@ -544,7 +544,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
int cover = 0;
int reallw = ( data.isDefault() ?
- pixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() );
+ tqpixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() );
cover = reallw - 1;
if ( ! ( flags & Style_Sunken ) )
@@ -572,16 +572,16 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_PanelDockWindow:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
- pixelMetric(PM_DefaultFrameWidth) :
+ tqpixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, false,
- &cg.brush( TQColorGroup::Button ) );
+ &cg.tqbrush( TQColorGroup::Button ) );
break;
case PE_PanelMenuBar:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
- pixelMetric(PM_MenuBarFrameWidth) :
+ tqpixelMetric(PM_MenuBarFrameWidth) :
data.lineWidth() ), false, false,
- &cg.brush( TQColorGroup::Button ) );
+ &cg.tqbrush( TQColorGroup::Button ) );
break;
case PE_ScrollBarSubLine:
@@ -607,14 +607,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight :
TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 );
if ( ! br.isValid() )
break;
- drawPrimitive( pe, p, br, cg, flags );
+ tqdrawPrimitive( pe, p, br, cg, flags );
break;
}
@@ -641,14 +641,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight :
TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 );
if ( ! br.isValid() )
break;
- drawPrimitive( pe, p, br, cg, flags );
+ tqdrawPrimitive( pe, p, br, cg, flags );
break;
}
@@ -672,7 +672,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight :
TQColorGroup::Button ) );
break;
@@ -698,7 +698,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight :
TQColorGroup::Button ) );
break;
@@ -728,7 +728,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
p->drawLine( br.topRight(), br.bottomRight() );
br.addCoords( 1, 1, -1, -1 );
- p->fillRect( br, cg.brush( TQColorGroup::Highlight ) );
+ p->fillRect( br, cg.tqbrush( TQColorGroup::Highlight ) );
break;
}
@@ -798,12 +798,12 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
p->restore();
} else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
}
-void LightStyleV3::drawControl( ControlElement control,
+void LightStyleV3::tqdrawControl( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -817,7 +817,7 @@ void LightStyleV3::drawControl( ControlElement control,
const TQTabBar *tb = (const TQTabBar *) widget;
TQRect br = r;
- if ( tb->shape() == TQTabBar::RoundedAbove ) {
+ if ( tb->tqshape() == TQTabBar::RoundedAbove ) {
if ( ! ( flags & Style_Selected ) ) {
p->setPen( cg.background() );
p->drawLine( br.left(), br.bottom(),
@@ -846,13 +846,13 @@ void LightStyleV3::drawControl( ControlElement control,
if ( flags & Style_Selected )
{
- p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.brush(TQColorGroup::Highlight));
+ p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.tqbrush(TQColorGroup::Highlight));
br.addCoords( 1, 1, -4, 0 );
}
else
br.addCoords( 1, 1, -1, 0 );
p->fillRect( br, cg.background() );
- } else if ( tb->shape() == TQTabBar::RoundedBelow ) {
+ } else if ( tb->tqshape() == TQTabBar::RoundedBelow ) {
if ( ! ( flags & Style_Selected ) ) {
p->setPen( cg.background() );
p->drawLine( br.left(), br.top(),
@@ -884,7 +884,7 @@ void LightStyleV3::drawControl( ControlElement control,
if ( flags & Style_Selected )
{
- p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.brush(TQColorGroup::Highlight));
+ p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.tqbrush(TQColorGroup::Highlight));
br.addCoords( 1, 0, -3, -1 );
}
else
@@ -892,7 +892,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->fillRect( br, cg.background() );
} else
- TQCommonStyle::drawControl( control, p, widget, r, cg, flags, data );
+ TQCommonStyle::tqdrawControl( control, p, widget, r, cg, flags, data );
break;
}
@@ -910,7 +910,7 @@ void LightStyleV3::drawControl( ControlElement control,
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
p->setPen( cg.mid() );
p->drawLine(r.left() + 12, r.top() + 1,
r.right() - 12, r.top() + 1);
@@ -922,11 +922,11 @@ void LightStyleV3::drawControl( ControlElement control,
if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1,
- &cg.brush(TQColorGroup::Midlight));
+ &cg.tqbrush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
if ( !mi )
break;
@@ -945,16 +945,16 @@ void LightStyleV3::drawControl( ControlElement control,
bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
- cr = visualRect( cr, r );
- sr = visualRect( sr, r );
- tr = visualRect( tr, r );
- ir = visualRect( ir, r );
+ cr = tqvisualRect( cr, r );
+ sr = tqvisualRect( sr, r );
+ tr = tqvisualRect( tr, r );
+ ir = tqvisualRect( ir, r );
}
if (mi->isChecked() &&
! (flags & Style_Active) &
(flags & Style_Enabled))
- qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
+ qDrawShadePanel(p, cr, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight));
if (mi->iconSet()) {
TQIconSet::Mode mode =
@@ -973,7 +973,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->setPen(cg.text());
p->drawPixmap(pmr.topLeft(), pixmap);
} else if (popupmenu->isCheckable() && mi->isChecked())
- drawPrimitive(PE_CheckMark, p, cr, cg,
+ tqdrawPrimitive(PE_CheckMark, p, cr, cg,
(flags & Style_Enabled) | Style_On);
TQColor textcolor;
@@ -1010,7 +1010,7 @@ void LightStyleV3::drawControl( ControlElement control,
TQString text = mi->text();
if (! text.isNull()) {
- int t = text.find('\t');
+ int t = text.tqfind('\t');
// draw accelerator/tab-text
if (t >= 0) {
@@ -1042,30 +1042,30 @@ void LightStyleV3::drawControl( ControlElement control,
} else if (mi->pixmap()) {
TQPixmap pixmap = *mi->pixmap();
if (pixmap.depth() == 1)
- p->setBackgroundMode(OpaqueMode);
+ p->setBackgroundMode(Qt::OpaqueMode);
p->drawPixmap(ir.x(), ir.y() + (ir.height() - pixmap.height()) / 2, pixmap);
if (pixmap.depth() == 1)
- p->setBackgroundMode(TransparentMode);
+ p->setBackgroundMode(Qt::TransparentMode);
}
if (mi->popup())
- drawPrimitive( (TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight),
+ tqdrawPrimitive( (TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight),
p, sr, cg, flags);
break;
}
case CE_MenuBarEmptyArea:
{
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
break;
}
case CE_MenuBarItem:
{
if ( flags & Style_Active )
- qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight));
else
- p->fillRect( r, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( r, cg.tqbrush( TQColorGroup::Button ) );
if (data.isDefault())
break;
@@ -1078,17 +1078,17 @@ void LightStyleV3::drawControl( ControlElement control,
}
case CE_ProgressBarGroove:
- drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ),
- true, true, &cg.brush( TQColorGroup::Background ) );
+ drawLightBevel( p, r, cg, Style_Sunken, tqpixelMetric( PM_DefaultFrameWidth ),
+ true, true, &cg.tqbrush( TQColorGroup::Background ) );
break;
default:
- TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data);
break;
}
}
-void LightStyleV3::drawControlMask( ControlElement control,
+void LightStyleV3::tqdrawControlMask( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1100,7 +1100,7 @@ void LightStyleV3::drawControlMask( ControlElement control,
break;
default:
- TQCommonStyle::drawControlMask(control, p, widget, r, data);
+ TQCommonStyle::tqdrawControlMask(control, p, widget, r, data);
break;
}
}
@@ -1113,7 +1113,7 @@ TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const
case SR_PushButtonFocusRect:
{
rect = TQCommonStyle::subRect( SR_PushButtonContents, widget );
- int bm = pixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2;
+ int bm = tqpixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2;
rect.addCoords( hbm, hbm, -hbm, -hbm );
break;
}
@@ -1150,7 +1150,7 @@ TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const
return rect;
}
-void LightStyleV3::drawComplexControl( ComplexControl control,
+void LightStyleV3::tqdrawComplexControl( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
@@ -1166,37 +1166,37 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
const TQComboBox *combobox = (const TQComboBox *) widget;
TQRect frame, arrow, field;
frame =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
if ((controls & SC_ComboBoxFrame) && frame.isValid())
- drawPrimitive( PE_Panel, p, frame, cg, flags | Style_Sunken );
+ tqdrawPrimitive( PE_Panel, p, frame, cg, flags | Style_Sunken );
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
drawLightEtch( p, arrow, cg.button(), ( active == SC_ComboBoxArrow ) );
arrow.addCoords( 1, 1, -1, -1 );
- p->fillRect( arrow, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( arrow, cg.tqbrush( TQColorGroup::Button ) );
arrow.addCoords(3, 1, -1, -1);
- drawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
+ tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
}
if ((controls & SC_ComboBoxEditField) && field.isValid()) {
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
TQRect fr =
- TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
- p->fillRect( fr, cg.brush( TQColorGroup::Highlight ) );
- drawPrimitive( PE_FocusRect, p, fr, cg,
+ p->fillRect( fr, cg.tqbrush( TQColorGroup::Highlight ) );
+ tqdrawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
TQStyleOption(cg.highlight()));
}
@@ -1204,8 +1204,8 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
p->setPen(cg.highlightedText());
} else {
p->fillRect( field, ( ( flags & Style_Enabled ) ?
- cg.brush( TQColorGroup::Base ) :
- cg.brush( TQColorGroup::Background ) ) );
+ cg.tqbrush( TQColorGroup::Base ) :
+ cg.tqbrush( TQColorGroup::Background ) ) );
p->setPen( cg.text() );
}
}
@@ -1218,13 +1218,13 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
const TQSpinWidget *spinwidget = (const TQSpinWidget *) widget;
TQRect frame, up, down;
- frame = querySubControlMetrics(CC_SpinWidget, widget,
+ frame = querySubControlMetrics((QStyle::ComplexControl)CC_SpinWidget, widget,
SC_SpinWidgetFrame, data);
up = spinwidget->upRect();
down = spinwidget->downRect();
if ((controls & SC_SpinWidgetFrame) && frame.isValid())
- drawPrimitive( PE_Panel, p, frame, cg, flags | Style_Sunken );
+ tqdrawPrimitive( PE_Panel, p, frame, cg, flags | Style_Sunken );
if ((controls & SC_SpinWidgetUp) && up.isValid()) {
PrimitiveElement pe = PE_SpinWidgetUp;
@@ -1235,11 +1235,11 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
p->drawLine( up.topLeft(), up.bottomLeft() );
up.addCoords( 1, 0, 0, 0 );
- p->fillRect( up, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( up, cg.tqbrush( TQColorGroup::Button ) );
drawLightEtch( p, up, cg.button(), ( active == SC_SpinWidgetUp ) );
up.addCoords( 1, 0, 0, 0 );
- drawPrimitive(pe, p, up, cg, flags |
+ tqdrawPrimitive(pe, p, up, cg, flags |
((active == SC_SpinWidgetUp) ?
Style_On | Style_Sunken : Style_Raised));
}
@@ -1253,11 +1253,11 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
p->drawLine( down.topLeft(), down.bottomLeft() );
down.addCoords( 1, 0, 0, 0 );
- p->fillRect( down, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( down, cg.tqbrush( TQColorGroup::Button ) );
drawLightEtch( p, down, cg.button(), ( active == SC_SpinWidgetDown ) );
down.addCoords( 1, 0, 0, 0 );
- drawPrimitive(pe, p, down, cg, flags |
+ tqdrawPrimitive(pe, p, down, cg, flags |
((active == SC_SpinWidgetDown) ?
Style_On | Style_Sunken : Style_Raised));
}
@@ -1286,52 +1286,52 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
subline2.moveBy(0, -addline.height());
if ((controls & SC_ScrollBarSubLine) && subline.isValid()) {
- drawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
Style_Enabled | ((active == SC_ScrollBarSubLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if (subline2.isValid())
- drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
Style_Enabled | ((active == SC_ScrollBarSubLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
}
if ((controls & SC_ScrollBarAddLine) && addline.isValid())
- drawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
+ tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
Style_Enabled | ((active == SC_ScrollBarAddLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSubPage) && subpage.isValid())
- drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
+ tqdrawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
Style_Enabled | ((active == SC_ScrollBarSubPage) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarAddPage) && addpage.isValid())
- drawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
+ tqdrawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
((maxedOut) ? Style_Default : Style_Enabled) |
((active == SC_ScrollBarAddPage) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarFirst) && first.isValid())
- drawPrimitive(PE_ScrollBarFirst, p, first, cg,
+ tqdrawPrimitive(PE_ScrollBarFirst, p, first, cg,
Style_Enabled | ((active == SC_ScrollBarFirst) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarLast) && last.isValid())
- drawPrimitive(PE_ScrollBarLast, p, last, cg,
+ tqdrawPrimitive(PE_ScrollBarLast, p, last, cg,
Style_Enabled | ((active == SC_ScrollBarLast) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSlider) && slider.isValid()) {
- drawPrimitive(PE_ScrollBarSlider, p, slider, cg,
+ tqdrawPrimitive(PE_ScrollBarSlider, p, slider, cg,
Style_Enabled | ((active == SC_ScrollBarSlider) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
@@ -1341,7 +1341,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if (scrollbar->hasFocus()) {
TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
- drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
}
@@ -1373,7 +1373,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if (flags & Style_HasFocus) {
groove.addCoords( -2, -2, 2, 2 );
- drawPrimitive( PE_FocusRect, p, groove, cg, flags );
+ tqdrawPrimitive( PE_FocusRect, p, groove, cg, flags );
}
}
@@ -1408,19 +1408,19 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
}
if (controls & SC_SliderTickmarks)
- TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
case CC_ListView:
// use the base style for CC_ListView
- basestyle->drawComplexControl(control, p, widget, r, cg, flags,
+ basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
default:
- TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
}
@@ -1436,8 +1436,8 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
switch (control) {
case CC_ComboBox:
{
- int fw = pixelMetric( PM_DefaultFrameWidth, widget );
- int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow
+ int fw = tqpixelMetric( PM_DefaultFrameWidth, widget );
+ int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow
switch ( sc ) {
case SC_ComboBoxFrame:
@@ -1462,7 +1462,7 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
{
const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
int sliderstart = scrollbar->sliderStart();
- int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
+ int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget);
int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ?
scrollbar->width() : scrollbar->height()) - (sbextent * 3);
int sliderlen;
@@ -1473,7 +1473,7 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
sliderlen = (scrollbar->pageStep() * maxlen) /
(range + scrollbar->pageStep());
- int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -1537,12 +1537,12 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case CC_Slider:
{
const TQSlider *slider = (const TQSlider *) widget;
- int tickOffset = pixelMetric( PM_SliderTickmarkOffset, widget );
- int thickness = pixelMetric( PM_SliderControlThickness, widget );
+ int tickOffset = tqpixelMetric( PM_SliderTickmarkOffset, widget );
+ int thickness = tqpixelMetric( PM_SliderControlThickness, widget );
switch ( sc ) {
case SC_SliderGroove:
- if ( slider->orientation() == Horizontal )
+ if ( slider->orientation() == Qt::Horizontal )
ret.setRect( 0, tickOffset, slider->width(), thickness );
else
ret.setRect( tickOffset, 0, thickness, slider->height() );
@@ -1551,9 +1551,9 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case SC_SliderHandle:
{
int pos = slider->sliderStart();
- int len = pixelMetric( PM_SliderLength, widget );
+ int len = tqpixelMetric( PM_SliderLength, widget );
- if ( slider->orientation() == Horizontal )
+ if ( slider->orientation() == Qt::Horizontal )
ret.setRect( pos + 2, tickOffset + 2, len - 4, thickness - 4 );
else
ret.setRect( tickOffset + 2, pos + 2, thickness - 4, len - 4 );
@@ -1593,7 +1593,7 @@ TQStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
return ret;
}
-int LightStyleV3::pixelMetric( PixelMetric metric,
+int LightStyleV3::tqpixelMetric( PixelMetric metric,
const TQWidget *widget ) const
{
int ret;
@@ -1664,7 +1664,7 @@ int LightStyleV3::pixelMetric( PixelMetric metric,
case PM_SliderControlThickness:
{
const TQSlider * sl = (const TQSlider *) widget;
- int space = (sl->orientation() == Horizontal) ? sl->height()
+ int space = (sl->orientation() == Qt::Horizontal) ? sl->height()
: sl->width();
int ticks = sl->tickmarks();
int n = 0;
@@ -1690,7 +1690,7 @@ int LightStyleV3::pixelMetric( PixelMetric metric,
break;
default:
- ret = TQCommonStyle::pixelMetric(metric, widget);
+ ret = TQCommonStyle::tqpixelMetric(metric, widget);
break;
}
@@ -1707,8 +1707,8 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
switch (contents) {
case CT_ComboBox:
{
- int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
- int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow
+ int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow
int w = contentsSize.width();
int h = contentsSize.height();
@@ -1726,9 +1726,9 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
case CT_PushButton:
{
const TQPushButton *button = (const TQPushButton *) widget;
- ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
+ ret = TQCommonStyle::tqsizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
- int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget ) * 2;
+ int dbi = tqpixelMetric( PM_ButtonDefaultIndicator, widget ) * 2;
int mw = 80 - dbi, mh = 25 - dbi;
// only expand the button if we are displaying text...
@@ -1755,8 +1755,8 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
int w = contentsSize.width(), h = contentsSize.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 < 22)
h = 22;
} else if(mi->widget()) {
@@ -1783,7 +1783,7 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
maxpmw = QMAX(maxpmw, 16);
w += (maxpmw * 2) + 8;
- if (! mi->text().isNull() && mi->text().find('\t') >= 0)
+ if (! mi->text().isNull() && mi->text().tqfind('\t') >= 0)
w += 8;
ret = TQSize(w, h);
@@ -1810,14 +1810,14 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
}
default:
- ret = TQCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
+ ret = TQCommonStyle::tqsizeFromContents(contents, widget, contentsSize, data);
break;
}
return ret;
}
-int LightStyleV3::styleHint( StyleHint stylehint,
+int LightStyleV3::tqstyleHint( StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
QStyleHintReturn* returnData ) const
@@ -1846,7 +1846,7 @@ int LightStyleV3::styleHint( StyleHint stylehint,
break;
default:
- ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData);
break;
}
diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h
index be8812b99..a97c57643 100644
--- a/kstyles/light/lightstyle-v3.h
+++ b/kstyles/light/lightstyle-v3.h
@@ -52,15 +52,15 @@ public:
SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQStyleOption & = TQStyleOption::Default) const;
TQRect subRect(SubRect, const TQWidget *) const;
- void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
SCFlags = SC_All, SCFlags = SC_None,
const TQStyleOption & = TQStyleOption::Default ) const;
@@ -71,12 +71,12 @@ public:
SubControl querySubControl(ComplexControl, const TQWidget *, const TQPoint &,
const TQStyleOption &data = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
+ int tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const;
TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint(StyleHint, const TQWidget * = 0,
+ int tqstyleHint(StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
diff --git a/kstyles/plastik/config/plastikconf.h b/kstyles/plastik/config/plastikconf.h
index 74800521c..512ad6f2e 100644
--- a/kstyles/plastik/config/plastikconf.h
+++ b/kstyles/plastik/config/plastikconf.h
@@ -29,7 +29,7 @@ DEALINGS IN THE SOFTWARE.
class TQCheckBox;
-class PlastikStyleConfig: public QWidget
+class PlastikStyleConfig: public TQWidget
{
Q_OBJECT
public:
diff --git a/kstyles/plastik/misc.cpp b/kstyles/plastik/misc.cpp
index e1fc2df79..d1a52d61e 100644
--- a/kstyles/plastik/misc.cpp
+++ b/kstyles/plastik/misc.cpp
@@ -30,9 +30,9 @@ TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const i
if(alpha<0) alpha = 0;
int inv_alpha = 255 - alpha;
- TQColor result = TQColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255,
- qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255,
- qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) );
+ TQColor result = TQColor( tqRgb(tqRed(rgb_b)*inv_alpha/255 + tqRed(rgb)*alpha/255,
+ tqGreen(rgb_b)*inv_alpha/255 + tqGreen(rgb)*alpha/255,
+ tqBlue(rgb_b)*inv_alpha/255 + tqBlue(rgb)*alpha/255) );
return result;
}
diff --git a/kstyles/plastik/plastik.cpp b/kstyles/plastik/plastik.cpp
index dd7954cc9..32b8b73c8 100644
--- a/kstyles/plastik/plastik.cpp
+++ b/kstyles/plastik/plastik.cpp
@@ -131,7 +131,7 @@ static const int arrowHMargin = 6;
static const int rightBorder = 12;
// -- Style Plugin Interface -------------------------
-class PlastikStylePlugin : public QStylePlugin
+class PlastikStylePlugin : public TQStylePlugin
{
public:
PlastikStylePlugin() {}
@@ -201,7 +201,7 @@ void PlastikStyle::updateProgressPos()
bool visible = false;
for (iter = progAnimWidgets.begin(); iter != progAnimWidgets.end(); ++iter)
{
- if ( !::qt_cast<TQProgressBar*>(iter.key()) )
+ if ( !::tqqt_cast<TQProgressBar*>(iter.key()) )
continue;
pb = dynamic_cast<TQProgressBar*>(iter.key());
@@ -242,27 +242,27 @@ void PlastikStyle::polish(TQWidget* widget)
connect(widget, TQT_SIGNAL(destroyed(TQObject*)), this, TQT_SLOT(khtmlWidgetDestroyed(TQObject*)));
}
- // use qt_cast where possible to check if the widget inheits one of the classes. might improve
+ // use tqqt_cast where possible to check if the widget inheits one of the classes. might improve
// performance compared to TQObject::inherits()
- if ( ::qt_cast<TQPushButton*>(widget) || ::qt_cast<TQComboBox*>(widget) ||
- ::qt_cast<TQSpinWidget*>(widget) || ::qt_cast<TQSlider*>(widget) ||
- ::qt_cast<TQCheckBox*>(widget) || ::qt_cast<TQRadioButton*>(widget) ||
- ::qt_cast<TQToolButton*>(widget) || widget->inherits("QSplitterHandle") )
+ if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) ||
+ ::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) ||
+ ::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) ||
+ ::tqqt_cast<TQToolButton*>(widget) || widget->inherits("QSplitterHandle") )
{
// widget->setBackgroundMode(PaletteBackground);
widget->installEventFilter(this);
- } else if (::qt_cast<TQLineEdit*>(widget)) {
+ } else if (::tqqt_cast<TQLineEdit*>(widget)) {
widget->installEventFilter(this);
- } else if (::qt_cast<TQTabBar*>(widget)) {
+ } else if (::tqqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(true);
widget->installEventFilter(this);
- } else if (::qt_cast<TQPopupMenu*>(widget)) {
+ } else if (::tqqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( NoBackground );
} else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
widget->installEventFilter(this);
}
- if( _animateProgressBar && ::qt_cast<TQProgressBar*>(widget) )
+ if( _animateProgressBar && ::tqqt_cast<TQProgressBar*>(widget) )
{
widget->installEventFilter(this);
progAnimWidgets[widget] = 0;
@@ -280,25 +280,25 @@ void PlastikStyle::unPolish(TQWidget* widget)
khtmlWidgets.remove(widget);
}
- // use qt_cast to check if the widget inheits one of the classes.
- if ( ::qt_cast<TQPushButton*>(widget) || ::qt_cast<TQComboBox*>(widget) ||
- ::qt_cast<TQSpinWidget*>(widget) || ::qt_cast<TQSlider*>(widget) ||
- ::qt_cast<TQCheckBox*>(widget) || ::qt_cast<TQRadioButton*>(widget) ||
- ::qt_cast<TQToolButton*>(widget) || ::qt_cast<TQLineEdit*>(widget) ||
+ // use tqqt_cast to check if the widget inheits one of the classes.
+ if ( ::tqqt_cast<TQPushButton*>(widget) || ::tqqt_cast<TQComboBox*>(widget) ||
+ ::tqqt_cast<TQSpinWidget*>(widget) || ::tqqt_cast<TQSlider*>(widget) ||
+ ::tqqt_cast<TQCheckBox*>(widget) || ::tqqt_cast<TQRadioButton*>(widget) ||
+ ::tqqt_cast<TQToolButton*>(widget) || ::tqqt_cast<TQLineEdit*>(widget) ||
widget->inherits("QSplitterHandle") )
{
widget->removeEventFilter(this);
}
- else if (::qt_cast<TQTabBar*>(widget)) {
+ else if (::tqqt_cast<TQTabBar*>(widget)) {
widget->setMouseTracking(false);
widget->removeEventFilter(this);
- } else if (::qt_cast<TQPopupMenu*>(widget)) {
+ } else if (::tqqt_cast<TQPopupMenu*>(widget)) {
widget->setBackgroundMode( PaletteBackground );
} else if ( !qstrcmp(widget->name(), "kde toolbar widget") ) {
widget->removeEventFilter(this);
}
- if ( ::qt_cast<TQProgressBar*>(widget) )
+ if ( ::tqqt_cast<TQProgressBar*>(widget) )
{
progAnimWidgets.remove(widget);
}
@@ -308,12 +308,12 @@ void PlastikStyle::unPolish(TQWidget* widget)
void PlastikStyle::khtmlWidgetDestroyed(TQObject* obj)
{
- khtmlWidgets.remove(static_cast<TQWidget*>(obj));
+ khtmlWidgets.remove(TQT_TQWIDGET(obj));
}
void PlastikStyle::progressBarDestroyed(TQObject* obj)
{
- progAnimWidgets.remove(static_cast<TQWidget*>(obj));
+ progAnimWidgets.remove(TQT_TQWIDGET(obj));
}
void PlastikStyle::renderContour(TQPainter *p,
@@ -662,7 +662,7 @@ void PlastikStyle::renderPixel(TQPainter *p,
int key = search.key();
CacheEntry *cacheEntry;
- if( (cacheEntry = pixmapCache->find(key)) ) {
+ if( (cacheEntry = pixmapCache->tqfind(key)) ) {
if( search == *cacheEntry ) { // match! we can draw now...
if(cacheEntry->pixmap)
p->drawPixmap(pos, *(cacheEntry->pixmap) );
@@ -675,7 +675,7 @@ void PlastikStyle::renderPixel(TQPainter *p,
TQImage aImg(1,1,32); // 1x1
aImg.setAlphaBuffer(true);
- aImg.setPixel(0,0,qRgba(qRed(rgb),qGreen(rgb),qBlue(rgb),alpha));
+ aImg.setPixel(0,0,tqRgba(tqRed(rgb),tqGreen(rgb),tqBlue(rgb),alpha));
TQPixmap *result = new TQPixmap(aImg);
p->drawPixmap(pos, *result);
@@ -696,9 +696,9 @@ void PlastikStyle::renderPixel(TQPainter *p,
if(a<0) a = 0;
int a_inv = 255 - a;
- TQColor res = TQColor( qRgb(qRed(rgb_b)*a_inv/255 + qRed(rgb_a)*a/255,
- qGreen(rgb_b)*a_inv/255 + qGreen(rgb_a)*a/255,
- qBlue(rgb_b)*a_inv/255 + qBlue(rgb_a)*a/255) );
+ TQColor res = TQColor( tqRgb(tqRed(rgb_b)*a_inv/255 + tqRed(rgb_a)*a/255,
+ tqGreen(rgb_b)*a_inv/255 + tqGreen(rgb_a)*a/255,
+ tqBlue(rgb_b)*a_inv/255 + tqBlue(rgb_a)*a/255) );
p->setPen(res);
p->drawPoint(pos);
}
@@ -798,7 +798,7 @@ void PlastikStyle::renderGradient(TQPainter *painter,
int key = search.key();
CacheEntry *cacheEntry;
- if( (cacheEntry = pixmapCache->find(key)) ) {
+ if( (cacheEntry = pixmapCache->tqfind(key)) ) {
if( search == *cacheEntry ) { // match! we can draw now...
if(cacheEntry->pixmap) {
painter->drawTiledPixmap(rect, *(cacheEntry->pixmap) );
@@ -819,7 +819,7 @@ void PlastikStyle::renderGradient(TQPainter *painter,
int r_w = result->rect().width();
int r_h = result->rect().height();
int r_x, r_y, r_x2, r_y2;
- result->rect().coords(&r_x, &r_y, &r_x2, &r_y2);
+ TQT_TQRECT_OBJECT(result->rect()).coords(&r_x, &r_y, &r_x2, &r_y2);
int rDiff, gDiff, bDiff;
int rc, gc, bc;
@@ -885,21 +885,21 @@ void PlastikStyle::renderPanel(TQPainter *p,
r.coords(&x, &y, &x2, &y2);
if (kickerMode &&
- p->device() && p->device()->devType() == TQInternal::Widget &&
- TQCString(static_cast<TQWidget*>(p->device())->className()) == "FittsLawFrame") {
+ p->tqdevice() && p->tqdevice()->devType() == TQInternal::Widget &&
+ TQCString(static_cast<TQWidget*>(static_cast<QWidget*>(static_cast<QPaintDevice*>(p->tqdevice())))->className()) == "FittsLawFrame") {
// Stolen wholesale from Keramik. I don't like it, but oh well.
if (sunken) {
- const QCOORD corners[] = { x2, y, x2, y2, x, y2, x, y };
+ const TQCOORD corners[] = { x2, y, x2, y2, x, y2, x, y };
p->setPen(g.background().dark());
p->drawConvexPolygon(TQPointArray(4, corners));
p->setPen(g.background().light());
- p->drawPolyline(TQPointArray(4, corners), 0, 3);
+ p->tqdrawPolyline(TQPointArray(4, corners), 0, 3);
} else {
- const QCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
+ const TQCOORD corners[] = { x, y2, x, y, x2, y, x2, y2 };
p->setPen(g.background().dark());
p->drawPolygon(TQPointArray(4, corners));
p->setPen(g.background().light());
- p->drawPolyline(TQPointArray(4, corners), 0, 3);
+ p->tqdrawPolyline(TQPointArray(4, corners), 0, 3);
}
} else {
renderContour(p, r, g.background(), getColor(g, PanelContour) );
@@ -1206,7 +1206,7 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
switch( kpe ) {
case KPE_SliderGroove: {
const TQSlider* slider = (const TQSlider*)widget;
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
if (horizontal) {
int center = r.y()+r.height()/2;
@@ -1224,7 +1224,7 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
case KPE_SliderHandle: {
const TQSlider* slider = (const TQSlider*)widget;
- bool horizontal = slider->orientation() == Horizontal;
+ bool horizontal = slider->orientation() == Qt::Horizontal;
const bool pressed = (flags&Style_Active);
const WidgetState s = enabled?(pressed?IsPressed:IsEnabled):IsDisabled;
@@ -1482,7 +1482,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
if(!kickerMode) {
// detect if this is the left most header item
bool isFirst = false;
- TQHeader *header = dynamic_cast<TQHeader*>(p->device() );
+ TQHeader *header = dynamic_cast<TQHeader*>(p->tqdevice() );
if (header) {
isFirst = header->mapToIndex(header->sectionAt(r.x() ) ) == 0;
}
@@ -1515,7 +1515,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
case PE_ButtonTool:
case PE_ButtonDropDown:
case PE_ButtonCommand: {
- bool khtmlMode = opt.isDefault() ? false : khtmlWidgets.contains(opt.widget());
+ bool khtmlMode = opt.isDefault() ? false : khtmlWidgets.tqcontains(opt.widget());
renderButton(p, r, cg, (on||down), mouseOver, true, enabled, khtmlMode );
break;
}
@@ -1818,7 +1818,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
// --------------
case PE_Splitter: {
// highlight on mouse over
- TQColor color = (hoverWidget == p->device())?cg.background().light(100+_contrast):cg.background();
+ TQColor color = (static_cast<QPaintDevice*>(static_cast<QWidget*>(hoverWidget)) == static_cast<QPaintDevice*>(p->tqdevice()))?TQColor(cg.background().light(100+_contrast)):cg.background();
p->fillRect(r, color);
if (w > h) {
if (h > 4) {
@@ -1861,9 +1861,9 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
bool isEnabled = true;
// panel is highlighted by default if it has focus, but if we have access to the
// widget itself we can try to avoid highlighting in case it's readOnly or disabled.
- if (p->device() && dynamic_cast<TQLineEdit*>(p->device()))
+ if (p->tqdevice() && dynamic_cast<TQLineEdit*>(p->tqdevice()))
{
- TQLineEdit* lineEdit = dynamic_cast<TQLineEdit*>(p->device());
+ TQLineEdit* lineEdit = dynamic_cast<TQLineEdit*>(p->tqdevice());
isReadOnly = lineEdit->isReadOnly();
isEnabled = lineEdit->isEnabled();
}
@@ -1880,7 +1880,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
// only thing we know is that khtml buffers its widgets into a pixmap. So
// when the paint device is a TQPixmap, chances are high that we are in khtml.
// It's possible that this breaks other things, so let's see how it works...
- if (p->device() && dynamic_cast<TQPixmap*>(p->device() ) ) {
+ if (p->tqdevice() && dynamic_cast<TQPixmap*>(p->tqdevice() ) ) {
contourFlags += Draw_AlphaBlend;
}
@@ -1941,7 +1941,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
case PE_PanelMenuBar:
case PE_PanelDockWindow: {
// fix for toolbar lag (from Mosfet Liquid)
- TQWidget* w = dynamic_cast<TQWidget*>(p->device());
+ TQWidget* w = dynamic_cast<TQWidget*>(p->tqdevice());
if(w && w->backgroundMode() == PaletteButton)
w->setBackgroundMode(PaletteBackground);
p->fillRect(r, cg.brush(TQColorGroup::Background));
@@ -2094,11 +2094,11 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
}
- const TQWMatrix oldMatrix( p->worldMatrix() );
+ const TQWMatrix oldMatrix( p->tqworldMatrix() );
if (flags & Style_Down) {
- p->translate(pixelMetric(PM_ButtonShiftHorizontal),
- pixelMetric(PM_ButtonShiftVertical));
+ p->translate(tqpixelMetric(PM_ButtonShiftHorizontal),
+ tqpixelMetric(PM_ButtonShiftVertical));
}
a.translate((r.x()+r.width()/2), (r.y()+r.height()/2));
@@ -2116,7 +2116,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
a.translate(0, 0);
}
- if (p->pen() == TQPen::NoPen) {
+ if (p->pen() == Qt::NoPen) {
if (flags & Style_Enabled) {
p->setPen(cg.buttonText());
} else {
@@ -2132,13 +2132,13 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
default: {
- return KStyle::drawPrimitive(pe, p, r, cg, flags, opt);
+ return KStyle::tqdrawPrimitive(pe, p, r, cg, flags, opt);
}
}
}
-void PlastikStyle::drawControl(ControlElement element,
+void PlastikStyle::tqdrawControl(ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -2171,7 +2171,7 @@ void PlastikStyle::drawControl(ControlElement element,
int steps = pb->totalSteps();
const TQColor bg = enabled?cg.base():cg.background(); // background
- const TQColor fg = enabled?cg.highlight():cg.background().dark(110); // foreground
+ const TQColor fg = enabled?cg.highlight():TQColor(cg.background().dark(110)); // foreground
if( steps == 0 ) { // Busy indicator
static const int barWidth = 10;
@@ -2265,7 +2265,7 @@ void PlastikStyle::drawControl(ControlElement element,
} else {
// find the animation Offset for the current Widget
TQWidget* nonConstWidget = const_cast<TQWidget*>(widget);
- TQMapConstIterator<TQWidget*, int> iter = progAnimWidgets.find(nonConstWidget);
+ TQMapConstIterator<TQWidget*, int> iter = progAnimWidgets.tqfind(nonConstWidget);
if (iter != progAnimWidgets.end())
animShift = iter.data();
}
@@ -2293,14 +2293,14 @@ void PlastikStyle::drawControl(ControlElement element,
case CE_TabBarTab: {
const TQTabBar * tb = (const TQTabBar *) widget;
bool cornerWidget = false;
- if( ::qt_cast<TQTabWidget*>(tb->parent()) ) {
+ if( ::tqqt_cast<TQTabWidget*>(tb->parent()) ) {
const TQTabWidget *tw = (const TQTabWidget*)tb->parent();
// is there a corner widget in the (top) left edge?
- TQWidget *cw = tw->cornerWidget(Qt::TopLeft);
+ TQWidget *cw = tw->cornerWidget(TQt::TopLeft);
if(cw)
cornerWidget = true;
}
- TQTabBar::Shape tbs = tb->shape();
+ TQTabBar::Shape tbs = tb->tqshape();
bool selected = false;
if (flags & Style_Selected) selected = true;
TabPosition pos;
@@ -2336,7 +2336,7 @@ void PlastikStyle::drawControl(ControlElement element,
renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
break;
default:
- KStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
}
break;
@@ -2379,15 +2379,15 @@ void PlastikStyle::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 )
{
@@ -2396,7 +2396,7 @@ void PlastikStyle::drawControl(ControlElement element,
else
{
p->setPen(cg.buttonText());
- 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;
}
@@ -2422,7 +2422,7 @@ void PlastikStyle::drawControl(ControlElement element,
p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
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 );
@@ -2432,14 +2432,14 @@ void PlastikStyle::drawControl(ControlElement element,
}
// 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;
}
@@ -2489,7 +2489,7 @@ void PlastikStyle::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 );
@@ -2524,7 +2524,7 @@ void PlastikStyle::drawControl(ControlElement element,
break;
}
- TQRect cr = visualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
+ TQRect cr = tqvisualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
// Do we have an icon?
if ( mi->iconSet() )
{
@@ -2605,7 +2605,7 @@ void PlastikStyle::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 = 2;
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
@@ -2654,22 +2654,22 @@ void PlastikStyle::drawControl(ControlElement element,
// Draw the pixmap
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( OpaqueMode );
+ p->setBackgroundMode( Qt::OpaqueMode );
int diffw = ( ( r.width() - pixmap->width() ) / 2 )
+ ( ( r.width() - pixmap->width() ) % 2 );
p->drawPixmap( r.x()+diffw, r.y()+1, *pixmap );
if ( pixmap->depth() == 1 )
- p->setBackgroundMode( TransparentMode );
+ p->setBackgroundMode( Qt::TransparentMode );
}
}
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
- int dim = pixelMetric(PM_MenuButtonIndicator) - 1;
- TQRect vr = visualRect( TQRect( r.x() + r.width() - 5 - 1 - dim,
+ int dim = tqpixelMetric(PM_MenuButtonIndicator) - 1;
+ TQRect vr = tqvisualRect( TQRect( r.x() + r.width() - 5 - 1 - dim,
r.y() + r.height() / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -2705,11 +2705,11 @@ void PlastikStyle::drawControl(ControlElement element,
break;
default:
- KStyle::drawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
}
}
-void PlastikStyle::drawControlMask(ControlElement element,
+void PlastikStyle::tqdrawControlMask(ControlElement element,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -2724,12 +2724,12 @@ void PlastikStyle::drawControlMask(ControlElement element,
}
default: {
- KStyle::drawControlMask (element, p, w, r, opt);
+ KStyle::tqdrawControlMask (element, p, w, r, opt);
}
}
}
-void PlastikStyle::drawComplexControlMask(ComplexControl c,
+void PlastikStyle::tqdrawComplexControlMask(ComplexControl c,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -2745,12 +2745,12 @@ void PlastikStyle::drawComplexControlMask(ComplexControl c,
break;
}
default: {
- KStyle::drawComplexControlMask (c, p, w, r, o);
+ KStyle::tqdrawComplexControlMask (c, p, w, r, o);
}
}
}
-void PlastikStyle::drawComplexControl(ComplexControl control,
+void PlastikStyle::tqdrawComplexControl(ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -2785,7 +2785,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
:cg.background();
uint contourFlags = 0;
- if( khtmlWidgets.contains(cb) )
+ if( khtmlWidgets.tqcontains(cb) )
contourFlags |= Draw_AlphaBlend;
if (_inputFocusHighlight && hasFocus && editable && enabled)
@@ -2951,10 +2951,10 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
// If we're pressed, on, or raised...
if (bflags & (Style_Down | Style_On | Style_Raised) || widget==hoverWidget ) {
drawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
- } else if (tb->parentWidget() &&
- tb->parentWidget()->backgroundPixmap() &&
- !tb->parentWidget()->backgroundPixmap()->isNull()) {
- TQPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
+ } else if (tb->tqparentWidget() &&
+ tb->tqparentWidget()->backgroundPixmap() &&
+ !tb->tqparentWidget()->backgroundPixmap()->isNull()) {
+ TQPixmap pixmap = *(tb->tqparentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, tb->pos() );
}
}
@@ -3140,7 +3140,7 @@ void PlastikStyle::drawComplexControl(ComplexControl control,
}
default:
- KStyle::drawComplexControl(control, p, widget,
+ KStyle::tqdrawComplexControl(control, p, widget,
r, cg, flags, controls,
active, opt);
break;
@@ -3245,15 +3245,15 @@ TQRect PlastikStyle::querySubControlMetrics(ComplexControl control,
}
}
-int PlastikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
+int PlastikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m) {
// TABS
// ----
case PM_TabBarTabVSpace: {
const TQTabBar * tb = (const TQTabBar *) widget;
- if (tb->shape() == TQTabBar::RoundedAbove ||
- tb->shape() == TQTabBar::RoundedBelow)
+ if (tb->tqshape() == TQTabBar::RoundedAbove ||
+ tb->tqshape() == TQTabBar::RoundedBelow)
return 12;
else
return 4;
@@ -3322,7 +3322,7 @@ int PlastikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
return 1;
case PM_DefaultFrameWidth: {
- if(widget && ::qt_cast<TQPopupMenu*>(widget))
+ if(widget && ::tqqt_cast<TQPopupMenu*>(widget))
return 1;
else
return 2;
@@ -3342,7 +3342,7 @@ int PlastikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
}
default:
- return KStyle::pixelMetric(m, widget);
+ return KStyle::tqpixelMetric(m, widget);
}
}
@@ -3364,8 +3364,8 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
bool checkable = popup->isCheckable();
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 += 4;
} else if (mi->widget()) {
@@ -3386,7 +3386,7 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
}
}
- 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;
@@ -3411,8 +3411,8 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
{
const TQPushButton* btn = static_cast<const TQPushButton*>(widget);
- int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget);
- int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget);
+ int w = s.width() + 2 * tqpixelMetric(PM_ButtonMargin, widget);
+ int h = s.height() + 2 * tqpixelMetric(PM_ButtonMargin, widget);
if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h);
return TQSize( w+25, h+5 );
@@ -3420,20 +3420,20 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
case CT_ToolButton:
{
- if(widget->parent() && ::qt_cast<TQToolBar*>(widget->parent()) )
+ if(widget->parent() && ::tqqt_cast<TQToolBar*>(widget->parent()) )
return TQSize( s.width()+2*4, s.height()+2*4 );
else
- return KStyle::sizeFromContents (t, widget, s, opt);
+ return KStyle::tqsizeFromContents (t, widget, s, opt);
}
default:
- return KStyle::sizeFromContents (t, widget, s, opt);
+ return KStyle::tqsizeFromContents (t, widget, s, opt);
}
- return KStyle::sizeFromContents (t, widget, s, opt);
+ return KStyle::tqsizeFromContents (t, widget, s, opt);
}
-int PlastikStyle::styleHint( StyleHint stylehint,
+int PlastikStyle::tqstyleHint( StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
QStyleHintReturn* returnData ) const
@@ -3443,7 +3443,7 @@ int PlastikStyle::styleHint( StyleHint stylehint,
return 96; // Motif-like delay...
default:
- return KStyle::styleHint(stylehint, widget, option, returnData);
+ return KStyle::tqstyleHint(stylehint, widget, option, returnData);
}
}
@@ -3455,52 +3455,52 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
if (!obj->isWidgetType() ) return false;
// focus highlight
- if ( ::qt_cast<TQLineEdit*>(obj) ) {
- TQWidget* widget = static_cast<TQWidget*>(obj);
+ if ( ::tqqt_cast<TQLineEdit*>(obj) ) {
+ TQWidget* widget = TQT_TQWIDGET(obj);
- if ( ::qt_cast<TQSpinWidget*>(widget->parentWidget()) )
+ if ( ::tqqt_cast<TQSpinWidget*>(widget->tqparentWidget()) )
{
- TQWidget* spinbox = widget->parentWidget();
+ TQWidget* spinbox = widget->tqparentWidget();
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
{
- spinbox->repaint(false);
+ spinbox->tqrepaint(false);
}
return false;
}
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
{
- widget->repaint(false);
+ widget->tqrepaint(false);
}
return false;
}
- //Hover highlight... use qt_cast to check if the widget inheits one of the classes.
- if ( ::qt_cast<TQPushButton*>(obj) || ::qt_cast<TQComboBox*>(obj) ||
- ::qt_cast<TQSpinWidget*>(obj) || ::qt_cast<TQCheckBox*>(obj) ||
- ::qt_cast<TQRadioButton*>(obj) || ::qt_cast<TQToolButton*>(obj) || obj->inherits("QSplitterHandle") )
+ //Hover highlight... use tqqt_cast to check if the widget inheits one of the classes.
+ if ( ::tqqt_cast<TQPushButton*>(obj) || ::tqqt_cast<TQComboBox*>(obj) ||
+ ::tqqt_cast<TQSpinWidget*>(obj) || ::tqqt_cast<TQCheckBox*>(obj) ||
+ ::tqqt_cast<TQRadioButton*>(obj) || ::tqqt_cast<TQToolButton*>(obj) || obj->inherits("QSplitterHandle") )
{
- if ((ev->type() == TQEvent::Enter) && static_cast<TQWidget*>(obj)->isEnabled())
+ if ((ev->type() == TQEvent::Enter) && TQT_TQWIDGET(obj)->isEnabled())
{
- TQWidget* button = static_cast<TQWidget*>(obj);
+ TQWidget* button = TQT_TQWIDGET(obj);
hoverWidget = button;
- button->repaint(false);
+ button->tqrepaint(false);
}
- else if ((ev->type() == TQEvent::Leave) && (obj == hoverWidget) )
+ else if ((ev->type() == TQEvent::Leave) && (TQT_BASE_OBJECT(obj) == TQT_BASE_OBJECT(hoverWidget)) )
{
- TQWidget* button = static_cast<TQWidget*>(obj);
+ TQWidget* button = TQT_TQWIDGET(obj);
hoverWidget = 0;
- button->repaint(false);
+ button->tqrepaint(false);
}
return false;
}
- if ( ::qt_cast<TQTabBar*>(obj) ) {
- if ((ev->type() == TQEvent::Enter) && static_cast<TQWidget*>(obj)->isEnabled())
+ if ( ::tqqt_cast<TQTabBar*>(obj) ) {
+ if ((ev->type() == TQEvent::Enter) && TQT_TQWIDGET(obj)->isEnabled())
{
- TQWidget* tabbar = static_cast<TQWidget*>(obj);
+ TQWidget* tabbar = TQT_TQWIDGET(obj);
hoverWidget = tabbar;
hoverTab = 0;
- tabbar->repaint(false);
+ tabbar->tqrepaint(false);
}
else if (ev->type() == TQEvent::MouseMove)
{
@@ -3508,31 +3508,31 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(ev);
if (tabbar && me) {
- // avoid unnecessary repaints (which otherwise would occour on every
+ // avoid unnecessary tqrepaints (which otherwise would occour on every
// MouseMove event causing high cpu load).
- bool repaint = true;
+ bool tqrepaint = true;
TQTab *tab = tabbar->selectTab(me->pos() );
if (hoverTab == tab)
- repaint = false;
+ tqrepaint = false;
hoverTab = tab;
- if (repaint)
- tabbar->repaint(false);
+ if (tqrepaint)
+ tabbar->tqrepaint(false);
}
}
else if (ev->type() == TQEvent::Leave)
{
- TQWidget* tabbar = static_cast<TQWidget*>(obj);
+ TQWidget* tabbar = TQT_TQWIDGET(obj);
hoverWidget = 0;
hoverTab = 0;
- tabbar->repaint(false);
+ tabbar->tqrepaint(false);
}
return false;
}
// Track show events for progress bars
- if ( _animateProgressBar && ::qt_cast<TQProgressBar*>(obj) )
+ if ( _animateProgressBar && ::tqqt_cast<TQProgressBar*>(obj) )
{
if ((ev->type() == TQEvent::Show) && !animationTimer->isActive())
{
@@ -3541,9 +3541,9 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
}
if ( !qstrcmp(obj->name(), "kde toolbar widget") )
{
- TQWidget* lb = static_cast<TQWidget*>(obj);
- if (lb->backgroundMode() == Qt::PaletteButton)
- lb->setBackgroundMode(Qt::PaletteBackground);
+ TQWidget* lb = TQT_TQWIDGET(obj);
+ if (lb->backgroundMode() == TQt::PaletteButton)
+ lb->setBackgroundMode(TQt::PaletteBackground);
lb->removeEventFilter(this);
}
diff --git a/kstyles/plastik/plastik.h b/kstyles/plastik/plastik.h
index 9b38d764c..64c3c3a65 100644
--- a/kstyles/plastik/plastik.h
+++ b/kstyles/plastik/plastik.h
@@ -81,7 +81,7 @@ public:
SFlags flags = Style_Default,
const TQStyleOption &opt = TQStyleOption::Default ) const;
- void drawControl(ControlElement element,
+ void tqdrawControl(ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -89,9 +89,9 @@ public:
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
+ void tqdrawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
- void drawComplexControl(ComplexControl control,
+ void tqdrawComplexControl(ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -101,7 +101,7 @@ public:
SCFlags active = SC_None,
const TQStyleOption& = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric m,
+ int tqpixelMetric(PixelMetric m,
const TQWidget *widget = 0 ) const;
TQRect subRect(SubRect r,
@@ -112,7 +112,7 @@ public:
SubControl subcontrol,
const TQStyleOption &opt = TQStyleOption::Default ) const;
- void drawComplexControlMask(TQStyle::ComplexControl c,
+ void tqdrawComplexControlMask(TQStyle::ComplexControl c,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -123,7 +123,7 @@ public:
const TQSize &s,
const TQStyleOption &o) const;
- int styleHint(StyleHint, const TQWidget * = 0,
+ int tqstyleHint(StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
diff --git a/kstyles/utils/installtheme/main.cpp b/kstyles/utils/installtheme/main.cpp
index 5ddf8cd56..10945d57f 100644
--- a/kstyles/utils/installtheme/main.cpp
+++ b/kstyles/utils/installtheme/main.cpp
@@ -57,7 +57,7 @@ int main(int argc, char **argv)
if (config.readEntry( "widgetStyle" ) == "basicstyle.la")
{
//OK, emit a style entry...
- if (!themes.contains(name)) //Only add first occurrence, i.e. user local one.
+ if (!themes.tqcontains(name)) //Only add first occurrence, i.e. user local one.
themes[name] = file;
}
}
diff --git a/kstyles/web/webstyle.cpp b/kstyles/web/webstyle.cpp
index f4ed7f931..17dc46941 100644
--- a/kstyles/web/webstyle.cpp
+++ b/kstyles/web/webstyle.cpp
@@ -92,7 +92,7 @@ scrollBarControlsMetrics
int extent = horizontal ? sb->height() : sb->width();
- TQColorGroup g = sb->colorGroup();
+ TQColorGroup g = sb->tqcolorGroup();
if (sliderStart > sliderMax)
sliderStart = sliderMax;
@@ -303,12 +303,12 @@ WebStyle::eventFilter(TQObject * o, TQEvent * e)
if (e->type() == TQEvent::Enter)
{
_highlightedButton = pb;
- pb->repaint(false);
+ pb->tqrepaint(false);
}
else if (e->type() == TQEvent::Leave)
{
_highlightedButton = 0;
- pb->repaint(false);
+ pb->tqrepaint(false);
}
return false;
@@ -371,14 +371,14 @@ WebStyle::drawPushButton(TQPushButton * b, TQPainter * p)
bool sunken(b->isDown() || b->isOn());
bool hl(_highlightedButton == b);
- TQColor bg(b->colorGroup().button());
+ TQColor bg(b->tqcolorGroup().button());
p->save();
- p->fillRect(b->rect(), b->colorGroup().brush(TQColorGroup::Background));
+ p->fillRect(b->rect(), b->tqcolorGroup().brush(TQColorGroup::Background));
if (b->isDefault())
{
- TQColor c(hl ? b->colorGroup().highlight() : b->colorGroup().mid());
+ TQColor c(hl ? b->tqcolorGroup().highlight() : b->tqcolorGroup().mid());
p->setPen(contrastingForeground(c, bg));
@@ -391,26 +391,26 @@ WebStyle::drawPushButton(TQPushButton * b, TQPainter * p)
4,
b->width() - 8,
b->height() - 8,
- b->colorGroup().brush(TQColorGroup::Button)
+ b->tqcolorGroup().brush(TQColorGroup::Button)
);
if (b->isEnabled())
{
if (sunken)
{
- p->setPen(contrastingForeground(b->colorGroup().light(), bg));
+ p->setPen(contrastingForeground(b->tqcolorGroup().light(), bg));
}
else
{
if (hl)
- p->setPen(contrastingForeground(b->colorGroup().highlight(), bg));
+ p->setPen(contrastingForeground(b->tqcolorGroup().highlight(), bg));
else
- p->setPen(contrastingForeground(b->colorGroup().mid(), bg));
+ p->setPen(contrastingForeground(b->tqcolorGroup().mid(), bg));
}
}
else
{
- p->setPen(b->colorGroup().button());
+ p->setPen(b->tqcolorGroup().button());
}
drawFunkyRect(p, 3, 3, b->width() - 6, b->height() - 6, true);
@@ -459,7 +459,7 @@ WebStyle::drawScrollBarControls
rSlider
);
- TQColorGroup g(sb->colorGroup());
+ TQColorGroup g(sb->tqcolorGroup());
if (controls & AddLine && rAdd.isValid())
{
@@ -754,7 +754,7 @@ WebStyle::drawExclusiveIndicator
p->setBrush(g.brush(TQColorGroup::Background));
- // Avoid misshapen ellipses. Qt or X bug ? Who knows...
+ // Avoid mistqshapen ellipses. Qt or X bug ? Who knows...
if (0 == w % 2)
--w;
@@ -1450,14 +1450,14 @@ WebStyle::drawTab
{
TQRect r(tab->rect());
- TQColorGroup g(tabBar->colorGroup());
+ TQColorGroup g(tabBar->tqcolorGroup());
p->save();
p->setPen(selected ? g.dark() : g.mid());
p->fillRect(r, g.brush(TQColorGroup::Background));
- switch (tabBar->shape())
+ switch (tabBar->tqshape())
{
case TQTabBar::RoundedAbove:
case TQTabBar::TriangularAbove:
@@ -1603,7 +1603,7 @@ WebStyle::drawKickerTaskButton
static TQString modStr =
TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]");
- int modStrPos = s.find(modStr);
+ int modStrPos = s.tqfind(modStr);
if (-1 != modStrPos)
{