summaryrefslogtreecommitdiffstats
path: root/kstyles/light
diff options
context:
space:
mode:
Diffstat (limited to 'kstyles/light')
-rw-r--r--kstyles/light/light.cpp5
-rw-r--r--kstyles/light/lightstyle-v2.cpp192
-rw-r--r--kstyles/light/lightstyle-v2.h10
-rw-r--r--kstyles/light/lightstyle-v3.cpp230
-rw-r--r--kstyles/light/lightstyle-v3.h10
5 files changed, 225 insertions, 222 deletions
diff --git a/kstyles/light/light.cpp b/kstyles/light/light.cpp
index caa1d3e8f..17ecde9fc 100644
--- a/kstyles/light/light.cpp
+++ b/kstyles/light/light.cpp
@@ -21,10 +21,13 @@
*/
#include <tqstyleplugin.h>
+#include <tqimage.h>
+#include <tqapplication.h>
+
#include "lightstyle-v2.h"
#include "lightstyle-v3.h"
-class LightStylePlugin : public QStylePlugin
+class LightStylePlugin : public TQStylePlugin
{
public:
LightStylePlugin();
diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp
index 8f673a707..6fde9549d 100644
--- a/kstyles/light/lightstyle-v2.cpp
+++ b/kstyles/light/lightstyle-v2.cpp
@@ -159,11 +159,11 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (flags & (TQStyle::Style_Down |
TQStyle::Style_On |
TQStyle::Style_Sunken))
- fill = &cg.brush(TQColorGroup::Midlight);
+ fill = &cg.tqbrush(TQColorGroup::Midlight);
else
- fill = &cg.brush(TQColorGroup::Button);
+ fill = &cg.tqbrush(TQColorGroup::Button);
} else
- fill = &cg.brush(TQColorGroup::Background);
+ fill = &cg.tqbrush(TQColorGroup::Background);
drawLightBevel(p, r, cg, flags, fill);
break;
}
@@ -176,11 +176,11 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (flags & TQStyle::Style_Enabled) {
if (sunken)
- thefill = cg.brush(TQColorGroup::Midlight);
+ thefill = cg.tqbrush(TQColorGroup::Midlight);
else
- thefill = cg.brush(TQColorGroup::Button);
+ thefill = cg.tqbrush(TQColorGroup::Button);
} else
- thefill = cg.brush(TQColorGroup::Background);
+ thefill = cg.tqbrush(TQColorGroup::Background);
p->setPen(cg.dark());
p->drawLine(r.topLeft(), r.topRight());
@@ -224,11 +224,11 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_Indicator:
const TQBrush *fill;
if (! (flags & Style_Enabled))
- fill = &cg.brush(TQColorGroup::Background);
+ fill = &cg.tqbrush(TQColorGroup::Background);
else if (flags & Style_Down)
- fill = &cg.brush(TQColorGroup::Mid);
+ fill = &cg.tqbrush(TQColorGroup::Mid);
else
- fill = &cg.brush(TQColorGroup::Base);
+ fill = &cg.tqbrush(TQColorGroup::Base);
drawLightBevel(p, r, cg, flags | Style_Sunken, fill);
p->setPen(cg.text());
@@ -265,7 +265,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
cr.addCoords(2, 2, -2, -2);
ir.addCoords(3, 3, -3, -3);
- p->fillRect(r, cg.brush(TQColorGroup::Background));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Background));
p->setPen(cg.dark());
p->drawArc(r, 0, 16*360);
@@ -294,7 +294,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
bool drawTitle = false;
if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device();
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
drawTitle = true;
title = p->caption();
@@ -307,7 +307,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
TQPixmap pm(r.height(), r.width());
TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(),
- cg.brush(TQColorGroup::Highlight));
+ cg.tqbrush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end();
@@ -331,7 +331,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
} else {
if (drawTitle) {
- p->fillRect(r, cg.brush(TQColorGroup::Highlight));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title);
} else {
@@ -366,7 +366,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
p->drawLine(r.left() + 6, r.top() + 2, r.right() - 6, r.top() + 2);
}
} else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -405,39 +405,39 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_WindowFrame:
{
int lw = data.isDefault() ?
- pixelMetric(PM_DefaultFrameWidth) : data.lineWidth();
+ tqpixelMetric(PM_DefaultFrameWidth) : data.lineWidth();
if ( ! ( flags & Style_Sunken ) )
flags |= Style_Raised;
if (lw == 2)
drawLightBevel(p, r, cg, flags);
else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
case PE_PanelDockWindow:
{
int lw = data.isDefault() ?
- pixelMetric(PM_DockWindowFrameWidth) : data.lineWidth();
+ tqpixelMetric(PM_DockWindowFrameWidth) : data.lineWidth();
if (lw == 2)
drawLightBevel(p, r, cg, flags | Style_Raised,
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
case PE_PanelMenuBar:
{
int lw = data.isDefault() ?
- pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
+ tqpixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
if (lw == 2)
- drawLightBevel(p, r, cg, flags, &cg.brush(TQColorGroup::Button));
+ drawLightBevel(p, r, cg, flags, &cg.tqbrush(TQColorGroup::Button));
else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -459,10 +459,10 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
pe = PE_ArrowUp;
}
- p->fillRect(fr, cg.brush((flags & Style_Down) ?
+ p->fillRect(fr, cg.tqbrush((flags & Style_Down) ?
TQColorGroup::Midlight :
TQColorGroup::Background));
- drawPrimitive(pe, p, ar, cg, flags);
+ tqdrawPrimitive(pe, p, ar, cg, flags);
break;
}
@@ -484,10 +484,10 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
pe = PE_ArrowDown;
}
- p->fillRect(fr, cg.brush((flags & Style_Down) ?
+ p->fillRect(fr, cg.tqbrush((flags & Style_Down) ?
TQColorGroup::Midlight :
TQColorGroup::Background));
- drawPrimitive(pe, p, ar, cg, flags);
+ tqdrawPrimitive(pe, p, ar, cg, flags);
break;
}
@@ -509,7 +509,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
fr.addCoords(2, 0, 0, 0);
}
- p->fillRect(fr, cg.brush((flags & Style_Down) ?
+ p->fillRect(fr, cg.tqbrush((flags & Style_Down) ?
TQColorGroup::Midlight :
TQColorGroup::Mid));
break;
@@ -534,7 +534,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
drawLightBevel(p, fr, cg, ((flags | Style_Down) ^ Style_Down) |
((flags & Style_Enabled) ? Style_Raised : Style_Default),
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
break;
}
@@ -607,12 +607,12 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->restore();
} else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
}
-void LightStyleV2::drawControl( ControlElement control,
+void LightStyleV2::tqdrawControl( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -631,7 +631,7 @@ void LightStyleV2::drawControl( ControlElement control,
tr.addCoords(0, 0, 0, -1);
fr.addCoords(2, 2, -2, -2);
- if ( tb->shape() == TQTabBar::RoundedBelow || tb->shape() == TQTabBar::TriangularBelow) {
+ if ( tb->tqshape() == TQTabBar::RoundedBelow || tb->tqshape() == TQTabBar::TriangularBelow) {
tr = r; tr.addCoords(0, 1, 0, 0);
fr = r; fr.addCoords(2, 2,-2, -4);
below = true;
@@ -786,7 +786,7 @@ void LightStyleV2::drawControl( ControlElement control,
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
p->setPen(cg.mid().dark(120));
p->drawLine(r.left() + 12, r.top() + 1,
@@ -799,11 +799,11 @@ void LightStyleV2::drawControl( ControlElement control,
if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1,
- &cg.brush(TQColorGroup::Midlight));
+ &cg.tqbrush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
if ( !mi )
break;
@@ -822,16 +822,16 @@ void LightStyleV2::drawControl( ControlElement control,
bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
- cr = visualRect( cr, r );
- sr = visualRect( sr, r );
- tr = visualRect( tr, r );
- ir = visualRect( ir, r );
+ cr = tqvisualRect( cr, r );
+ sr = tqvisualRect( sr, r );
+ tr = tqvisualRect( tr, r );
+ ir = tqvisualRect( ir, r );
}
if (mi->isChecked() &&
! (flags & Style_Active) &
(flags & Style_Enabled))
- qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
+ qDrawShadePanel(p, cr, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight));
if (mi->iconSet()) {
TQIconSet::Mode mode =
@@ -850,7 +850,7 @@ void LightStyleV2::drawControl( ControlElement control,
p->setPen(cg.text());
p->drawPixmap(pmr.topLeft(), pixmap);
} else if (popupmenu->isCheckable() && mi->isChecked())
- drawPrimitive(PE_CheckMark, p, cr, cg,
+ tqdrawPrimitive(PE_CheckMark, p, cr, cg,
(flags & Style_Enabled) | Style_On);
TQColor textcolor;
@@ -887,7 +887,7 @@ void LightStyleV2::drawControl( ControlElement control,
TQString text = mi->text();
if (! text.isNull()) {
- int t = text.find('\t');
+ int t = text.tqfind('\t');
// draw accelerator/tab-text
if (t >= 0) {
@@ -919,26 +919,26 @@ void LightStyleV2::drawControl( ControlElement control,
} else if (mi->pixmap()) {
TQPixmap pixmap = *mi->pixmap();
if (pixmap.depth() == 1)
- p->setBackgroundMode(OpaqueMode);
+ p->setBackgroundMode(Qt::OpaqueMode);
p->drawPixmap(ir.x(), ir.y() + (ir.height() - pixmap.height()) / 2, pixmap);
if (pixmap.depth() == 1)
- p->setBackgroundMode(TransparentMode);
+ p->setBackgroundMode(Qt::TransparentMode);
}
if (mi->popup())
- drawPrimitive( (reverse ? PE_ArrowLeft : PE_ArrowRight), p, sr, cg, flags);
+ tqdrawPrimitive( (reverse ? PE_ArrowLeft : PE_ArrowRight), p, sr, cg, flags);
break;
}
case CE_MenuBarEmptyArea:
{
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
break;
}
case CE_DockWindowEmptyArea:
{
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
break;
}
@@ -946,9 +946,9 @@ void LightStyleV2::drawControl( ControlElement control,
case CE_MenuBarItem:
{
if (flags & Style_Active)
- qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight));
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
if (data.isDefault())
break;
@@ -961,16 +961,16 @@ void LightStyleV2::drawControl( ControlElement control,
}
case CE_ProgressBarGroove:
- drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(TQColorGroup::Background));
+ drawLightBevel(p, r, cg, Style_Sunken, &cg.tqbrush(TQColorGroup::Background));
break;
default:
- TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data);
break;
}
}
-void LightStyleV2::drawControlMask( ControlElement control,
+void LightStyleV2::tqdrawControlMask( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -982,7 +982,7 @@ void LightStyleV2::drawControlMask( ControlElement control,
break;
default:
- TQCommonStyle::drawControlMask(control, p, widget, r, data);
+ TQCommonStyle::tqdrawControlMask(control, p, widget, r, data);
break;
}
}
@@ -997,7 +997,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const
const TQPushButton *button = (const TQPushButton *) widget;
int dbw1 = 0, dbw2 = 0;
if (button->isDefault() || button->autoDefault()) {
- dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget);
+ dbw1 = tqpixelMetric(PM_ButtonDefaultIndicator, widget);
dbw2 = dbw1 * 2;
}
@@ -1015,7 +1015,7 @@ TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const
return rect;
}
-void LightStyleV2::drawComplexControl( ComplexControl control,
+void LightStyleV2::tqdrawComplexControl( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
@@ -1031,27 +1031,27 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
const TQComboBox *combobox = (const TQComboBox *) widget;
TQRect frame, arrow, field;
frame =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
if ((controls & SC_ComboBoxFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Raised,
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
if (active == SC_ComboBoxArrow)
- p->fillRect(arrow, cg.brush(TQColorGroup::Mid));
+ p->fillRect(arrow, cg.tqbrush(TQColorGroup::Mid));
arrow.addCoords(4, 2, -2, -2);
- drawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
+ tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
}
if ((controls & SC_ComboBoxEditField) && field.isValid()) {
@@ -1065,11 +1065,11 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
- p->fillRect( field, cg.brush( TQColorGroup::Highlight ) );
+ p->fillRect( field, cg.tqbrush( TQColorGroup::Highlight ) );
TQRect fr =
- TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
- drawPrimitive( PE_FocusRect, p, fr, cg,
+ tqdrawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
TQStyleOption(cg.highlight()));
}
@@ -1087,14 +1087,14 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
const TQSpinWidget *spinwidget = (const TQSpinWidget *) widget;
TQRect frame, up, down;
- frame = querySubControlMetrics(CC_SpinWidget, widget,
+ frame = querySubControlMetrics((QStyle::ComplexControl)CC_SpinWidget, widget,
SC_SpinWidgetFrame, data);
up = spinwidget->upRect();
down = spinwidget->downRect();
if ((controls & SC_SpinWidgetFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Sunken,
- &cg.brush(TQColorGroup::Base));
+ &cg.tqbrush(TQColorGroup::Base));
if ((controls & SC_SpinWidgetUp) && up.isValid()) {
PrimitiveElement pe = PE_SpinWidgetUp;
@@ -1105,7 +1105,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
p->drawLine(up.topLeft(), up.bottomLeft());
up.addCoords(1, 0, 0, 0);
- p->fillRect(up, cg.brush(TQColorGroup::Button));
+ p->fillRect(up, cg.tqbrush(TQColorGroup::Button));
if (active == SC_SpinWidgetUp)
p->setPen(cg.mid());
else
@@ -1124,7 +1124,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
up.right() - 1, up.bottom());
up.addCoords(1, 0, 0, 0);
- drawPrimitive(pe, p, up, cg, flags |
+ tqdrawPrimitive(pe, p, up, cg, flags |
((active == SC_SpinWidgetUp) ?
Style_On | Style_Sunken : Style_Raised));
}
@@ -1138,7 +1138,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
p->drawLine(down.topLeft(), down.bottomLeft());
down.addCoords(1, 0, 0, 0);
- p->fillRect(down, cg.brush(TQColorGroup::Button));
+ p->fillRect(down, cg.tqbrush(TQColorGroup::Button));
if (active == SC_SpinWidgetDown)
p->setPen(cg.mid());
else
@@ -1157,7 +1157,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
down.right() - 1, down.bottom());
down.addCoords(1, 0, 0, 0);
- drawPrimitive(pe, p, down, cg, flags |
+ tqdrawPrimitive(pe, p, down, cg, flags |
((active == SC_SpinWidgetDown) ?
Style_On | Style_Sunken : Style_Raised));
}
@@ -1186,52 +1186,52 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
subline2.moveBy(0, -addline.height());
if ((controls & SC_ScrollBarSubLine) && subline.isValid()) {
- drawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
Style_Enabled | ((active == SC_ScrollBarSubLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if (subline2.isValid())
- drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
Style_Enabled | ((active == SC_ScrollBarSubLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
}
if ((controls & SC_ScrollBarAddLine) && addline.isValid())
- drawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
+ tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
Style_Enabled | ((active == SC_ScrollBarAddLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSubPage) && subpage.isValid())
- drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
+ tqdrawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
Style_Enabled | ((active == SC_ScrollBarSubPage) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarAddPage) && addpage.isValid())
- drawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
+ tqdrawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
((maxedOut) ? Style_Default : Style_Enabled) |
((active == SC_ScrollBarAddPage) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarFirst) && first.isValid())
- drawPrimitive(PE_ScrollBarFirst, p, first, cg,
+ tqdrawPrimitive(PE_ScrollBarFirst, p, first, cg,
Style_Enabled | ((active == SC_ScrollBarFirst) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarLast) && last.isValid())
- drawPrimitive(PE_ScrollBarLast, p, last, cg,
+ tqdrawPrimitive(PE_ScrollBarLast, p, last, cg,
Style_Enabled | ((active == SC_ScrollBarLast) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSlider) && slider.isValid()) {
- drawPrimitive(PE_ScrollBarSlider, p, slider, cg,
+ tqdrawPrimitive(PE_ScrollBarSlider, p, slider, cg,
Style_Enabled | ((active == SC_ScrollBarSlider) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
@@ -1241,7 +1241,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if (scrollbar->hasFocus()) {
TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
- drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
}
@@ -1258,7 +1258,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if ((controls & SC_SliderGroove) && groove.isValid()) {
if (flags & Style_HasFocus)
- drawPrimitive( PE_FocusRect, p, groove, cg );
+ tqdrawPrimitive( PE_FocusRect, p, groove, cg );
if (slider->orientation() == Qt::Horizontal) {
int dh = (groove.height() - 5) / 2;
@@ -1270,30 +1270,30 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
drawLightBevel(p, groove, cg, ((flags | Style_Raised) ^ Style_Raised) |
((flags & Style_Enabled) ? Style_Sunken : Style_Default),
- &cg.brush(TQColorGroup::Midlight));
+ &cg.tqbrush(TQColorGroup::Midlight));
}
if ((controls & SC_SliderHandle) && handle.isValid()) {
drawLightBevel(p, handle, cg, ((flags | Style_Down) ^ Style_Down) |
((flags & Style_Enabled) ? Style_Raised : Style_Default),
- &cg.brush(TQColorGroup::Button));
+ &cg.tqbrush(TQColorGroup::Button));
}
if (controls & SC_SliderTickmarks)
- TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
case CC_ListView:
// use the base style for CC_ListView
- singleton->basestyle->drawComplexControl(control, p, widget, r, cg, flags,
+ singleton->basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
default:
- TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
}
@@ -1311,7 +1311,7 @@ TQRect LightStyleV2::querySubControlMetrics( ComplexControl control,
{
const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
int sliderstart = scrollbar->sliderStart();
- int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
+ int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget);
int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ?
scrollbar->width() : scrollbar->height()) - (sbextent * 3);
int sliderlen;
@@ -1322,7 +1322,7 @@ TQRect LightStyleV2::querySubControlMetrics( ComplexControl control,
sliderlen = (scrollbar->pageStep() * maxlen) /
(range + scrollbar->pageStep());
- int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -1409,7 +1409,7 @@ TQStyle::SubControl LightStyleV2::querySubControl( ComplexControl control,
return ret;
}
-int LightStyleV2::pixelMetric( PixelMetric metric,
+int LightStyleV2::tqpixelMetric( PixelMetric metric,
const TQWidget *widget ) const
{
int ret;
@@ -1464,7 +1464,7 @@ int LightStyleV2::pixelMetric( PixelMetric metric,
case PM_SliderLength:
case PM_SliderControlThickness:
- ret = singleton->basestyle->pixelMetric( metric, widget );
+ ret = singleton->basestyle->tqpixelMetric( metric, widget );
break;
case PM_MaximumDragDistance:
@@ -1472,7 +1472,7 @@ int LightStyleV2::pixelMetric( PixelMetric metric,
break;
default:
- ret = TQCommonStyle::pixelMetric(metric, widget);
+ ret = TQCommonStyle::tqpixelMetric(metric, widget);
break;
}
@@ -1490,7 +1490,7 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
case CT_PushButton:
{
const TQPushButton *button = (const TQPushButton *) widget;
- ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
+ ret = TQCommonStyle::tqsizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
// only expand the button if we are displaying text...
@@ -1525,8 +1525,8 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
int w = contentsSize.width(), h = contentsSize.height();
if (mi->custom()) {
- w = mi->custom()->sizeHint().width();
- h = mi->custom()->sizeHint().height();
+ w = mi->custom()->tqsizeHint().width();
+ h = mi->custom()->tqsizeHint().height();
if (! mi->custom()->fullSpan() && h < 22)
h = 22;
} else if(mi->widget()) {
@@ -1553,7 +1553,7 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
maxpmw = QMAX(maxpmw, 16);
w += (maxpmw * 2) + 8;
- if (! mi->text().isNull() && mi->text().find('\t') >= 0)
+ if (! mi->text().isNull() && mi->text().tqfind('\t') >= 0)
w += 8;
ret = TQSize(w, h);
@@ -1579,14 +1579,14 @@ TQSize LightStyleV2::sizeFromContents( ContentsType contents,
}
default:
- ret = TQCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
+ ret = TQCommonStyle::tqsizeFromContents(contents, widget, contentsSize, data);
break;
}
return ret;
}
-int LightStyleV2::styleHint( StyleHint stylehint,
+int LightStyleV2::tqstyleHint( StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
QStyleHintReturn* returnData ) const
@@ -1611,7 +1611,7 @@ int LightStyleV2::styleHint( StyleHint stylehint,
break;
default:
- ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData);
break;
}
diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h
index e5a3fffac..292984811 100644
--- a/kstyles/light/lightstyle-v2.h
+++ b/kstyles/light/lightstyle-v2.h
@@ -48,15 +48,15 @@ public:
SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQStyleOption & = TQStyleOption::Default) const;
TQRect subRect(SubRect, const TQWidget *) const;
- void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
SCFlags = SC_All, SCFlags = SC_None,
const TQStyleOption & = TQStyleOption::Default ) const;
@@ -67,12 +67,12 @@ public:
SubControl querySubControl(ComplexControl, const TQWidget *, const TQPoint &,
const TQStyleOption &data = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
+ int tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const;
TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint(StyleHint, const TQWidget * = 0,
+ int tqstyleHint(StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp
index 5a902d7f5..b7da954c9 100644
--- a/kstyles/light/lightstyle-v3.cpp
+++ b/kstyles/light/lightstyle-v3.cpp
@@ -248,7 +248,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
// fill the header
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight : TQColorGroup::Button ) );
// the taskbuttons in kicker seem to allow the style to set the pencolor
@@ -265,11 +265,11 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if (flags & (TQStyle::Style_Down |
TQStyle::Style_On |
TQStyle::Style_Sunken))
- fill = &cg.brush(TQColorGroup::Midlight);
+ fill = &cg.tqbrush(TQColorGroup::Midlight);
else
- fill = &cg.brush(TQColorGroup::Button);
+ fill = &cg.tqbrush(TQColorGroup::Button);
} else
- fill = &cg.brush(TQColorGroup::Background);
+ fill = &cg.tqbrush(TQColorGroup::Background);
bool etch = true;
if ( flags & Style_ButtonDefault ) {
@@ -277,7 +277,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
br.addCoords( 1, 1, -1, -1 );
}
drawLightBevel( p, br, cg, flags,
- pixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ),
+ tqpixelMetric( PM_DefaultFrameWidth ) + ( etch ? 1 : 0 ),
etch, true, fill );
break;
}
@@ -288,12 +288,12 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if (flags & (TQStyle::Style_Down |
TQStyle::Style_On |
TQStyle::Style_Sunken))
- fill = &cg.brush(TQColorGroup::Midlight);
+ fill = &cg.tqbrush(TQColorGroup::Midlight);
else
- fill = &cg.brush(TQColorGroup::Button);
+ fill = &cg.tqbrush(TQColorGroup::Button);
} else
- fill = &cg.brush(TQColorGroup::Background);
- drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ),
+ fill = &cg.tqbrush(TQColorGroup::Background);
+ drawLightBevel( p, r, cg, flags, tqpixelMetric( PM_DefaultFrameWidth ),
false, true, fill );
break;
@@ -305,11 +305,11 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if (flags & TQStyle::Style_Enabled) {
if (sunken)
- thefill = cg.brush(TQColorGroup::Midlight);
+ thefill = cg.tqbrush(TQColorGroup::Midlight);
else
- thefill = cg.brush(TQColorGroup::Button);
+ thefill = cg.tqbrush(TQColorGroup::Button);
} else
- thefill = cg.brush(TQColorGroup::Background);
+ thefill = cg.tqbrush(TQColorGroup::Background);
p->setPen( cg.dark() );
p->drawLine(r.topLeft(), r.topRight());
@@ -352,11 +352,11 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_Indicator:
const TQBrush *fill;
if (! (flags & Style_Enabled))
- fill = &cg.brush(TQColorGroup::Background);
+ fill = &cg.tqbrush(TQColorGroup::Background);
else if (flags & Style_Down)
- fill = &cg.brush(TQColorGroup::Mid);
+ fill = &cg.tqbrush(TQColorGroup::Mid);
else
- fill = &cg.brush(TQColorGroup::Base);
+ fill = &cg.tqbrush(TQColorGroup::Base);
drawLightBevel( p, r, cg, flags | Style_Sunken, 2, true, true, fill );
p->setPen(cg.text());
@@ -394,7 +394,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
cr.addCoords( 2, 2, -2, -2 );
ir.addCoords( 3, 3, -3, -3 );
- p->fillRect( r, cg.brush( TQColorGroup::Background ) );
+ p->fillRect( r, cg.tqbrush( TQColorGroup::Background ) );
p->setPen( flags & Style_Down ? cg.mid() :
( flags & Style_Enabled ? cg.base() : cg.background() ) );
@@ -426,7 +426,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
bool drawTitle = false;
if ( p && p->device()->devType() == TQInternal::Widget ) {
TQWidget *w = (TQWidget *) p->device();
- TQWidget *p = w->parentWidget();
+ TQWidget *p = w->tqparentWidget();
if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
drawTitle = true;
title = p->caption();
@@ -439,7 +439,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
TQPixmap pm(r.height(), r.width());
TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(),
- cg.brush(TQColorGroup::Highlight));
+ cg.tqbrush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end();
@@ -460,7 +460,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
} else {
if (drawTitle) {
- p->fillRect(r, cg.brush(TQColorGroup::Highlight));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title);
} else {
@@ -525,13 +525,13 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( br, cg.tqbrush( TQColorGroup::Button ) );
break;
}
case PE_PanelPopup:
drawLightBevel( p, r, cg, flags,
- ( data.isDefault() ? pixelMetric(PM_DefaultFrameWidth) :
+ ( data.isDefault() ? tqpixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, true );
break;
@@ -544,7 +544,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
int cover = 0;
int reallw = ( data.isDefault() ?
- pixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() );
+ tqpixelMetric( PM_DefaultFrameWidth ) : data.lineWidth() );
cover = reallw - 1;
if ( ! ( flags & Style_Sunken ) )
@@ -572,16 +572,16 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_PanelDockWindow:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
- pixelMetric(PM_DefaultFrameWidth) :
+ tqpixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, false,
- &cg.brush( TQColorGroup::Button ) );
+ &cg.tqbrush( TQColorGroup::Button ) );
break;
case PE_PanelMenuBar:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
- pixelMetric(PM_MenuBarFrameWidth) :
+ tqpixelMetric(PM_MenuBarFrameWidth) :
data.lineWidth() ), false, false,
- &cg.brush( TQColorGroup::Button ) );
+ &cg.tqbrush( TQColorGroup::Button ) );
break;
case PE_ScrollBarSubLine:
@@ -607,14 +607,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight :
TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 );
if ( ! br.isValid() )
break;
- drawPrimitive( pe, p, br, cg, flags );
+ tqdrawPrimitive( pe, p, br, cg, flags );
break;
}
@@ -641,14 +641,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight :
TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 );
if ( ! br.isValid() )
break;
- drawPrimitive( pe, p, br, cg, flags );
+ tqdrawPrimitive( pe, p, br, cg, flags );
break;
}
@@ -672,7 +672,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight :
TQColorGroup::Button ) );
break;
@@ -698,7 +698,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
+ p->fillRect( br, cg.tqbrush( ( flags & Style_Down ) ?
TQColorGroup::Midlight :
TQColorGroup::Button ) );
break;
@@ -728,7 +728,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
p->drawLine( br.topRight(), br.bottomRight() );
br.addCoords( 1, 1, -1, -1 );
- p->fillRect( br, cg.brush( TQColorGroup::Highlight ) );
+ p->fillRect( br, cg.tqbrush( TQColorGroup::Highlight ) );
break;
}
@@ -798,12 +798,12 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
p->restore();
} else
- TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::tqdrawPrimitive(pe, p, r, cg, flags, data);
break;
}
}
-void LightStyleV3::drawControl( ControlElement control,
+void LightStyleV3::tqdrawControl( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -817,7 +817,7 @@ void LightStyleV3::drawControl( ControlElement control,
const TQTabBar *tb = (const TQTabBar *) widget;
TQRect br = r;
- if ( tb->shape() == TQTabBar::RoundedAbove ) {
+ if ( tb->tqshape() == TQTabBar::RoundedAbove ) {
if ( ! ( flags & Style_Selected ) ) {
p->setPen( cg.background() );
p->drawLine( br.left(), br.bottom(),
@@ -846,13 +846,13 @@ void LightStyleV3::drawControl( ControlElement control,
if ( flags & Style_Selected )
{
- p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.brush(TQColorGroup::Highlight));
+ p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.tqbrush(TQColorGroup::Highlight));
br.addCoords( 1, 1, -4, 0 );
}
else
br.addCoords( 1, 1, -1, 0 );
p->fillRect( br, cg.background() );
- } else if ( tb->shape() == TQTabBar::RoundedBelow ) {
+ } else if ( tb->tqshape() == TQTabBar::RoundedBelow ) {
if ( ! ( flags & Style_Selected ) ) {
p->setPen( cg.background() );
p->drawLine( br.left(), br.top(),
@@ -884,7 +884,7 @@ void LightStyleV3::drawControl( ControlElement control,
if ( flags & Style_Selected )
{
- p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.brush(TQColorGroup::Highlight));
+ p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.tqbrush(TQColorGroup::Highlight));
br.addCoords( 1, 0, -3, -1 );
}
else
@@ -892,7 +892,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->fillRect( br, cg.background() );
} else
- TQCommonStyle::drawControl( control, p, widget, r, cg, flags, data );
+ TQCommonStyle::tqdrawControl( control, p, widget, r, cg, flags, data );
break;
}
@@ -910,7 +910,7 @@ void LightStyleV3::drawControl( ControlElement control,
if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
p->setPen( cg.mid() );
p->drawLine(r.left() + 12, r.top() + 1,
r.right() - 12, r.top() + 1);
@@ -922,11 +922,11 @@ void LightStyleV3::drawControl( ControlElement control,
if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1,
- &cg.brush(TQColorGroup::Midlight));
+ &cg.tqbrush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
if ( !mi )
break;
@@ -945,16 +945,16 @@ void LightStyleV3::drawControl( ControlElement control,
bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
- cr = visualRect( cr, r );
- sr = visualRect( sr, r );
- tr = visualRect( tr, r );
- ir = visualRect( ir, r );
+ cr = tqvisualRect( cr, r );
+ sr = tqvisualRect( sr, r );
+ tr = tqvisualRect( tr, r );
+ ir = tqvisualRect( ir, r );
}
if (mi->isChecked() &&
! (flags & Style_Active) &
(flags & Style_Enabled))
- qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
+ qDrawShadePanel(p, cr, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight));
if (mi->iconSet()) {
TQIconSet::Mode mode =
@@ -973,7 +973,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->setPen(cg.text());
p->drawPixmap(pmr.topLeft(), pixmap);
} else if (popupmenu->isCheckable() && mi->isChecked())
- drawPrimitive(PE_CheckMark, p, cr, cg,
+ tqdrawPrimitive(PE_CheckMark, p, cr, cg,
(flags & Style_Enabled) | Style_On);
TQColor textcolor;
@@ -1010,7 +1010,7 @@ void LightStyleV3::drawControl( ControlElement control,
TQString text = mi->text();
if (! text.isNull()) {
- int t = text.find('\t');
+ int t = text.tqfind('\t');
// draw accelerator/tab-text
if (t >= 0) {
@@ -1042,30 +1042,30 @@ void LightStyleV3::drawControl( ControlElement control,
} else if (mi->pixmap()) {
TQPixmap pixmap = *mi->pixmap();
if (pixmap.depth() == 1)
- p->setBackgroundMode(OpaqueMode);
+ p->setBackgroundMode(Qt::OpaqueMode);
p->drawPixmap(ir.x(), ir.y() + (ir.height() - pixmap.height()) / 2, pixmap);
if (pixmap.depth() == 1)
- p->setBackgroundMode(TransparentMode);
+ p->setBackgroundMode(Qt::TransparentMode);
}
if (mi->popup())
- drawPrimitive( (TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight),
+ tqdrawPrimitive( (TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight),
p, sr, cg, flags);
break;
}
case CE_MenuBarEmptyArea:
{
- p->fillRect(r, cg.brush(TQColorGroup::Button));
+ p->fillRect(r, cg.tqbrush(TQColorGroup::Button));
break;
}
case CE_MenuBarItem:
{
if ( flags & Style_Active )
- qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.tqbrush(TQColorGroup::Midlight));
else
- p->fillRect( r, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( r, cg.tqbrush( TQColorGroup::Button ) );
if (data.isDefault())
break;
@@ -1078,17 +1078,17 @@ void LightStyleV3::drawControl( ControlElement control,
}
case CE_ProgressBarGroove:
- drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ),
- true, true, &cg.brush( TQColorGroup::Background ) );
+ drawLightBevel( p, r, cg, Style_Sunken, tqpixelMetric( PM_DefaultFrameWidth ),
+ true, true, &cg.tqbrush( TQColorGroup::Background ) );
break;
default:
- TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::tqdrawControl(control, p, widget, r, cg, flags, data);
break;
}
}
-void LightStyleV3::drawControlMask( ControlElement control,
+void LightStyleV3::tqdrawControlMask( ControlElement control,
TQPainter *p,
const TQWidget *widget,
const TQRect &r,
@@ -1100,7 +1100,7 @@ void LightStyleV3::drawControlMask( ControlElement control,
break;
default:
- TQCommonStyle::drawControlMask(control, p, widget, r, data);
+ TQCommonStyle::tqdrawControlMask(control, p, widget, r, data);
break;
}
}
@@ -1113,7 +1113,7 @@ TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const
case SR_PushButtonFocusRect:
{
rect = TQCommonStyle::subRect( SR_PushButtonContents, widget );
- int bm = pixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2;
+ int bm = tqpixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2;
rect.addCoords( hbm, hbm, -hbm, -hbm );
break;
}
@@ -1150,7 +1150,7 @@ TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const
return rect;
}
-void LightStyleV3::drawComplexControl( ComplexControl control,
+void LightStyleV3::tqdrawComplexControl( ComplexControl control,
TQPainter* p,
const TQWidget* widget,
const TQRect& r,
@@ -1166,37 +1166,37 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
const TQComboBox *combobox = (const TQComboBox *) widget;
TQRect frame, arrow, field;
frame =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::tqvisualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
if ((controls & SC_ComboBoxFrame) && frame.isValid())
- drawPrimitive( PE_Panel, p, frame, cg, flags | Style_Sunken );
+ tqdrawPrimitive( PE_Panel, p, frame, cg, flags | Style_Sunken );
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
drawLightEtch( p, arrow, cg.button(), ( active == SC_ComboBoxArrow ) );
arrow.addCoords( 1, 1, -1, -1 );
- p->fillRect( arrow, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( arrow, cg.tqbrush( TQColorGroup::Button ) );
arrow.addCoords(3, 1, -1, -1);
- drawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
+ tqdrawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
}
if ((controls & SC_ComboBoxEditField) && field.isValid()) {
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
TQRect fr =
- TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ TQStyle::tqvisualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
- p->fillRect( fr, cg.brush( TQColorGroup::Highlight ) );
- drawPrimitive( PE_FocusRect, p, fr, cg,
+ p->fillRect( fr, cg.tqbrush( TQColorGroup::Highlight ) );
+ tqdrawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
TQStyleOption(cg.highlight()));
}
@@ -1204,8 +1204,8 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
p->setPen(cg.highlightedText());
} else {
p->fillRect( field, ( ( flags & Style_Enabled ) ?
- cg.brush( TQColorGroup::Base ) :
- cg.brush( TQColorGroup::Background ) ) );
+ cg.tqbrush( TQColorGroup::Base ) :
+ cg.tqbrush( TQColorGroup::Background ) ) );
p->setPen( cg.text() );
}
}
@@ -1218,13 +1218,13 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
const TQSpinWidget *spinwidget = (const TQSpinWidget *) widget;
TQRect frame, up, down;
- frame = querySubControlMetrics(CC_SpinWidget, widget,
+ frame = querySubControlMetrics((QStyle::ComplexControl)CC_SpinWidget, widget,
SC_SpinWidgetFrame, data);
up = spinwidget->upRect();
down = spinwidget->downRect();
if ((controls & SC_SpinWidgetFrame) && frame.isValid())
- drawPrimitive( PE_Panel, p, frame, cg, flags | Style_Sunken );
+ tqdrawPrimitive( PE_Panel, p, frame, cg, flags | Style_Sunken );
if ((controls & SC_SpinWidgetUp) && up.isValid()) {
PrimitiveElement pe = PE_SpinWidgetUp;
@@ -1235,11 +1235,11 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
p->drawLine( up.topLeft(), up.bottomLeft() );
up.addCoords( 1, 0, 0, 0 );
- p->fillRect( up, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( up, cg.tqbrush( TQColorGroup::Button ) );
drawLightEtch( p, up, cg.button(), ( active == SC_SpinWidgetUp ) );
up.addCoords( 1, 0, 0, 0 );
- drawPrimitive(pe, p, up, cg, flags |
+ tqdrawPrimitive(pe, p, up, cg, flags |
((active == SC_SpinWidgetUp) ?
Style_On | Style_Sunken : Style_Raised));
}
@@ -1253,11 +1253,11 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
p->drawLine( down.topLeft(), down.bottomLeft() );
down.addCoords( 1, 0, 0, 0 );
- p->fillRect( down, cg.brush( TQColorGroup::Button ) );
+ p->fillRect( down, cg.tqbrush( TQColorGroup::Button ) );
drawLightEtch( p, down, cg.button(), ( active == SC_SpinWidgetDown ) );
down.addCoords( 1, 0, 0, 0 );
- drawPrimitive(pe, p, down, cg, flags |
+ tqdrawPrimitive(pe, p, down, cg, flags |
((active == SC_SpinWidgetDown) ?
Style_On | Style_Sunken : Style_Raised));
}
@@ -1286,52 +1286,52 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
subline2.moveBy(0, -addline.height());
if ((controls & SC_ScrollBarSubLine) && subline.isValid()) {
- drawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline, cg,
Style_Enabled | ((active == SC_ScrollBarSubLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if (subline2.isValid())
- drawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
+ tqdrawPrimitive(PE_ScrollBarSubLine, p, subline2, cg,
Style_Enabled | ((active == SC_ScrollBarSubLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
}
if ((controls & SC_ScrollBarAddLine) && addline.isValid())
- drawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
+ tqdrawPrimitive(PE_ScrollBarAddLine, p, addline, cg,
Style_Enabled | ((active == SC_ScrollBarAddLine) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSubPage) && subpage.isValid())
- drawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
+ tqdrawPrimitive(PE_ScrollBarSubPage, p, subpage, cg,
Style_Enabled | ((active == SC_ScrollBarSubPage) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarAddPage) && addpage.isValid())
- drawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
+ tqdrawPrimitive(PE_ScrollBarAddPage, p, addpage, cg,
((maxedOut) ? Style_Default : Style_Enabled) |
((active == SC_ScrollBarAddPage) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarFirst) && first.isValid())
- drawPrimitive(PE_ScrollBarFirst, p, first, cg,
+ tqdrawPrimitive(PE_ScrollBarFirst, p, first, cg,
Style_Enabled | ((active == SC_ScrollBarFirst) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarLast) && last.isValid())
- drawPrimitive(PE_ScrollBarLast, p, last, cg,
+ tqdrawPrimitive(PE_ScrollBarLast, p, last, cg,
Style_Enabled | ((active == SC_ScrollBarLast) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
Style_Horizontal : 0));
if ((controls & SC_ScrollBarSlider) && slider.isValid()) {
- drawPrimitive(PE_ScrollBarSlider, p, slider, cg,
+ tqdrawPrimitive(PE_ScrollBarSlider, p, slider, cg,
Style_Enabled | ((active == SC_ScrollBarSlider) ?
Style_Down : Style_Default) |
((scrollbar->orientation() == Qt::Horizontal) ?
@@ -1341,7 +1341,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if (scrollbar->hasFocus()) {
TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
- drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
+ tqdrawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
}
@@ -1373,7 +1373,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if (flags & Style_HasFocus) {
groove.addCoords( -2, -2, 2, 2 );
- drawPrimitive( PE_FocusRect, p, groove, cg, flags );
+ tqdrawPrimitive( PE_FocusRect, p, groove, cg, flags );
}
}
@@ -1408,19 +1408,19 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
}
if (controls & SC_SliderTickmarks)
- TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
case CC_ListView:
// use the base style for CC_ListView
- basestyle->drawComplexControl(control, p, widget, r, cg, flags,
+ basestyle->tqdrawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
default:
- TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::tqdrawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
}
@@ -1436,8 +1436,8 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
switch (control) {
case CC_ComboBox:
{
- int fw = pixelMetric( PM_DefaultFrameWidth, widget );
- int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow
+ int fw = tqpixelMetric( PM_DefaultFrameWidth, widget );
+ int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow
switch ( sc ) {
case SC_ComboBoxFrame:
@@ -1462,7 +1462,7 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
{
const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
int sliderstart = scrollbar->sliderStart();
- int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
+ int sbextent = tqpixelMetric(PM_ScrollBarExtent, widget);
int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ?
scrollbar->width() : scrollbar->height()) - (sbextent * 3);
int sliderlen;
@@ -1473,7 +1473,7 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
sliderlen = (scrollbar->pageStep() * maxlen) /
(range + scrollbar->pageStep());
- int slidermin = pixelMetric( PM_ScrollBarSliderMin, widget );
+ int slidermin = tqpixelMetric( PM_ScrollBarSliderMin, widget );
if ( sliderlen < slidermin || range > INT_MAX / 2 )
sliderlen = slidermin;
if ( sliderlen > maxlen )
@@ -1537,12 +1537,12 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case CC_Slider:
{
const TQSlider *slider = (const TQSlider *) widget;
- int tickOffset = pixelMetric( PM_SliderTickmarkOffset, widget );
- int thickness = pixelMetric( PM_SliderControlThickness, widget );
+ int tickOffset = tqpixelMetric( PM_SliderTickmarkOffset, widget );
+ int thickness = tqpixelMetric( PM_SliderControlThickness, widget );
switch ( sc ) {
case SC_SliderGroove:
- if ( slider->orientation() == Horizontal )
+ if ( slider->orientation() == Qt::Horizontal )
ret.setRect( 0, tickOffset, slider->width(), thickness );
else
ret.setRect( tickOffset, 0, thickness, slider->height() );
@@ -1551,9 +1551,9 @@ TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case SC_SliderHandle:
{
int pos = slider->sliderStart();
- int len = pixelMetric( PM_SliderLength, widget );
+ int len = tqpixelMetric( PM_SliderLength, widget );
- if ( slider->orientation() == Horizontal )
+ if ( slider->orientation() == Qt::Horizontal )
ret.setRect( pos + 2, tickOffset + 2, len - 4, thickness - 4 );
else
ret.setRect( tickOffset + 2, pos + 2, thickness - 4, len - 4 );
@@ -1593,7 +1593,7 @@ TQStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
return ret;
}
-int LightStyleV3::pixelMetric( PixelMetric metric,
+int LightStyleV3::tqpixelMetric( PixelMetric metric,
const TQWidget *widget ) const
{
int ret;
@@ -1664,7 +1664,7 @@ int LightStyleV3::pixelMetric( PixelMetric metric,
case PM_SliderControlThickness:
{
const TQSlider * sl = (const TQSlider *) widget;
- int space = (sl->orientation() == Horizontal) ? sl->height()
+ int space = (sl->orientation() == Qt::Horizontal) ? sl->height()
: sl->width();
int ticks = sl->tickmarks();
int n = 0;
@@ -1690,7 +1690,7 @@ int LightStyleV3::pixelMetric( PixelMetric metric,
break;
default:
- ret = TQCommonStyle::pixelMetric(metric, widget);
+ ret = TQCommonStyle::tqpixelMetric(metric, widget);
break;
}
@@ -1707,8 +1707,8 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
switch (contents) {
case CT_ComboBox:
{
- int fw = pixelMetric( PM_DefaultFrameWidth, widget ) * 2;
- int sb = pixelMetric( PM_ScrollBarExtent ); // width of the arrow
+ int fw = tqpixelMetric( PM_DefaultFrameWidth, widget ) * 2;
+ int sb = tqpixelMetric( PM_ScrollBarExtent ); // width of the arrow
int w = contentsSize.width();
int h = contentsSize.height();
@@ -1726,9 +1726,9 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
case CT_PushButton:
{
const TQPushButton *button = (const TQPushButton *) widget;
- ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
+ ret = TQCommonStyle::tqsizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
- int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget ) * 2;
+ int dbi = tqpixelMetric( PM_ButtonDefaultIndicator, widget ) * 2;
int mw = 80 - dbi, mh = 25 - dbi;
// only expand the button if we are displaying text...
@@ -1755,8 +1755,8 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
int w = contentsSize.width(), h = contentsSize.height();
if (mi->custom()) {
- w = mi->custom()->sizeHint().width();
- h = mi->custom()->sizeHint().height();
+ w = mi->custom()->tqsizeHint().width();
+ h = mi->custom()->tqsizeHint().height();
if (! mi->custom()->fullSpan() && h < 22)
h = 22;
} else if(mi->widget()) {
@@ -1783,7 +1783,7 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
maxpmw = QMAX(maxpmw, 16);
w += (maxpmw * 2) + 8;
- if (! mi->text().isNull() && mi->text().find('\t') >= 0)
+ if (! mi->text().isNull() && mi->text().tqfind('\t') >= 0)
w += 8;
ret = TQSize(w, h);
@@ -1810,14 +1810,14 @@ TQSize LightStyleV3::sizeFromContents( ContentsType contents,
}
default:
- ret = TQCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
+ ret = TQCommonStyle::tqsizeFromContents(contents, widget, contentsSize, data);
break;
}
return ret;
}
-int LightStyleV3::styleHint( StyleHint stylehint,
+int LightStyleV3::tqstyleHint( StyleHint stylehint,
const TQWidget *widget,
const TQStyleOption &option,
QStyleHintReturn* returnData ) const
@@ -1846,7 +1846,7 @@ int LightStyleV3::styleHint( StyleHint stylehint,
break;
default:
- ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::tqstyleHint(stylehint, widget, option, returnData);
break;
}
diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h
index be8812b99..a97c57643 100644
--- a/kstyles/light/lightstyle-v3.h
+++ b/kstyles/light/lightstyle-v3.h
@@ -52,15 +52,15 @@ public:
SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
const TQStyleOption & = TQStyleOption::Default) const;
TQRect subRect(SubRect, const TQWidget *) const;
- void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ void tqdrawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
const TQColorGroup &, SFlags = Style_Default,
SCFlags = SC_All, SCFlags = SC_None,
const TQStyleOption & = TQStyleOption::Default ) const;
@@ -71,12 +71,12 @@ public:
SubControl querySubControl(ComplexControl, const TQWidget *, const TQPoint &,
const TQStyleOption &data = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
+ int tqpixelMetric(PixelMetric, const TQWidget * = 0 ) const;
TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint(StyleHint, const TQWidget * = 0,
+ int tqstyleHint(StyleHint, const TQWidget * = 0,
const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;