summaryrefslogtreecommitdiffstats
path: root/kstyles
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-01-07 03:45:53 +0000
commit10308be19ef7fa44699562cc75946e7ea1fdf6b9 (patch)
tree4bc444c00a79e88105f2cfce5b6209994c413ca0 /kstyles
parent307136d8eef0ba133b78ceee8e901138d4c996a1 (diff)
downloadtdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.tar.gz
tdelibs-10308be19ef7fa44699562cc75946e7ea1fdf6b9.zip
Revert automated changes
Sorry guys, they are just not ready for prime time Work will continue as always git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdelibs@1212479 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'kstyles')
-rw-r--r--kstyles/highcolor/bitmaps.h2
-rw-r--r--kstyles/highcolor/highcolor.cpp120
-rw-r--r--kstyles/highcolor/highcolor.h10
-rw-r--r--kstyles/highcontrast/config/highcontrastconfig.cpp6
-rw-r--r--kstyles/highcontrast/highcontrast.cpp90
-rw-r--r--kstyles/highcontrast/highcontrast.h12
-rw-r--r--kstyles/keramik/genembed.cpp32
-rw-r--r--kstyles/keramik/gradients.cpp2
-rw-r--r--kstyles/keramik/keramik.cpp204
-rw-r--r--kstyles/keramik/keramik.h22
-rw-r--r--kstyles/keramik/pixmaploader.cpp124
-rw-r--r--kstyles/keramik/pixmaploader.h4
-rw-r--r--kstyles/klegacy/klegacystyle.cpp204
-rw-r--r--kstyles/kthemestyle/kthemebase.cpp126
-rw-r--r--kstyles/kthemestyle/kthemebase.h42
-rw-r--r--kstyles/kthemestyle/kthemestyle.cpp202
-rw-r--r--kstyles/kthemestyle/kthemestyle.h14
-rw-r--r--kstyles/light/lightstyle-v2.cpp68
-rw-r--r--kstyles/light/lightstyle-v2.h10
-rw-r--r--kstyles/light/lightstyle-v3.cpp94
-rw-r--r--kstyles/light/lightstyle-v3.h10
-rw-r--r--kstyles/plastik/config/plastikconf.cpp36
-rw-r--r--kstyles/plastik/misc.cpp6
-rw-r--r--kstyles/plastik/plastik.cpp190
-rw-r--r--kstyles/plastik/plastik.h14
-rw-r--r--kstyles/utils/installtheme/main.cpp2
-rw-r--r--kstyles/web/webstyle.cpp34
27 files changed, 840 insertions, 840 deletions
diff --git a/kstyles/highcolor/bitmaps.h b/kstyles/highcolor/bitmaps.h
index 807eae3e0..43e96bd8e 100644
--- a/kstyles/highcolor/bitmaps.h
+++ b/kstyles/highcolor/bitmaps.h
@@ -22,7 +22,7 @@ static const unsigned char radiooff_center_bits[] = {
0xfc, 0x07, 0xfc, 0x07, 0xfc, 0x07, 0xf8, 0x03, 0xf0, 0x01, 0x00, 0x00,
0x00, 0x00};
-static const unsigned char radiotqmask_bits[] = {
+static const unsigned char radiomask_bits[] = {
0xf0, 0x01, 0xfc, 0x07, 0xfe, 0x0b, 0xfe, 0x0b, 0xff, 0x17, 0xff, 0x17,
0xff, 0x17, 0xff, 0x17, 0xff, 0x17, 0xfe, 0x0b, 0xf2, 0x09, 0x0c, 0x06,
0xf0, 0x01};
diff --git a/kstyles/highcolor/highcolor.cpp b/kstyles/highcolor/highcolor.cpp
index cb485f85c..a3a520f84 100644
--- a/kstyles/highcolor/highcolor.cpp
+++ b/kstyles/highcolor/highcolor.cpp
@@ -84,7 +84,7 @@ static TQBitmap lightBmp;
static TQBitmap grayBmp;
static TQBitmap dgrayBmp;
static TQBitmap centerBmp;
-static TQBitmap tqmaskBmp;
+static TQBitmap maskBmp;
static TQBitmap xBmp;
static TQIntDict<GradientSet> gDict;
@@ -242,7 +242,7 @@ void HighColorStyle::renderMenuBlendPixmap( KPixmap& pix, const TQColorGroup &cg
}
-// This function draws primitive elements as well as their tqmasks.
+// This function draws primitive elements as well as their masks.
void HighColorStyle::drawPrimitive( PrimitiveElement pe,
TQPainter *p,
const TQRect &r,
@@ -709,16 +709,16 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
}
- // RADIOBUTTON (exclusive indicator) tqmask
+ // RADIOBUTTON (exclusive indicator) mask
// -------------------------------------------------------------------
case PE_ExclusiveIndicatorMask: {
- if (tqmaskBmp.isNull()) {
- tqmaskBmp = TQBitmap(13, 13, radiotqmask_bits, true);
- tqmaskBmp.setMask(tqmaskBmp);
+ if (maskBmp.isNull()) {
+ maskBmp = TQBitmap(13, 13, radiomask_bits, true);
+ maskBmp.setMask(maskBmp);
}
p->setPen(Qt::color1);
- p->drawPixmap(r.x(), r.y(), tqmaskBmp);
+ p->drawPixmap(r.x(), r.y(), maskBmp);
break;
}
@@ -760,7 +760,7 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
case PE_WindowFrame:
case PE_PanelLineEdit: {
bool sunken = flags & Style_Sunken;
- int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth)
: opt.lineWidth();
if (lw == 2)
{
@@ -795,7 +795,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() ? tqpixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth)
: opt.lineWidth();
if (lw)
@@ -889,8 +889,8 @@ void HighColorStyle::drawPrimitive( PrimitiveElement pe,
p->save();
if ( flags & Style_Down )
- p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ),
- tqpixelMetric( PM_ButtonShiftVertical ) );
+ p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
+ pixelMetric( PM_ButtonShiftVertical ) );
if ( flags & Style_Enabled ) {
a.translate( r.x() + r.width() / 2, r.y() + r.height() / 2 );
@@ -1092,7 +1092,7 @@ void HighColorStyle::drawKStylePrimitive( KStylePrimitive kpe,
}
-void HighColorStyle::tqdrawControl( ControlElement element,
+void HighColorStyle::drawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1115,7 +1115,7 @@ void HighColorStyle::tqdrawControl( ControlElement element,
if ( btnDefault || button->autoDefault() ) {
// Compensate for default indicator
- static int di = tqpixelMetric( PM_ButtonDefaultIndicator );
+ static int di = pixelMetric( PM_ButtonDefaultIndicator );
br.addCoords( di, di, -di, -di );
}
@@ -1141,14 +1141,14 @@ void HighColorStyle::tqdrawControl( ControlElement element,
// Shift button contents if pushed.
if ( active ) {
- x += tqpixelMetric(PM_ButtonShiftHorizontal, widget);
- y += tqpixelMetric(PM_ButtonShiftVertical, widget);
+ x += pixelMetric(PM_ButtonShiftHorizontal, widget);
+ y += pixelMetric(PM_ButtonShiftVertical, widget);
flags |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() ) {
- int dx = tqpixelMetric( PM_MenuButtonIndicator, widget );
+ int dx = pixelMetric( PM_MenuButtonIndicator, widget );
drawPrimitive( PE_ArrowDown, p, TQRect(x + w - dx - 2, y + 2, dx, h - 4),
cg, flags, opt );
w -= dx;
@@ -1181,7 +1181,7 @@ void HighColorStyle::tqdrawControl( 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::tqsizeHint(), but gives
+ // the same as computed in TQPushButton::sizeHint(), but gives
// a reasonable bold effect.
int i;
@@ -1189,25 +1189,25 @@ void HighColorStyle::tqdrawControl( 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->tqcolorGroup(), button->isEnabled(), NULL,
+ button->colorGroup(), button->isEnabled(), NULL,
button->text(), -1,
- active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() );
+ active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
// Normal Text
for(i=0; i<2; i++)
drawItem( p, TQRect(x+i, y, w, h), AlignCenter | ShowPrefix,
- button->tqcolorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL,
+ button->colorGroup(), button->isEnabled(), i == 0 ? button->pixmap() : NULL,
button->text(), -1,
- active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
+ active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
} else
- drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->tqcolorGroup(),
+ drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,
- active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
+ active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
// Draw a focus rect if the button has focus
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- TQStyle::tqvisualRect(subRect(SR_PushButtonFocusRect, widget), widget),
+ TQStyle::visualRect(subRect(SR_PushButtonFocusRect, widget), widget),
cg, flags );
break;
}
@@ -1293,7 +1293,7 @@ void HighColorStyle::tqdrawControl( ControlElement element,
bool enabled = mi->isEnabled();
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
- bool etchtext = tqstyleHint( SH_EtchDisabledText );
+ bool etchtext = styleHint( SH_EtchDisabledText );
bool reverse = TQApplication::reverseLayout();
int x, y, w, h;
r.rect( &x, &y, &w, &h );
@@ -1324,7 +1324,7 @@ void HighColorStyle::tqdrawControl( ControlElement element,
// Do we have an icon?
if ( mi->iconSet() ) {
TQIconSet::Mode mode;
- TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r );
+ TQRect cr = visualRect( TQRect(x, y, checkcol, h), r );
// Select the correct icon from the iconset
if ( active )
@@ -1404,7 +1404,7 @@ void HighColorStyle::tqdrawControl( ControlElement element,
// Does the menu item have a text label?
if ( !s.isNull() ) {
- int t = s.tqfind( '\t' );
+ int t = s.find( '\t' );
int m = itemVMargin;
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
@@ -1459,8 +1459,8 @@ void HighColorStyle::tqdrawControl( ControlElement element,
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
- int dim = tqpixelMetric(PM_MenuButtonIndicator);
- TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
+ int dim = pixelMetric(PM_MenuButtonIndicator);
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -1480,12 +1480,12 @@ void HighColorStyle::tqdrawControl( ControlElement element,
}
default:
- KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
}
-void HighColorStyle::tqdrawControlMask( ControlElement element,
+void HighColorStyle::drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1506,12 +1506,12 @@ void HighColorStyle::tqdrawControlMask( ControlElement element,
}
default:
- KStyle::tqdrawControlMask(element, p, widget, r, opt);
+ KStyle::drawControlMask(element, p, widget, r, opt);
}
}
-void HighColorStyle::tqdrawComplexControl( ComplexControl control,
+void HighColorStyle::drawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1562,7 +1562,7 @@ void HighColorStyle::tqdrawComplexControl( ComplexControl control,
p->drawLine(x+1, y+2, x+1, y2-2);
// Get the button bounding box
- TQRect ar = TQStyle::tqvisualRect(
+ TQRect ar = TQStyle::visualRect(
querySubControlMetrics(CC_ComboBox, widget, SC_ComboBoxArrow),
widget );
@@ -1581,7 +1581,7 @@ void HighColorStyle::tqdrawComplexControl( ComplexControl control,
if ( controls & SC_ComboBoxEditField )
{
const TQComboBox * cb = (const TQComboBox *) widget;
- TQRect re = TQStyle::tqvisualRect(
+ TQRect re = TQStyle::visualRect(
querySubControlMetrics( CC_ComboBox, widget,
SC_ComboBoxEditField), widget );
@@ -1605,7 +1605,7 @@ void HighColorStyle::tqdrawComplexControl( ComplexControl control,
p->fillRect( re.x(), re.y(), re.width(), re.height(),
cg.brush( TQColorGroup::Highlight ) );
- TQRect re = TQStyle::tqvisualRect(
+ TQRect re = TQStyle::visualRect(
subRect(SR_ComboBoxFocusRect, cb), widget);
drawPrimitive( PE_FocusRect, p, re, cg,
@@ -1639,11 +1639,11 @@ void HighColorStyle::tqdrawComplexControl( ComplexControl control,
drawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
// Check whether to draw a background pixmap
- else if ( toolbutton->tqparentWidget() &&
- toolbutton->tqparentWidget()->backgroundPixmap() &&
- !toolbutton->tqparentWidget()->backgroundPixmap()->isNull() )
+ else if ( toolbutton->parentWidget() &&
+ toolbutton->parentWidget()->backgroundPixmap() &&
+ !toolbutton->parentWidget()->backgroundPixmap()->isNull() )
{
- TQPixmap pixmap = *(toolbutton->tqparentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, toolbutton->pos() );
}
else if (widget->parent())
@@ -1693,14 +1693,14 @@ void HighColorStyle::tqdrawComplexControl( ComplexControl control,
default:
- KStyle::tqdrawComplexControl(control, p, widget,
+ KStyle::drawComplexControl(control, p, widget,
r, cg, flags, controls, active, opt);
break;
}
}
-void HighColorStyle::tqdrawComplexControlMask( ComplexControl control,
+void HighColorStyle::drawComplexControlMask( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1722,7 +1722,7 @@ void HighColorStyle::tqdrawComplexControlMask( ComplexControl control,
}
default:
- KStyle::tqdrawComplexControlMask(control, p, widget, r, opt);
+ KStyle::drawComplexControlMask(control, p, widget, r, opt);
}
}
@@ -1765,11 +1765,11 @@ TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const
int dbw1 = 0, dbw2 = 0;
if (button->isDefault() || button->autoDefault()) {
- dbw1 = tqpixelMetric(PM_ButtonDefaultIndicator, widget);
+ dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget);
dbw2 = dbw1 * 2;
}
- int dfw1 = tqpixelMetric(PM_DefaultFrameWidth, widget) * 2,
+ int dfw1 = pixelMetric(PM_DefaultFrameWidth, widget) * 2,
dfw2 = dfw1 * 2;
return TQRect(wrect.x() + dfw1 + dbw1 + 1,
@@ -1781,7 +1781,7 @@ TQRect HighColorStyle::subRect(SubRect r, const TQWidget *widget) const
}
-int HighColorStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
+int HighColorStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m)
{
@@ -1814,7 +1814,7 @@ int HighColorStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
}
default:
- return KStyle::tqpixelMetric(m, widget);
+ return KStyle::pixelMetric(m, widget);
}
}
@@ -1832,8 +1832,8 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
const TQPushButton* button = (const TQPushButton*) widget;
int w = contentSize.width();
int h = contentSize.height();
- int bm = tqpixelMetric( PM_ButtonMargin, widget );
- int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int bm = pixelMetric( PM_ButtonMargin, widget );
+ int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
w += bm + fw + 6; // ### Add 6 to make way for bold font.
h += bm + fw;
@@ -1845,7 +1845,7 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
if ( type != HighColor ) {
// Compensate for default indicator
- int di = tqpixelMetric( PM_ButtonDefaultIndicator );
+ int di = pixelMetric( PM_ButtonDefaultIndicator );
w += di * 2;
h += di * 2;
}
@@ -1871,8 +1871,8 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
int w = contentSize.width(), h = contentSize.height();
if ( mi->custom() ) {
- w = mi->custom()->tqsizeHint().width();
- h = mi->custom()->tqsizeHint().height();
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().height();
if ( ! mi->custom()->fullSpan() )
h += 2*itemVMargin + 2*itemFrame;
}
@@ -1898,7 +1898,7 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
2 * itemFrame );
}
- if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 )
+ if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 )
w += 12;
else if ( mi->popup() )
w += 2 * arrowHMargin;
@@ -1922,7 +1922,7 @@ TQSize HighColorStyle::sizeFromContents( ContentsType contents,
}
-// Fix Qt's wacky image tqalignment
+// Fix Qt's wacky image alignment
TQPixmap HighColorStyle::stylePixmap(StylePixmap stylepixmap,
const TQWidget* widget,
const TQStyleOption& opt) const
@@ -1954,12 +1954,12 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
if ( (event->type() == TQEvent::Enter) &&
(button->isEnabled()) ) {
hoverWidget = button;
- button->tqrepaint( false );
+ button->repaint( false );
}
else if ( (event->type() == TQEvent::Leave) &&
(object == hoverWidget) ) {
hoverWidget = 0L;
- button->tqrepaint( false );
+ button->repaint( false );
}
} else if ( object->parent() && !qstrcmp( object->name(), kdeToolbarWidget ) )
{
@@ -1988,7 +1988,7 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
if (tb) horiz_grad = tb->orientation() == Qt::Vertical;
TQPainter p( widget );
- renderGradient(&p, r, parent->tqcolorGroup().button(), horiz_grad,
+ renderGradient(&p, r, parent->colorGroup().button(), horiz_grad,
x_offset, y_offset, pr.width(), pr.height());
return false; // Now draw the contents
@@ -2002,11 +2002,11 @@ bool HighColorStyle::eventFilter( TQObject *object, TQEvent *event )
TQWidget *widget = static_cast<TQWidget*>(object);
TQRect wr = widget->rect(), tr = toolbar->rect();
TQPainter p( widget );
- renderGradient(&p, wr, toolbar->tqcolorGroup().button(),
+ renderGradient(&p, wr, toolbar->colorGroup().button(),
toolbar->orientation() == Qt::Vertical,
wr.x(), wr.y(), tr.width() - 2, tr.height() - 2);
- p.setPen( toolbar->tqcolorGroup().dark() );
+ p.setPen( toolbar->colorGroup().dark() );
if ( toolbar->orientation() == Qt::Horizontal )
p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 );
else
@@ -2034,7 +2034,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.tqfind( clr.rgb() );
+ GradientSet* grSet = gDict.find( clr.rgb() );
if (!grSet) {
grSet = new GradientSet(clr);
diff --git a/kstyles/highcolor/highcolor.h b/kstyles/highcolor/highcolor.h
index 98fe2f651..f1fc44c33 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 tqdrawControl( ControlElement element,
+ void drawControl( 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 tqdrawControlMask( ControlElement element,
+ void drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default ) const;
- void tqdrawComplexControl( ComplexControl control,
+ void drawComplexControl( 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 tqdrawComplexControlMask( ComplexControl control,
+ void drawComplexControlMask( 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 tqpixelMetric( PixelMetric m,
+ int pixelMetric( PixelMetric m,
const TQWidget *widget = 0 ) const;
TQSize sizeFromContents( ContentsType contents,
diff --git a/kstyles/highcontrast/config/highcontrastconfig.cpp b/kstyles/highcontrast/config/highcontrastconfig.cpp
index fa980af2c..233fb7365 100644
--- a/kstyles/highcontrast/config/highcontrastconfig.cpp
+++ b/kstyles/highcontrast/config/highcontrastconfig.cpp
@@ -43,13 +43,13 @@ HighContrastStyleConfig::HighContrastStyleConfig(
TQWidget* parent): TQWidget(parent)
{
// Should have no margins here, the dialog provides them
- TQVBoxLayout* tqlayout = new TQVBoxLayout(this, 0, 0);
+ TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0);
KGlobal::locale()->insertCatalogue("kstyle_highcontrast_config");
wideLinesBox = new TQCheckBox(i18n("Use wider lines"), this);
- tqlayout->add(wideLinesBox);
- tqlayout->addStretch(1);
+ layout->add(wideLinesBox);
+ layout->addStretch(1);
TQSettings s;
diff --git a/kstyles/highcontrast/highcontrast.cpp b/kstyles/highcontrast/highcontrast.cpp
index bc53393f5..0b9c0cfcf 100644
--- a/kstyles/highcontrast/highcontrast.cpp
+++ b/kstyles/highcontrast/highcontrast.cpp
@@ -702,13 +702,13 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe,
}
case KPE_ListViewExpander: {
- // TODO There is no tqpixelMetric associated with the
+ // TODO There is no pixelMetric associated with the
// ListViewExpander in KStyle.
// To have a properly large expander, the CC_ListView case of
- // tqdrawComplexControl should be handled.
+ // drawComplexControl should be handled.
// Probably it would be better to add a KPM_ListViewExpander metric
// to the KStyle KStylePixelMetric enum, and have the KStyle
- // tqdrawComplexControl handle it.
+ // drawComplexControl handle it.
PrimitiveElement direction;
if (flags & Style_On) { // Collapsed = On
direction = PE_ArrowRight;
@@ -729,7 +729,7 @@ void HighContrastStyle::drawKStylePrimitive (KStylePrimitive kpe,
}
-void HighContrastStyle::tqdrawControl (ControlElement element,
+void HighContrastStyle::drawControl (ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -755,9 +755,9 @@ void HighContrastStyle::tqdrawControl (ControlElement element,
drawRoundRect (p, r);
const TQTabBar *tb = static_cast< const TQTabBar * >(widget);
- TQTabBar::Shape tqshape = tb->tqshape();
- if (tqshape == TQTabBar::TriangularBelow ||
- tqshape == TQTabBar::RoundedBelow) {
+ TQTabBar::Shape shape = tb->shape();
+ if (shape == TQTabBar::TriangularBelow ||
+ shape == TQTabBar::RoundedBelow) {
p->fillRect (r.left(), r.top(),
r.width(), 2*basicLineWidth,
p->pen().color());
@@ -789,7 +789,7 @@ void HighContrastStyle::tqdrawControl (ControlElement element,
if (( btnDefault || button->autoDefault() ) && (button->isEnabled())) {
// Compensate for default indicator
- static int di = tqpixelMetric( PM_ButtonDefaultIndicator );
+ static int di = pixelMetric( PM_ButtonDefaultIndicator );
addOffset (&br, di);
}
@@ -860,7 +860,7 @@ void HighContrastStyle::tqdrawControl (ControlElement element,
// Does the button have a popup menu?
if (popup) {
- int dx = tqpixelMetric (PM_MenuButtonIndicator, widget);
+ int dx = pixelMetric (PM_MenuButtonIndicator, widget);
drawArrow (p, TQRect(x + w - dx - 2, y + 2, dx, h - 4), PE_ArrowDown);
w -= dx;
}
@@ -1009,7 +1009,7 @@ void HighContrastStyle::tqdrawControl (ControlElement element,
// Do we have an icon?
if ( mi->iconSet() && !mi->iconSet()->isNull() ) {
TQIconSet::Mode mode;
- TQRect cr = tqvisualRect( TQRect(x, y, checkcol, h), r );
+ TQRect cr = visualRect( TQRect(x, y, checkcol, h), r );
// Select the correct icon from the iconset
if (!(flags & Style_Enabled))
@@ -1075,7 +1075,7 @@ void HighContrastStyle::tqdrawControl (ControlElement element,
// Does the menu item have a text label?
if ( !s.isNull() ) {
- int t = s.tqfind( '\t' );
+ int t = s.find( '\t' );
int m = itemVMargin;
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
@@ -1118,8 +1118,8 @@ void HighContrastStyle::tqdrawControl (ControlElement element,
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
- int dim = tqpixelMetric(PM_MenuButtonIndicator);
- TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
+ int dim = pixelMetric(PM_MenuButtonIndicator);
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - 2*itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -1129,11 +1129,11 @@ void HighContrastStyle::tqdrawControl (ControlElement element,
}
default:
- KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
}
-void HighContrastStyle::tqdrawControlMask (ControlElement element,
+void HighContrastStyle::drawControlMask (ControlElement element,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -1157,12 +1157,12 @@ void HighContrastStyle::tqdrawControlMask (ControlElement element,
}
default: {
- KStyle::tqdrawControlMask (element, p, w, r, opt);
+ KStyle::drawControlMask (element, p, w, r, opt);
}
}
}
-// Helper to tqfind the next sibling that's not hidden
+// Helper to find the next sibling that's not hidden
// Lifted from kstyle.cpp
static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
{
@@ -1176,7 +1176,7 @@ static TQListViewItem* nextVisibleSibling(TQListViewItem* item)
return sibling;
}
-void HighContrastStyle::tqdrawComplexControl (ComplexControl control,
+void HighContrastStyle::drawComplexControl (ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1197,7 +1197,7 @@ void HighContrastStyle::tqdrawComplexControl (ComplexControl control,
setColorsText (p, cg, flags);
drawRoundRect (p, r);
- TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget);
+ TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_ComboBox, widget, SC_ComboBoxArrow), widget);
if (flags & Style_HasFocus) {
TQRect r3 (r);
if (r2.left() > 0)
@@ -1232,12 +1232,12 @@ void HighContrastStyle::tqdrawComplexControl (ComplexControl control,
setColorsButton (p, cg, flags);
// Draw arrows if required
if (controls & SC_SpinWidgetDown) {
- TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetDown), widget);
+ TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetDown), widget);
drawRoundRect (p, r2);
drawArrow (p, r2, PE_SpinWidgetDown, 2*basicLineWidth);
}
if (controls & SC_SpinWidgetUp) {
- TQRect r2 = TQStyle::tqvisualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetUp), widget);
+ TQRect r2 = TQStyle::visualRect (querySubControlMetrics (CC_SpinWidget, widget, SC_SpinWidgetUp), widget);
drawRoundRect (p, r2);
drawArrow (p, r2, PE_SpinWidgetUp, 2*basicLineWidth);
}
@@ -1273,11 +1273,11 @@ void HighContrastStyle::tqdrawComplexControl (ComplexControl control,
drawPrimitive(PE_ButtonTool, p, button, cg, bflags, opt);
// Check whether to draw a background pixmap
- else if ( toolbutton->tqparentWidget() &&
- toolbutton->tqparentWidget()->backgroundPixmap() &&
- !toolbutton->tqparentWidget()->backgroundPixmap()->isNull() )
+ else if ( toolbutton->parentWidget() &&
+ toolbutton->parentWidget()->backgroundPixmap() &&
+ !toolbutton->parentWidget()->backgroundPixmap()->isNull() )
{
- TQPixmap pixmap = *(toolbutton->tqparentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, toolbutton->pos() );
}
}
@@ -1312,7 +1312,7 @@ void HighContrastStyle::tqdrawComplexControl (ComplexControl control,
// Paint the icon and text.
if ( controls & SC_ListView )
- TQCommonStyle::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ TQCommonStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
// If we're have a branch or are expanded...
if ( controls & (SC_ListViewBranch | SC_ListViewExpand) )
@@ -1458,13 +1458,13 @@ void HighContrastStyle::tqdrawComplexControl (ComplexControl control,
}
default:
- KStyle::tqdrawComplexControl(control, p, widget,
+ KStyle::drawComplexControl(control, p, widget,
r, cg, flags, controls, active, opt);
break;
}
}
-void HighContrastStyle::tqdrawComplexControlMask(ComplexControl c,
+void HighContrastStyle::drawComplexControlMask(ComplexControl c,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -1478,7 +1478,7 @@ void HighContrastStyle::tqdrawComplexControlMask(ComplexControl c,
break;
}
default: {
- KStyle::tqdrawComplexControlMask (c, p, w, r, o);
+ KStyle::drawComplexControlMask (c, p, w, r, o);
}
}
}
@@ -1515,7 +1515,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
switch (control)
{
case CC_ComboBox : {
- int arrow = tqpixelMetric (PM_ScrollBarExtent, widget);
+ int arrow = pixelMetric (PM_ScrollBarExtent, widget);
switch (subcontrol)
{
case SC_ComboBoxFrame:
@@ -1531,7 +1531,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
break;
}
case CC_SpinWidget : {
- int arrow = tqpixelMetric (PM_ScrollBarExtent, 0);
+ int arrow = pixelMetric (PM_ScrollBarExtent, 0);
switch (subcontrol)
{
case SC_SpinWidgetFrame:
@@ -1559,7 +1559,7 @@ TQRect HighContrastStyle::querySubControlMetrics( ComplexControl control,
}
-int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
+int HighContrastStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
//### TODO: Use the tab metrics changes from Ker.
switch(m)
@@ -1643,7 +1643,7 @@ int HighContrastStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) cons
}
default:
- return KStyle::tqpixelMetric(m, widget);
+ return KStyle::pixelMetric(m, widget);
}
}
@@ -1672,8 +1672,8 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
const TQPushButton* button = (const TQPushButton*) widget;
int w = contentSize.width();
int h = contentSize.height();
- int bm = tqpixelMetric( PM_ButtonMargin, widget );
- int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int bm = pixelMetric( PM_ButtonMargin, widget );
+ int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
w += bm + fw + 6; // ### Add 6 to make way for bold font.
h += bm + fw;
@@ -1684,7 +1684,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
w = 80;
// Compensate for default indicator
- int di = tqpixelMetric( PM_ButtonDefaultIndicator );
+ int di = pixelMetric( PM_ButtonDefaultIndicator );
w += di * 2;
h += di * 2;
}
@@ -1709,7 +1709,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 = tqpixelMetric (PM_ScrollBarExtent, cb);
+ int arrowSize = pixelMetric (PM_ScrollBarExtent, cb);
return TQSize(borderSize + basicLineWidth + arrowSize, borderSize) + contentSize;
}
@@ -1726,8 +1726,8 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
int w = contentSize.width(), h = contentSize.height();
if ( mi->custom() ) {
- w = mi->custom()->tqsizeHint().width();
- h = mi->custom()->tqsizeHint().height();
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().height();
if ( ! mi->custom()->fullSpan() )
h += 2*itemVMargin + 2*itemFrame;
}
@@ -1753,7 +1753,7 @@ TQSize HighContrastStyle::sizeFromContents( ContentsType contents,
2 * itemFrame );
}
- if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 )
+ if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 )
w += 12;
else if ( mi->popup() )
w += 2 * arrowHMargin;
@@ -1807,7 +1807,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
|| widget->inherits ("QSpinWidget")))
{
hoverWidget = widget;
- widget->tqrepaint (false);
+ widget->repaint (false);
}
else if (event->type() == TQEvent::Leave
&& (widget->inherits ("QButton")
@@ -1816,7 +1816,7 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
{
if (object == hoverWidget)
hoverWidget = 0L;
- widget->tqrepaint (false);
+ widget->repaint (false);
}
// Make sure the focus rectangle is shown correctly.
else if (event->type() == TQEvent::FocusIn || event->type() == TQEvent::FocusOut)
@@ -1830,9 +1830,9 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
}
if (widgetparent)
- widgetparent->tqrepaint (false);
+ widgetparent->repaint (false);
else
- widget->tqrepaint (false);
+ widget->repaint (false);
}
}
@@ -1840,4 +1840,4 @@ bool HighContrastStyle::eventFilter (TQObject *object, TQEvent *event)
}
// vim: set noet ts=4 sw=4:
-// kate: indent-width 4; tqreplace-tabs off; smart-indent on; tab-width 4;
+// kate: indent-width 4; replace-tabs off; smart-indent on; tab-width 4;
diff --git a/kstyles/highcontrast/highcontrast.h b/kstyles/highcontrast/highcontrast.h
index 5b9bd0fb9..fb3db68b1 100644
--- a/kstyles/highcontrast/highcontrast.h
+++ b/kstyles/highcontrast/highcontrast.h
@@ -74,7 +74,7 @@ class HighContrastStyle : public KStyle
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- void tqdrawControl( ControlElement element,
+ void drawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -82,13 +82,13 @@ class HighContrastStyle : public KStyle
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- void tqdrawControlMask( ControlElement element,
+ void drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default ) const;
- void tqdrawComplexControl( ComplexControl control,
+ void drawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -98,7 +98,7 @@ class HighContrastStyle : public KStyle
SCFlags active = SC_None,
const TQStyleOption& = TQStyleOption::Default ) const;
- void tqdrawComplexControlMask( ComplexControl control,
+ void drawComplexControlMask( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -120,7 +120,7 @@ class HighContrastStyle : public KStyle
int len = -1,
const TQColor *penColor = 0 ) const;
- int tqpixelMetric( PixelMetric m,
+ int pixelMetric( PixelMetric m,
const TQWidget *widget = 0 ) const;
int kPixelMetric( KStylePixelMetric m,
@@ -157,6 +157,6 @@ class HighContrastStyle : public KStyle
};
// vim: set noet ts=4 sw=4:
-// kate: indent-width 4; tqreplace-tabs off; smart-indent on; tab-width 4;
+// kate: indent-width 4; replace-tabs off; smart-indent on; tab-width 4;
#endif
diff --git a/kstyles/keramik/genembed.cpp b/kstyles/keramik/genembed.cpp
index e47e7e6e7..2fecf94d1 100644
--- a/kstyles/keramik/genembed.cpp
+++ b/kstyles/keramik/genembed.cpp
@@ -146,7 +146,7 @@ int main(int argc, char** argv)
int readJustID = 0;
- if ((pos = s.tqfindRev("-")) != -1)
+ if ((pos = s.findRev("-")) != -1)
{
int suffix = evalSuffix(s.mid(pos));
if (suffix !=-1 )
@@ -156,16 +156,16 @@ int main(int argc, char** argv)
}
}
- if (!assignID.tqcontains(id))
+ if (!assignID.contains(id))
{
assignID[id] = nextID;
nextID += 256;
}
- s.tqreplace("-","_");
+ s.replace("-","_");
- if (s.tqcontains("button"))
+ if (s.contains("button"))
KImageEffect::contrastHSV(input);
int fullID = assignID[id] + readJustID;//Subwidget..
@@ -178,7 +178,7 @@ int main(int argc, char** argv)
- if (s.tqcontains("toolbar") || s.tqcontains("tab-top-active") || s.tqcontains("menubar") )
+ if (s.contains("toolbar") || s.contains("tab-top-active") || s.contains("menubar") )
{
// highlights = false;
gamma = 1/1.25f;
@@ -186,7 +186,7 @@ int main(int argc, char** argv)
shadows = false;
}
- if (s.tqcontains("scrollbar") && s.tqcontains("groove"))
+ if (s.contains("scrollbar") && s.contains("groove"))
{
//highlights = false;
//gamma = 1.5;
@@ -194,7 +194,7 @@ int main(int argc, char** argv)
}
//brightAdj = -10;
- if (s.tqcontains("scrollbar") && s.tqcontains("slider"))
+ if (s.contains("scrollbar") && s.contains("slider"))
{
//highlights = false;
gamma =1/0.7f;
@@ -202,7 +202,7 @@ int main(int argc, char** argv)
}
- if (s.tqcontains("menuitem"))
+ if (s.contains("menuitem"))
{
//highlights = false;
gamma =1/0.6f;
@@ -222,14 +222,14 @@ int main(int argc, char** argv)
cout<<"static const unsigned char "<<s.latin1()<<"[]={\n";
- TQ_UINT32* read = reinterpret_cast< TQ_UINT32* >(input.bits() );
+ Q_UINT32* read = reinterpret_cast< Q_UINT32* >(input.bits() );
int size = input.width()*input.height();
for (int pos=0; pos<size; pos++)
{
QRgb basePix = (QRgb)*read;
- if (tqAlpha(basePix) != 255)
+ if (qAlpha(basePix) != 255)
reallySolid = false;
else
pixSolid++;
@@ -242,7 +242,7 @@ int main(int argc, char** argv)
images.push_back(image);
- read = reinterpret_cast< TQ_UINT32* >(input.bits() );
+ read = reinterpret_cast< Q_UINT32* >(input.bits() );
for (int pos=0; pos<size; pos++)
{
QRgb basePix = (QRgb)*read;
@@ -252,10 +252,10 @@ int main(int argc, char** argv)
int h,s,v;
clr.hsv(&h,&s,&v);
- v=tqGray(basePix);
+ v=qGray(basePix);
int targetColorAlpha = 0 , greyAdd = 0;
- //int srcAlpha = tqAlpha(basePix);
+ //int srcAlpha = qAlpha(basePix);
if (s>0 || v > 128)
{ //Non-shadow
@@ -296,8 +296,8 @@ int main(int argc, char** argv)
if (reallySolid)
cout<<targetColorAlpha<<","<<greyAdd<<",";
else
- cout<<targetColorAlpha<<","<<greyAdd<<","<<tqAlpha(basePix)<<",";
- //cout<<tqRed(basePix)<<","<<tqGreen(basePix)<<","<<tqBlue(basePix)<<","<<tqAlpha(basePix)<<",";
+ cout<<targetColorAlpha<<","<<greyAdd<<","<<qAlpha(basePix)<<",";
+ //cout<<qRed(basePix)<<","<<qGreen(basePix)<<","<<qBlue(basePix)<<","<<qAlpha(basePix)<<",";
if (pos%8 == 7)
cout<<"\n";
@@ -373,7 +373,7 @@ int main(int argc, char** argv)
for (TQMap<TQString, int>::iterator i = assignID.begin(); i != assignID.end(); ++i)
{
TQString name = "keramik_"+i.key();
- name.tqreplace("-","_");
+ name.replace("-","_");
ts<<"\t"<<name<<" = "<<i.data()<<",\n";
}
ts<<"\tkeramik_last\n";
diff --git a/kstyles/keramik/gradients.cpp b/kstyles/keramik/gradients.cpp
index 4a5c7dfc9..ab804d117 100644
--- a/kstyles/keramik/gradients.cpp
+++ b/kstyles/keramik/gradients.cpp
@@ -96,7 +96,7 @@ void GradientPainter::renderGradient( TQPainter* p, const TQRect& r, TQColor c,
int key = entry.key();
- if ((cacheEntry = cache.tqfind(key, false)))
+ if ((cacheEntry = cache.find(key, false)))
{
if (entry == *cacheEntry)
{
diff --git a/kstyles/keramik/keramik.cpp b/kstyles/keramik/keramik.cpp
index 9ac37d2b9..6921efa2f 100644
--- a/kstyles/keramik/keramik.cpp
+++ b/kstyles/keramik/keramik.cpp
@@ -102,7 +102,7 @@ TQBitmap lightBmp;
TQBitmap grayBmp;
TQBitmap dgrayBmp;
TQBitmap centerBmp;
-TQBitmap tqmaskBmp;
+TQBitmap maskBmp;
TQBitmap xBmp;
*/
namespace
@@ -146,8 +146,8 @@ namespace
p->save();
/*if ( down )
- p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ),
- tqpixelMetric( PM_ButtonShiftVertical ) );
+ p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
+ pixelMetric( PM_ButtonShiftVertical ) );
*/
if ( enabled ) {
@@ -277,7 +277,7 @@ TQPixmap KeramikStyle::stylePixmap(StylePixmap stylepixmap,
KeramikStyle::KeramikStyle()
:KStyle( AllowMenuTransparency | FilledFrameWorkaround, ThreeButtonScrollBar ),
- tqmaskMode(false), formMode(false),
+ maskMode(false), formMode(false),
toolbarBlendWidget(0), titleBarMode(None), flatMode(false), customScrollMode(false), kickerMode(false)
{
forceSmallMode = false;
@@ -346,8 +346,8 @@ void KeramikStyle::polish(TQWidget* widget)
else if ( widget->inherits( "QMenuBar" ) || widget->inherits( "QPopupMenu" ) )
widget->setBackgroundMode( NoBackground );
- else if ( widget->tqparentWidget() &&
- ( ( widget->inherits( "QListBox" ) && widget->tqparentWidget()->inherits( "QComboBox" ) ) ||
+ else if ( widget->parentWidget() &&
+ ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->inherits( "QComboBox" ) ) ||
widget->inherits( "KCompletionBox" ) ) ) {
TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 4 );
@@ -387,8 +387,8 @@ void KeramikStyle::unPolish(TQWidget* widget)
else if ( widget->inherits( "QMenuBar" ) || widget->inherits( "QPopupMenu" ) )
widget->setBackgroundMode( PaletteBackground );
- else if ( widget->tqparentWidget() &&
- ( ( widget->inherits( "QListBox" ) && widget->tqparentWidget()->inherits( "QComboBox" ) ) ||
+ else if ( widget->parentWidget() &&
+ ( ( widget->inherits( "QListBox" ) && widget->parentWidget()->inherits( "QComboBox" ) ) ||
widget->inherits( "KCompletionBox" ) ) ) {
TQListBox* listbox = (TQListBox*) widget;
listbox->setLineWidth( 1 );
@@ -432,7 +432,7 @@ static void renderToolbarEntryBackground(TQPainter* paint,
//Do we have a parent toolbar to use?
if (parent)
{
- //Calculate the toolbar tqgeometry.
+ //Calculate the toolbar geometry.
//The initial guess is the size of the parent widget
toolWidth = parent->width();
toolHeight = parent->height();
@@ -476,7 +476,7 @@ static void renderToolbarWidgetBackground(TQPainter* painter, const TQWidget* wi
// Find the top-level toolbar of this widget, since it may be nested in other
// widgets that are on the toolbar.
- TQWidget *parent = static_cast<TQWidget*>(widget->tqparentWidget());
+ TQWidget *parent = static_cast<TQWidget*>(widget->parentWidget());
int x_offset = widget->x(), y_offset = widget->y();
while (parent && parent->parent() && !qstrcmp( parent->name(), kdeToolbarWidget ) )
{
@@ -519,19 +519,19 @@ static void renderToolbarWidgetBackground(TQPainter* painter, const TQWidget* wi
if (painter)
{
Keramik::GradientPainter::renderGradient( painter, widget->rect(),
- widget->tqcolorGroup().button(), horiz_grad, false,
+ widget->colorGroup().button(), horiz_grad, false,
x_offset, y_offset, toolWidth, toolHeight);
}
else
{
TQPainter p( widget );
Keramik::GradientPainter::renderGradient( &p, widget->rect(),
- widget->tqcolorGroup().button(), horiz_grad, false,
+ widget->colorGroup().button(), horiz_grad, false,
x_offset, y_offset, toolWidth, toolHeight);
}
}
-// This function draws primitive elements as well as their tqmasks.
+// This function draws primitive elements as well as their masks.
void KeramikStyle::drawPrimitive( PrimitiveElement pe,
TQPainter *p,
const TQRect &r,
@@ -944,7 +944,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
//p->setPen( cg.shadow() );
//p->drawRect( r.x()+1, r.y()+1, r.width()-2, r.height()-2);
- //p->fillRect( tqvisualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) );
+ //p->fillRect( visualRect( TQRect( x + 1, y + 1, 23, h - 2 ), r ), cg.background().dark( 105 ) );
//break;
// GENERAL PANELS
@@ -976,7 +976,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
case PE_WindowFrame:
{
bool sunken = flags & Style_Sunken;
- int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth)
: opt.lineWidth();
if (lw == 2)
{
@@ -1014,7 +1014,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
int x2 = r.x()+r.width()-1;
int y2 = r.y()+r.height()-1;
- int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth)
: opt.lineWidth();
if (lw)
{
@@ -1034,7 +1034,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
int y = r.y();
int x2 = r.x() + r.width() - 1;
int y2 = r.y() + r.height() - 1;
- int lw = opt.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth)
+ int lw = opt.isDefault() ? pixelMetric(PM_DefaultFrameWidth)
: opt.lineWidth();
if (lw)
@@ -1092,7 +1092,7 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
TQWidget* paintWidget = dynamic_cast<TQWidget*>(p->device());
TQToolBar* parent = 0;
if (paintWidget)
- parent = ::qt_cast<TQToolBar*>(paintWidget->tqparentWidget());
+ parent = ::qt_cast<TQToolBar*>(paintWidget->parentWidget());
renderToolbarEntryBackground(p, parent, r, cg, (flags & Style_Horizontal) );
if ( !(flags & Style_Horizontal) )
@@ -1140,8 +1140,8 @@ void KeramikStyle::drawPrimitive( PrimitiveElement pe,
p->save();
if ( flags & Style_Down )
- p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ),
- tqpixelMetric( PM_ButtonShiftVertical ) );
+ p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
+ pixelMetric( PM_ButtonShiftVertical ) );
if ( flags & Style_Enabled )
{
@@ -1305,16 +1305,16 @@ bool KeramikStyle::isFormWidget(const TQWidget* widget) const
{
//Form widgets are in the KHTMLView, but that has 2 further inner levels
//of widgets - QClipperWidget, and outside of that, QViewportWidget
- TQWidget* potentialClipPort = widget->tqparentWidget();
+ TQWidget* potentialClipPort = widget->parentWidget();
if ( !potentialClipPort || potentialClipPort->isTopLevel() )
return false;
- TQWidget* potentialViewPort = potentialClipPort->tqparentWidget();
+ TQWidget* potentialViewPort = potentialClipPort->parentWidget();
if (!potentialViewPort || potentialViewPort->isTopLevel() ||
qstrcmp(potentialViewPort->name(), "qt_viewport") )
return false;
- TQWidget* potentialKHTML = potentialViewPort->tqparentWidget();
+ TQWidget* potentialKHTML = potentialViewPort->parentWidget();
if (!potentialKHTML || potentialKHTML->isTopLevel() ||
qstrcmp(potentialKHTML->className(), "KHTMLView") )
return false;
@@ -1323,7 +1323,7 @@ bool KeramikStyle::isFormWidget(const TQWidget* widget) const
return true;
}
-void KeramikStyle::tqdrawControl( ControlElement element,
+void KeramikStyle::drawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1381,15 +1381,15 @@ void KeramikStyle::tqdrawControl( ControlElement element,
// Shift button contents if pushed.
if ( active )
{
- x += tqpixelMetric(PM_ButtonShiftHorizontal, widget);
- y += tqpixelMetric(PM_ButtonShiftVertical, widget);
+ x += pixelMetric(PM_ButtonShiftHorizontal, widget);
+ y += pixelMetric(PM_ButtonShiftVertical, widget);
flags |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() )
{
- int dx = tqpixelMetric( PM_MenuButtonIndicator, widget );
+ int dx = pixelMetric( PM_MenuButtonIndicator, widget );
if ( button->iconSet() && !button->iconSet()->isNull() &&
(dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w )
{
@@ -1397,7 +1397,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
}
else
{
- drawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
cg, flags, opt );
w -= dx;
}
@@ -1446,18 +1446,18 @@ void KeramikStyle::tqdrawControl( ControlElement element,
}
if (cornArrow) //Draw over the icon
- drawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
cg, flags, opt );
}
// Make the label indicate if the button is a default button or not
- drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->tqcolorGroup(),
+ drawItem( p, TQRect(x, y, w, h), AlignCenter | ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,
- &button->tqcolorGroup().buttonText() );
+ &button->colorGroup().buttonText() );
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, flags );
break;
}
@@ -1465,13 +1465,13 @@ void KeramikStyle::tqdrawControl( ControlElement element,
case CE_ToolButtonLabel:
{
//const TQToolButton *toolbutton = static_cast<const TQToolButton * >(widget);
- bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" );
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
TQRect nr = r;
if (!onToolbar)
{
- if (widget->tqparentWidget() &&
- !qstrcmp(widget->tqparentWidget()->name(),"qt_maxcontrols" ) )
+ if (widget->parentWidget() &&
+ !qstrcmp(widget->parentWidget()->name(),"qt_maxcontrols" ) )
{
//Make sure we don't cut into the endline
if (!qstrcmp(widget->name(), "close"))
@@ -1486,7 +1486,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
// nr.setWidth(r.width()-2); //Account for shadow
}
- KStyle::tqdrawControl(element, p, widget, nr, cg, flags, opt);
+ KStyle::drawControl(element, p, widget, nr, cg, flags, opt);
break;
}
@@ -1494,8 +1494,8 @@ void KeramikStyle::tqdrawControl( ControlElement element,
{
const TQTabBar* tabBar = static_cast< const TQTabBar* >( widget );
- bool bottom = tabBar->tqshape() == TQTabBar::RoundedBelow ||
- tabBar->tqshape() == TQTabBar::TriangularBelow;
+ bool bottom = tabBar->shape() == TQTabBar::RoundedBelow ||
+ tabBar->shape() == TQTabBar::TriangularBelow;
if ( flags & Style_Selected )
{
@@ -1551,7 +1551,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
tb->orientation() == Qt::Horizontal);
}
else
- KStyle::tqdrawControl( CE_DockWindowEmptyArea, p,
+ KStyle::drawControl( CE_DockWindowEmptyArea, p,
widget, r, cg, flags, opt );
break;
}
@@ -1607,7 +1607,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
bool enabled = mi->isEnabled();
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
- bool etchtext = tqstyleHint( SH_EtchDisabledText );
+ bool etchtext = styleHint( SH_EtchDisabledText );
bool reverse = TQApplication::reverseLayout();
if ( checkable )
checkcol = QMAX( checkcol, 20 );
@@ -1641,7 +1641,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
break;
}
- TQRect cr = tqvisualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r );
+ TQRect cr = visualRect( TQRect( x + 2, y + 2, checkcol - 1, h - 4 ), r );
// Do we have an icon?
if ( mi->iconSet() )
{
@@ -1724,7 +1724,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() ) {
- int t = s.tqfind( '\t' );
+ int t = s.find( '\t' );
int m = itemVMargin;
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
@@ -1787,8 +1787,8 @@ void KeramikStyle::tqdrawControl( ControlElement element,
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
- int dim = tqpixelMetric(PM_MenuButtonIndicator) - itemFrame;
- TQRect vr = tqvisualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
+ int dim = pixelMetric(PM_MenuButtonIndicator) - itemFrame;
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
y + h / 2 - dim / 2, dim, dim), r );
// Draw an arrow at the far end of the menu item
@@ -1868,7 +1868,7 @@ void KeramikStyle::tqdrawControl( ControlElement element,
//Here, we can't simply shift, as the painter code calculates everything based
//on the left corner, so we need to draw the 2 portions ourselves.
- //Start off by checking the tqgeometry of the end pixmap - it introduces a bit of an offset
+ //Start off by checking the geometry of the end pixmap - it introduces a bit of an offset
TQSize endDim = loader.size(keramik_progressbar + 3); //3 = 3*1 + 0 = (1,0) = cl
//We might not have anything to animate at all, though, if the ender is the only thing to paint
@@ -1914,27 +1914,27 @@ void KeramikStyle::tqdrawControl( ControlElement element,
default:
- KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
}
-void KeramikStyle::tqdrawControlMask( ControlElement element,
+void KeramikStyle::drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& opt ) const
{
p->fillRect(r, color1);
- tqmaskMode = true;
- tqdrawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt);
- tqmaskMode = false;
+ maskMode = true;
+ drawControl( element, p, widget, r, TQApplication::palette().active(), TQStyle::Style_Default, opt);
+ maskMode = false;
}
bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const
{
if (combo->width() >= 80)
return false;
- int suggestedWidth = combo->tqsizeHint().width();
+ int suggestedWidth = combo->sizeHint().width();
if (combo->width() - suggestedWidth < -5)
return true;
@@ -1942,7 +1942,7 @@ bool KeramikStyle::isSizeConstrainedCombo(const TQComboBox* combo) const
return false;
}
-void KeramikStyle::tqdrawComplexControl( ComplexControl control,
+void KeramikStyle::drawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1996,8 +1996,8 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
//When in compact mode, we force the shadow-less bevel mode,
//but that also alters height and not just width.
//readjust height to fake the other metrics (plus clear
- //the other areas, as appropriate). The autotqmasker
- //will take care of the overall tqshape.
+ //the other areas, as appropriate). The automasker
+ //will take care of the overall shape.
if ( compact )
{
forceSmallMode = true;
@@ -2019,7 +2019,7 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
toolbarBlendWidget = 0;
}
- // don't draw the focus rect etc. on the tqmask
+ // don't draw the focus rect etc. on the mask
if ( cg.button() == color1 && cg.background() == color0 )
break;
@@ -2033,11 +2033,11 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
if (!compact)
{
ar.setWidth(ar.width()-13);
- TQRect rr = tqvisualRect( TQRect( ar.x(), ar.y() + 4,
+ TQRect rr = visualRect( TQRect( ar.x(), ar.y() + 4,
loader.size(keramik_ripple ).width(), ar.height() - 8 ),
widget );
- ar = tqvisualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(),
+ ar = visualRect( TQRect( ar.x() + loader.size( keramik_ripple ).width() + 4, ar.y(),
11, ar.height() ),
widget );
@@ -2054,7 +2054,7 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
else //Size-constrained combo -- loose the ripple.
{
ar.setWidth(ar.width() - 7);
- ar = tqvisualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget);
+ ar = visualRect( TQRect( ar.x(), ar.y(), 11, ar.height() ), widget);
TQPointArray a;
a.setPoints(QCOORDARRLEN(keramik_combo_arrow), keramik_combo_arrow);
@@ -2069,7 +2069,7 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
{
if ( cb->editable() )
{
- TQRect er = tqvisualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget );
+ TQRect er = visualRect( querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxEditField ), widget );
er.addCoords( -2, -2, 2, 2 );
p2->fillRect( er, cg.base() );
drawPrimitive( PE_PanelLineEdit, p2, er, cg );
@@ -2078,7 +2078,7 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
}
else if ( cb->hasFocus() )
{
- TQRect re = TQStyle::tqvisualRect(subRect(SR_ComboBoxFocusRect, cb), widget);
+ TQRect re = TQStyle::visualRect(subRect(SR_ComboBoxFocusRect, cb), widget);
if ( compact )
re.addCoords( 3, 3, 0, -3 );
p2->fillRect( re, cg.brush( TQColorGroup::Highlight ) );
@@ -2113,7 +2113,7 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
case CC_SpinWidget:
{
const TQSpinWidget* sw = static_cast< const TQSpinWidget* >( widget );
- TQRect br = tqvisualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget );
+ TQRect br = visualRect( querySubControlMetrics( CC_SpinWidget, widget, SC_SpinWidgetButtonField ), widget );
if ( controls & SC_SpinWidgetButtonField )
{
Keramik::SpinBoxPainter().draw( p, br, cg.button(), cg.background(), !sw->isEnabled() );
@@ -2135,9 +2135,9 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
case CC_ScrollBar:
{
const TQScrollBar* sb = static_cast< const TQScrollBar* >( widget );
- if (highlightScrollBar && sb->tqparentWidget()) //Don't do the check if not highlighting anyway
+ if (highlightScrollBar && sb->parentWidget()) //Don't do the check if not highlighting anyway
{
- if (sb->tqparentWidget()->tqcolorGroup().button() != sb->tqcolorGroup().button())
+ if (sb->parentWidget()->colorGroup().button() != sb->colorGroup().button())
customScrollMode = true;
}
bool horizontal = sb->orientation() == Horizontal;
@@ -2208,14 +2208,14 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
// -------------------------------------------------------------------
case CC_ToolButton: {
const TQToolButton *toolbutton = (const TQToolButton *) widget;
- bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" );
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
bool onExtender = !onToolbar &&
- widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBarExtensionWidget") &&
- widget->tqparentWidget()->tqparentWidget()->inherits( "QToolBar" );
+ widget->parentWidget() && widget->parentWidget()->inherits( "QToolBarExtensionWidget") &&
+ widget->parentWidget()->parentWidget()->inherits( "QToolBar" );
bool onControlButtons = false;
- if (!onToolbar && !onExtender && widget->tqparentWidget() &&
- !qstrcmp(widget->tqparentWidget()->name(),"qt_maxcontrols" ) )
+ if (!onToolbar && !onExtender && widget->parentWidget() &&
+ !qstrcmp(widget->parentWidget()->name(),"qt_maxcontrols" ) )
{
onControlButtons = true;
titleBarMode = Maximized;
@@ -2254,11 +2254,11 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
}
// Check whether to draw a background pixmap
- else if ( toolbutton->tqparentWidget() &&
- toolbutton->tqparentWidget()->backgroundPixmap() &&
- !toolbutton->tqparentWidget()->backgroundPixmap()->isNull() )
+ else if ( toolbutton->parentWidget() &&
+ toolbutton->parentWidget()->backgroundPixmap() &&
+ !toolbutton->parentWidget()->backgroundPixmap()->isNull() )
{
- TQPixmap pixmap = *(toolbutton->tqparentWidget()->backgroundPixmap());
+ TQPixmap pixmap = *(toolbutton->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, toolbutton->pos() );
}
else if (onToolbar)
@@ -2311,14 +2311,14 @@ void KeramikStyle::tqdrawComplexControl( ComplexControl control,
case CC_TitleBar:
titleBarMode = Regular; //Handle buttons on titlebar different from toolbuttons
default:
- KStyle::tqdrawComplexControl( control, p, widget,
+ KStyle::drawComplexControl( control, p, widget,
r, cg, flags, controls, active, opt );
titleBarMode = None;
}
}
-void KeramikStyle::tqdrawComplexControlMask( ComplexControl control,
+void KeramikStyle::drawComplexControlMask( ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -2326,11 +2326,11 @@ void KeramikStyle::tqdrawComplexControlMask( ComplexControl control,
{
if (control == CC_ComboBox)
{
- tqmaskMode = true;
- tqdrawComplexControl(CC_ComboBox, p, widget, r,
+ maskMode = true;
+ drawComplexControl(CC_ComboBox, p, widget, r,
TQApplication::palette().active(), Style_Default,
SC_ComboBoxFrame,SC_None, opt);
- tqmaskMode = false;
+ maskMode = false;
}
else
@@ -2338,7 +2338,7 @@ void KeramikStyle::tqdrawComplexControlMask( ComplexControl control,
}
-int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
+int KeramikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m)
{
@@ -2395,8 +2395,8 @@ int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
const TQTabBar* tb = ::qt_cast<const TQTabBar*>(widget);
if (tb)
{
- if (tb->tqshape() == TQTabBar::RoundedBelow ||
- tb->tqshape() == TQTabBar::TriangularBelow)
+ if (tb->shape() == TQTabBar::RoundedBelow ||
+ tb->shape() == TQTabBar::TriangularBelow)
return 0;
}
@@ -2408,7 +2408,7 @@ int KeramikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
return titleBarH;
default:
- return KStyle::tqpixelMetric(m, widget);
+ return KStyle::pixelMetric(m, widget);
}
}
@@ -2426,8 +2426,8 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents,
{
const TQPushButton* btn = static_cast< const TQPushButton* >( widget );
- int w = contentSize.width() + 2 * tqpixelMetric( PM_ButtonMargin, widget );
- int h = contentSize.height() + 2 * tqpixelMetric( PM_ButtonMargin, widget );
+ int w = contentSize.width() + 2 * pixelMetric( PM_ButtonMargin, widget );
+ int h = contentSize.height() + 2 * pixelMetric( PM_ButtonMargin, widget );
if ( btn->text().isEmpty() && contentSize.width() < 32 ) return TQSize( w, h );
@@ -2440,7 +2440,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents,
case CT_ToolButton:
{
- bool onToolbar = widget->tqparentWidget() && widget->tqparentWidget()->inherits( "QToolBar" );
+ bool onToolbar = widget->parentWidget() && widget->parentWidget()->inherits( "QToolBar" );
if (!onToolbar) //Behaves like a button, so scale appropriately to the border
{
int w = contentSize.width();
@@ -2473,8 +2473,8 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents,
int w = contentSize.width(), h = contentSize.height();
if ( mi->custom() ) {
- w = mi->custom()->tqsizeHint().width();
- h = mi->custom()->tqsizeHint().height();
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().height();
if ( ! mi->custom()->fullSpan() )
h += 2*itemVMargin + 2*itemFrame;
}
@@ -2500,7 +2500,7 @@ TQSize KeramikStyle::sizeFromContents( ContentsType contents,
2 * itemFrame );
}
- if ( ! mi->text().isNull() && mi->text().tqfind('\t') >= 0 )
+ if ( ! mi->text().isNull() && mi->text().find('\t') >= 0 )
w += itemHMargin + itemFrame*2 + 7;
else if ( mi->popup() )
w += 2 * arrowHMargin;
@@ -2584,7 +2584,7 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control,
{
//Note that the widget here == the combo, not the completion
//box, so we don't get any recursion
- int suggestedWidth = widget->tqsizeHint().width();
+ int suggestedWidth = widget->sizeHint().width();
TQRect def = opt.rect();
def.addCoords( 4, -4, -6, 4 );
@@ -2621,7 +2621,7 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control,
{
int range = sb->maxValue() - sb->minValue();
sliderlen = ( sb->pageStep() * maxlen ) / ( range + sb->pageStep() );
- slidermin = tqpixelMetric( PM_ScrollBarSliderMin, sb );
+ slidermin = pixelMetric( PM_ScrollBarSliderMin, sb );
if ( sliderlen < slidermin ) sliderlen = slidermin;
if ( sliderlen > maxlen ) sliderlen = maxlen;
}
@@ -2664,9 +2664,9 @@ TQRect KeramikStyle::querySubControlMetrics( ComplexControl control,
bool horizontal = sl->orientation() == Horizontal;
TQSlider::TickSetting ticks = sl->tickmarks();
int pos = sl->sliderStart();
- int size = tqpixelMetric( PM_SliderControlThickness, widget );
- int handleSize = tqpixelMetric( PM_SliderThickness, widget );
- int len = tqpixelMetric( PM_SliderLength, widget );
+ int size = pixelMetric( PM_SliderControlThickness, widget );
+ int handleSize = pixelMetric( PM_SliderThickness, widget );
+ int len = pixelMetric( PM_SliderLength, widget );
//Shrink the metrics if the widget is too small
//to fit our normal values for them.
@@ -2749,7 +2749,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
{
TQWidget* button = static_cast<TQWidget*>(object);
hoverWidget = 0;
- button->tqrepaint( false );
+ button->repaint( false );
return false;
}
@@ -2759,7 +2759,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
if (event->type() == TQEvent::Enter && static_cast<TQWidget*>(object)->isEnabled() )
{
hoverWidget = static_cast<TQWidget*>(object);
- hoverWidget->tqrepaint( false );
+ hoverWidget->repaint( false );
}
return false;
}
@@ -2787,7 +2787,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
switch (event->type())
{
#ifdef HAVE_X11_EXTENSIONS_SHAPE_H
- //Combo dropdowns are tqshaped
+ //Combo dropdowns are shaped
case TQEvent::Resize:
{
TQListBox* listbox = static_cast<TQListBox*>(object);
@@ -2819,7 +2819,7 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
TQPaintEvent* paint = (TQPaintEvent*) event;
- if ( !listbox->contentsRect().tqcontains( paint->rect() ) )
+ if ( !listbox->contentsRect().contains( paint->rect() ) )
{
TQPainter p( listbox );
Keramik::RectTilePainter( keramik_combobox_list, false, false ).draw( &p, 0, 0, listbox->width(), listbox->height(),
@@ -2858,12 +2858,12 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
TQMouseEvent* mev = static_cast<TQMouseEvent*>(event);
TQListBox* box = static_cast<TQListBox*> (object);
- TQWidget* parent = box->tqparentWidget();
+ TQWidget* parent = box->parentWidget();
if (!parent)
return false;
TQPoint inParCoords = parent->mapFromGlobal(mev->globalPos());
- if (parent->rect().tqcontains(inParCoords))
+ if (parent->rect().contains(inParCoords))
return true;
}
break;
@@ -2899,20 +2899,20 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
if ( toolbar->orientation() == Qt::Horizontal )
{
- Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(),
+ Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(),
true /*horizontal*/, false /*not a menu*/,
0, widget->y(), wr.width(), tr.height());
}
else
{
- Keramik::GradientPainter::renderGradient( &p, wr, widget->tqcolorGroup().button(),
+ Keramik::GradientPainter::renderGradient( &p, wr, widget->colorGroup().button(),
false /*vertical*/, false /*not a menu*/,
widget->x(), 0, tr.width(), wr.height());
}
//Draw terminator line, too
- p.setPen( toolbar->tqcolorGroup().mid() );
+ p.setPen( toolbar->colorGroup().mid() );
if ( toolbar->orientation() == Qt::Horizontal )
p.drawLine( wr.width()-1, 0, wr.width()-1, wr.height()-1 );
else
@@ -2932,4 +2932,4 @@ bool KeramikStyle::eventFilter( TQObject* object, TQEvent* event )
}
// vim: ts=4 sw=4 noet
-// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off;
+// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/kstyles/keramik/keramik.h b/kstyles/keramik/keramik.h
index 135a92751..03d97ee3a 100644
--- a/kstyles/keramik/keramik.h
+++ b/kstyles/keramik/keramik.h
@@ -70,7 +70,7 @@ public:
SFlags flags = Style_Default,
const TQStyleOption& = TQStyleOption::Default ) const;
- void tqdrawControl( ControlElement element,
+ void drawControl( ControlElement element,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
@@ -78,13 +78,13 @@ public:
SFlags flags = Style_Default,
const TQStyleOption& opt = TQStyleOption::Default ) const;
- void tqdrawControlMask( ControlElement element,
+ void drawControlMask( ControlElement element,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
const TQStyleOption& opt = TQStyleOption::Default ) const;
- void tqdrawComplexControl( ComplexControl control,
+ void drawComplexControl( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
@@ -94,13 +94,13 @@ public:
SCFlags active = SC_None,
const TQStyleOption& = TQStyleOption::Default ) const;
- void tqdrawComplexControlMask( ComplexControl control,
+ void drawComplexControlMask( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
const TQStyleOption& = TQStyleOption::Default ) const;
- int tqpixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const;
+ int pixelMetric( PixelMetric m, const TQWidget* widget = 0 ) const;
TQSize sizeFromContents( ContentsType contents,
const TQWidget* widget,
@@ -133,7 +133,7 @@ private:
//Rendering flags
mutable bool forceSmallMode;
- mutable bool tqmaskMode; //Ugly round trip flag to permit tqmasking with little code;
+ mutable bool maskMode; //Ugly round trip flag to permit masking with little code;
mutable bool formMode; //Set when rendering form widgets
mutable const TQWidget* toolbarBlendWidget; //Ditto for blending with toolbars
@@ -166,15 +166,15 @@ private:
if (formMode)
{
//If we're a form widget, we blend on painting, and consider ourselves
- //not to have a tqmask (so we don't get clipped to it)
- if (tqmaskMode)
+ //not to have a mask (so we don't get clipped to it)
+ if (maskMode)
return Keramik::TilePainter::PaintTrivialMask;
else
return Keramik::TilePainter::PaintFullBlend;
}
else
{
- if (tqmaskMode)
+ if (maskMode)
return Keramik::TilePainter::PaintMask;
else
return Keramik::TilePainter::PaintNormal;
@@ -183,7 +183,7 @@ private:
Keramik::TilePainter::PaintMode pmodeFullBlend() const
{
- return tqmaskMode?Keramik::TilePainter::PaintMask : Keramik::TilePainter::PaintFullBlend;
+ return maskMode?Keramik::TilePainter::PaintMask : Keramik::TilePainter::PaintFullBlend;
}
TQWidget* hoverWidget;
@@ -204,4 +204,4 @@ private:
#endif
// vim: ts=4 sw=4 noet
-// kate: indent-width 4; tqreplace-tabs off; tab-width 4;
+// kate: indent-width 4; replace-tabs off; tab-width 4;
diff --git a/kstyles/keramik/pixmaploader.cpp b/kstyles/keramik/pixmaploader.cpp
index 3013c8277..01cdf5fc6 100644
--- a/kstyles/keramik/pixmaploader.cpp
+++ b/kstyles/keramik/pixmaploader.cpp
@@ -69,13 +69,13 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor
//OK, now, fill it in, using the color..
- TQ_UINT32 r, g,b;
- TQ_UINT32 i = tqGray(color.rgb());
+ Q_UINT32 r, g,b;
+ Q_UINT32 i = qGray(color.rgb());
r = (3*color.red()+i)>>2;
g = (3*color.green()+i)>>2;
b = (3*color.blue()+i)>>2;
- TQ_UINT32 br = back.red(), bg = back.green(), bb = back.blue();
+ Q_UINT32 br = back.red(), bg = back.green(), bb = back.blue();
if (edata->haveAlpha)
@@ -83,21 +83,21 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor
if (blend)
{
img->setAlphaBuffer(false);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 3;
for (int pos = 0; pos < size; pos+=3)
{
- TQ_UINT32 scale = edata->data[pos];
- TQ_UINT32 add = (edata->data[pos+1]*i+127)>>8;
- TQ_UINT32 alpha = edata->data[pos+2];
- TQ_UINT32 destAlpha = 256 - alpha;
+ Q_UINT32 scale = edata->data[pos];
+ Q_UINT32 add = (edata->data[pos+1]*i+127)>>8;
+ Q_UINT32 alpha = edata->data[pos+2];
+ Q_UINT32 destAlpha = 256 - alpha;
- TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add];
- TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add];
- TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add];
+ Q_UINT32 rr = clamp[((r*scale+127)>>8) + add];
+ Q_UINT32 rg = clamp[((g*scale+127)>>8) + add];
+ Q_UINT32 rb = clamp[((b*scale+127)>>8) + add];
- *write =tqRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8),
+ *write =qRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8),
((rg*alpha+127)>>8) + ((bg*destAlpha+127)>>8),
((rb*alpha+127)>>8) + ((bb*destAlpha+127)>>8));
@@ -107,20 +107,20 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor
else
{
img->setAlphaBuffer(true);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 3;
for (int pos = 0; pos < size; pos+=3)
{
- TQ_UINT32 scale = edata->data[pos];
- TQ_UINT32 add = (edata->data[pos+1]*i+127)>>8;
- TQ_UINT32 alpha = edata->data[pos+2];
+ Q_UINT32 scale = edata->data[pos];
+ Q_UINT32 add = (edata->data[pos+1]*i+127)>>8;
+ Q_UINT32 alpha = edata->data[pos+2];
- TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add];
- TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add];
- TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add];
+ Q_UINT32 rr = clamp[((r*scale+127)>>8) + add];
+ Q_UINT32 rg = clamp[((g*scale+127)>>8) + add];
+ Q_UINT32 rb = clamp[((b*scale+127)>>8) + add];
- *write =tqRgba(rr, rg, rb, alpha);
+ *write =qRgba(rr, rg, rb, alpha);
write++;
}
@@ -130,17 +130,17 @@ TQImage* PixmapLoader::getDisabled(int name, const TQColor& color, const TQColor
else
{
img->setAlphaBuffer(false);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 2;
for (int pos = 0; pos < size; pos+=2)
{
- TQ_UINT32 scale = edata->data[pos];
- TQ_UINT32 add = (edata->data[pos+1]*i+127)>>8;
- TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add];
- TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add];
- TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add];
- *write =tqRgb(rr, rg, rb);
+ Q_UINT32 scale = edata->data[pos];
+ Q_UINT32 add = (edata->data[pos+1]*i+127)>>8;
+ Q_UINT32 rr = clamp[((r*scale+127)>>8) + add];
+ Q_UINT32 rg = clamp[((g*scale+127)>>8) + add];
+ Q_UINT32 rb = clamp[((b*scale+127)>>8) + add];
+ *write =qRgb(rr, rg, rb);
write++;
}
}
@@ -158,14 +158,14 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor&
TQImage* img = new TQImage(edata->width, edata->height, 32);
//OK, now, fill it in, using the color..
- TQ_UINT32 r, g,b;
+ Q_UINT32 r, g,b;
r = color.red() + 2;
g = color.green() + 2;
b = color.blue() + 2;
-// int i = tqGray(color.rgb());
+// int i = qGray(color.rgb());
- TQ_UINT32 br = back.red(), bg = back.green(), bb = back.blue();
+ Q_UINT32 br = back.red(), bg = back.green(), bb = back.blue();
if (edata->haveAlpha)
{
@@ -173,23 +173,23 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor&
{
img->setAlphaBuffer(false);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 3;
for (int pos = 0; pos < size; pos+=3)
{
- TQ_UINT32 scale = edata->data[pos];
- TQ_UINT32 add = edata->data[pos+1];
- TQ_UINT32 alpha = edata->data[pos+2];
- TQ_UINT32 destAlpha = 256 - alpha;
+ Q_UINT32 scale = edata->data[pos];
+ Q_UINT32 add = edata->data[pos+1];
+ Q_UINT32 alpha = edata->data[pos+2];
+ Q_UINT32 destAlpha = 256 - alpha;
if (scale != 0)
add = add*5/4;
- TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add];
- TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add];
- TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add];
+ Q_UINT32 rr = clamp[((r*scale+127)>>8) + add];
+ Q_UINT32 rg = clamp[((g*scale+127)>>8) + add];
+ Q_UINT32 rb = clamp[((b*scale+127)>>8) + add];
- *write =tqRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8),
+ *write =qRgb(((rr*alpha+127)>>8) + ((br*destAlpha+127)>>8),
((rg*alpha+127)>>8) + ((bg*destAlpha+127)>>8),
((rb*alpha+127)>>8) + ((bb*destAlpha+127)>>8));
@@ -200,22 +200,22 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor&
{
img->setAlphaBuffer(true);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 3;
for (int pos = 0; pos < size; pos+=3)
{
- TQ_UINT32 scale = edata->data[pos];
- TQ_UINT32 add = edata->data[pos+1];
- TQ_UINT32 alpha = edata->data[pos+2];
+ Q_UINT32 scale = edata->data[pos];
+ Q_UINT32 add = edata->data[pos+1];
+ Q_UINT32 alpha = edata->data[pos+2];
if (scale != 0)
add = add*5/4;
- TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add];
- TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add];
- TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add];
+ Q_UINT32 rr = clamp[((r*scale+127)>>8) + add];
+ Q_UINT32 rg = clamp[((g*scale+127)>>8) + add];
+ Q_UINT32 rb = clamp[((b*scale+127)>>8) + add];
- *write =tqRgba(rr, rg, rb, alpha);
+ *write =qRgba(rr, rg, rb, alpha);
write++;
}
}
@@ -224,22 +224,22 @@ TQImage* PixmapLoader::getColored(int name, const TQColor& color, const TQColor&
{
img->setAlphaBuffer(false);
- TQ_UINT32* write = reinterpret_cast< TQ_UINT32* >(img->bits() );
+ Q_UINT32* write = reinterpret_cast< Q_UINT32* >(img->bits() );
int size = img->width()*img->height() * 2;
for (int pos = 0; pos < size; pos+=2)
{
- TQ_UINT32 scale = edata->data[pos];
- TQ_UINT32 add = edata->data[pos+1];
+ Q_UINT32 scale = edata->data[pos];
+ Q_UINT32 add = edata->data[pos+1];
if (scale != 0)
add = add*5/4;
- TQ_UINT32 rr = clamp[((r*scale+127)>>8) + add];
- TQ_UINT32 rg = clamp[((g*scale+127)>>8) + add];
- TQ_UINT32 rb = clamp[((b*scale+127)>>8) + add];
+ Q_UINT32 rr = clamp[((r*scale+127)>>8) + add];
+ Q_UINT32 rg = clamp[((g*scale+127)>>8) + add];
+ Q_UINT32 rb = clamp[((b*scale+127)>>8) + add];
- *write =tqRgb(rr, rg, rb);
+ *write =qRgb(rr, rg, rb);
write++;
}
}
@@ -260,7 +260,7 @@ TQPixmap PixmapLoader::scale( int name, int width, int height, const TQColor& co
int key = entry.key();
- if ((cacheEntry = m_pixmapCache.tqfind(key, true)))
+ if ((cacheEntry = m_pixmapCache.find(key, true)))
{
if (entry == *cacheEntry) //True match!
return *cacheEntry->m_pixmap;
@@ -422,12 +422,12 @@ void TilePainter::draw( TQPainter *p, int x, int y, int width, int height, const
}
else
{
- const TQBitmap* tqmask = scale( col, row, w, h, color, bg, disabled, false ).tqmask();
- if (tqmask)
+ const TQBitmap* mask = scale( col, row, w, h, color, bg, disabled, false ).mask();
+ if (mask)
{
p->setBackgroundColor(Qt::color0);
p->setPen(Qt::color1);
- p->drawTiledPixmap( xpos, ypos, realW, realH, *tqmask);
+ p->drawTiledPixmap( xpos, ypos, realW, realH, *mask);
}
else
p->fillRect ( xpos, ypos, realW, realH, Qt::color1);
@@ -442,12 +442,12 @@ void TilePainter::draw( TQPainter *p, int x, int y, int width, int height, const
}
else
{
- const TQBitmap* tqmask = tile( col, row, color, bg, disabled, false ).tqmask();
- if (tqmask)
+ const TQBitmap* mask = tile( col, row, color, bg, disabled, false ).mask();
+ if (mask)
{
p->setBackgroundColor(Qt::color0);
p->setPen(Qt::color1);
- p->drawTiledPixmap( xpos, ypos, realW, realH, *tqmask);
+ p->drawTiledPixmap( xpos, ypos, realW, realH, *mask);
}
else
p->fillRect ( xpos, ypos, realW, realH, Qt::color1);
@@ -626,4 +626,4 @@ int SpinBoxPainter::tileName( unsigned int column, unsigned int ) const
}
// vim: ts=4 sw=4 noet
-// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent off;
+// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent off;
diff --git a/kstyles/keramik/pixmaploader.h b/kstyles/keramik/pixmaploader.h
index 6b8440ec0..ab0bb4223 100644
--- a/kstyles/keramik/pixmaploader.h
+++ b/kstyles/keramik/pixmaploader.h
@@ -161,7 +161,7 @@ namespace Keramik
Note that the IDs and offsets are separated since we can reuse the same code in many
cases by splitting the widget identify from tile identity (as there are many
- different widgets that have the same or similar tile tqlayout)
+ different widgets that have the same or similar tile layout)
*/
virtual int tileName( unsigned int, unsigned int ) const { return 0; }
@@ -364,4 +364,4 @@ namespace Keramik
#endif
// vim: ts=4 sw=4 noet
-// kate: indent-width 4; tqreplace-tabs off; tab-width 4;
+// kate: indent-width 4; replace-tabs off; tab-width 4;
diff --git a/kstyles/klegacy/klegacystyle.cpp b/kstyles/klegacy/klegacystyle.cpp
index 575edde01..0f998b2db 100644
--- a/kstyles/klegacy/klegacystyle.cpp
+++ b/kstyles/klegacy/klegacystyle.cpp
@@ -186,12 +186,12 @@ public:
struct KLegacyImageDataKeyField {
- TQ_INT8 function : 8;
- TQ_INT8 state : 8;
- TQ_INT8 shadow : 4;
- TQ_INT8 orientation : 4;
- TQ_INT8 arrowDirection : 4;
- TQ_INT8 gapSide : 4;
+ Q_INT8 function : 8;
+ Q_INT8 state : 8;
+ Q_INT8 shadow : 4;
+ Q_INT8 orientation : 4;
+ Q_INT8 arrowDirection : 4;
+ Q_INT8 gapSide : 4;
};
@@ -269,7 +269,7 @@ public:
: TQObject(parent, name)
{ d = 0; }
- GtkObject *tqfind(TQRegExp &) const;
+ GtkObject *find(TQRegExp &) const;
TQColor backColor(KLegacy::State);
TQColor baseColor(KLegacy::State);
@@ -385,7 +385,7 @@ static TQPixmap *drawImage(TQImage *image, int width, int height,
}
// draw the image
- bool tqmask = image->hasAlphaBuffer();
+ bool mask = image->hasAlphaBuffer();
TQBitmap bm(width, height);
bm.fill(Qt::color1);
@@ -406,7 +406,7 @@ static TQPixmap *drawImage(TQImage *image, int width, int height,
bitBlt(pixmap, x2[xx], y2[yy], &nimage[yy][xx],
0, 0, w2[xx], h2[yy], Qt::CopyROP);
- if (tqmask) {
+ if (mask) {
TQImage am = nimage[yy][xx].createAlphaMask();
bitBlt(&bm, x2[xx], y2[yy], &am,
0, 0, w2[xx], h2[yy], Qt::CopyROP);
@@ -414,7 +414,7 @@ static TQPixmap *drawImage(TQImage *image, int width, int height,
}
}
- if (tqmask)
+ if (mask)
pixmap->setMask(bm);
} else {
for (int y = 0; y < height; y += image->height())
@@ -422,12 +422,12 @@ static TQPixmap *drawImage(TQImage *image, int width, int height,
bitBlt(pixmap, x, y, image, 0, 0, -1, -1, Qt::CopyROP);
if (image->hasAlphaBuffer()) {
- TQImage tqmask = image->createAlphaMask();
+ TQImage mask = image->createAlphaMask();
- if (! tqmask.isNull() && tqmask.depth() == 1) {
+ if (! mask.isNull() && mask.depth() == 1) {
TQBitmap bm(width, height);
bm.fill(Qt::color1);
- bm = tqmask;
+ bm = mask;
pixmap->setMask(bm);
}
}
@@ -568,8 +568,8 @@ static GtkObject *initialize(TQPtrDict<GtkObject> &dict) {
new GtkObject( myGtkOptionMenu, "GtkCombo" );
- GtkObject * myGtktqStatusbar =
- new GtkObject( myGtkHBox, "GtktqStatusbar" );
+ GtkObject * myGtkStatusbar =
+ new GtkObject( myGtkHBox, "GtkStatusbar" );
GtkObject * myGtkCList =
new GtkObject( myGtkContainer, "GtkCList" );
GtkObject * myGtkCTree =
@@ -712,7 +712,7 @@ static GtkObject *initialize(TQPtrDict<GtkObject> &dict) {
dict.insert(TQSlider::staticMetaObject(), myGtkScale);
dict.insert(TQSpinBox::staticMetaObject(), myGtkSpinButton);
dict.insert(TQSplitter::staticMetaObject(), myGtkPaned);
- dict.insert(TQStatusBar::staticMetaObject(), myGtktqStatusbar);
+ dict.insert(TQStatusBar::staticMetaObject(), myGtkStatusbar);
dict.insert(TQTabBar::staticMetaObject(), myGtkNotebook);
dict.insert(TQTabDialog::staticMetaObject(), myGtkNotebook);
dict.insert(TQTabWidget::staticMetaObject(), myGtkNotebook);
@@ -848,7 +848,7 @@ TQFont *GtkObject::font() {
}
-GtkObject *GtkObject::tqfind(TQRegExp &r) const {
+GtkObject *GtkObject::find(TQRegExp &r) const {
// if the regular expression matches the name of this widget, return
if (r.match(name()) != -1) {
return (GtkObject *) this;
@@ -866,7 +866,7 @@ GtkObject *GtkObject::tqfind(TQRegExp &r) const {
while ((o = ot.current()) != 0) {
++ot;
- // this would be nice if tqmoc could parse this file :/
+ // this would be nice if moc could parse this file :/
//
// if (o->className() != "GtkObject") {
// qDebug("object is not a GtkObject (className = '%s')",
@@ -876,10 +876,10 @@ GtkObject *GtkObject::tqfind(TQRegExp &r) const {
obj = (GtkObject *) o;
- // use obj->tqfind(r) instead of r.match(obj->name()) so that this child's
+ // use obj->find(r) instead of r.match(obj->name()) so that this child's
// children will be searched as well... this allows us to search the entire
// object tree
- if ((gobj = obj->tqfind(r)) != 0) {
+ if ((gobj = obj->find(r)) != 0) {
// found something!
return (GtkObject *) gobj;
}
@@ -909,7 +909,7 @@ TQPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
imagedata->key.cachekey << "_" << (uint) imagedata->recolorable <<
(uint) imagedata->stretch << (uint) imagedata->overlayStretch;
- TQPixmap *pixmap = TQPixmapCache::tqfind(pixmapKey);
+ TQPixmap *pixmap = TQPixmapCache::find(pixmapKey);
if (pixmap) {
return pixmap;
}
@@ -917,7 +917,7 @@ TQPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
TQPixmap *main = 0, *overlay = 0;
if (! imagedata->file.isNull()) {
- TQImage *image = imageCache->tqfind(imagedata->file);
+ TQImage *image = imageCache->find(imagedata->file);
bool found = true;
if (! image) {
@@ -938,7 +938,7 @@ TQPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
}
if (! imagedata->overlayFile.isNull()) {
- TQImage *image = imageCache->tqfind(imagedata->overlayFile);
+ TQImage *image = imageCache->find(imagedata->overlayFile);
bool found = true;
if (! image) {
@@ -989,24 +989,24 @@ TQPixmap *GtkObject::draw(KLegacyImageData *imagedata, int width, int height) {
p.end();
if (main) {
- if (main->tqmask() && (! main->tqmask()->isNull())) {
+ if (main->mask() && (! main->mask()->isNull())) {
TQBitmap bm(sz);
TQPainter m(&bm);
TQRect r(0, 0, width, height);
- m.drawTiledPixmap(r, *(main->tqmask()));
+ m.drawTiledPixmap(r, *(main->mask()));
m.end();
pixmap->setMask(bm);
}
} else if (overlay) {
- if (overlay->tqmask() && (! overlay->tqmask()->isNull())) {
+ if (overlay->mask() && (! overlay->mask()->isNull())) {
TQBitmap bm(sz);
TQPainter m(&bm);
TQRect r((sz.width() - overlay->width()) / 2,
(sz.height() - overlay->height()) / 2,
sz.width(), sz.height());
- m.drawTiledPixmap(r, *(overlay->tqmask()));
+ m.drawTiledPixmap(r, *(overlay->mask()));
m.end();
pixmap->setMask(bm);
@@ -1149,14 +1149,14 @@ bool KLegacyStylePrivate::parseClass() {
TQRegExp r(classname);
r.setWildcard(true);
- GtkObject *obj = gtktree->tqfind(r);
+ GtkObject *obj = gtktree->find(r);
if (! obj) {
qWarning("unknown object '%s'", classname.latin1());
return false;
}
- KLegacyStyleData *styledata = styleDict.tqfind(stylename);
+ KLegacyStyleData *styledata = styleDict.find(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.tqfind(',');
- rp = border.tqfind(',', lp + 1);
- tp = border.tqfind(',', rp + 1);
- bp = border.tqfind('}', tp + 1);
+ lp = border.find(',');
+ rp = border.find(',', lp + 1);
+ tp = border.find(',', rp + 1);
+ bp = border.find('}', 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.tqfind(',');
- rp = border.tqfind(',', lp + 1);
- tp = border.tqfind(',', rp + 1);
- bp = border.tqfind('}', tp + 1);
+ lp = border.find(',');
+ rp = border.find(',', lp + 1);
+ tp = border.find(',', rp + 1);
+ bp = border.find('}', 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.tqfind(":");
+ int start = 0, end = next.find(":");
while (end != -1) {
TQString path(next.mid(start, end - start));
@@ -1500,7 +1500,7 @@ bool KLegacyStylePrivate::parsePixmapPath() {
}
start = end + 1;
- end = next.tqfind(":", start);
+ end = next.find(":", start);
}
// get the straggler
@@ -1543,7 +1543,7 @@ bool KLegacyStylePrivate::parseStyle() {
newstylename = newstylename.mid(1, newstylename.length() - 2);
- KLegacyStyleData *styledata = styleDict.tqfind(stylename);
+ KLegacyStyleData *styledata = styleDict.find(stylename);
if (! styledata) return false;
@@ -1573,7 +1573,7 @@ bool KLegacyStylePrivate::parseStyle() {
}
if (next.left(5) == "base[") {
- int l = next.tqfind('['), r = next.tqfind(']'), state;
+ int l = next.find('['), r = next.find(']'), 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.tqfind(',');
- gp = color.tqfind(',', rp + 1);
- bp = color.tqfind('}', gp + 1);
+ rp = color.find(',');
+ gp = color.find(',', rp + 1);
+ bp = color.find('}', 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.tqfind('['), r = next.tqfind(']'), state;
+ int l = next.find('['), r = next.find(']'), 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.tqfind(',');
- gp = color.tqfind(',', rp + 1);
- bp = color.tqfind('}', gp + 1);
+ rp = color.find(',');
+ gp = color.find(',', rp + 1);
+ bp = color.find('}', 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.tqfind('['), r = next.tqfind(']'), state;
+ int l = next.find('['), r = next.find(']'), 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.tqfind(',');
- gp = color.tqfind(',', rp + 1);
- bp = color.tqfind('}', gp + 1);
+ rp = color.find(',');
+ gp = color.find(',', rp + 1);
+ bp = color.find('}', 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.tqfind(TQMainWindow::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(((metaobject) ? metaobject :
- widget->tqmetaObject()));
+ GtkObject *gobj = gobj = priv->gtkDict.find(((metaobject) ? metaobject :
+ widget->metaObject()));
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.tqfind(&menuitem_ptr);
+ GtkObject *gobj = priv->gtkDict.find(&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.tqfind(TQButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQPushButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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->tqcolorGroup();
+ TQColorGroup g = btn->colorGroup();
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.tqfind(TQCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
if (! gobj) {
KStyle::drawIndicatorMask(p, x, y, w, h, state);
@@ -2275,15 +2275,15 @@ void KLegacyStyle::drawIndicatorMask(TQPainter *p, int x, int y, int w, int h, i
TQPixmap *pix = gobj->draw(key, w, h, "checkbutton");
- if (pix && pix->tqmask() && ! pix->tqmask()->isNull())
- p->drawPixmap(x, y, *(pix->tqmask()));
+ if (pix && pix->mask() && ! pix->mask()->isNull())
+ p->drawPixmap(x, y, *(pix->mask()));
else
KStyle::drawIndicatorMask(p, x, y, w, h, state);
}
TQSize KLegacyStyle::indicatorSize(void) const {
- GtkObject *gobj = priv->gtkDict.tqfind(TQCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQCheckBox::staticMetaObject());
if (! gobj) return KStyle::indicatorSize();
@@ -2303,7 +2303,7 @@ TQSize KLegacyStyle::indicatorSize(void) const {
else
return KStyle::indicatorSize();
- TQImage *image = imageCache->tqfind(filename);
+ TQImage *image = imageCache->find(filename);
if (! image) {
image = new TQImage(filename);
@@ -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.tqfind(TQRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
if (! gobj) {
KStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on);
@@ -2360,15 +2360,15 @@ void KLegacyStyle::drawExclusiveIndicatorMask(TQPainter *p, int x, int y, int w,
TQPixmap *pix = gobj->draw(key, w, h, "radiobutton");
- if (pix && pix->tqmask() && ! pix->tqmask()->isNull())
- p->drawPixmap(x, y, *(pix->tqmask()));
+ if (pix && pix->mask() && ! pix->mask()->isNull())
+ p->drawPixmap(x, y, *(pix->mask()));
else
KStyle::drawExclusiveIndicatorMask(p, x, y, w, h, on);
}
TQSize KLegacyStyle::exclusiveIndicatorSize(void) const {
- GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQRadioButton::staticMetaObject());
if (! gobj) {
return KStyle::indicatorSize();
@@ -2391,7 +2391,7 @@ TQSize KLegacyStyle::exclusiveIndicatorSize(void) const {
return KStyle::indicatorSize();
}
- TQImage *image = imageCache->tqfind(filename);
+ TQImage *image = imageCache->find(filename);
if (! image) {
image = new TQImage(filename);
@@ -2427,7 +2427,7 @@ void KLegacyStyle::drawPopupMenuItem(TQPainter *p, bool checkable, int maxpmw, i
}
if ( act && enabled ) {
- GtkObject *gobj = priv->gtkDict.tqfind(&menuitem_ptr);
+ GtkObject *gobj = priv->gtkDict.find(&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.tqfind( '\t' );
+ int t = s.find( '\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.tqfind(TQComboBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQComboBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQScrollBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(TQScrollBar::staticMetaObject());
if (! gobj) {
KStyle::drawScrollBarControls(p, scrollbar, start, controls, active);
@@ -2696,7 +2696,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll
skey.data.function = KLegacy::Box;
skey.data.orientation = scrollbar->orientation() + 1;
- if ((active & Slider) || (priv->hovering && slider.tqcontains(priv->mousePos)))
+ if ((active & Slider) || (priv->hovering && slider.contains(priv->mousePos)))
skey.data.state = KLegacy::Prelight;
else
skey.data.state = KLegacy::Normal;
@@ -2741,7 +2741,7 @@ void KLegacyStyle::drawScrollBarControls(TQPainter *p, const TQScrollBar *scroll
(active & SubLine), x, y,
buttonDim,
buttonDim,
- scrollbar->tqcolorGroup(), true);
+ scrollbar->colorGroup(), 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->tqcolorGroup(), true);
+ scrollbar->colorGroup(), 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.tqfind(TQSlider::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQSlider::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(&arrow_ptr);
+ GtkObject *gobj = priv->gtkDict.find(&arrow_ptr);
if (! gobj) {
KStyle::drawArrow(p, type, down, x, y, w, h, g, enabled, b);
@@ -2831,7 +2831,7 @@ void KLegacyStyle::drawArrow(TQPainter *p, ArrowType type, bool down,
key.data.arrowDirection = type + 1;
if ((! down) && priv->hovering &&
- TQRect(x, y, w, h).tqcontains(priv->mousePos)) {
+ TQRect(x, y, w, h).contains(priv->mousePos)) {
key.data.state = KLegacy::Prelight;
}
@@ -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.tqfind(&menuitem_ptr);
+ GtkObject *gobj = priv->gtkDict.find(&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.tqfind(&checkmenuitem_ptr);
+ GtkObject *gobj = priv->gtkDict.find(&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.tqfind(TQTabBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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->tqshape() == TQTabBar::RoundedAbove ||
- tabbar->tqshape() == TQTabBar::TriangularAbove) ?
+ key.data.gapSide = (tabbar->shape() == TQTabBar::RoundedAbove ||
+ tabbar->shape() == 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->tqshape() == TQTabBar::RoundedAbove ||
- tabbar->tqshape() == TQTabBar::TriangularAbove)
+ if (tabbar->shape() == TQTabBar::RoundedAbove ||
+ tabbar->shape() == 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.tqfind(TQToolBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(modStr);
+ int modStrPos = s.find(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.tqfind(TQPopupMenu::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQMainWindow::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQLineEdit::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQMenuBar::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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->tqrepaint(false);
+ priv->lastWidget->repaint(false);
} else if (obj->inherits("QRadioButton")) {
TQWidget *w = (TQWidget *) obj;
if (! w->isTopLevel() && w->isEnabled()) {
- GtkObject *gobj = priv->gtkDict.tqfind(TQRadioButton::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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.tqfind(TQCheckBox::staticMetaObject());
+ GtkObject *gobj = priv->gtkDict.find(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)->tqrepaint(false);
+ ((TQWidget *) obj)->repaint(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->tqrepaint(true);
+ w->repaint(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)->tqrepaint(false);
+ ((TQWidget *) obj)->repaint(false);
priv->hovering = false;
}
diff --git a/kstyles/kthemestyle/kthemebase.cpp b/kstyles/kthemestyle/kthemebase.cpp
index f2b133d23..6b5c0961d 100644
--- a/kstyles/kthemestyle/kthemebase.cpp
+++ b/kstyles/kthemestyle/kthemebase.cpp
@@ -77,8 +77,8 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
else
{
bool bOK;
- // tqfind first part (red)
- int nIndex = aValue.tqfind( ',' );
+ // find first part (red)
+ int nIndex = aValue.find( ',' );
if ( nIndex == -1 )
{
// return a sensible default -- Bernd
@@ -89,9 +89,9 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
nRed = aValue.left( nIndex ).toInt( &bOK );
- // tqfind second part (green)
+ // find second part (green)
int nOldIndex = nIndex;
- nIndex = aValue.tqfind( ',', nOldIndex + 1 );
+ nIndex = aValue.find( ',', nOldIndex + 1 );
if ( nIndex == -1 )
{
@@ -103,7 +103,7 @@ static TQColor readColorEntry( TQSettings* s, const char *pKey,
nGreen = aValue.mid( nOldIndex + 1,
nIndex - nOldIndex - 1 ).toInt( &bOK );
- // tqfind third part (blue)
+ // find third part (blue)
nBlue = aValue.right( aValue.length() - nIndex - 1 ).toInt( &bOK );
aRetColor.setRgb( nRed, nGreen, nBlue );
@@ -176,7 +176,7 @@ public:
*/
TQColor pixmapAveColor( const TQPixmap* p )
{
- if ( colorCache.tqcontains( p ) )
+ if ( colorCache.contains( p ) )
return colorCache[ p ];
TQImage to_ave = p->convertToImage();
@@ -209,7 +209,7 @@ public:
-// This is used to encode the keys. I used to use tqmasks but I think this
+// This is used to encode the keys. I used to use masks but I think this
// bitfield is nicer :) I don't know why C++ coders don't use these more..
// (mosfet)
struct kthemeKeyData
@@ -222,7 +222,7 @@ unsigned int height :
12;
unsigned int border :
1;
-unsigned int tqmask :
+unsigned int mask :
1;
};
@@ -236,8 +236,8 @@ void KThemeBase::generateBorderPix( int i )
// separate pixmap into separate components
if ( pbPixmaps[ i ] )
{
- // evidently I have to do tqmasks manually...
- const TQBitmap * srcMask = pbPixmaps[ i ] ->tqmask();
+ // evidently I have to do masks manually...
+ const TQBitmap * srcMask = pbPixmaps[ i ] ->mask();
TQBitmap destMask( pbWidth[ i ], pbWidth[ i ] );
TQPixmap tmp( pbWidth[ i ], pbWidth[ i ] );
@@ -563,7 +563,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
{
TQStringList keys = config.entryList( configFileName );
- if ( keys.tqcontains( "foreground" ) )
+ if ( keys.contains( "foreground" ) )
{
d->overrideForeground = true;
d->overrideForegroundCol = readColorEntry( &config, ( configFileName + "foreground" ).latin1(), 0 );
@@ -571,7 +571,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideForeground = false;
- if ( keys.tqcontains( "background" ) )
+ if ( keys.contains( "background" ) )
{
d->overrideBackground = true;
d->overrideBackgroundCol = readColorEntry( &config, ( configFileName + "background" ).latin1(), 0 );
@@ -581,7 +581,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
- if ( keys.tqcontains( "selectForeground" ) )
+ if ( keys.contains( "selectForeground" ) )
{
d->overrideSelectForeground = true;
d->overrideSelectForegroundCol = readColorEntry( &config, ( configFileName + "selectForeground" ).latin1(), 0 );
@@ -589,7 +589,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideSelectForeground = false;
- if ( keys.tqcontains( "selectBackground" ) )
+ if ( keys.contains( "selectBackground" ) )
{
d->overrideSelectBackground = true;
d->overrideSelectBackgroundCol = readColorEntry( &config, ( configFileName + "selectBackground" ).latin1(), 0 );
@@ -597,7 +597,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
else
d->overrideSelectBackground = false;
- if ( keys.tqcontains( "windowBackground" ) )
+ if ( keys.contains( "windowBackground" ) )
{
d->overrideWindowBackground = true;
d->overrideWindowBackgroundCol = readColorEntry( &config, ( configFileName + "windowBackground" ).latin1(), 0 );
@@ -606,7 +606,7 @@ void KThemeBase::applyConfigFile( TQSettings& config )
d->overrideWindowBackground = false;
- if ( keys.tqcontains( "windowForeground" ) )
+ if ( keys.contains( "windowForeground" ) )
{
d->overrideWindowForeground = true;
d->overrideWindowForegroundCol = readColorEntry( &config, ( configFileName + "windowForeground" ).latin1(), 0 );
@@ -801,51 +801,51 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
{
pixmap = new KThemePixmap();
pixmap->resize( w, h );
- TQBitmap tqmask;
- tqmask.resize( w, h );
- tqmask.fill( color0 );
+ TQBitmap mask;
+ mask.resize( w, h );
+ mask.fill( color0 );
TQPainter mPainter;
- mPainter.begin( &tqmask );
+ mPainter.begin( &mask );
TQPixmap *tmp = borderPixmap( widget ) ->border( KThemePixmap::TopLeft );
- const TQBitmap *srcMask = tmp->tqmask();
+ const TQBitmap *srcMask = tmp->mask();
int bdWidth = tmp->width();
bitBlt( pixmap, 0, 0, tmp, 0, 0, bdWidth, bdWidth,
Qt::CopyROP, false );
if ( srcMask )
- bitBlt( &tqmask, 0, 0, srcMask, 0, 0, bdWidth, bdWidth,
+ bitBlt( &mask, 0, 0, srcMask, 0, 0, bdWidth, bdWidth,
Qt::CopyROP, false );
else
mPainter.fillRect( 0, 0, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::TopRight );
- srcMask = tmp->tqmask();
+ srcMask = tmp->mask();
bitBlt( pixmap, w - bdWidth, 0, tmp, 0, 0, bdWidth,
bdWidth, Qt::CopyROP, false );
if ( srcMask )
- bitBlt( &tqmask, w - bdWidth, 0, srcMask, 0, 0, bdWidth,
+ bitBlt( &mask, w - bdWidth, 0, srcMask, 0, 0, bdWidth,
bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, 0, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::BottomLeft );
- srcMask = tmp->tqmask();
+ srcMask = tmp->mask();
bitBlt( pixmap, 0, h - bdWidth, tmp, 0, 0, bdWidth,
bdWidth, Qt::CopyROP, false );
if ( srcMask )
- bitBlt( &tqmask, 0, h - bdWidth, srcMask, 0, 0, bdWidth,
+ bitBlt( &mask, 0, h - bdWidth, srcMask, 0, 0, bdWidth,
bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( 0, h - bdWidth, bdWidth, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::BottomRight );
- srcMask = tmp->tqmask();
+ srcMask = tmp->mask();
bitBlt( pixmap, w - bdWidth, h - bdWidth, tmp, 0, 0,
bdWidth, bdWidth, Qt::CopyROP, false );
if ( srcMask )
- bitBlt( &tqmask, w - bdWidth, h - bdWidth, srcMask, 0, 0,
+ bitBlt( &mask, w - bdWidth, h - bdWidth, srcMask, 0, 0,
bdWidth, bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, h - bdWidth, bdWidth, bdWidth, color1 );
@@ -855,20 +855,20 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
if ( w - bdWidth * 2 > 0 )
{
tmp = borderPixmap( widget ) ->border( KThemePixmap::Top );
- srcMask = tmp->tqmask();
+ srcMask = tmp->mask();
p.drawTiledPixmap( bdWidth, 0, w - bdWidth * 2, bdWidth, *tmp );
if ( srcMask )
- bitBlt( &tqmask, bdWidth, 0, srcMask, 0, 0,
+ bitBlt( &mask, bdWidth, 0, srcMask, 0, 0,
w - bdWidth * 2, bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( bdWidth, 0, w - bdWidth * 2, bdWidth, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::Bottom );
- srcMask = tmp->tqmask();
+ srcMask = tmp->mask();
p.drawTiledPixmap( bdWidth, h - bdWidth, w - bdWidth * 2, bdWidth,
*tmp );
if ( srcMask )
- bitBlt( &tqmask, bdWidth, h - bdWidth, srcMask, 0, 0,
+ bitBlt( &mask, bdWidth, h - bdWidth, srcMask, 0, 0,
w - bdWidth * 2, bdWidth, Qt::CopyROP, false );
else
mPainter.fillRect( bdWidth, h - bdWidth, w - bdWidth * 2, bdWidth,
@@ -877,30 +877,30 @@ KThemePixmap* KThemeBase::scaleBorder( int w, int h, WidgetType widget ) const
if ( h - bdWidth * 2 > 0 )
{
tmp = borderPixmap( widget ) ->border( KThemePixmap::Left );
- srcMask = tmp->tqmask();
+ srcMask = tmp->mask();
p.drawTiledPixmap( 0, bdWidth, bdWidth, h - bdWidth * 2, *tmp );
if ( srcMask )
- bitBlt( &tqmask, 0, bdWidth, srcMask, 0, 0,
+ bitBlt( &mask, 0, bdWidth, srcMask, 0, 0,
bdWidth, h - bdWidth * 2, Qt::CopyROP, false );
else
mPainter.fillRect( 0, bdWidth, bdWidth, h - bdWidth * 2, color1 );
tmp = borderPixmap( widget ) ->border( KThemePixmap::Right );
- srcMask = tmp->tqmask();
+ srcMask = tmp->mask();
p.drawTiledPixmap( w - bdWidth, bdWidth, bdWidth, h - bdWidth * 2,
*tmp );
if ( srcMask )
- bitBlt( &tqmask, w - bdWidth, bdWidth, srcMask, 0, 0,
+ bitBlt( &mask, w - bdWidth, bdWidth, srcMask, 0, 0,
bdWidth, h - bdWidth * 2, Qt::CopyROP, false );
else
mPainter.fillRect( w - bdWidth, bdWidth, bdWidth, h - bdWidth * 2, color1 );
}
p.end();
mPainter.end();
- pixmap->setMask( tqmask );
+ pixmap->setMask( mask );
cache->insert( pixmap, KThemeCache::FullScale, widget, true );
- if ( !pixmap->tqmask() )
- qWarning( "No tqmask for border pixmap!\n" );
+ if ( !pixmap->mask() )
+ qWarning( "No mask for border pixmap!\n" );
}
return ( pixmap );
}
@@ -1269,22 +1269,22 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
TQStringList keys = config->entryList( base );
// Gradient low color or blend background
- if ( keys.tqcontains( "GradientLow" ) )
+ if ( keys.contains( "GradientLow" ) )
prop[ "GrLow" ] = readColorEntry( config, TQString( base + "GradientLow" ).latin1(),
&TQApplication::palette().active().background() ).name();
// Gradient high color
- if ( keys.tqcontains( "GradientHigh" ) )
+ if ( keys.contains( "GradientHigh" ) )
prop[ "GrHigh" ] = readColorEntry( config, TQString( base + "GradientHigh" ).latin1(),
&TQApplication::palette().active().foreground() ).name();
// Extended color attributes
- if ( keys.tqcontains( "Foreground" ) || keys.tqcontains( "Background" ) )
+ if ( keys.contains( "Foreground" ) || keys.contains( "Background" ) )
{
TQColor fg, bg;
- if ( keys.tqcontains( "Background" ) )
+ if ( keys.contains( "Background" ) )
bg = readColorEntry( config, TQString( base + "Background" ).latin1(), &bg );
- if ( keys.tqcontains( "Foreground" ) )
+ if ( keys.contains( "Foreground" ) )
fg = readColorEntry( config, TQString( base + "Foreground" ).latin1(), &fg );
prop[ "Foreground" ] = fg.name();
prop[ "Background" ] = bg.name();
@@ -1318,7 +1318,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.tqcontains( "Round" ) )
+ if ( keys.contains( "Round" ) )
prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000"; // invalid, used w/multiple groups
@@ -1326,25 +1326,25 @@ void KThemeBase::applyResourceGroup( TQSettings *config, int i )
}
else if ( i == PushButton || i == PushButtonDown )
{
- if ( keys.tqcontains( "XShift" ) )
+ if ( keys.contains( "XShift" ) )
prop[ "XShift" ] = TQString::number( config->readNumEntry( base + "XShift", 0 ) );
else
prop[ "XShift" ] = "5000";
- if ( keys.tqcontains( "YShift" ) )
+ if ( keys.contains( "YShift" ) )
prop[ "YShift" ] = TQString::number( config->readNumEntry( base + "YShift", 0 ) );
else
prop[ "YShift" ] = "5000";
- if ( keys.tqcontains( "3DFocusRect" ) )
+ if ( keys.contains( "3DFocusRect" ) )
prop[ "3DFRect" ] = TQString::number( config->
readBoolEntry( base + "3DFocusRect", false ) );
else
prop[ "3DFRect" ] = "5000";
- if ( keys.tqcontains( "3DFocusOffset" ) )
+ if ( keys.contains( "3DFocusOffset" ) )
prop[ "3DFOffset" ] = TQString::number( config->
readBoolEntry( base + "3DFocusOffset", 0 ) );
else
prop[ "3DFOffset" ] = "5000";
- if ( keys.tqcontains( "Round" ) )
+ if ( keys.contains( "Round" ) )
prop[ "Round" ] = TQString::number( config->readBoolEntry( base + "Round", false ) );
else
prop[ "Round" ] = "5000";
@@ -1411,7 +1411,7 @@ void KThemeBase::readResourceGroup( int i, TQString *pixnames, TQString *brdname
// Blend intensity
tmpStr = prop[ "Blend" ];
if ( tmpStr.isEmpty() )
- tmpStr = TQString::tqfromLatin1( "0.0" );
+ tmpStr = TQString::fromLatin1( "0.0" );
blends[ i ] = tmpStr.toFloat();
// Bevel contrast
@@ -1607,7 +1607,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
{
if ( isColor( Background ) )
{
- background = tqcolorGroup( pal.active(), Background )
+ background = colorGroup( pal.active(), Background )
->background();
}
if ( isPixmap( Background ) )
@@ -1620,7 +1620,7 @@ TQPalette KThemeBase::overridePalette( const TQPalette& pal )
background.dark( lowlightVal ), background.dark( 120 ),
baseText, buttonText /*CHECKME: BrightText*/, base, background );
- buttonText = tqcolorGroup( pre, PushButton ) ->foreground();
+ buttonText = colorGroup( pre, PushButton ) ->foreground();
}
TQColor disfg = foreground;
@@ -1752,7 +1752,7 @@ void KThemeCache::flushTimeout()
}
KThemePixmap* KThemeCache::pixmap( int w, int h, int widgetID, bool border,
- bool tqmask )
+ bool mask )
{
kthemeKey key;
@@ -1761,9 +1761,9 @@ KThemePixmap* KThemeCache::pixmap( int w, int h, int widgetID, bool border,
key.data.width = w;
key.data.height = h;
key.data.border = border;
- key.data.tqmask = tqmask;
+ key.data.mask = mask;
- KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
+ KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
@@ -1777,8 +1777,8 @@ KThemePixmap* KThemeCache::horizontalPixmap( int w, int widgetID )
key.data.width = w;
key.data.height = 0;
key.data.border = false;
- key.data.tqmask = false;
- KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
+ key.data.mask = false;
+ KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
@@ -1792,15 +1792,15 @@ KThemePixmap* KThemeCache::verticalPixmap( int h, int widgetID )
key.data.width = 0;
key.data.height = h;
key.data.border = false;
- key.data.tqmask = false;
- KThemePixmap *pix = cache.tqfind( ( unsigned long ) key.cacheKey );
+ key.data.mask = false;
+ KThemePixmap *pix = cache.find( ( unsigned long ) key.cacheKey );
if ( pix )
pix->updateAccessed();
return ( pix );
}
bool KThemeCache::insert( KThemePixmap *pixmap, ScaleHint scale, int widgetID,
- bool border, bool tqmask )
+ bool border, bool mask )
{
kthemeKey key;
key.cacheKey = 0; // shut up, gcc
@@ -1810,9 +1810,9 @@ bool KThemeCache::insert( KThemePixmap *pixmap, ScaleHint scale, int widgetID,
key.data.height = ( scale == FullScale || scale == VerticalScale ) ?
pixmap->height() : 0;
key.data.border = border;
- key.data.tqmask = tqmask;
+ key.data.mask = mask;
- if ( cache.tqfind( ( unsigned long ) key.cacheKey, true ) != NULL )
+ if ( cache.find( ( 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 dab801573..6da89cc3e 100644
--- a/kstyles/kthemestyle/kthemebase.h
+++ b/kstyles/kthemestyle/kthemebase.h
@@ -107,7 +107,7 @@ inline bool KThemePixmap::isOld()
*
* This class is mostly just inline methods that do bit operations on a key
* composed of the widget ID, width and/or height, and then calls
- * TQIntCache::tqfind().
+ * TQIntCache::find().
*
* One other thing to note is that full, horizontal, and vertically scaled
* pixmaps are not used interchangeably. For example, if you insert a fully
@@ -120,7 +120,7 @@ inline bool KThemePixmap::isOld()
* @author Daniel M. Duley <mosfet@kde.org>
*
*/
-class KThemeCache : public TQObject
+class KThemeCache : public QObject
{
Q_OBJECT
public:
@@ -145,12 +145,12 @@ public:
* @param widgetID The widget ID of the pixmap, usually from KThemeBase's
* WidgetType enum.
* @param border True if the pixmap has a border.
- * @param tqmask True if the pixmap has a tqmask.
+ * @param mask True if the pixmap has a mask.
*
* @return True if the insert was successful, false otherwise.
*/
bool insert( KThemePixmap *pixmap, ScaleHint scale, int widgetID,
- bool border = false, bool tqmask = false );
+ bool border = false, bool mask = false );
/**
* Returns a fully scaled pixmap.
*
@@ -158,13 +158,13 @@ public:
* @param h The pixmap height to search for.
* @param widgetID The widget ID to search for.
* @param border True if the pixmap has a border.
- * @param tqmask True if the pixmap has a tqmask.
+ * @param mask True if the pixmap has a mask.
*
* @return True if a pixmap matching the width, height, and widget ID of
* the pixmap exists, NULL otherwise.
*/
KThemePixmap* pixmap( int w, int h, int widgetID, bool border = false,
- bool tqmask = false );
+ bool mask = false );
/**
* Returns a horizontally scaled pixmap.
*
@@ -234,7 +234,7 @@ public:
*/
enum ShadeStyle{Motif, Windows, Next, KDE};
/**
- * The default scrollbar button tqlayout. BottomLeft is like what Next
+ * The default scrollbar button layout. BottomLeft is like what Next
* uses, BottomRight is like Platinum, and Opposite it like Windows and
* Motif.
*/
@@ -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 tqcolorGroup to set if one is available.
+ * @param defaultGroup The colorGroup to set if one is available.
*
* @param widget The widget whose color group to retrieve.
*
*/
- const TQColorGroup* tqcolorGroup( const TQColorGroup &defaultGroup,
+ const TQColorGroup* colorGroup( const TQColorGroup &defaultGroup,
WidgetType widget ) const;
TQBrush pixmapBrush( const TQColorGroup &group, TQColorGroup::ColorRole role,
@@ -356,7 +356,7 @@ public:
*/
int getSBExtent() const;
/**
- * The scrollbar button tqlayout.
+ * The scrollbar button layout.
*/
SButton scrollBarLayout() const;
/**
@@ -508,9 +508,9 @@ protected:
/**
These are included for fuuture extension purposes..
*/
- virtual int tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const
+ virtual int pixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const
{
- return KStyle::tqpixelMetric( metric, widget );
+ return KStyle::pixelMetric( metric, widget );
}
virtual void drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRect & r, const TQColorGroup & cg,
@@ -522,7 +522,7 @@ protected:
}
- virtual void tqdrawControl( ControlElement element,
+ virtual void drawControl( 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::tqdrawControl( element, p, widget,
+ KStyle::drawControl( element, p, widget,
r, cg, how, opt );
}
- virtual void tqdrawControlMask( ControlElement element,
+ virtual void drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& opt = TQStyleOption::Default ) const
{
- KStyle::tqdrawControlMask( element, p, widget, r, opt );
+ KStyle::drawControlMask( element, p, widget, r, opt );
}
- virtual void tqdrawComplexControl( ComplexControl control,
+ virtual void drawComplexControl( 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::tqdrawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
+ KStyle::drawComplexControl( control, p, widget, r, cg, flags, controls, active, opt );
}
@@ -572,12 +572,12 @@ protected:
}
- virtual int tqstyleHint( StyleHint sh,
+ virtual int styleHint( StyleHint sh,
const TQWidget *widget = 0,
const TQStyleOption& opt = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const
{
- return KStyle::tqstyleHint( sh,
+ return KStyle::styleHint( sh,
widget,
opt,
returnData );
@@ -731,7 +731,7 @@ inline TQBrush KThemeBase::pixmapBrush( const TQColorGroup &group,
return ( group.color( role ) );
}
-inline const TQColorGroup* KThemeBase::tqcolorGroup( const TQColorGroup &defaultGroup,
+inline const TQColorGroup* KThemeBase::colorGroup( 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 26764f72e..4927c67bc 100644
--- a/kstyles/kthemestyle/kthemestyle.cpp
+++ b/kstyles/kthemestyle/kthemestyle.cpp
@@ -119,7 +119,7 @@ public:
//####### (Fixes exit crashes with qt-only apps that occur on Linux)
//####### This should be rethought after 3.0,
//####### as it relies on the implementation-specific behavior
- //####### of the glibc libdl (tqfinding already loaded libraries based on the
+ //####### of the glibc libdl (finding already loaded libraries based on the
//####### soname)
#endif
}
@@ -186,8 +186,8 @@ void kDrawWindowsArrow ( TQPainter *p, const TQStyle* style, TQStyle::PrimitiveE
p->save();
if ( down )
{
- p->translate( style->tqpixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
- style->tqpixelMetric( TQStyle::PM_ButtonShiftVertical ) );
+ p->translate( style->pixelMetric( TQStyle::PM_ButtonShiftHorizontal ),
+ style->pixelMetric( 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 = tqpixelMetric( PM_ButtonMargin, widget );
- int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int bm = pixelMetric( PM_ButtonMargin, widget );
+ int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
w += bm + fw + 6; // ### Add 6 to make way for bold font.
h += bm + fw;
@@ -260,8 +260,8 @@ TQSize KThemeStyle::sizeFromContents( ContentsType contents,
if ( mi->custom() )
{
- w = mi->custom() ->tqsizeHint().width();
- h = mi->custom() ->tqsizeHint().height();
+ w = mi->custom() ->sizeHint().width();
+ h = mi->custom() ->sizeHint().height();
if ( ! mi->custom() ->fullSpan() )
h += 2 * itemVMargin + 2 * itemFrame;
}
@@ -286,7 +286,7 @@ TQSize KThemeStyle::sizeFromContents( ContentsType contents,
2 * itemFrame );
}
- if ( ! mi->text().isNull() && mi->text().tqfind( '\t' ) >= 0 )
+ if ( ! mi->text().isNull() && mi->text().find( '\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 = tqpixelMetric(PM_IndicatorWidth, widget);
- int ch = tqpixelMetric(PM_IndicatorHeight, widget);
+ int cw = pixelMetric(PM_IndicatorWidth, widget);
+ int ch = pixelMetric(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::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) const
+int KThemeStyle::pixelMetric ( PixelMetric metric, const TQWidget * widget ) const
{
switch ( metric )
{
@@ -361,26 +361,26 @@ int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) c
if ( isPixmap( ExIndicatorOn ) )
return ( uncached( ExIndicatorOn ) ->size().width() );
else
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
case PM_ExclusiveIndicatorHeight:
if ( isPixmap( ExIndicatorOn ) )
return ( uncached( ExIndicatorOn ) ->size().height() );
else
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
case PM_IndicatorWidth:
if ( isPixmap( IndicatorOn ) )
return ( uncached( IndicatorOn ) ->size().width() );
else
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
case PM_IndicatorHeight:
if ( isPixmap( IndicatorOn ) )
return ( uncached( IndicatorOn ) ->size().height() );
else
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
case PM_SliderLength:
return ( sliderButtonLength() );
@@ -389,7 +389,7 @@ int KThemeStyle::tqpixelMetric ( PixelMetric metric, const TQWidget * widget ) c
return ( splitWidth() );
default:
- return KThemeBase::tqpixelMetric ( metric, widget );
+ return KThemeBase::pixelMetric ( metric, widget );
}
}
@@ -470,7 +470,7 @@ bool KThemeStyle::eventFilter( TQObject* object, TQEvent* event )
{
TQWidget *w = static_cast<TQWidget*>(object);
TQPoint pos(0, 0);
- pos = w->mapTo(w->tqtopLevelWidget(), pos);
+ pos = w->mapTo(w->topLevelWidget(), pos);
TQPixmap pix(uncached( Background )->size());
TQPainter p;
p.begin(&pix);
@@ -559,12 +559,12 @@ void KThemeStyle::polish( TQWidget *w )
TQPalette newPal( w->palette() );
if ( isColor( MenuItem ) )
{
- newPal.setActive( *tqcolorGroup( newPal.active(), MenuItem ) );
- newPal.setDisabled( *tqcolorGroup( newPal.active(), MenuItem ) );
+ newPal.setActive( *colorGroup( newPal.active(), MenuItem ) );
+ newPal.setDisabled( *colorGroup( newPal.active(), MenuItem ) );
}
if ( isColor( MenuItemDown ) )
{
- newPal.setActive( *tqcolorGroup( newPal.active(), MenuItemDown ) );
+ newPal.setActive( *colorGroup( newPal.active(), MenuItemDown ) );
}
w->setPalette( newPal );
}
@@ -578,11 +578,11 @@ void KThemeStyle::polish( TQWidget *w )
TQPalette newPal( w->palette() );
if ( isColor( IndicatorOff ) )
{
- newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOff ) );
- newPal.setDisabled( *tqcolorGroup( newPal.active(), IndicatorOff ) );
+ newPal.setActive( *colorGroup( newPal.active(), IndicatorOff ) );
+ newPal.setDisabled( *colorGroup( newPal.active(), IndicatorOff ) );
}
if ( isColor( IndicatorOn ) )
- newPal.setActive( *tqcolorGroup( newPal.active(), IndicatorOn ) );
+ newPal.setActive( *colorGroup( newPal.active(), IndicatorOn ) );
w->setPalette( newPal );
}
}
@@ -593,12 +593,12 @@ void KThemeStyle::polish( TQWidget *w )
TQPalette newPal( w->palette() );
if ( isColor( ExIndicatorOff ) )
{
- newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOff ) );
- newPal.setDisabled( *tqcolorGroup( newPal.active(),
+ newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOff ) );
+ newPal.setDisabled( *colorGroup( newPal.active(),
ExIndicatorOff ) );
}
if ( isColor( ExIndicatorOn ) )
- newPal.setActive( *tqcolorGroup( newPal.active(), ExIndicatorOn ) );
+ newPal.setActive( *colorGroup( newPal.active(), ExIndicatorOn ) );
w->setPalette( newPal );
}
}
@@ -757,7 +757,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
return ;
}
- const TQColorGroup *cg = tqcolorGroup( g, widget );
+ const TQColorGroup *cg = colorGroup( g, widget );
// Standard arrow types
if ( arrowType() == MotifArrow )
{
@@ -791,8 +791,8 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
p->save();
if ( flags & Style_Down )
- p->translate( tqpixelMetric( PM_ButtonShiftHorizontal ),
- tqpixelMetric( PM_ButtonShiftVertical ) );
+ p->translate( pixelMetric( PM_ButtonShiftHorizontal ),
+ pixelMetric( PM_ButtonShiftVertical ) );
if ( flags & Style_Enabled )
{
@@ -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, *tqcolorGroup( g, type ), ( sunken || on || down ), false, type );
+ drawBaseButton( p, x, y, w, h, *colorGroup( 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, *tqcolorGroup( g, ToolBar ), false, false,
+ drawBaseButton( p, x, y, w, h, *colorGroup( g, ToolBar ), false, false,
ToolBar );
handled = true;
break;
@@ -895,11 +895,11 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
{
if ( isPixmap( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) )
{
- const TQBitmap * tqmask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->tqmask();
- if ( tqmask )
+ const TQBitmap * mask = uncached( ( flags & Style_On || flags & Style_Down ) ? ExIndicatorOn : ExIndicatorOff ) ->mask();
+ if ( mask )
{
p->setPen( Qt::color1 );
- p->drawPixmap( x, y, *tqmask );
+ p->drawPixmap( x, y, *mask );
}
else
p->fillRect( x, y, w, h, TQBrush( color1, SolidPattern ) );
@@ -912,12 +912,12 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
{
if ( isPixmap( ( flags & Style_On ) ? IndicatorOn : IndicatorOff ) )
{
- const TQBitmap * tqmask = uncached( ( flags & Style_On ) ? IndicatorOn :
- IndicatorOff ) ->tqmask();
- if ( tqmask )
+ const TQBitmap * mask = uncached( ( flags & Style_On ) ? IndicatorOn :
+ IndicatorOff ) ->mask();
+ if ( mask )
{
p->setPen( Qt::color1 );
- p->drawPixmap( x, y, *tqmask );
+ p->drawPixmap( x, y, *mask );
}
else
p->fillRect( x, y, w, h, TQBrush( color1, SolidPattern ) );
@@ -938,7 +938,7 @@ void KThemeStyle::drawPrimitive ( PrimitiveElement pe, TQPainter * p, const TQRe
}
case PE_Splitter:
{
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, Splitter ), false, false,
+ drawBaseButton( p, x, y, w, h, *colorGroup( 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, tqcolorGroup( g, widget ) ->brush( TQColorGroup::Background ) );
+ p->fillRect( r, colorGroup( g, widget ) ->brush( TQColorGroup::Background ) );
// Do the borders and frame
drawShade( p, r.x(), r.y(), r.width(),
- r.height(), *tqcolorGroup( g, widget ), true, false,
+ r.height(), *colorGroup( 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(), *tqcolorGroup( g, widget ), true, false,
+ r.height(), *colorGroup( 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(),
- *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
down, false, down ? ScrollButtonDown : ScrollButton );
drawPrimitive( ( horizontal ) ? PE_ArrowRight : PE_ArrowDown, p ,
TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
- *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *colorGroup( 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(),
- *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *colorGroup( g, down ? ScrollButtonDown : ScrollButton ),
down, false, down ? ScrollButtonDown : ScrollButton );
drawPrimitive( ( horizontal ) ? PE_ArrowLeft : PE_ArrowUp, p ,
TQRect( r.x() + 3, r.y() + 3, r.width() - 6, r.height() - 6 ),
- *tqcolorGroup( g, down ? ScrollButtonDown : ScrollButton ),
+ *colorGroup( 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, *tqcolorGroup( g, widget ), active, false,
+ r.height()-2*offsetV, *colorGroup( 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 = tqcolorGroup( TQApplication::palette().active(), MenuBar);
+ const TQColorGroup *g = colorGroup( TQApplication::palette().active(), MenuBar);
menuCache = new TQPixmap ( w, h );
TQPainter p(menuCache);
@@ -1096,7 +1096,7 @@ TQPixmap* KThemeStyle::makeMenuBarCache(int w, int h) const
}
-void KThemeStyle::tqdrawControl( ControlElement element,
+void KThemeStyle::drawControl( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1115,9 +1115,9 @@ void KThemeStyle::tqdrawControl( ControlElement element,
{
const TQPushButton * btn = ( const TQPushButton* ) widget;
bool sunken = btn->isOn() || btn->isDown();
- int diw = tqpixelMetric( PM_ButtonDefaultIndicator, btn );
+ int diw = pixelMetric( PM_ButtonDefaultIndicator, btn );
drawBaseButton( p, diw, diw, w - 2 * diw, h - 2 * diw,
- *tqcolorGroup( btn->tqcolorGroup(), sunken ? PushButtonDown :
+ *colorGroup( btn->colorGroup(), sunken ? PushButtonDown :
PushButton ), sunken, roundButton(),
sunken ? PushButtonDown : PushButton );
// TODO if diw, draw fancy default button indicator
@@ -1134,15 +1134,15 @@ void KThemeStyle::tqdrawControl( ControlElement element,
// Shift button contents if pushed.
if ( active )
{
- x += tqpixelMetric( PM_ButtonShiftHorizontal, widget );
- y += tqpixelMetric( PM_ButtonShiftVertical, widget );
+ x += pixelMetric( PM_ButtonShiftHorizontal, widget );
+ y += pixelMetric( PM_ButtonShiftVertical, widget );
how |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() )
{
- int dx = tqpixelMetric( PM_MenuButtonIndicator, widget );
+ int dx = pixelMetric( PM_MenuButtonIndicator, widget );
drawPrimitive( PE_ArrowDown, p, TQRect( x + w - dx - 2, y + 2, dx, h - 4 ),
cg, how, opt );
w -= dx;
@@ -1177,49 +1177,49 @@ void KThemeStyle::tqdrawControl( 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::tqsizeHint(), but gives
+ // the same as computed in TQPushButton::sizeHint(), 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->tqcolorGroup(), button->isEnabled(), NULL,
+ button->colorGroup(), button->isEnabled(), NULL,
button->text(), -1,
- active ? &button->tqcolorGroup().dark() : &button->tqcolorGroup().mid() );
+ active ? &button->colorGroup().dark() : &button->colorGroup().mid() );
// Normal Text
for ( i = 0; i < 2; i++ )
drawItem( p, TQRect( x + i, y, w, h ), AlignCenter | ShowPrefix,
- button->tqcolorGroup(), true, i == 0 ? button->pixmap() : NULL,
+ button->colorGroup(), true, i == 0 ? button->pixmap() : NULL,
button->text(), -1,
- active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
+ active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
}
else
{
if ( button->isEnabled() )
{
- drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
- active ? &button->tqcolorGroup().light() : &button->tqcolorGroup().buttonText() );
+ active ? &button->colorGroup().light() : &button->colorGroup().buttonText() );
}
else
{
//TODO: Handle reversed
- drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
+ drawItem( p, TQRect( x + 1, y + 1, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
- &button->tqcolorGroup().light() );
+ &button->colorGroup().light() );
- drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->tqcolorGroup(),
+ drawItem( p, TQRect( x, y, w, h ), AlignCenter | ShowPrefix, button->colorGroup(),
true, button->pixmap(), button->text(), -1,
- &button->tqcolorGroup().buttonText() );
+ &button->colorGroup().buttonText() );
}
}
// Draw a focus rect if the button has focus
if ( how & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- TQStyle::tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ TQStyle::visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, how );
handled = true;
break;
@@ -1238,10 +1238,10 @@ void KThemeStyle::tqdrawControl( ControlElement element,
case CE_TabBarTab:
{
const TQTabBar* tb = ( const TQTabBar* ) widget;
- TQTabBar::Shape tbs = tb->tqshape();
+ TQTabBar::Shape tbs = tb->shape();
bool selected = how & Style_Selected;
WidgetType widget = selected ? ActiveTab : InactiveTab;
- const TQColorGroup *cg = tqcolorGroup( tb->tqcolorGroup(), widget );
+ const TQColorGroup *cg = colorGroup( tb->colorGroup(), widget );
int i;
int x2 = x + w - 1, y2 = y + h - 1;
int bWidth = borderWidth( widget );
@@ -1314,8 +1314,8 @@ void KThemeStyle::tqdrawControl( ControlElement element,
else
p->fillRect( x, y, x2 - x + 1, y2 - y + 1, cg->background() );
}
- else if ( tb->tqshape() == TQTabBar::RoundedBelow ||
- tb->tqshape() == TQTabBar::TriangularBelow )
+ else if ( tb->shape() == TQTabBar::RoundedBelow ||
+ tb->shape() == TQTabBar::TriangularBelow )
{
if ( widget == ActiveTab )
widget = RotActiveTab;
@@ -1397,7 +1397,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
TQRect pr = mb->rect();
bool active = how & Style_Active;
//bool focused = how & Style_HasFocus;
- const TQColorGroup *g = tqcolorGroup( cg, active ? MenuBarItem : MenuBar );
+ const TQColorGroup *g = colorGroup( cg, active ? MenuBarItem : MenuBar );
TQColor btext = g->buttonText();
TQPixmap* cache = makeMenuBarCache(pr.width(), pr.height());
@@ -1439,10 +1439,10 @@ void KThemeStyle::tqdrawControl( ControlElement element,
bool enabled = (mi? mi->isEnabled():true);
bool checkable = popupmenu->isCheckable();
bool active = how & Style_Active;
- bool etchtext = tqstyleHint( SH_EtchDisabledText, 0 );
+ bool etchtext = styleHint( SH_EtchDisabledText, 0 );
bool reverse = TQApplication::reverseLayout();
- const TQColorGroup& cg_ours = *tqcolorGroup( cg, active ? MenuItemDown : MenuItem );
+ const TQColorGroup& cg_ours = *colorGroup( cg, active ? MenuItemDown : MenuItem );
//TQColor btext = cg_ours.buttonText();
@@ -1464,7 +1464,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
drawBaseButton( p, x, y, w, h, cg_ours, true, false, MenuItemDown );
else
{
- drawShade( p, x, y, w, h, *tqcolorGroup( cg_ours, MenuItem ), false, false,
+ drawShade( p, x, y, w, h, *colorGroup( cg_ours, MenuItem ), false, false,
highlightWidth( MenuItem ), borderWidth( MenuItem ),
shade() );
int dw = decoWidth( MenuItem );
@@ -1474,7 +1474,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
x + dw, y + dw, w - dw * 2, h - dw * 2,
cg_ours.brush( TQColorGroup::Background ) );
//cg.brush( TQColorGroup::Background ));
- //tqcolorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) );
+ //colorGroup( cg_ours, MenuItem ) ->brush( TQColorGroup::Background ) );
}
else
{
@@ -1492,7 +1492,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
if ( mi->iconSet() )
{
TQIconSet::Mode mode;
- TQRect cr = tqvisualRect( TQRect( x, y, checkcol, h ), r );
+ TQRect cr = visualRect( TQRect( x, y, checkcol, h ), r );
// Select the correct icon from the iconset
if ( active )
@@ -1503,7 +1503,7 @@ void KThemeStyle::tqdrawControl( 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(), *tqcolorGroup( cg_ours, BevelDown ), true, false, BevelDown );
+ drawBaseButton( p, cr.x(), cr.y(), cr.width(), cr.height(), *colorGroup( cg_ours, BevelDown ), true, false, BevelDown );
// Draw the icon
TQPixmap pixmap = mi->iconSet() ->pixmap( TQIconSet::Small, mode );
@@ -1580,7 +1580,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
// Does the menu item have a text label?
if ( !s.isNull() )
{
- int t = s.tqfind( '\t' );
+ int t = s.find( '\t' );
int m = itemVMargin;
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
@@ -1643,7 +1643,7 @@ void KThemeStyle::tqdrawControl( 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 = tqvisualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
+ TQRect vr = visualRect( TQRect( x + w - arrowHMargin - itemFrame - dim,
y + h / 2 - dim / 2, dim, dim ), r );
// Draw an arrow at the far end of the menu item
@@ -1667,7 +1667,7 @@ void KThemeStyle::tqdrawControl( ControlElement element,
case CE_ProgressBarGroove:
{
TQBrush bg;
- const TQColorGroup * cg2 = tqcolorGroup( cg, ProgressBg );
+ const TQColorGroup * cg2 = colorGroup( cg, ProgressBg );
qDrawWinPanel( p, r, *cg2, true );
bg.setColor( cg2->color( TQColorGroup::Background ) );
if ( isPixmap( ProgressBg ) )
@@ -1714,13 +1714,13 @@ void KThemeStyle::tqdrawControl( ControlElement element,
}
if ( !reverse )
- drawBaseButton( p, x + pstep, y, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar );
+ drawBaseButton( p, x + pstep, y, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar );
else
{
//TODO:Optimize
TQPixmap buf( width, h );
TQPainter p2( &buf );
- drawBaseButton( &p2, 0, 0, width, h, *tqcolorGroup( cg, ProgressBar ), false, false, ProgressBar );
+ drawBaseButton( &p2, 0, 0, width, h, *colorGroup( cg, ProgressBar ), false, false, ProgressBar );
p2.end();
TQPixmap mirroredPix = TQPixmap( buf.convertToImage().mirror( true, false ) );
bitBlt( p->device(), x + w - width - pstep, y, &mirroredPix );
@@ -1735,12 +1735,12 @@ void KThemeStyle::tqdrawControl( ControlElement element,
};
if ( !handled )
- KThemeBase::tqdrawControl( element,
+ KThemeBase::drawControl( element,
p, widget, r, cg, how, opt );
}
-void KThemeStyle::tqdrawControlMask( ControlElement element,
+void KThemeStyle::drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1764,7 +1764,7 @@ void KThemeStyle::tqdrawControlMask( ControlElement element,
};
if ( !handled )
- KThemeBase::tqdrawControlMask( element,
+ KThemeBase::drawControlMask( element,
p, widget, r, opt );
}
@@ -1791,12 +1791,12 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
bool horizontal = slider->orientation() == Horizontal;
if ( horizontal )
{
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, SliderGroove ), true,
+ drawBaseButton( p, x, y, w, h, *colorGroup( cg, SliderGroove ), true,
false, SliderGroove );
}
else
{
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, RotSliderGroove ), true,
+ drawBaseButton( p, x, y, w, h, *colorGroup( cg, RotSliderGroove ), true,
false, RotSliderGroove );
}
}
@@ -1853,8 +1853,8 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
TQWMatrix r270;
r270.rotate( 270 );
vsliderCache = new TQPixmap( uncached( Slider ) ->xForm( r270 ) );
- if ( uncached( Slider ) ->tqmask() )
- vsliderCache->setMask( uncached( Slider ) ->tqmask() ->xForm( r270 ) );
+ if ( uncached( Slider ) ->mask() )
+ vsliderCache->setMask( uncached( Slider ) ->mask() ->xForm( r270 ) );
}
bitBlt( p->device(), x + ( w - vsliderCache->width() ) / 2, y,
vsliderCache );
@@ -1925,10 +1925,10 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
case KPE_GeneralHandle:
{
if ( w > h )
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, HBarHandle ), false, false,
+ drawBaseButton( p, x, y, w, h, *colorGroup( cg, HBarHandle ), false, false,
HBarHandle );
else
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( cg, VBarHandle ), false, false,
+ drawBaseButton( p, x, y, w, h, *colorGroup( cg, VBarHandle ), false, false,
VBarHandle );
handled = true;
@@ -1950,7 +1950,7 @@ void KThemeStyle::drawKStylePrimitive( KStylePrimitive kpe,
-void KThemeStyle::tqdrawComplexControl ( ComplexControl control, TQPainter * p, const TQWidget * widget,
+void KThemeStyle::drawComplexControl ( 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::tqdrawComplexControl ( ComplexControl control, TQPainter * p,
{
WidgetType widget = ( down || on ) ? ToolButtonDown : ToolButton;
- drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *tqcolorGroup( g, widget ), down || on, false,
+ drawBaseButton( p, button.x(), button.y(), button.width(), button.height(), *colorGroup( g, widget ), down || on, false,
widget );
// int m = decoWidth( widget );
@@ -2013,7 +2013,7 @@ void KThemeStyle::tqdrawComplexControl ( ComplexControl control, TQPainter * p,
bool sunken = ( active == SC_ComboBoxArrow );
//No frame, edit box and button for now?
WidgetType widget = sunken ? ComboBoxDown : ComboBox;
- drawBaseButton( p, x, y, w, h, *tqcolorGroup( g, widget ), sunken,
+ drawBaseButton( p, x, y, w, h, *colorGroup( g, widget ), sunken,
roundComboBox(), widget );
controls ^= SC_ComboBoxFrame;
@@ -2022,7 +2022,7 @@ void KThemeStyle::tqdrawComplexControl ( ComplexControl control, TQPainter * p,
if ( controls & SC_ComboBoxArrow )
{
bool sunken = ( active == SC_ComboBoxArrow );
- TQRect ar = TQStyle::tqvisualRect(
+ TQRect ar = TQStyle::visualRect(
querySubControlMetrics( CC_ComboBox, widget, SC_ComboBoxArrow ),
widget );
ar.rect( &x, &y, &w, &h );
@@ -2041,8 +2041,8 @@ void KThemeStyle::tqdrawComplexControl ( ComplexControl control, TQPainter * p,
else
{
- mtfstyle->drawPrimitive( 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,
+ 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,
}
controls ^= SC_ComboBoxArrow;
}
@@ -2115,7 +2115,7 @@ void KThemeStyle::tqdrawComplexControl ( ComplexControl control, TQPainter * p,
if ( !handled )
{
- KThemeBase::tqdrawComplexControl ( control, p, widget,
+ KThemeBase::drawComplexControl ( control, p, widget,
r, g, how ,
controls, active,
opt );
@@ -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::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, QStyleHintReturn *shr ) const
+int KThemeStyle::styleHint( StyleHint sh, const TQWidget *w, const TQStyleOption &opt, QStyleHintReturn *shr ) const
{
switch ( sh )
{
@@ -2206,7 +2206,7 @@ int KThemeStyle::tqstyleHint( StyleHint sh, const TQWidget *w, const TQStyleOpti
return NoBackground;
default:
- return KThemeBase::tqstyleHint( sh, w, opt, shr );
+ return KThemeBase::styleHint( sh, w, opt, shr );
};
}
@@ -2381,4 +2381,4 @@ int KThemeStyle::popupMenuItemHeight( bool /*checkable*/, TQMenuItem *mi,
}
#include "kthemestyle.moc"
-// kate: indent-width 4; tqreplace-tabs off; tab-width 4; space-indent on;
+// kate: indent-width 4; replace-tabs off; tab-width 4; space-indent on;
diff --git a/kstyles/kthemestyle/kthemestyle.h b/kstyles/kthemestyle/kthemestyle.h
index 37483a804..00d6256e7 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 tqpixelMetric ( PixelMetric metric, const TQWidget * widget = 0 ) const;
+ virtual int pixelMetric ( 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 tqdrawControl( ControlElement element,
+ virtual void drawControl( 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 tqdrawControlMask( ControlElement element,
+ virtual void drawControlMask( ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual void tqdrawComplexControl( ComplexControl control,
+ virtual void drawComplexControl( ComplexControl control,
TQPainter *p,
const TQWidget* widget,
const TQRect &r,
@@ -119,7 +119,7 @@ public:
const TQStyleOption& = TQStyleOption::Default ) const;
- virtual int tqstyleHint( StyleHint sh,
+ virtual int styleHint( StyleHint sh,
const TQWidget *widget = 0,
const TQStyleOption& = TQStyleOption::Default,
QStyleHintReturn* returnData = 0 ) const;
@@ -165,7 +165,7 @@ public:
const TQColorGroup &g, bool sunken = false,
bool rounded = false, WidgetType type = Bevel ) const;
/**
- * Draw a tqmask with for widgets that may be rounded.
+ * Draw a mask with for widgets that may be rounded.
*
*Currently used
* by pushbuttons and comboboxes.
@@ -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 tqshape if @p true. Requires bWidth to be
+ * @param rounded Draws a rounded shape 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/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp
index 2647c7cfb..8f673a707 100644
--- a/kstyles/light/lightstyle-v2.cpp
+++ b/kstyles/light/lightstyle-v2.cpp
@@ -51,7 +51,7 @@ public:
if ( ! basestyle )
basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() );
if ( ! basestyle )
- qFatal( "LightStyle: couldn't tqfind a basestyle!" );
+ qFatal( "LightStyle: couldn't find a basestyle!" );
}
~LightStyleV2Private()
@@ -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->tqparentWidget();
+ TQWidget *p = w->parentWidget();
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
drawTitle = true;
title = p->caption();
@@ -405,7 +405,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_WindowFrame:
{
int lw = data.isDefault() ?
- tqpixelMetric(PM_DefaultFrameWidth) : data.lineWidth();
+ pixelMetric(PM_DefaultFrameWidth) : data.lineWidth();
if ( ! ( flags & Style_Sunken ) )
flags |= Style_Raised;
@@ -419,7 +419,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_PanelDockWindow:
{
int lw = data.isDefault() ?
- tqpixelMetric(PM_DockWindowFrameWidth) : data.lineWidth();
+ pixelMetric(PM_DockWindowFrameWidth) : data.lineWidth();
if (lw == 2)
drawLightBevel(p, r, cg, flags | Style_Raised,
@@ -432,7 +432,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_PanelMenuBar:
{
int lw = data.isDefault() ?
- tqpixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
+ pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
if (lw == 2)
drawLightBevel(p, r, cg, flags, &cg.brush(TQColorGroup::Button));
@@ -612,7 +612,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
}
-void LightStyleV2::tqdrawControl( ControlElement control,
+void LightStyleV2::drawControl( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -631,7 +631,7 @@ void LightStyleV2::tqdrawControl( ControlElement control,
tr.addCoords(0, 0, 0, -1);
fr.addCoords(2, 2, -2, -2);
- if ( tb->tqshape() == TQTabBar::RoundedBelow || tb->tqshape() == TQTabBar::TriangularBelow) {
+ if ( tb->shape() == TQTabBar::RoundedBelow || tb->shape() == TQTabBar::TriangularBelow) {
tr = r; tr.addCoords(0, 1, 0, 0);
fr = r; fr.addCoords(2, 2,-2, -4);
below = true;
@@ -822,10 +822,10 @@ void LightStyleV2::tqdrawControl( ControlElement control,
bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
- cr = tqvisualRect( cr, r );
- sr = tqvisualRect( sr, r );
- tr = tqvisualRect( tr, r );
- ir = tqvisualRect( ir, r );
+ cr = visualRect( cr, r );
+ sr = visualRect( sr, r );
+ tr = visualRect( tr, r );
+ ir = visualRect( ir, r );
}
if (mi->isChecked() &&
@@ -887,7 +887,7 @@ void LightStyleV2::tqdrawControl( ControlElement control,
TQString text = mi->text();
if (! text.isNull()) {
- int t = text.tqfind('\t');
+ int t = text.find('\t');
// draw accelerator/tab-text
if (t >= 0) {
@@ -965,12 +965,12 @@ void LightStyleV2::tqdrawControl( ControlElement control,
break;
default:
- TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
break;
}
}
-void LightStyleV2::tqdrawControlMask( ControlElement control,
+void LightStyleV2::drawControlMask( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -982,7 +982,7 @@ void LightStyleV2::tqdrawControlMask( ControlElement control,
break;
default:
- TQCommonStyle::tqdrawControlMask(control, p, widget, r, data);
+ TQCommonStyle::drawControlMask(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 = tqpixelMetric(PM_ButtonDefaultIndicator, widget);
+ dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget);
dbw2 = dbw1 * 2;
}
@@ -1015,7 +1015,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const
return rect;
}
-void LightStyleV2::tqdrawComplexControl( ComplexControl control,
+void LightStyleV2::drawComplexControl( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
@@ -1031,15 +1031,15 @@ void LightStyleV2::tqdrawComplexControl( ComplexControl control,
const TQComboBox *combobox = (const TQComboBox *) widget;
TQRect frame, arrow, field;
frame =
- TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
@@ -1067,7 +1067,7 @@ void LightStyleV2::tqdrawComplexControl( ComplexControl control,
if (! combobox->editable()) {
p->fillRect( field, cg.brush( TQColorGroup::Highlight ) );
TQRect fr =
- TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
drawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
@@ -1281,19 +1281,19 @@ void LightStyleV2::tqdrawComplexControl( ComplexControl control,
}
if (controls & SC_SliderTickmarks)
- TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
case CC_ListView:
// use the base style for CC_ListView
- singleton->basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags,
+ singleton->basestyle->drawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
default:
- TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(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 = tqpixelMetric(PM_ScrollBarExtent, widget);
+ int sbextent = pixelMetric(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 = tqpixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = pixelMetric( 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::tqpixelMetric( PixelMetric metric,
+int LightStyleV2::pixelMetric( PixelMetric metric,
const TQWidget *widget ) const
{
int ret;
@@ -1464,7 +1464,7 @@ int LightStyleV2::tqpixelMetric( PixelMetric metric,
case PM_SliderLength:
case PM_SliderControlThickness:
- ret = singleton->basestyle->tqpixelMetric( metric, widget );
+ ret = singleton->basestyle->pixelMetric( metric, widget );
break;
case PM_MaximumDragDistance:
@@ -1472,7 +1472,7 @@ int LightStyleV2::tqpixelMetric( PixelMetric metric,
break;
default:
- ret = TQCommonStyle::tqpixelMetric(metric, widget);
+ ret = TQCommonStyle::pixelMetric(metric, widget);
break;
}
@@ -1525,8 +1525,8 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
int w = contentsSize.width(), h = contentsSize.height();
if (mi->custom()) {
- w = mi->custom()->tqsizeHint().width();
- h = mi->custom()->tqsizeHint().height();
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().height();
if (! mi->custom()->fullSpan() && h < 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().tqfind('\t') >= 0)
+ if (! mi->text().isNull() && mi->text().find('\t') >= 0)
w += 8;
ret = TQSize(w, h);
@@ -1586,7 +1586,7 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
return ret;
}
-int LightStyleV2::tqstyleHint( StyleHint stylehint,
+int LightStyleV2::styleHint( StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
QStyleHintReturn* returnData ) const
@@ -1611,7 +1611,7 @@ int LightStyleV2::tqstyleHint( StyleHint stylehint,
break;
default:
- ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
break;
}
diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h
index 292984811..e5a3fffac 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 tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQStyleOption & = TQStyleOption::Default) const;
TQRect subRect(SubRect, const TQWidget *) const;
- void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ void drawComplexControl(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 tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const;
+ int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int tqstyleHint(StyleHint, const TQWidget * = 0,
+ int styleHint(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 9f5bd77f8..5a902d7f5 100644
--- a/kstyles/light/lightstyle-v3.cpp
+++ b/kstyles/light/lightstyle-v3.cpp
@@ -51,7 +51,7 @@ LightStyleV3::LightStyleV3()
if ( ! basestyle )
basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() );
if ( ! basestyle )
- qFatal( "LightStyle: couldn't tqfind a basestyle!" );
+ qFatal( "LightStyle: couldn't find a basestyle!" );
}
LightStyleV3::~LightStyleV3()
@@ -277,7 +277,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
br.addCoords( 1, 1, -1, -1 );
}
drawLightBevel( p, br, cg, flags,
- tqpixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ),
+ pixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ),
etch, true, fill );
break;
}
@@ -293,7 +293,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
fill = &cg.brush(TQColorGroup::Button);
} else
fill = &cg.brush(TQColorGroup::Background);
- drawLightBevel( p, r, cg, flags, tqpixelMetric( PM_DefaultFrameWidth ),
+ drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ),
false, true, fill );
break;
@@ -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->tqparentWidget();
+ TQWidget *p = w->parentWidget();
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
drawTitle = true;
title = p->caption();
@@ -531,7 +531,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_PanelPopup:
drawLightBevel( p, r, cg, flags,
- ( data.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) :
+ ( data.isDefault() ? pixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, true );
break;
@@ -544,7 +544,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
int cover = 0;
int reallw = ( data.isDefault() ?
- tqpixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() );
+ pixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() );
cover = reallw - 1;
if ( ! ( flags & Style_Sunken ) )
@@ -572,14 +572,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_PanelDockWindow:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
- tqpixelMetric(PM_DefaultFrameWidth) :
+ pixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, false,
&cg.brush( TQColorGroup::Button ) );
break;
case PE_PanelMenuBar:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
- tqpixelMetric(PM_MenuBarFrameWidth) :
+ pixelMetric(PM_MenuBarFrameWidth) :
data.lineWidth() ), false, false,
&cg.brush( TQColorGroup::Button ) );
break;
@@ -803,7 +803,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
}
-void LightStyleV3::tqdrawControl( ControlElement control,
+void LightStyleV3::drawControl( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -817,7 +817,7 @@ void LightStyleV3::tqdrawControl( ControlElement control,
const TQTabBar *tb = (const TQTabBar *) widget;
TQRect br = r;
- if ( tb->tqshape() == TQTabBar::RoundedAbove ) {
+ if ( tb->shape() == TQTabBar::RoundedAbove ) {
if ( ! ( flags & Style_Selected ) ) {
p->setPen( cg.background() );
p->drawLine( br.left(), br.bottom(),
@@ -852,7 +852,7 @@ void LightStyleV3::tqdrawControl( ControlElement control,
else
br.addCoords( 1, 1, -1, 0 );
p->fillRect( br, cg.background() );
- } else if ( tb->tqshape() == TQTabBar::RoundedBelow ) {
+ } else if ( tb->shape() == TQTabBar::RoundedBelow ) {
if ( ! ( flags & Style_Selected ) ) {
p->setPen( cg.background() );
p->drawLine( br.left(), br.top(),
@@ -892,7 +892,7 @@ void LightStyleV3::tqdrawControl( ControlElement control,
p->fillRect( br, cg.background() );
} else
- TQCommonStyle::tqdrawControl( control, p, widget, r, cg, flags, data );
+ TQCommonStyle::drawControl( control, p, widget, r, cg, flags, data );
break;
}
@@ -945,10 +945,10 @@ void LightStyleV3::tqdrawControl( ControlElement control,
bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
- cr = tqvisualRect( cr, r );
- sr = tqvisualRect( sr, r );
- tr = tqvisualRect( tr, r );
- ir = tqvisualRect( ir, r );
+ cr = visualRect( cr, r );
+ sr = visualRect( sr, r );
+ tr = visualRect( tr, r );
+ ir = visualRect( ir, r );
}
if (mi->isChecked() &&
@@ -1010,7 +1010,7 @@ void LightStyleV3::tqdrawControl( ControlElement control,
TQString text = mi->text();
if (! text.isNull()) {
- int t = text.tqfind('\t');
+ int t = text.find('\t');
// draw accelerator/tab-text
if (t >= 0) {
@@ -1078,17 +1078,17 @@ void LightStyleV3::tqdrawControl( ControlElement control,
}
case CE_ProgressBarGroove:
- drawLightBevel( p, r, cg, Style_Sunken, tqpixelMetric( PM_DefaultFrameWidth ),
+ drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ),
true, true, &cg.brush( TQColorGroup::Background ) );
break;
default:
- TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
break;
}
}
-void LightStyleV3::tqdrawControlMask( ControlElement control,
+void LightStyleV3::drawControlMask( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1100,7 +1100,7 @@ void LightStyleV3::tqdrawControlMask( ControlElement control,
break;
default:
- TQCommonStyle::tqdrawControlMask(control, p, widget, r, data);
+ TQCommonStyle::drawControlMask(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 = tqpixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2;
+ int bm = pixelMetric( 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::tqdrawComplexControl( ComplexControl control,
+void LightStyleV3::drawComplexControl( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
@@ -1166,15 +1166,15 @@ void LightStyleV3::tqdrawComplexControl( ComplexControl control,
const TQComboBox *combobox = (const TQComboBox *) widget;
TQRect frame, arrow, field;
frame =
- TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
@@ -1193,7 +1193,7 @@ void LightStyleV3::tqdrawComplexControl( ComplexControl control,
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
TQRect fr =
- TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
p->fillRect( fr, cg.brush( TQColorGroup::Highlight ) );
drawPrimitive( PE_FocusRect, p, fr, cg,
@@ -1408,19 +1408,19 @@ void LightStyleV3::tqdrawComplexControl( ComplexControl control,
}
if (controls & SC_SliderTickmarks)
- TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
case CC_ListView:
// use the base style for CC_ListView
- basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags,
+ basestyle->drawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
default:
- TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(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 = tqpixelMetric( PM_DefaultFrameWidth, widget );
- int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow
+ int fw = pixelMetric( PM_DefaultFrameWidth, widget );
+ int sb = pixelMetric( 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 = tqpixelMetric(PM_ScrollBarExtent, widget);
+ int sbextent = pixelMetric(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 = tqpixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -1537,8 +1537,8 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case CC_Slider:
{
const TQSlider *slider = (const TQSlider *) widget;
- int tickOffset = tqpixelMetric( PM_SliderTickmarkOffset, widget );
- int thickness = tqpixelMetric( PM_SliderControlThickness, widget );
+ int tickOffset = pixelMetric( PM_SliderTickmarkOffset, widget );
+ int thickness = pixelMetric( PM_SliderControlThickness, widget );
switch ( sc ) {
case SC_SliderGroove:
@@ -1551,7 +1551,7 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case SC_SliderHandle:
{
int pos = slider->sliderStart();
- int len = tqpixelMetric( PM_SliderLength, widget );
+ int len = pixelMetric( PM_SliderLength, widget );
if ( slider->orientation() == Horizontal )
ret.setRect( pos + 2, tickOffset + 2, len - 4, thickness - 4 );
@@ -1593,7 +1593,7 @@ TQStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
return ret;
}
-int LightStyleV3::tqpixelMetric( PixelMetric metric,
+int LightStyleV3::pixelMetric( PixelMetric metric,
const TQWidget *widget ) const
{
int ret;
@@ -1690,7 +1690,7 @@ int LightStyleV3::tqpixelMetric( PixelMetric metric,
break;
default:
- ret = TQCommonStyle::tqpixelMetric(metric, widget);
+ ret = TQCommonStyle::pixelMetric(metric, widget);
break;
}
@@ -1707,8 +1707,8 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
switch (contents) {
case CT_ComboBox:
{
- int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
- int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow
+ int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow
int w = contentsSize.width();
int h = contentsSize.height();
@@ -1728,7 +1728,7 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
const TQPushButton *button = (const TQPushButton *) widget;
ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
- int dbi = tqpixelMetric( PM_ButtonDefaultIndicator, widget ) * 2;
+ int dbi = pixelMetric( 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()->tqsizeHint().width();
- h = mi->custom()->tqsizeHint().height();
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().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().tqfind('\t') >= 0)
+ if (! mi->text().isNull() && mi->text().find('\t') >= 0)
w += 8;
ret = TQSize(w, h);
@@ -1817,7 +1817,7 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
return ret;
}
-int LightStyleV3::tqstyleHint( StyleHint stylehint,
+int LightStyleV3::styleHint( StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
QStyleHintReturn* returnData ) const
@@ -1846,7 +1846,7 @@ int LightStyleV3::tqstyleHint( StyleHint stylehint,
break;
default:
- ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
break;
}
diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h
index a97c57643..be8812b99 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 tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQStyleOption & = TQStyleOption::Default) const;
TQRect subRect(SubRect, const TQWidget *) const;
- void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ void drawComplexControl(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 tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const;
+ int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int tqstyleHint(StyleHint, const TQWidget * = 0,
+ int styleHint(StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
diff --git a/kstyles/plastik/config/plastikconf.cpp b/kstyles/plastik/config/plastikconf.cpp
index 4ad31ef26..70d4f6cfa 100644
--- a/kstyles/plastik/config/plastikconf.cpp
+++ b/kstyles/plastik/config/plastikconf.cpp
@@ -49,7 +49,7 @@ extern "C"
PlastikStyleConfig::PlastikStyleConfig(TQWidget* parent): TQWidget(parent)
{
//Should have no margins here, the dialog provides them
- TQVBoxLayout* tqlayout = new TQVBoxLayout(this, 0, 0);
+ TQVBoxLayout* layout = new TQVBoxLayout(this, 0, 0);
KGlobal::locale()->insertCatalogue("kstyle_plastik_config");
// scrollBarLines = new TQCheckBox(i18n("Scrollbar handle lines"), this);
@@ -62,33 +62,33 @@ PlastikStyleConfig::PlastikStyleConfig(TQWidget* parent): TQWidget(parent)
customFocusHighlightColor = new TQCheckBox(i18n("Custom text input highlight color:"), this);
TQHBox *hbox1 = new TQHBox(this);
- hbox1->tqlayout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
+ hbox1->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
focusHighlightColor = new KColorButton(hbox1);
customOverHighlightColor = new TQCheckBox(i18n("Custom mouseover highlight color:"), this);
TQHBox *hbox2 = new TQHBox(this);
- hbox2->tqlayout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
+ hbox2->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
overHighlightColor = new KColorButton(hbox2);
customCheckMarkColor = new TQCheckBox(i18n("Custom checkmark color:"), this);
TQHBox *hbox3 = new TQHBox(this);
- hbox3->tqlayout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
+ hbox3->layout()->addItem(new TQSpacerItem(20, 0, TQSizePolicy::Fixed, TQSizePolicy::Minimum) );
checkMarkColor = new KColorButton(hbox3);
-// tqlayout->add(scrollBarLines);
- tqlayout->add(animateProgressBar);
- tqlayout->add(drawToolBarSeparator);
- tqlayout->add(drawToolBarItemSeparator);
-// tqlayout->add(drawFocusRect);
- tqlayout->add(drawTriangularExpander);
- tqlayout->add(inputFocusHighlight);
- tqlayout->add(customFocusHighlightColor);
- tqlayout->add(hbox1);
- tqlayout->add(customOverHighlightColor);
- tqlayout->add(hbox2);
- tqlayout->add(customCheckMarkColor);
- tqlayout->add(hbox3);
- tqlayout->addStretch(1);
+// layout->add(scrollBarLines);
+ layout->add(animateProgressBar);
+ layout->add(drawToolBarSeparator);
+ layout->add(drawToolBarItemSeparator);
+// layout->add(drawFocusRect);
+ layout->add(drawTriangularExpander);
+ layout->add(inputFocusHighlight);
+ layout->add(customFocusHighlightColor);
+ layout->add(hbox1);
+ layout->add(customOverHighlightColor);
+ layout->add(hbox2);
+ layout->add(customCheckMarkColor);
+ layout->add(hbox3);
+ layout->addStretch(1);
TQSettings s;
// origScrollBarLines = s.readBoolEntry("/plastikstyle/Settings/scrollBarLines", false);
diff --git a/kstyles/plastik/misc.cpp b/kstyles/plastik/misc.cpp
index d1a52d61e..e1fc2df79 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( 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) );
+ 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) );
return result;
}
diff --git a/kstyles/plastik/plastik.cpp b/kstyles/plastik/plastik.cpp
index a148b953c..dd7954cc9 100644
--- a/kstyles/plastik/plastik.cpp
+++ b/kstyles/plastik/plastik.cpp
@@ -74,7 +74,7 @@
// some bitmaps for the radio button so it's easier to handle the circle stuff...
// 13x13
-static const unsigned char radiobutton_tqmask_bits[] = {
+static const unsigned char radiobutton_mask_bits[] = {
0xf8, 0x03, 0xfc, 0x07, 0xfe, 0x0f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f,
0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xff, 0x1f, 0xfe, 0x0f, 0xfc, 0x07,
0xf8, 0x03};
@@ -662,7 +662,7 @@ void PlastikStyle::renderPixel(TQPainter *p,
int key = search.key();
CacheEntry *cacheEntry;
- if( (cacheEntry = pixmapCache->tqfind(key)) ) {
+ if( (cacheEntry = pixmapCache->find(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,tqRgba(tqRed(rgb),tqGreen(rgb),tqBlue(rgb),alpha));
+ aImg.setPixel(0,0,qRgba(qRed(rgb),qGreen(rgb),qBlue(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( 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) );
+ 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) );
p->setPen(res);
p->drawPoint(pos);
}
@@ -798,7 +798,7 @@ void PlastikStyle::renderGradient(TQPainter *painter,
int key = search.key();
CacheEntry *cacheEntry;
- if( (cacheEntry = pixmapCache->tqfind(key)) ) {
+ if( (cacheEntry = pixmapCache->find(key)) ) {
if( search == *cacheEntry ) { // match! we can draw now...
if(cacheEntry->pixmap) {
painter->drawTiledPixmap(rect, *(cacheEntry->pixmap) );
@@ -1143,7 +1143,7 @@ void PlastikStyle::renderTab(TQPainter *p,
// fake the panel border edge for tabs which are aligned left-most
// (i.e. only if there is no widget in the corner of the tabwidget!)
if(isFirst&&!reverseLayout&&!cornerWidget)
- // normal tqlayout
+ // normal layout
{
if (!bottom) {
p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
@@ -1165,7 +1165,7 @@ void PlastikStyle::renderTab(TQPainter *p,
p->drawPoint(Rb.x()+1, Rb.bottom() );
}
} else if(isFirst&&reverseLayout&&!cornerWidget)
- // reverse tqlayout
+ // reverse layout
{
if (!bottom) {
p->setPen(alphaBlendColors(g.background(), getColor(g,PanelContour), 50) );
@@ -1266,16 +1266,16 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawPoint(xcenter+5-4, ycenter+8);
- TQRegion tqmask(xcenter-4, ycenter-5, 9, 13);
- tqmask -= TQRegion(xcenter-4, ycenter+4, 1, 4);
- tqmask -= TQRegion(xcenter-3, ycenter+5, 1, 3);
- tqmask -= TQRegion(xcenter-2, ycenter+6, 1, 2);
- tqmask -= TQRegion(xcenter-1, ycenter+7, 1, 1);
- tqmask -= TQRegion(xcenter+1, ycenter+7, 1, 1);
- tqmask -= TQRegion(xcenter+2, ycenter+6, 1, 2);
- tqmask -= TQRegion(xcenter+3, ycenter+5, 1, 3);
- tqmask -= TQRegion(xcenter+4, ycenter+4, 1, 4);
- p->setClipRegion(tqmask);
+ TQRegion mask(xcenter-4, ycenter-5, 9, 13);
+ mask -= TQRegion(xcenter-4, ycenter+4, 1, 4);
+ mask -= TQRegion(xcenter-3, ycenter+5, 1, 3);
+ mask -= TQRegion(xcenter-2, ycenter+6, 1, 2);
+ mask -= TQRegion(xcenter-1, ycenter+7, 1, 1);
+ mask -= TQRegion(xcenter+1, ycenter+7, 1, 1);
+ mask -= TQRegion(xcenter+2, ycenter+6, 1, 2);
+ mask -= TQRegion(xcenter+3, ycenter+5, 1, 3);
+ mask -= TQRegion(xcenter+4, ycenter+4, 1, 4);
+ p->setClipRegion(mask);
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Round_UpperLeft|Round_UpperRight|Is_Horizontal;
if(!enabled)
surfaceFlags |= Is_Disabled;
@@ -1316,16 +1316,16 @@ void PlastikStyle::drawKStylePrimitive(KStylePrimitive kpe,
p->drawPoint(xcenter+8, ycenter-5+4);
p->drawPoint(xcenter+8, ycenter+5-4);
- TQRegion tqmask(xcenter-5, ycenter-4, 13, 9);
- tqmask -= TQRegion(xcenter+4, ycenter-4, 4, 1);
- tqmask -= TQRegion(xcenter+5, ycenter-3, 3, 1);
- tqmask -= TQRegion(xcenter+6, ycenter-2, 2, 1);
- tqmask -= TQRegion(xcenter+7, ycenter-1, 1, 1);
- tqmask -= TQRegion(xcenter+7, ycenter+1, 1, 1);
- tqmask -= TQRegion(xcenter+6, ycenter+2, 2, 1);
- tqmask -= TQRegion(xcenter+5, ycenter+3, 3, 1);
- tqmask -= TQRegion(xcenter+4, ycenter+4, 4, 1);
- p->setClipRegion(tqmask);
+ TQRegion mask(xcenter-5, ycenter-4, 13, 9);
+ mask -= TQRegion(xcenter+4, ycenter-4, 4, 1);
+ mask -= TQRegion(xcenter+5, ycenter-3, 3, 1);
+ mask -= TQRegion(xcenter+6, ycenter-2, 2, 1);
+ mask -= TQRegion(xcenter+7, ycenter-1, 1, 1);
+ mask -= TQRegion(xcenter+7, ycenter+1, 1, 1);
+ mask -= TQRegion(xcenter+6, ycenter+2, 2, 1);
+ mask -= TQRegion(xcenter+5, ycenter+3, 3, 1);
+ mask -= TQRegion(xcenter+4, ycenter+4, 4, 1);
+ p->setClipRegion(mask);
uint surfaceFlags = Draw_Left|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft|
Round_UpperRight|Is_Horizontal;
if(!enabled)
@@ -1515,7 +1515,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
case PE_ButtonTool:
case PE_ButtonDropDown:
case PE_ButtonCommand: {
- bool khtmlMode = opt.isDefault() ? false : khtmlWidgets.tqcontains(opt.widget());
+ bool khtmlMode = opt.isDefault() ? false : khtmlWidgets.contains(opt.widget());
renderButton(p, r, cg, (on||down), mouseOver, true, enabled, khtmlMode );
break;
}
@@ -1732,7 +1732,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
TQColor contentColor = enabled?cg.base():cg.background();
TQBitmap bmp;
- bmp = TQBitmap(13, 13, radiobutton_tqmask_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_mask_bits, true);
// first the surface...
uint surfaceFlags = Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Is_Horizontal;
if(!enabled) {
@@ -1806,7 +1806,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
p->fillRect(r, color0);
TQBitmap bmp;
- bmp = TQBitmap(13, 13, radiobutton_tqmask_bits, true);
+ bmp = TQBitmap(13, 13, radiobutton_mask_bits, true);
bmp.setMask(bmp);
p->setPen(color1);
p->drawPixmap(x, y, bmp);
@@ -2094,11 +2094,11 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
}
- const TQWMatrix oldMatrix( p->tqworldMatrix() );
+ const TQWMatrix oldMatrix( p->worldMatrix() );
if (flags & Style_Down) {
- p->translate(tqpixelMetric(PM_ButtonShiftHorizontal),
- tqpixelMetric(PM_ButtonShiftVertical));
+ p->translate(pixelMetric(PM_ButtonShiftHorizontal),
+ pixelMetric(PM_ButtonShiftVertical));
}
a.translate((r.x()+r.width()/2), (r.y()+r.height()/2));
@@ -2138,7 +2138,7 @@ void PlastikStyle::drawPrimitive(PrimitiveElement pe,
}
-void PlastikStyle::tqdrawControl(ControlElement element,
+void PlastikStyle::drawControl(ControlElement element,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -2211,15 +2211,15 @@ void PlastikStyle::tqdrawControl(ControlElement element,
reverseLayout ? Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperLeft|Round_BottomLeft
: Draw_Left|Draw_Right|Draw_Top|Draw_Bottom|Round_UpperRight|Round_BottomRight);
- TQRegion tqmask(Rsurface);
+ TQRegion mask(Rsurface);
if(reverseLayout) {
- tqmask -= TQRegion(Rsurface.left(), Rsurface.top(), 1, 1);
- tqmask -= TQRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
+ mask -= TQRegion(Rsurface.left(), Rsurface.top(), 1, 1);
+ mask -= TQRegion(Rsurface.left(), Rsurface.bottom(), 1, 1);
} else {
- tqmask -= TQRegion(Rsurface.right(), Rsurface.top(), 1, 1);
- tqmask -= TQRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
+ mask -= TQRegion(Rsurface.right(), Rsurface.top(), 1, 1);
+ mask -= TQRegion(Rsurface.right(), Rsurface.bottom(), 1, 1);
}
- p->setClipRegion(tqmask);
+ p->setClipRegion(mask);
int counter = 0;
TQPixmap surfaceTile(21, r.height()-2);
TQPainter surfacePainter(&surfaceTile);
@@ -2263,9 +2263,9 @@ void PlastikStyle::tqdrawControl(ControlElement element,
if (!_animateProgressBar) {
staticShift = (reverseLayout ? Rsurface.left() : Rsurface.right()) % 40 - 40;
} else {
- // tqfind the animation Offset for the current Widget
+ // find the animation Offset for the current Widget
TQWidget* nonConstWidget = const_cast<TQWidget*>(widget);
- TQMapConstIterator<TQWidget*, int> iter = progAnimWidgets.tqfind(nonConstWidget);
+ TQMapConstIterator<TQWidget*, int> iter = progAnimWidgets.find(nonConstWidget);
if (iter != progAnimWidgets.end())
animShift = iter.data();
}
@@ -2300,7 +2300,7 @@ void PlastikStyle::tqdrawControl(ControlElement element,
if(cw)
cornerWidget = true;
}
- TQTabBar::Shape tbs = tb->tqshape();
+ TQTabBar::Shape tbs = tb->shape();
bool selected = false;
if (flags & Style_Selected) selected = true;
TabPosition pos;
@@ -2336,7 +2336,7 @@ void PlastikStyle::tqdrawControl(ControlElement element,
renderTab(p, r, cg, mouseOver, selected, true, pos, false, cornerWidget);
break;
default:
- KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
break;
@@ -2379,15 +2379,15 @@ void PlastikStyle::tqdrawControl(ControlElement element,
// Shift button contents if pushed.
if ( active )
{
- x += tqpixelMetric(PM_ButtonShiftHorizontal, widget);
- y += tqpixelMetric(PM_ButtonShiftVertical, widget);
+ x += pixelMetric(PM_ButtonShiftHorizontal, widget);
+ y += pixelMetric(PM_ButtonShiftVertical, widget);
flags |= Style_Sunken;
}
// Does the button have a popup menu?
if ( button->isMenuButton() )
{
- int dx = tqpixelMetric( PM_MenuButtonIndicator, widget );
+ int dx = pixelMetric( PM_MenuButtonIndicator, widget );
if ( button->iconSet() && !button->iconSet()->isNull() &&
(dx + button->iconSet()->pixmap (TQIconSet::Small, TQIconSet::Normal, TQIconSet::Off ).width()) >= w )
{
@@ -2396,7 +2396,7 @@ void PlastikStyle::tqdrawControl(ControlElement element,
else
{
p->setPen(cg.buttonText());
- drawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - dx - 8, y + 2, dx, h - 4), r ),
cg, flags, opt );
w -= dx;
}
@@ -2422,7 +2422,7 @@ void PlastikStyle::tqdrawControl(ControlElement element,
p->drawPixmap( x + 4, y + h / 2 - pixmap.height() / 2, pixmap );
if (cornArrow) //Draw over the icon
- drawPrimitive( PE_ArrowDown, p, tqvisualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
+ drawPrimitive( PE_ArrowDown, p, visualRect( TQRect(x + w - 6, x + h - 6, 7, 7), r ),
cg, flags, opt );
@@ -2432,14 +2432,14 @@ void PlastikStyle::tqdrawControl(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->tqcolorGroup(),
+ drawItem( p, TQRect(x, y, w, h), AlignCenter|ShowPrefix, button->colorGroup(),
button->isEnabled(), button->pixmap(), button->text(), -1,
- &button->tqcolorGroup().buttonText() );
+ &button->colorGroup().buttonText() );
if ( flags & Style_HasFocus )
drawPrimitive( PE_FocusRect, p,
- tqvisualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
+ visualRect( subRect( SR_PushButtonFocusRect, widget ), widget ),
cg, flags );
break;
}
@@ -2489,7 +2489,7 @@ void PlastikStyle::tqdrawControl(ControlElement element,
bool enabled = mi->isEnabled();
bool checkable = popupmenu->isCheckable();
bool active = flags & Style_Active;
- bool etchtext = tqstyleHint( SH_EtchDisabledText );
+ bool etchtext = styleHint( SH_EtchDisabledText );
bool reverse = TQApplication::reverseLayout();
if ( checkable )
checkcol = QMAX( checkcol, 20 );
@@ -2524,7 +2524,7 @@ void PlastikStyle::tqdrawControl(ControlElement element,
break;
}
- TQRect cr = tqvisualRect( TQRect( r.x() + 2, r.y() + 2, checkcol - 1, r.height() - 4 ), r );
+ TQRect cr = visualRect( 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::tqdrawControl(ControlElement element,
TQString s = mi->text();
// Does the menu item have a text label?
if ( !s.isNull() ) {
- int t = s.tqfind( '\t' );
+ int t = s.find( '\t' );
int m = 2;
int text_flags = AlignVCenter | ShowPrefix | DontClip | SingleLine;
text_flags |= reverse ? AlignRight : AlignLeft;
@@ -2668,8 +2668,8 @@ void PlastikStyle::tqdrawControl(ControlElement element,
// Does the menu item have a submenu?
if ( mi->popup() ) {
PrimitiveElement arrow = reverse ? PE_ArrowLeft : PE_ArrowRight;
- int dim = tqpixelMetric(PM_MenuButtonIndicator) - 1;
- TQRect vr = tqvisualRect( TQRect( r.x() + r.width() - 5 - 1 - dim,
+ int dim = pixelMetric(PM_MenuButtonIndicator) - 1;
+ TQRect vr = visualRect( 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::tqdrawControl(ControlElement element,
break;
default:
- KStyle::tqdrawControl(element, p, widget, r, cg, flags, opt);
+ KStyle::drawControl(element, p, widget, r, cg, flags, opt);
}
}
-void PlastikStyle::tqdrawControlMask(ControlElement element,
+void PlastikStyle::drawControlMask(ControlElement element,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -2724,12 +2724,12 @@ void PlastikStyle::tqdrawControlMask(ControlElement element,
}
default: {
- KStyle::tqdrawControlMask (element, p, w, r, opt);
+ KStyle::drawControlMask (element, p, w, r, opt);
}
}
}
-void PlastikStyle::tqdrawComplexControlMask(ComplexControl c,
+void PlastikStyle::drawComplexControlMask(ComplexControl c,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -2745,12 +2745,12 @@ void PlastikStyle::tqdrawComplexControlMask(ComplexControl c,
break;
}
default: {
- KStyle::tqdrawComplexControlMask (c, p, w, r, o);
+ KStyle::drawComplexControlMask (c, p, w, r, o);
}
}
}
-void PlastikStyle::tqdrawComplexControl(ComplexControl control,
+void PlastikStyle::drawComplexControl(ComplexControl control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -2785,7 +2785,7 @@ void PlastikStyle::tqdrawComplexControl(ComplexControl control,
:cg.background();
uint contourFlags = 0;
- if( khtmlWidgets.tqcontains(cb) )
+ if( khtmlWidgets.contains(cb) )
contourFlags |= Draw_AlphaBlend;
if (_inputFocusHighlight && hasFocus && editable && enabled)
@@ -2951,10 +2951,10 @@ void PlastikStyle::tqdrawComplexControl(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->tqparentWidget() &&
- tb->tqparentWidget()->backgroundPixmap() &&
- !tb->tqparentWidget()->backgroundPixmap()->isNull()) {
- TQPixmap pixmap = *(tb->tqparentWidget()->backgroundPixmap());
+ } else if (tb->parentWidget() &&
+ tb->parentWidget()->backgroundPixmap() &&
+ !tb->parentWidget()->backgroundPixmap()->isNull()) {
+ TQPixmap pixmap = *(tb->parentWidget()->backgroundPixmap());
p->drawTiledPixmap( r, pixmap, tb->pos() );
}
}
@@ -3140,7 +3140,7 @@ void PlastikStyle::tqdrawComplexControl(ComplexControl control,
}
default:
- KStyle::tqdrawComplexControl(control, p, widget,
+ KStyle::drawComplexControl(control, p, widget,
r, cg, flags, controls,
active, opt);
break;
@@ -3245,15 +3245,15 @@ TQRect PlastikStyle::querySubControlMetrics(ComplexControl control,
}
}
-int PlastikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
+int PlastikStyle::pixelMetric(PixelMetric m, const TQWidget *widget) const
{
switch(m) {
// TABS
// ----
case PM_TabBarTabVSpace: {
const TQTabBar * tb = (const TQTabBar *) widget;
- if (tb->tqshape() == TQTabBar::RoundedAbove ||
- tb->tqshape() == TQTabBar::RoundedBelow)
+ if (tb->shape() == TQTabBar::RoundedAbove ||
+ tb->shape() == TQTabBar::RoundedBelow)
return 12;
else
return 4;
@@ -3342,7 +3342,7 @@ int PlastikStyle::tqpixelMetric(PixelMetric m, const TQWidget *widget) const
}
default:
- return KStyle::tqpixelMetric(m, widget);
+ return KStyle::pixelMetric(m, widget);
}
}
@@ -3364,8 +3364,8 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
bool checkable = popup->isCheckable();
if (mi->custom()) {
- w = mi->custom()->tqsizeHint().width();
- h = mi->custom()->tqsizeHint().height();
+ w = mi->custom()->sizeHint().width();
+ h = mi->custom()->sizeHint().height();
if (!mi->custom()->fullSpan() )
h += 4;
} else if (mi->widget()) {
@@ -3386,7 +3386,7 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
}
}
- if (!mi->text().isNull() && (mi->text().tqfind('\t') >= 0)) {
+ if (!mi->text().isNull() && (mi->text().find('\t') >= 0)) {
w += itemHMargin + itemFrame*2 + 7;
} else if (mi->popup()) {
w += 2 * arrowHMargin;
@@ -3411,8 +3411,8 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
{
const TQPushButton* btn = static_cast<const TQPushButton*>(widget);
- int w = s.width() + 2 * tqpixelMetric(PM_ButtonMargin, widget);
- int h = s.height() + 2 * tqpixelMetric(PM_ButtonMargin, widget);
+ int w = s.width() + 2 * pixelMetric(PM_ButtonMargin, widget);
+ int h = s.height() + 2 * pixelMetric(PM_ButtonMargin, widget);
if ( btn->text().isEmpty() && s.width() < 32 ) return TQSize(w, h);
return TQSize( w+25, h+5 );
@@ -3433,7 +3433,7 @@ TQSize PlastikStyle::sizeFromContents(ContentsType t,
return KStyle::sizeFromContents (t, widget, s, opt);
}
-int PlastikStyle::tqstyleHint( StyleHint stylehint,
+int PlastikStyle::styleHint( StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
QStyleHintReturn* returnData ) const
@@ -3443,7 +3443,7 @@ int PlastikStyle::tqstyleHint( StyleHint stylehint,
return 96; // Motif-like delay...
default:
- return KStyle::tqstyleHint(stylehint, widget, option, returnData);
+ return KStyle::styleHint(stylehint, widget, option, returnData);
}
}
@@ -3458,19 +3458,19 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
if ( ::qt_cast<TQLineEdit*>(obj) ) {
TQWidget* widget = static_cast<TQWidget*>(obj);
- if ( ::qt_cast<TQSpinWidget*>(widget->tqparentWidget()) )
+ if ( ::qt_cast<TQSpinWidget*>(widget->parentWidget()) )
{
- TQWidget* spinbox = widget->tqparentWidget();
+ TQWidget* spinbox = widget->parentWidget();
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
{
- spinbox->tqrepaint(false);
+ spinbox->repaint(false);
}
return false;
}
if ((ev->type() == TQEvent::FocusIn) || (ev->type() == TQEvent::FocusOut))
{
- widget->tqrepaint(false);
+ widget->repaint(false);
}
return false;
}
@@ -3484,13 +3484,13 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
{
TQWidget* button = static_cast<TQWidget*>(obj);
hoverWidget = button;
- button->tqrepaint(false);
+ button->repaint(false);
}
else if ((ev->type() == TQEvent::Leave) && (obj == hoverWidget) )
{
TQWidget* button = static_cast<TQWidget*>(obj);
hoverWidget = 0;
- button->tqrepaint(false);
+ button->repaint(false);
}
return false;
}
@@ -3500,7 +3500,7 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
TQWidget* tabbar = static_cast<TQWidget*>(obj);
hoverWidget = tabbar;
hoverTab = 0;
- tabbar->tqrepaint(false);
+ tabbar->repaint(false);
}
else if (ev->type() == TQEvent::MouseMove)
{
@@ -3508,18 +3508,18 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
TQMouseEvent *me = dynamic_cast<TQMouseEvent*>(ev);
if (tabbar && me) {
- // avoid unnecessary tqrepaints (which otherwise would occour on every
+ // avoid unnecessary repaints (which otherwise would occour on every
// MouseMove event causing high cpu load).
- bool tqrepaint = true;
+ bool repaint = true;
TQTab *tab = tabbar->selectTab(me->pos() );
if (hoverTab == tab)
- tqrepaint = false;
+ repaint = false;
hoverTab = tab;
- if (tqrepaint)
- tabbar->tqrepaint(false);
+ if (repaint)
+ tabbar->repaint(false);
}
}
else if (ev->type() == TQEvent::Leave)
@@ -3527,7 +3527,7 @@ bool PlastikStyle::eventFilter(TQObject *obj, TQEvent *ev)
TQWidget* tabbar = static_cast<TQWidget*>(obj);
hoverWidget = 0;
hoverTab = 0;
- tabbar->tqrepaint(false);
+ tabbar->repaint(false);
}
return false;
}
diff --git a/kstyles/plastik/plastik.h b/kstyles/plastik/plastik.h
index 7ddc6c183..9b38d764c 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 tqdrawControl(ControlElement element,
+ void drawControl(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 tqdrawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
+ void drawControlMask( ControlElement, TQPainter *, const TQWidget *, const TQRect &, const TQStyleOption &) const;
- void tqdrawComplexControl(ComplexControl control,
+ void drawComplexControl(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 tqpixelMetric(PixelMetric m,
+ int pixelMetric(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 tqdrawComplexControlMask(TQStyle::ComplexControl c,
+ void drawComplexControlMask(TQStyle::ComplexControl c,
TQPainter *p,
const TQWidget *w,
const TQRect &r,
@@ -123,7 +123,7 @@ public:
const TQSize &s,
const TQStyleOption &o) const;
- int tqstyleHint(StyleHint, const TQWidget * = 0,
+ int styleHint(StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
@@ -326,7 +326,7 @@ private:
{
// create an int key from the properties which is used to refer to entries in the TQIntCache.
// the result may not be 100% correct as we don't have so much space in one integer -- use
- // == operator after tqfind to make sure we got the right one. :)
+ // == operator after find to make sure we got the right one. :)
return horizontal ^ (type<<1) ^ (width<<5) ^ (height<<10) ^ (c1Rgb<<19) ^ (c2Rgb<<22);
}
diff --git a/kstyles/utils/installtheme/main.cpp b/kstyles/utils/installtheme/main.cpp
index 10945d57f..5ddf8cd56 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.tqcontains(name)) //Only add first occurrence, i.e. user local one.
+ if (!themes.contains(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 167fc5070..f4ed7f931 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->tqcolorGroup();
+ TQColorGroup g = sb->colorGroup();
if (sliderStart > sliderMax)
sliderStart = sliderMax;
@@ -303,12 +303,12 @@ WebStyle::eventFilter(TQObject * o, TQEvent * e)
if (e->type() == TQEvent::Enter)
{
_highlightedButton = pb;
- pb->tqrepaint(false);
+ pb->repaint(false);
}
else if (e->type() == TQEvent::Leave)
{
_highlightedButton = 0;
- pb->tqrepaint(false);
+ pb->repaint(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->tqcolorGroup().button());
+ TQColor bg(b->colorGroup().button());
p->save();
- p->fillRect(b->rect(), b->tqcolorGroup().brush(TQColorGroup::Background));
+ p->fillRect(b->rect(), b->colorGroup().brush(TQColorGroup::Background));
if (b->isDefault())
{
- TQColor c(hl ? b->tqcolorGroup().highlight() : b->tqcolorGroup().mid());
+ TQColor c(hl ? b->colorGroup().highlight() : b->colorGroup().mid());
p->setPen(contrastingForeground(c, bg));
@@ -391,26 +391,26 @@ WebStyle::drawPushButton(TQPushButton * b, TQPainter * p)
4,
b->width() - 8,
b->height() - 8,
- b->tqcolorGroup().brush(TQColorGroup::Button)
+ b->colorGroup().brush(TQColorGroup::Button)
);
if (b->isEnabled())
{
if (sunken)
{
- p->setPen(contrastingForeground(b->tqcolorGroup().light(), bg));
+ p->setPen(contrastingForeground(b->colorGroup().light(), bg));
}
else
{
if (hl)
- p->setPen(contrastingForeground(b->tqcolorGroup().highlight(), bg));
+ p->setPen(contrastingForeground(b->colorGroup().highlight(), bg));
else
- p->setPen(contrastingForeground(b->tqcolorGroup().mid(), bg));
+ p->setPen(contrastingForeground(b->colorGroup().mid(), bg));
}
}
else
{
- p->setPen(b->tqcolorGroup().button());
+ p->setPen(b->colorGroup().button());
}
drawFunkyRect(p, 3, 3, b->width() - 6, b->height() - 6, true);
@@ -459,7 +459,7 @@ WebStyle::drawScrollBarControls
rSlider
);
- TQColorGroup g(sb->tqcolorGroup());
+ TQColorGroup g(sb->colorGroup());
if (controls & AddLine && rAdd.isValid())
{
@@ -583,7 +583,7 @@ WebStyle::scrollBarPointOver
const TQPoint & point
)
{
- if (!sb->rect().tqcontains(point))
+ if (!sb->rect().contains(point))
return NoScroll;
int sliderMin, sliderMax, sliderLength, buttonDim;
@@ -754,7 +754,7 @@ WebStyle::drawExclusiveIndicator
p->setBrush(g.brush(TQColorGroup::Background));
- // Avoid mistqshapen ellipses. Qt or X bug ? Who knows...
+ // Avoid misshapen 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->tqcolorGroup());
+ TQColorGroup g(tabBar->colorGroup());
p->save();
p->setPen(selected ? g.dark() : g.mid());
p->fillRect(r, g.brush(TQColorGroup::Background));
- switch (tabBar->tqshape())
+ switch (tabBar->shape())
{
case TQTabBar::RoundedAbove:
case TQTabBar::TriangularAbove:
@@ -1603,7 +1603,7 @@ WebStyle::drawKickerTaskButton
static TQString modStr =
TQString::fromUtf8("[") + i18n("modified") + TQString::fromUtf8("]");
- int modStrPos = s.tqfind(modStr);
+ int modStrPos = s.find(modStr);
if (-1 != modStrPos)
{