summaryrefslogtreecommitdiffstats
path: root/kstyles/light
diff options
context:
space:
mode:
Diffstat (limited to 'kstyles/light')
-rw-r--r--kstyles/light/light.cpp14
-rw-r--r--kstyles/light/lightstyle-v2.cpp394
-rw-r--r--kstyles/light/lightstyle-v2.h48
-rw-r--r--kstyles/light/lightstyle-v3.cpp462
-rw-r--r--kstyles/light/lightstyle-v3.h52
5 files changed, 485 insertions, 485 deletions
diff --git a/kstyles/light/light.cpp b/kstyles/light/light.cpp
index 264bc5b3d..caa1d3e8f 100644
--- a/kstyles/light/light.cpp
+++ b/kstyles/light/light.cpp
@@ -20,7 +20,7 @@
DEALINGS IN THE SOFTWARE.
*/
-#include <qstyleplugin.h>
+#include <tqstyleplugin.h>
#include "lightstyle-v2.h"
#include "lightstyle-v3.h"
@@ -29,24 +29,24 @@ class LightStylePlugin : public QStylePlugin
public:
LightStylePlugin();
- QStringList keys() const;
- QStyle *create(const QString &);
+ TQStringList keys() const;
+ TQStyle *create(const TQString &);
};
LightStylePlugin::LightStylePlugin()
- : QStylePlugin()
+ : TQStylePlugin()
{
}
-QStringList LightStylePlugin::keys() const
+TQStringList LightStylePlugin::keys() const
{
- QStringList list;
+ TQStringList list;
list << "Light, 2nd revision";
list << "Light, 3rd revision";
return list;
}
-QStyle *LightStylePlugin::create(const QString &s)
+TQStyle *LightStylePlugin::create(const TQString &s)
{
if (s.lower() == "light, 2nd revision")
return new LightStyleV2;
diff --git a/kstyles/light/lightstyle-v2.cpp b/kstyles/light/lightstyle-v2.cpp
index a562c03c0..13569379b 100644
--- a/kstyles/light/lightstyle-v2.cpp
+++ b/kstyles/light/lightstyle-v2.cpp
@@ -22,23 +22,23 @@
#include "lightstyle-v2.h"
-#include "qmenubar.h"
-#include "qapplication.h"
-#include "qpainter.h"
-#include "qpalette.h"
-#include "qframe.h"
-#include "qpushbutton.h"
-#include "qdrawutil.h"
-#include "qprogressbar.h"
-#include "qscrollbar.h"
-#include "qtabbar.h"
-#include "qguardedptr.h"
-#include "qlayout.h"
-#include "qlineedit.h"
-#include "qimage.h"
-#include "qcombobox.h"
-#include "qslider.h"
-#include "qstylefactory.h"
+#include "tqmenubar.h"
+#include "tqapplication.h"
+#include "tqpainter.h"
+#include "tqpalette.h"
+#include "tqframe.h"
+#include "tqpushbutton.h"
+#include "tqdrawutil.h"
+#include "tqprogressbar.h"
+#include "tqscrollbar.h"
+#include "tqtabbar.h"
+#include "tqguardedptr.h"
+#include "tqlayout.h"
+#include "tqlineedit.h"
+#include "tqimage.h"
+#include "tqcombobox.h"
+#include "tqslider.h"
+#include "tqstylefactory.h"
class LightStyleV2Private
@@ -47,9 +47,9 @@ public:
LightStyleV2Private()
: ref(1)
{
- basestyle = QStyleFactory::create( "Windows" );
+ basestyle = TQStyleFactory::create( "Windows" );
if ( ! basestyle )
- basestyle = QStyleFactory::create( QStyleFactory::keys().first() );
+ basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() );
if ( ! basestyle )
qFatal( "LightStyle: couldn't find a basestyle!" );
}
@@ -59,7 +59,7 @@ public:
delete basestyle;
}
- QStyle *basestyle;
+ TQStyle *basestyle;
int ref;
};
@@ -83,23 +83,23 @@ LightStyleV2::~LightStyleV2()
}
}
-void LightStyleV2::polishPopupMenu( QPopupMenu * menu )
+void LightStyleV2::polishPopupMenu( TQPopupMenu * menu )
{
KStyle::polishPopupMenu(menu);
}
-static void drawLightBevel(QPainter *p, const QRect &r, const QColorGroup &cg,
- QStyle::SFlags flags, const QBrush *fill = 0)
+static void drawLightBevel(TQPainter *p, const TQRect &r, const TQColorGroup &cg,
+ TQStyle::SFlags flags, const TQBrush *fill = 0)
{
- QRect br = r;
- bool sunken = (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken));
+ TQRect br = r;
+ bool sunken = (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken));
p->setPen(cg.dark());
p->drawRect(r);
- if (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken | QStyle::Style_Raised)) {
+ if (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken | TQStyle::Style_Raised)) {
// button bevel
if (sunken)
p->setPen(cg.mid());
@@ -130,19 +130,19 @@ static void drawLightBevel(QPainter *p, const QRect &r, const QColorGroup &cg,
}
void LightStyleV2::drawPrimitive( PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (pe) {
case PE_HeaderSection:
{
flags = ((flags | Style_Sunken) ^ Style_Sunken) | Style_Raised;
//Don't show pressed too often (as in light 3)
- QBrush fill(cg.background());
- if (flags & QStyle::Style_Enabled)
+ TQBrush fill(cg.background());
+ if (flags & TQStyle::Style_Enabled)
fill.setColor(cg.button());
drawLightBevel(p, r, cg, flags, &fill);
@@ -154,41 +154,41 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_ButtonBevel:
case PE_ButtonTool:
{
- const QBrush *fill;
- if (flags & QStyle::Style_Enabled) {
- if (flags & (QStyle::Style_Down |
- QStyle::Style_On |
- QStyle::Style_Sunken))
- fill = &cg.brush(QColorGroup::Midlight);
+ const TQBrush *fill;
+ if (flags & TQStyle::Style_Enabled) {
+ if (flags & (TQStyle::Style_Down |
+ TQStyle::Style_On |
+ TQStyle::Style_Sunken))
+ fill = &cg.brush(TQColorGroup::Midlight);
else
- fill = &cg.brush(QColorGroup::Button);
+ fill = &cg.brush(TQColorGroup::Button);
} else
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
drawLightBevel(p, r, cg, flags, fill);
break;
}
case PE_ButtonDropDown:
{
- QBrush thefill;
+ TQBrush thefill;
bool sunken =
- (flags & (QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken));
+ (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken));
- if (flags & QStyle::Style_Enabled) {
+ if (flags & TQStyle::Style_Enabled) {
if (sunken)
- thefill = cg.brush(QColorGroup::Midlight);
+ thefill = cg.brush(TQColorGroup::Midlight);
else
- thefill = cg.brush(QColorGroup::Button);
+ thefill = cg.brush(TQColorGroup::Button);
} else
- thefill = cg.brush(QColorGroup::Background);
+ thefill = cg.brush(TQColorGroup::Background);
p->setPen(cg.dark());
p->drawLine(r.topLeft(), r.topRight());
p->drawLine(r.topRight(), r.bottomRight());
p->drawLine(r.bottomRight(), r.bottomLeft());
- if (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken | QStyle::Style_Raised)) {
+ if (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken | TQStyle::Style_Raised)) {
// button bevel
if (sunken)
p->setPen(cg.mid());
@@ -222,13 +222,13 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
break;
case PE_Indicator:
- const QBrush *fill;
+ const TQBrush *fill;
if (! (flags & Style_Enabled))
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
else if (flags & Style_Down)
- fill = &cg.brush(QColorGroup::Mid);
+ fill = &cg.brush(TQColorGroup::Mid);
else
- fill = &cg.brush(QColorGroup::Base);
+ fill = &cg.brush(TQColorGroup::Base);
drawLightBevel(p, r, cg, flags | Style_Sunken, fill);
p->setPen(cg.text());
@@ -258,14 +258,14 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_ExclusiveIndicator:
{
- QRect br = r, // bevel rect
+ TQRect br = r, // bevel rect
cr = r, // contents rect
ir = r; // indicator rect
br.addCoords(1, 1, -1, -1);
cr.addCoords(2, 2, -2, -2);
ir.addCoords(3, 3, -3, -3);
- p->fillRect(r, cg.brush(QColorGroup::Background));
+ p->fillRect(r, cg.brush(TQColorGroup::Background));
p->setPen(cg.dark());
p->drawArc(r, 0, 16*360);
@@ -290,12 +290,12 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_DockWindowHandle:
{
- QString title;
+ TQString title;
bool drawTitle = false;
- if ( p && p->device()->devType() == QInternal::Widget ) {
- QWidget *w = (QWidget *) p->device();
- QWidget *p = w->parentWidget();
- if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
+ if ( p && p->device()->devType() == TQInternal::Widget ) {
+ TQWidget *w = (TQWidget *) p->device();
+ TQWidget *p = w->parentWidget();
+ if (p->inherits("TQDockWindow") && ! p->inherits("TQToolBar")) {
drawTitle = true;
title = p->caption();
}
@@ -304,15 +304,15 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
flags |= Style_Raised;
if (flags & Style_Horizontal) {
if (drawTitle) {
- QPixmap pm(r.height(), r.width());
- QPainter p2(&pm);
+ TQPixmap pm(r.height(), r.width());
+ TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end();
- QWMatrix m;
+ TQWMatrix m;
m.rotate(270.0);
pm = pm.xForm(m);
p->drawPixmap(r.x(), r.y(), pm);
@@ -331,7 +331,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
} else {
if (drawTitle) {
- p->fillRect(r, cg.brush(QColorGroup::Highlight));
+ p->fillRect(r, cg.brush(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
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -412,7 +412,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (lw == 2)
drawLightBevel(p, r, cg, flags);
else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -423,9 +423,9 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (lw == 2)
drawLightBevel(p, r, cg, flags | Style_Raised,
- &cg.brush(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
@@ -435,15 +435,15 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
pixelMetric(PM_MenuBarFrameWidth) : data.lineWidth();
if (lw == 2)
- drawLightBevel(p, r, cg, flags, &cg.brush(QColorGroup::Button));
+ drawLightBevel(p, r, cg, flags, &cg.brush(TQColorGroup::Button));
else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
case PE_ScrollBarSubLine:
{
- QRect fr = r, ar = r;
+ TQRect fr = r, ar = r;
PrimitiveElement pe;
p->setPen(cg.dark());
@@ -460,15 +460,15 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->fillRect(fr, cg.brush((flags & Style_Down) ?
- QColorGroup::Midlight :
- QColorGroup::Background));
+ TQColorGroup::Midlight :
+ TQColorGroup::Background));
drawPrimitive(pe, p, ar, cg, flags);
break;
}
case PE_ScrollBarAddLine:
{
- QRect fr = r, ar = r;
+ TQRect fr = r, ar = r;
PrimitiveElement pe;
p->setPen(cg.dark());
@@ -485,8 +485,8 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->fillRect(fr, cg.brush((flags & Style_Down) ?
- QColorGroup::Midlight :
- QColorGroup::Background));
+ TQColorGroup::Midlight :
+ TQColorGroup::Background));
drawPrimitive(pe, p, ar, cg, flags);
break;
}
@@ -494,7 +494,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
case PE_ScrollBarSubPage:
case PE_ScrollBarAddPage:
{
- QRect fr = r;
+ TQRect fr = r;
p->setPen(cg.dark());
if (flags & Style_Horizontal) {
@@ -510,14 +510,14 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->fillRect(fr, cg.brush((flags & Style_Down) ?
- QColorGroup::Midlight :
- QColorGroup::Mid));
+ TQColorGroup::Midlight :
+ TQColorGroup::Mid));
break;
}
case PE_ScrollBarSlider:
{
- QRect fr = r;
+ TQRect fr = r;
p->setPen(cg.dark());
if (flags & Style_Horizontal) {
@@ -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(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
break;
}
@@ -563,7 +563,7 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft) {
- QPointArray a;
+ TQPointArray a;
switch ( pe ) {
case PE_ArrowUp:
@@ -607,31 +607,31 @@ void LightStyleV2::drawPrimitive( PrimitiveElement pe,
}
p->restore();
} else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
}
void LightStyleV2::drawControl( ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (control) {
case CE_TabBarTab:
{
- const QTabBar* tb = static_cast<const QTabBar*>(widget);
+ const TQTabBar* tb = static_cast<const TQTabBar*>(widget);
bool below = false;
- QRect tr(r);
- QRect fr(r);
+ TQRect tr(r);
+ TQRect fr(r);
tr.addCoords(0, 0, 0, -1);
fr.addCoords(2, 2, -2, -2);
- if ( tb->shape() == QTabBar::RoundedBelow || tb->shape() == QTabBar::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;
@@ -776,8 +776,8 @@ void LightStyleV2::drawControl( ControlElement control,
if (! widget || data.isDefault())
break;
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
- QMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
+ TQMenuItem *mi = data.menuItem();
int tab = data.tabWidth();
int maxpmw = data.maxIconWidth();
@@ -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(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
p->setPen(cg.mid().dark(120));
p->drawLine(r.left() + 12, r.top() + 1,
@@ -799,18 +799,18 @@ void LightStyleV2::drawControl( ControlElement control,
if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1,
- &cg.brush(QColorGroup::Midlight));
+ &cg.brush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
if ( !mi )
break;
maxpmw = QMAX(maxpmw, 16);
- QRect cr, ir, tr, sr;
+ TQRect cr, ir, tr, sr;
// check column
cr.setRect(r.left(), r.top(), maxpmw, r.height());
// submenu indicator column
@@ -820,7 +820,7 @@ void LightStyleV2::drawControl( ControlElement control,
// item column
ir.setCoords(cr.right() + 4, r.top(), tr.right() - 4, r.bottom());
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
cr = visualRect( cr, r );
sr = visualRect( sr, r );
@@ -831,21 +831,21 @@ void LightStyleV2::drawControl( ControlElement control,
if (mi->isChecked() &&
! (flags & Style_Active) &
(flags & Style_Enabled))
- qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
if (mi->iconSet()) {
- QIconSet::Mode mode =
- (flags & Style_Enabled) ? QIconSet::Normal : QIconSet::Disabled;
+ TQIconSet::Mode mode =
+ (flags & Style_Enabled) ? TQIconSet::Normal : TQIconSet::Disabled;
if ((flags & Style_Active) && (flags & Style_Enabled))
- mode = QIconSet::Active;
- QPixmap pixmap;
+ mode = TQIconSet::Active;
+ TQPixmap pixmap;
if (popupmenu->isCheckable() && mi->isChecked())
pixmap =
- mi->iconSet()->pixmap( QIconSet::Small, mode, QIconSet::On );
+ mi->iconSet()->pixmap( TQIconSet::Small, mode, TQIconSet::On );
else
pixmap =
- mi->iconSet()->pixmap( QIconSet::Small, mode );
- QRect pmr(QPoint(0, 0), pixmap.size());
+ mi->iconSet()->pixmap( TQIconSet::Small, mode );
+ TQRect pmr(TQPoint(0, 0), pixmap.size());
pmr.moveCenter(cr.center());
p->setPen(cg.text());
p->drawPixmap(pmr.topLeft(), pixmap);
@@ -853,8 +853,8 @@ void LightStyleV2::drawControl( ControlElement control,
drawPrimitive(PE_CheckMark, p, cr, cg,
(flags & Style_Enabled) | Style_On);
- QColor textcolor;
- QColor embosscolor;
+ TQColor textcolor;
+ TQColor embosscolor;
if (flags & Style_Active) {
if (! (flags & Style_Enabled))
textcolor = cg.midlight().dark();
@@ -885,7 +885,7 @@ void LightStyleV2::drawControl( ControlElement control,
p->restore();
}
- QString text = mi->text();
+ TQString text = mi->text();
if (! text.isNull()) {
int t = text.find('\t');
@@ -917,7 +917,7 @@ void LightStyleV2::drawControl( ControlElement control,
p->drawText(ir, alignFlag, text, t);
} else if (mi->pixmap()) {
- QPixmap pixmap = *mi->pixmap();
+ TQPixmap pixmap = *mi->pixmap();
if (pixmap.depth() == 1)
p->setBackgroundMode(OpaqueMode);
p->drawPixmap(ir.x(), ir.y() + (ir.height() - pixmap.height()) / 2, pixmap);
@@ -932,13 +932,13 @@ void LightStyleV2::drawControl( ControlElement control,
case CE_MenuBarEmptyArea:
{
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
break;
}
case CE_DockWindowEmptyArea:
{
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
break;
}
@@ -946,14 +946,14 @@ void LightStyleV2::drawControl( ControlElement control,
case CE_MenuBarItem:
{
if (flags & Style_Active)
- qDrawShadePanel(p, r, cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
if (data.isDefault())
break;
- QMenuItem *mi = data.menuItem();
+ TQMenuItem *mi = data.menuItem();
drawItem(p, r, AlignCenter | ShowPrefix | DontClip | SingleLine, cg,
flags & Style_Enabled, mi->pixmap(), mi->text(), -1,
&cg.buttonText());
@@ -961,20 +961,20 @@ void LightStyleV2::drawControl( ControlElement control,
}
case CE_ProgressBarGroove:
- drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(QColorGroup::Background));
+ drawLightBevel(p, r, cg, Style_Sunken, &cg.brush(TQColorGroup::Background));
break;
default:
- QCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
break;
}
}
void LightStyleV2::drawControlMask( ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption &data ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption &data ) const
{
switch (control) {
case CE_PushButton:
@@ -982,19 +982,19 @@ void LightStyleV2::drawControlMask( ControlElement control,
break;
default:
- QCommonStyle::drawControlMask(control, p, widget, r, data);
+ TQCommonStyle::drawControlMask(control, p, widget, r, data);
break;
}
}
-QRect LightStyleV2::subRect(SubRect subrect, const QWidget *widget) const
+TQRect LightStyleV2::subRect(SubRect subrect, const TQWidget *widget) const
{
- QRect rect, wrect(widget->rect());
+ TQRect rect, wrect(widget->rect());
switch (subrect) {
case SR_PushButtonFocusRect:
{
- const QPushButton *button = (const QPushButton *) widget;
+ const TQPushButton *button = (const TQPushButton *) widget;
int dbw1 = 0, dbw2 = 0;
if (button->isDefault() || button->autoDefault()) {
dbw1 = pixelMetric(PM_ButtonDefaultIndicator, widget);
@@ -1009,47 +1009,47 @@ QRect LightStyleV2::subRect(SubRect subrect, const QWidget *widget) const
}
default:
- rect = QCommonStyle::subRect(subrect, widget);
+ rect = TQCommonStyle::subRect(subrect, widget);
}
return rect;
}
void LightStyleV2::drawComplexControl( ComplexControl control,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QColorGroup& cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQColorGroup& cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (control) {
case CC_ComboBox:
{
- const QComboBox *combobox = (const QComboBox *) widget;
- QRect frame, arrow, field;
+ const TQComboBox *combobox = (const TQComboBox *) widget;
+ TQRect frame, arrow, field;
frame =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
if ((controls & SC_ComboBoxFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Raised,
- &cg.brush(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
if ((controls & SC_ComboBoxArrow) && arrow.isValid()) {
if (active == SC_ComboBoxArrow)
- p->fillRect(arrow, cg.brush(QColorGroup::Mid));
+ p->fillRect(arrow, cg.brush(TQColorGroup::Mid));
arrow.addCoords(4, 2, -2, -2);
drawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
}
@@ -1065,13 +1065,13 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
- p->fillRect( field, cg.brush( QColorGroup::Highlight ) );
- QRect fr =
- QStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ p->fillRect( field, cg.brush( TQColorGroup::Highlight ) );
+ TQRect fr =
+ TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
drawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
- QStyleOption(cg.highlight()));
+ TQStyleOption(cg.highlight()));
}
p->setPen(cg.highlightedText());
@@ -1084,8 +1084,8 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
case CC_SpinWidget:
{
- const QSpinWidget *spinwidget = (const QSpinWidget *) widget;
- QRect frame, up, down;
+ const TQSpinWidget *spinwidget = (const TQSpinWidget *) widget;
+ TQRect frame, up, down;
frame = querySubControlMetrics(CC_SpinWidget, widget,
SC_SpinWidgetFrame, data);
@@ -1094,18 +1094,18 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if ((controls & SC_SpinWidgetFrame) && frame.isValid())
drawLightBevel(p, frame, cg, flags | Style_Sunken,
- &cg.brush(QColorGroup::Base));
+ &cg.brush(TQColorGroup::Base));
if ((controls & SC_SpinWidgetUp) && up.isValid()) {
PrimitiveElement pe = PE_SpinWidgetUp;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetPlus;
p->setPen(cg.dark());
p->drawLine(up.topLeft(), up.bottomLeft());
up.addCoords(1, 0, 0, 0);
- p->fillRect(up, cg.brush(QColorGroup::Button));
+ p->fillRect(up, cg.brush(TQColorGroup::Button));
if (active == SC_SpinWidgetUp)
p->setPen(cg.mid());
else
@@ -1131,14 +1131,14 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
if ((controls & SC_SpinWidgetDown) && down.isValid()) {
PrimitiveElement pe = PE_SpinWidgetDown;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetMinus;
p->setPen(cg.dark());
p->drawLine(down.topLeft(), down.bottomLeft());
down.addCoords(1, 0, 0, 0);
- p->fillRect(down, cg.brush(QColorGroup::Button));
+ p->fillRect(down, cg.brush(TQColorGroup::Button));
if (active == SC_SpinWidgetDown)
p->setPen(cg.mid());
else
@@ -1167,8 +1167,8 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
- QRect addline, subline, subline2, addpage, subpage, slider, first, last;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
+ TQRect addline, subline, subline2, addpage, subpage, slider, first, last;
bool maxedOut = (scrollbar->minValue() == scrollbar->maxValue());
subline = querySubControlMetrics(control, widget, SC_ScrollBarSubLine, data);
@@ -1239,7 +1239,7 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
// ### perhaps this should not be able to accept focus if maxedOut?
if (scrollbar->hasFocus()) {
- QRect fr(slider.x() + 2, slider.y() + 2,
+ TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
@@ -1250,8 +1250,8 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
case CC_Slider:
{
- const QSlider *slider = (const QSlider *) widget;
- QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove,
+ const TQSlider *slider = (const TQSlider *) widget;
+ TQRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove,
data),
handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle,
data);
@@ -1270,18 +1270,18 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
drawLightBevel(p, groove, cg, ((flags | Style_Raised) ^ Style_Raised) |
((flags & Style_Enabled) ? Style_Sunken : Style_Default),
- &cg.brush(QColorGroup::Midlight));
+ &cg.brush(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(QColorGroup::Button));
+ &cg.brush(TQColorGroup::Button));
}
if (controls & SC_SliderTickmarks)
- QCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
@@ -1293,23 +1293,23 @@ void LightStyleV2::drawComplexControl( ComplexControl control,
break;
default:
- QCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
}
}
-QRect LightStyleV2::querySubControlMetrics( ComplexControl control,
- const QWidget *widget,
+TQRect LightStyleV2::querySubControlMetrics( ComplexControl control,
+ const TQWidget *widget,
SubControl sc,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
- QRect ret;
+ TQRect ret;
switch (control) {
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
int sliderstart = scrollbar->sliderStart();
int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ?
@@ -1386,19 +1386,19 @@ QRect LightStyleV2::querySubControlMetrics( ComplexControl control,
}
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, data);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, data);
break;
}
return ret;
}
-QStyle::SubControl LightStyleV2::querySubControl( ComplexControl control,
- const QWidget *widget,
- const QPoint &pos,
- const QStyleOption &data ) const
+TQStyle::SubControl LightStyleV2::querySubControl( ComplexControl control,
+ const TQWidget *widget,
+ const TQPoint &pos,
+ const TQStyleOption &data ) const
{
- QStyle::SubControl ret = QCommonStyle::querySubControl(control, widget, pos, data);
+ TQStyle::SubControl ret = TQCommonStyle::querySubControl(control, widget, pos, data);
// this is an ugly hack, but i really don't care, it's the quickest way to
// enabled the third button
@@ -1410,7 +1410,7 @@ QStyle::SubControl LightStyleV2::querySubControl( ComplexControl control,
}
int LightStyleV2::pixelMetric( PixelMetric metric,
- const QWidget *widget ) const
+ const TQWidget *widget ) const
{
int ret;
@@ -1472,25 +1472,25 @@ int LightStyleV2::pixelMetric( PixelMetric metric,
break;
default:
- ret = QCommonStyle::pixelMetric(metric, widget);
+ ret = TQCommonStyle::pixelMetric(metric, widget);
break;
}
return ret;
}
-QSize LightStyleV2::sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentsSize,
- const QStyleOption &data ) const
+TQSize LightStyleV2::sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentsSize,
+ const TQStyleOption &data ) const
{
- QSize ret;
+ TQSize ret;
switch (contents) {
case CT_PushButton:
{
- const QPushButton *button = (const QPushButton *) widget;
- ret = QCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
+ const TQPushButton *button = (const TQPushButton *) widget;
+ ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
// only expand the button if we are displaying text...
@@ -1510,7 +1510,7 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
}
}
- ret = QSize( w, h );
+ ret = TQSize( w, h );
break;
}
@@ -1519,8 +1519,8 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
if (! widget || data.isDefault())
break;
- QMenuItem *mi = data.menuItem();
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
+ TQMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
int maxpmw = data.maxIconWidth();
int w = contentsSize.width(), h = contentsSize.height();
@@ -1542,8 +1542,8 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
else if (! mi->text().isNull())
h = QMAX(h, popupmenu->fontMetrics().height() + 2);
if (mi->iconSet() != 0)
- h = QMAX(h, mi->iconSet()->pixmap(QIconSet::Small,
- QIconSet::Normal).height());
+ h = QMAX(h, mi->iconSet()->pixmap(TQIconSet::Small,
+ TQIconSet::Normal).height());
h += 2;
}
@@ -1556,21 +1556,21 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
if (! mi->text().isNull() && mi->text().find('\t') >= 0)
w += 8;
- ret = QSize(w, h);
+ ret = TQSize(w, h);
break;
}
case CT_ProgressBar:
{
- const QProgressBar* pb = static_cast<const QProgressBar*>(widget);
+ const TQProgressBar* pb = static_cast<const TQProgressBar*>(widget);
//If we have to display the indicator, and we do it on RHS, give some more room
//for it. This tries to match the logic and the spacing in SR_ProgressBarGroove/Contents
- //sizing in QCommonStyle.
+ //sizing in TQCommonStyle.
if (pb->percentageVisible() &&
(pb->indicatorFollowsStyle() || ! pb->centerIndicator()))
{
int addw = pb->fontMetrics().width("100%") + 6;
- return QSize(contentsSize.width() + addw, contentsSize.height());
+ return TQSize(contentsSize.width() + addw, contentsSize.height());
}
else
return contentsSize; //Otherwise leave unchanged
@@ -1579,7 +1579,7 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
}
default:
- ret = QCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
+ ret = TQCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
break;
}
@@ -1587,8 +1587,8 @@ QSize LightStyleV2::sizeFromContents( ContentsType contents,
}
int LightStyleV2::styleHint( StyleHint stylehint,
- const QWidget *widget,
- const QStyleOption &option,
+ const TQWidget *widget,
+ const TQStyleOption &option,
QStyleHintReturn* returnData ) const
{
int ret;
@@ -1611,16 +1611,16 @@ int LightStyleV2::styleHint( StyleHint stylehint,
break;
default:
- ret = QCommonStyle::styleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
break;
}
return ret;
}
-QPixmap LightStyleV2::stylePixmap( StylePixmap stylepixmap,
- const QWidget *widget,
- const QStyleOption &data ) const
+TQPixmap LightStyleV2::stylePixmap( StylePixmap stylepixmap,
+ const TQWidget *widget,
+ const TQStyleOption &data ) const
{
return singleton->basestyle->stylePixmap( stylepixmap, widget, data );
}
diff --git a/kstyles/light/lightstyle-v2.h b/kstyles/light/lightstyle-v2.h
index 6a7befd0c..e5a3fffac 100644
--- a/kstyles/light/lightstyle-v2.h
+++ b/kstyles/light/lightstyle-v2.h
@@ -42,43 +42,43 @@ public:
LightStyleV2();
virtual ~LightStyleV2();
- void polishPopupMenu( QPopupMenu * );
+ void polishPopupMenu( TQPopupMenu * );
- void drawPrimitive(PrimitiveElement, QPainter *, const QRect &, const QColorGroup &,
+ void drawPrimitive(PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &,
SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
+ const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControl(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
- void drawControlMask(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QStyleOption & = QStyleOption::Default) const;
+ void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default,
+ const TQStyleOption & = TQStyleOption::Default ) const;
+ void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQStyleOption & = TQStyleOption::Default) const;
- QRect subRect(SubRect, const QWidget *) const;
+ TQRect subRect(SubRect, const TQWidget *) const;
- void drawComplexControl(ComplexControl, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default,
+ void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default,
SCFlags = SC_All, SCFlags = SC_None,
- const QStyleOption & = QStyleOption::Default ) const;
+ const TQStyleOption & = TQStyleOption::Default ) const;
- QRect querySubControlMetrics(ComplexControl, const QWidget *, SubControl,
- const QStyleOption & = QStyleOption::Default ) const;
+ TQRect querySubControlMetrics(ComplexControl, const TQWidget *, SubControl,
+ const TQStyleOption & = TQStyleOption::Default ) const;
- SubControl querySubControl(ComplexControl, const QWidget *, const QPoint &,
- const QStyleOption &data = QStyleOption::Default ) const;
+ SubControl querySubControl(ComplexControl, const TQWidget *, const TQPoint &,
+ const TQStyleOption &data = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric, const QWidget * = 0 ) const;
+ int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
- QSize sizeFromContents(ContentsType, const QWidget *, const QSize &,
- const QStyleOption & = QStyleOption::Default ) const;
+ TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
+ const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint(StyleHint, const QWidget * = 0,
- const QStyleOption & = QStyleOption::Default,
+ int styleHint(StyleHint, const TQWidget * = 0,
+ const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget* widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget* widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
};
diff --git a/kstyles/light/lightstyle-v3.cpp b/kstyles/light/lightstyle-v3.cpp
index fc9966b63..49900c8f5 100644
--- a/kstyles/light/lightstyle-v3.cpp
+++ b/kstyles/light/lightstyle-v3.cpp
@@ -22,24 +22,24 @@
#include "lightstyle-v3.h"
-#include "qmenubar.h"
-#include "qapplication.h"
-#include "qcheckbox.h"
-#include "qpainter.h"
-#include "qpalette.h"
-#include "qframe.h"
-#include "qpushbutton.h"
-#include "qdrawutil.h"
-#include "qprogressbar.h"
-#include "qscrollbar.h"
-#include "qtabbar.h"
-#include "qguardedptr.h"
-#include "qlayout.h"
-#include "qlineedit.h"
-#include "qimage.h"
-#include "qcombobox.h"
-#include "qslider.h"
-#include "qstylefactory.h"
+#include "tqmenubar.h"
+#include "tqapplication.h"
+#include "tqcheckbox.h"
+#include "tqpainter.h"
+#include "tqpalette.h"
+#include "tqframe.h"
+#include "tqpushbutton.h"
+#include "tqdrawutil.h"
+#include "tqprogressbar.h"
+#include "tqscrollbar.h"
+#include "tqtabbar.h"
+#include "tqguardedptr.h"
+#include "tqlayout.h"
+#include "tqlineedit.h"
+#include "tqimage.h"
+#include "tqcombobox.h"
+#include "tqslider.h"
+#include "tqstylefactory.h"
// The Light Style, 3rd revision
@@ -47,9 +47,9 @@
LightStyleV3::LightStyleV3()
: KStyle(AllowMenuTransparency)
{
- basestyle = QStyleFactory::create( "Windows" );
+ basestyle = TQStyleFactory::create( "Windows" );
if ( ! basestyle )
- basestyle = QStyleFactory::create( QStyleFactory::keys().first() );
+ basestyle = TQStyleFactory::create( TQStyleFactory::keys().first() );
if ( ! basestyle )
qFatal( "LightStyle: couldn't find a basestyle!" );
}
@@ -59,7 +59,7 @@ LightStyleV3::~LightStyleV3()
delete basestyle;
}
-void LightStyleV3::polishPopupMenu( QPopupMenu * menu)
+void LightStyleV3::polishPopupMenu( TQPopupMenu * menu)
{
KStyle::polishPopupMenu(menu);
// empty to satisy pure virtual requirements
@@ -101,12 +101,12 @@ void LightStyleV3::polishPopupMenu( QPopupMenu * menu)
the etching and border )
F is the fill ( optional, not drawn by default )
*/
-static void drawLightEtch( QPainter *p,
- const QRect &rect,
- const QColor &color,
+static void drawLightEtch( TQPainter *p,
+ const TQRect &rect,
+ const TQColor &color,
bool sunken )
{
- QPointArray pts( 4 );
+ TQPointArray pts( 4 );
pts.setPoint( 0, rect.left(), rect.bottom() - 1);
pts.setPoint( 1, rect.left(), rect.top() );
@@ -123,20 +123,20 @@ static void drawLightEtch( QPainter *p,
p->drawLineSegments( pts );
}
-static void drawLightBevel( QPainter *p,
- const QRect &rect,
- const QColorGroup &cg,
- QStyle::SFlags flags,
+static void drawLightBevel( TQPainter *p,
+ const TQRect &rect,
+ const TQColorGroup &cg,
+ TQStyle::SFlags flags,
int linewidth,
bool etch = false, // light sunken bevel around border
bool border = true, // rectangle around bevel
- const QBrush *fill = 0 ) // contents fill
+ const TQBrush *fill = 0 ) // contents fill
{
- QRect br = rect;
- bool bevel = ( flags & ( QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken | QStyle::Style_Raised ) );
- bool sunken = (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken));
+ TQRect br = rect;
+ bool bevel = ( flags & ( TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken | TQStyle::Style_Raised ) );
+ bool sunken = (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken));
if ( etch && linewidth > 0 ) {
drawLightEtch( p, br, cg.background(), true );
@@ -161,7 +161,7 @@ static void drawLightBevel( QPainter *p,
br.rect( &x, &y, &w, &h );
// copied form qDrawShadePanel - just changed the highlight colors...
- QPointArray a( 4*linewidth );
+ TQPointArray a( 4*linewidth );
if ( sunken )
p->setPen( border ? cg.mid() : cg.dark() );
else
@@ -213,14 +213,14 @@ static void drawLightBevel( QPainter *p,
}
void LightStyleV3::drawPrimitive( PrimitiveElement pe,
- QPainter *p,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
- QRect br = r;
- const QBrush *fill = 0;
+ TQRect br = r;
+ const TQBrush *fill = 0;
switch (pe) {
case PE_HeaderSection:
@@ -249,7 +249,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight : QColorGroup::Button ) );
+ TQColorGroup::Midlight : TQColorGroup::Button ) );
// the taskbuttons in kicker seem to allow the style to set the pencolor
// here, which will be used to draw the text for focused window buttons...
@@ -259,17 +259,17 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ButtonCommand:
{
- QRect br = r;
+ TQRect br = r;
- if (flags & QStyle::Style_Enabled) {
- if (flags & (QStyle::Style_Down |
- QStyle::Style_On |
- QStyle::Style_Sunken))
- fill = &cg.brush(QColorGroup::Midlight);
+ if (flags & TQStyle::Style_Enabled) {
+ if (flags & (TQStyle::Style_Down |
+ TQStyle::Style_On |
+ TQStyle::Style_Sunken))
+ fill = &cg.brush(TQColorGroup::Midlight);
else
- fill = &cg.brush(QColorGroup::Button);
+ fill = &cg.brush(TQColorGroup::Button);
} else
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
bool etch = true;
if ( flags & Style_ButtonDefault ) {
@@ -284,40 +284,40 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ButtonBevel:
case PE_ButtonTool:
- if (flags & QStyle::Style_Enabled) {
- if (flags & (QStyle::Style_Down |
- QStyle::Style_On |
- QStyle::Style_Sunken))
- fill = &cg.brush(QColorGroup::Midlight);
+ if (flags & TQStyle::Style_Enabled) {
+ if (flags & (TQStyle::Style_Down |
+ TQStyle::Style_On |
+ TQStyle::Style_Sunken))
+ fill = &cg.brush(TQColorGroup::Midlight);
else
- fill = &cg.brush(QColorGroup::Button);
+ fill = &cg.brush(TQColorGroup::Button);
} else
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
drawLightBevel( p, r, cg, flags, pixelMetric( PM_DefaultFrameWidth ),
false, true, fill );
break;
case PE_ButtonDropDown:
{
- QBrush thefill;
+ TQBrush thefill;
bool sunken =
- (flags & (QStyle::Style_Down | QStyle::Style_On | QStyle::Style_Sunken));
+ (flags & (TQStyle::Style_Down | TQStyle::Style_On | TQStyle::Style_Sunken));
- if (flags & QStyle::Style_Enabled) {
+ if (flags & TQStyle::Style_Enabled) {
if (sunken)
- thefill = cg.brush(QColorGroup::Midlight);
+ thefill = cg.brush(TQColorGroup::Midlight);
else
- thefill = cg.brush(QColorGroup::Button);
+ thefill = cg.brush(TQColorGroup::Button);
} else
- thefill = cg.brush(QColorGroup::Background);
+ thefill = cg.brush(TQColorGroup::Background);
p->setPen( cg.dark() );
p->drawLine(r.topLeft(), r.topRight());
p->drawLine(r.topRight(), r.bottomRight());
p->drawLine(r.bottomRight(), r.bottomLeft());
- if (flags & (QStyle::Style_Down | QStyle::Style_On |
- QStyle::Style_Sunken | QStyle::Style_Raised)) {
+ if (flags & (TQStyle::Style_Down | TQStyle::Style_On |
+ TQStyle::Style_Sunken | TQStyle::Style_Raised)) {
// button bevel
if (sunken)
p->setPen(cg.mid());
@@ -350,13 +350,13 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
break;
case PE_Indicator:
- const QBrush *fill;
+ const TQBrush *fill;
if (! (flags & Style_Enabled))
- fill = &cg.brush(QColorGroup::Background);
+ fill = &cg.brush(TQColorGroup::Background);
else if (flags & Style_Down)
- fill = &cg.brush(QColorGroup::Mid);
+ fill = &cg.brush(TQColorGroup::Mid);
else
- fill = &cg.brush(QColorGroup::Base);
+ fill = &cg.brush(TQColorGroup::Base);
drawLightBevel( p, r, cg, flags | Style_Sunken, 2, true, true, fill );
p->setPen(cg.text());
@@ -386,7 +386,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ExclusiveIndicator:
{
- QRect br = r, // bevel rect
+ TQRect br = r, // bevel rect
lr = r, // outline rect
cr = r, // contents rect
ir = r; // indicator rect
@@ -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( QColorGroup::Background ) );
+ p->fillRect( r, cg.brush( TQColorGroup::Background ) );
p->setPen( flags & Style_Down ? cg.mid() :
( flags & Style_Enabled ? cg.base() : cg.background() ) );
@@ -422,12 +422,12 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_DockWindowHandle:
{
- QString title;
+ TQString title;
bool drawTitle = false;
- if ( p && p->device()->devType() == QInternal::Widget ) {
- QWidget *w = (QWidget *) p->device();
- QWidget *p = w->parentWidget();
- if (p->inherits("QDockWindow") && ! p->inherits("QToolBar")) {
+ if ( p && p->device()->devType() == TQInternal::Widget ) {
+ TQWidget *w = (TQWidget *) p->device();
+ TQWidget *p = w->parentWidget();
+ if (p->inherits("TQDockWindow") && ! p->inherits("TQToolBar")) {
drawTitle = true;
title = p->caption();
}
@@ -436,15 +436,15 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
flags |= Style_Raised;
if (flags & Style_Horizontal) {
if (drawTitle) {
- QPixmap pm(r.height(), r.width());
- QPainter p2(&pm);
+ TQPixmap pm(r.height(), r.width());
+ TQPainter p2(&pm);
p2.fillRect(0, 0, pm.width(), pm.height(),
- cg.brush(QColorGroup::Highlight));
+ cg.brush(TQColorGroup::Highlight));
p2.setPen(cg.highlightedText());
p2.drawText(0, 0, pm.width(), pm.height(), AlignCenter, title);
p2.end();
- QWMatrix m;
+ TQWMatrix m;
m.rotate(270.0);
pm = pm.xForm(m);
p->drawPixmap(r.x(), r.y(), pm);
@@ -460,7 +460,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
} else {
if (drawTitle) {
- p->fillRect(r, cg.brush(QColorGroup::Highlight));
+ p->fillRect(r, cg.brush(TQColorGroup::Highlight));
p->setPen(cg.highlightedText());
p->drawText(r, AlignCenter, title);
} else {
@@ -505,7 +505,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_DockWindowResizeHandle:
{
- QRect br = r;
+ TQRect br = r;
p->setPen( cg.shadow() );
p->drawRect( br );
@@ -525,7 +525,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
- p->fillRect( br, cg.brush( QColorGroup::Button ) );
+ p->fillRect( br, cg.brush( TQColorGroup::Button ) );
break;
}
@@ -540,7 +540,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_PanelTabWidget:
case PE_WindowFrame:
{
- QRect br = r;
+ TQRect br = r;
int cover = 0;
int reallw = ( data.isDefault() ?
@@ -553,7 +553,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
br.addCoords( 1, 1, -1, -1 );
while ( cover-- > 0 ) {
- QPointArray pts( 8 );
+ TQPointArray pts( 8 );
pts.setPoint( 0, br.left(), br.bottom() - 1);
pts.setPoint( 1, br.left(), br.top() );
pts.setPoint( 2, br.left() + 1, br.top() );
@@ -574,19 +574,19 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
pixelMetric(PM_DefaultFrameWidth) :
data.lineWidth() ), false, false,
- &cg.brush( QColorGroup::Button ) );
+ &cg.brush( TQColorGroup::Button ) );
break;
case PE_PanelMenuBar:
drawLightBevel( p, r, cg, flags, ( data.isDefault() ?
pixelMetric(PM_MenuBarFrameWidth) :
data.lineWidth() ), false, false,
- &cg.brush( QColorGroup::Button ) );
+ &cg.brush( TQColorGroup::Button ) );
break;
case PE_ScrollBarSubLine:
{
- QRect br = r;
+ TQRect br = r;
PrimitiveElement pe;
p->setPen( cg.background() );
@@ -608,8 +608,8 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight :
- QColorGroup::Button ) );
+ TQColorGroup::Midlight :
+ TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 );
if ( ! br.isValid() )
@@ -620,7 +620,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ScrollBarAddLine:
{
- QRect br = r;
+ TQRect br = r;
PrimitiveElement pe;
p->setPen( cg.background() );
@@ -642,8 +642,8 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight :
- QColorGroup::Button ) );
+ TQColorGroup::Midlight :
+ TQColorGroup::Button ) );
br.addCoords( 2, 2, -2, -2 );
if ( ! br.isValid() )
@@ -654,7 +654,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
case PE_ScrollBarSubPage:
{
- QRect br = r;
+ TQRect br = r;
p->setPen( cg.background() );
if (flags & Style_Horizontal) {
@@ -673,14 +673,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight :
- QColorGroup::Button ) );
+ TQColorGroup::Midlight :
+ TQColorGroup::Button ) );
break;
}
case PE_ScrollBarAddPage:
{
- QRect br = r;
+ TQRect br = r;
p->setPen( cg.background() );
if (flags & Style_Horizontal) {
@@ -699,14 +699,14 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
if ( ! br.isValid() )
break;
p->fillRect( br, cg.brush( ( flags & Style_Down ) ?
- QColorGroup::Midlight :
- QColorGroup::Button ) );
+ TQColorGroup::Midlight :
+ TQColorGroup::Button ) );
break;
}
case PE_ScrollBarSlider:
{
- QRect br = r;
+ TQRect br = r;
p->setPen( cg.background() );
if (flags & Style_Horizontal) {
@@ -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( QColorGroup::Highlight ) );
+ p->fillRect( br, cg.brush( TQColorGroup::Highlight ) );
break;
}
@@ -754,7 +754,7 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
if (pe >= PE_ArrowUp && pe <= PE_ArrowLeft) {
- QPointArray a;
+ TQPointArray a;
switch ( pe ) {
case PE_ArrowUp:
@@ -798,26 +798,26 @@ void LightStyleV3::drawPrimitive( PrimitiveElement pe,
}
p->restore();
} else
- QCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
+ TQCommonStyle::drawPrimitive(pe, p, r, cg, flags, data);
break;
}
}
void LightStyleV3::drawControl( ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QColorGroup &cg,
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQColorGroup &cg,
SFlags flags,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (control) {
case CE_TabBarTab:
{
- const QTabBar *tb = (const QTabBar *) widget;
- QRect br = r;
+ const TQTabBar *tb = (const TQTabBar *) widget;
+ TQRect br = r;
- if ( tb->shape() == QTabBar::RoundedAbove ) {
+ if ( tb->shape() == 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(QColorGroup::Highlight));
+ p->fillRect( br.right() - 3, br.top() + 1, 3, br.height() - 1, cg.brush(TQColorGroup::Highlight));
br.addCoords( 1, 1, -4, 0 );
}
else
br.addCoords( 1, 1, -1, 0 );
p->fillRect( br, cg.background() );
- } else if ( tb->shape() == QTabBar::RoundedBelow ) {
+ } else if ( tb->shape() == 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(QColorGroup::Highlight));
+ p->fillRect( br.right() - 2, br.top(), 3, br.height(), cg.brush(TQColorGroup::Highlight));
br.addCoords( 1, 0, -3, -1 );
}
else
@@ -892,7 +892,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->fillRect( br, cg.background() );
} else
- QCommonStyle::drawControl( control, p, widget, r, cg, flags, data );
+ TQCommonStyle::drawControl( control, p, widget, r, cg, flags, data );
break;
}
@@ -901,8 +901,8 @@ void LightStyleV3::drawControl( ControlElement control,
if (! widget || data.isDefault())
break;
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
- QMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
+ TQMenuItem *mi = data.menuItem();
int tab = data.tabWidth();
int maxpmw = data.maxIconWidth();
@@ -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(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
p->setPen( cg.mid() );
p->drawLine(r.left() + 12, r.top() + 1,
r.right() - 12, r.top() + 1);
@@ -922,18 +922,18 @@ void LightStyleV3::drawControl( ControlElement control,
if (flags & Style_Active)
qDrawShadePanel(p, r, cg, true, 1,
- &cg.brush(QColorGroup::Midlight));
+ &cg.brush(TQColorGroup::Midlight));
else if ( widget->erasePixmap() && !widget->erasePixmap()->isNull() )
p->drawPixmap( r.topLeft(), *widget->erasePixmap(), r );
else
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
if ( !mi )
break;
maxpmw = QMAX(maxpmw, 16);
- QRect cr, ir, tr, sr;
+ TQRect cr, ir, tr, sr;
// check column
cr.setRect(r.left(), r.top(), maxpmw, r.height());
// submenu indicator column
@@ -943,7 +943,7 @@ void LightStyleV3::drawControl( ControlElement control,
// item column
ir.setCoords(cr.right() + 4, r.top(), tr.right() - 4, r.bottom());
- bool reverse = QApplication::reverseLayout();
+ bool reverse = TQApplication::reverseLayout();
if ( reverse ) {
cr = visualRect( cr, r );
sr = visualRect( sr, r );
@@ -954,21 +954,21 @@ void LightStyleV3::drawControl( ControlElement control,
if (mi->isChecked() &&
! (flags & Style_Active) &
(flags & Style_Enabled))
- qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ qDrawShadePanel(p, cr, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
if (mi->iconSet()) {
- QIconSet::Mode mode =
- (flags & Style_Enabled) ? QIconSet::Normal : QIconSet::Disabled;
+ TQIconSet::Mode mode =
+ (flags & Style_Enabled) ? TQIconSet::Normal : TQIconSet::Disabled;
if ((flags & Style_Active) && (flags & Style_Enabled))
- mode = QIconSet::Active;
- QPixmap pixmap;
+ mode = TQIconSet::Active;
+ TQPixmap pixmap;
if (popupmenu->isCheckable() && mi->isChecked())
pixmap =
- mi->iconSet()->pixmap( QIconSet::Small, mode, QIconSet::On );
+ mi->iconSet()->pixmap( TQIconSet::Small, mode, TQIconSet::On );
else
pixmap =
- mi->iconSet()->pixmap( QIconSet::Small, mode );
- QRect pmr(QPoint(0, 0), pixmap.size());
+ mi->iconSet()->pixmap( TQIconSet::Small, mode );
+ TQRect pmr(TQPoint(0, 0), pixmap.size());
pmr.moveCenter(cr.center());
p->setPen(cg.text());
p->drawPixmap(pmr.topLeft(), pixmap);
@@ -976,8 +976,8 @@ void LightStyleV3::drawControl( ControlElement control,
drawPrimitive(PE_CheckMark, p, cr, cg,
(flags & Style_Enabled) | Style_On);
- QColor textcolor;
- QColor embosscolor;
+ TQColor textcolor;
+ TQColor embosscolor;
if (flags & Style_Active) {
if (! (flags & Style_Enabled))
textcolor = cg.midlight().dark();
@@ -1008,7 +1008,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->restore();
}
- QString text = mi->text();
+ TQString text = mi->text();
if (! text.isNull()) {
int t = text.find('\t');
@@ -1040,7 +1040,7 @@ void LightStyleV3::drawControl( ControlElement control,
p->drawText(ir, alignFlag, text, t);
} else if (mi->pixmap()) {
- QPixmap pixmap = *mi->pixmap();
+ TQPixmap pixmap = *mi->pixmap();
if (pixmap.depth() == 1)
p->setBackgroundMode(OpaqueMode);
p->drawPixmap(ir.x(), ir.y() + (ir.height() - pixmap.height()) / 2, pixmap);
@@ -1049,28 +1049,28 @@ void LightStyleV3::drawControl( ControlElement control,
}
if (mi->popup())
- drawPrimitive( (QApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight),
+ drawPrimitive( (TQApplication::reverseLayout() ? PE_ArrowLeft : PE_ArrowRight),
p, sr, cg, flags);
break;
}
case CE_MenuBarEmptyArea:
{
- p->fillRect(r, cg.brush(QColorGroup::Button));
+ p->fillRect(r, cg.brush(TQColorGroup::Button));
break;
}
case CE_MenuBarItem:
{
if ( flags & Style_Active )
- qDrawShadePanel(p, r, cg, true, 1, &cg.brush(QColorGroup::Midlight));
+ qDrawShadePanel(p, r, cg, true, 1, &cg.brush(TQColorGroup::Midlight));
else
- p->fillRect( r, cg.brush( QColorGroup::Button ) );
+ p->fillRect( r, cg.brush( TQColorGroup::Button ) );
if (data.isDefault())
break;
- QMenuItem *mi = data.menuItem();
+ TQMenuItem *mi = data.menuItem();
drawItem(p, r, AlignCenter | ShowPrefix | DontClip | SingleLine, cg,
flags & Style_Enabled, mi->pixmap(), mi->text(), -1,
&cg.buttonText());
@@ -1079,20 +1079,20 @@ void LightStyleV3::drawControl( ControlElement control,
case CE_ProgressBarGroove:
drawLightBevel( p, r, cg, Style_Sunken, pixelMetric( PM_DefaultFrameWidth ),
- true, true, &cg.brush( QColorGroup::Background ) );
+ true, true, &cg.brush( TQColorGroup::Background ) );
break;
default:
- QCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
+ TQCommonStyle::drawControl(control, p, widget, r, cg, flags, data);
break;
}
}
void LightStyleV3::drawControlMask( ControlElement control,
- QPainter *p,
- const QWidget *widget,
- const QRect &r,
- const QStyleOption &data ) const
+ TQPainter *p,
+ const TQWidget *widget,
+ const TQRect &r,
+ const TQStyleOption &data ) const
{
switch (control) {
case CE_PushButton:
@@ -1100,19 +1100,19 @@ void LightStyleV3::drawControlMask( ControlElement control,
break;
default:
- QCommonStyle::drawControlMask(control, p, widget, r, data);
+ TQCommonStyle::drawControlMask(control, p, widget, r, data);
break;
}
}
-QRect LightStyleV3::subRect(SubRect subrect, const QWidget *widget) const
+TQRect LightStyleV3::subRect(SubRect subrect, const TQWidget *widget) const
{
- QRect rect;
+ TQRect rect;
switch (subrect) {
case SR_PushButtonFocusRect:
{
- rect = QCommonStyle::subRect( SR_PushButtonContents, widget );
+ rect = TQCommonStyle::subRect( SR_PushButtonContents, widget );
int bm = pixelMetric( PM_ButtonMargin, widget ), hbm = bm / 2;
rect.addCoords( hbm, hbm, -hbm, -hbm );
break;
@@ -1120,20 +1120,20 @@ QRect LightStyleV3::subRect(SubRect subrect, const QWidget *widget) const
case SR_ComboBoxFocusRect:
{
- rect = QCommonStyle::subRect( SR_ComboBoxFocusRect, widget );
+ rect = TQCommonStyle::subRect( SR_ComboBoxFocusRect, widget );
rect.addCoords( -1, -1, 1, 1 );
break;
}
case SR_CheckBoxFocusRect:
{
- const QCheckBox* cb = static_cast<const QCheckBox*>(widget);
+ const TQCheckBox* cb = static_cast<const TQCheckBox*>(widget);
//Only checkbox, no label
if (cb->text().isEmpty() && (cb->pixmap() == 0) )
{
- QRect bounding = cb->rect();
- QRect checkbox(bounding.x(), bounding.y() + (bounding.height() - 13)/2,
+ TQRect bounding = cb->rect();
+ TQRect checkbox(bounding.x(), bounding.y() + (bounding.height() - 13)/2,
13, 13);
return checkbox;
@@ -1143,7 +1143,7 @@ QRect LightStyleV3::subRect(SubRect subrect, const QWidget *widget) const
default:
- rect = QCommonStyle::subRect(subrect, widget);
+ rect = TQCommonStyle::subRect(subrect, widget);
break;
}
@@ -1151,30 +1151,30 @@ QRect LightStyleV3::subRect(SubRect subrect, const QWidget *widget) const
}
void LightStyleV3::drawComplexControl( ComplexControl control,
- QPainter* p,
- const QWidget* widget,
- const QRect& r,
- const QColorGroup& cg,
+ TQPainter* p,
+ const TQWidget* widget,
+ const TQRect& r,
+ const TQColorGroup& cg,
SFlags flags,
SCFlags controls,
SCFlags active,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
switch (control) {
case CC_ComboBox:
{
- const QComboBox *combobox = (const QComboBox *) widget;
- QRect frame, arrow, field;
+ const TQComboBox *combobox = (const TQComboBox *) widget;
+ TQRect frame, arrow, field;
frame =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxFrame, data),
widget);
arrow =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxArrow, data),
widget);
field =
- QStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
+ TQStyle::visualRect(querySubControlMetrics(CC_ComboBox, widget,
SC_ComboBoxEditField, data),
widget);
@@ -1184,7 +1184,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
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( QColorGroup::Button ) );
+ p->fillRect( arrow, cg.brush( TQColorGroup::Button ) );
arrow.addCoords(3, 1, -1, -1);
drawPrimitive(PE_ArrowDown, p, arrow, cg, flags);
}
@@ -1192,20 +1192,20 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if ((controls & SC_ComboBoxEditField) && field.isValid()) {
if (flags & Style_HasFocus) {
if (! combobox->editable()) {
- QRect fr =
- QStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
+ TQRect fr =
+ TQStyle::visualRect( subRect( SR_ComboBoxFocusRect, widget ),
widget );
- p->fillRect( fr, cg.brush( QColorGroup::Highlight ) );
+ p->fillRect( fr, cg.brush( TQColorGroup::Highlight ) );
drawPrimitive( PE_FocusRect, p, fr, cg,
flags | Style_FocusAtBorder,
- QStyleOption(cg.highlight()));
+ TQStyleOption(cg.highlight()));
}
p->setPen(cg.highlightedText());
} else {
p->fillRect( field, ( ( flags & Style_Enabled ) ?
- cg.brush( QColorGroup::Base ) :
- cg.brush( QColorGroup::Background ) ) );
+ cg.brush( TQColorGroup::Base ) :
+ cg.brush( TQColorGroup::Background ) ) );
p->setPen( cg.text() );
}
}
@@ -1215,8 +1215,8 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
case CC_SpinWidget:
{
- const QSpinWidget *spinwidget = (const QSpinWidget *) widget;
- QRect frame, up, down;
+ const TQSpinWidget *spinwidget = (const TQSpinWidget *) widget;
+ TQRect frame, up, down;
frame = querySubControlMetrics(CC_SpinWidget, widget,
SC_SpinWidgetFrame, data);
@@ -1228,14 +1228,14 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if ((controls & SC_SpinWidgetUp) && up.isValid()) {
PrimitiveElement pe = PE_SpinWidgetUp;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetPlus;
p->setPen( cg.background() );
p->drawLine( up.topLeft(), up.bottomLeft() );
up.addCoords( 1, 0, 0, 0 );
- p->fillRect( up, cg.brush( QColorGroup::Button ) );
+ p->fillRect( up, cg.brush( TQColorGroup::Button ) );
drawLightEtch( p, up, cg.button(), ( active == SC_SpinWidgetUp ) );
up.addCoords( 1, 0, 0, 0 );
@@ -1246,14 +1246,14 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
if ((controls & SC_SpinWidgetDown) && down.isValid()) {
PrimitiveElement pe = PE_SpinWidgetDown;
- if ( spinwidget->buttonSymbols() == QSpinWidget::PlusMinus )
+ if ( spinwidget->buttonSymbols() == TQSpinWidget::PlusMinus )
pe = PE_SpinWidgetMinus;
p->setPen( cg.background() );
p->drawLine( down.topLeft(), down.bottomLeft() );
down.addCoords( 1, 0, 0, 0 );
- p->fillRect( down, cg.brush( QColorGroup::Button ) );
+ p->fillRect( down, cg.brush( TQColorGroup::Button ) );
drawLightEtch( p, down, cg.button(), ( active == SC_SpinWidgetDown ) );
down.addCoords( 1, 0, 0, 0 );
@@ -1267,8 +1267,8 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
- QRect addline, subline, subline2, addpage, subpage, slider, first, last;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
+ TQRect addline, subline, subline2, addpage, subpage, slider, first, last;
bool maxedOut = (scrollbar->minValue() == scrollbar->maxValue());
subline = querySubControlMetrics(control, widget, SC_ScrollBarSubLine, data);
@@ -1339,7 +1339,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
// ### perhaps this should not be able to accept focus if maxedOut?
if (scrollbar->hasFocus()) {
- QRect fr(slider.x() + 2, slider.y() + 2,
+ TQRect fr(slider.x() + 2, slider.y() + 2,
slider.width() - 5, slider.height() - 5);
drawPrimitive(PE_FocusRect, p, fr, cg, Style_Default);
}
@@ -1350,19 +1350,19 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
case CC_Slider:
{
- const QSlider *slider = (const QSlider *) widget;
- QRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove,
+ const TQSlider *slider = (const TQSlider *) widget;
+ TQRect groove = querySubControlMetrics(CC_Slider, widget, SC_SliderGroove,
data),
handle = querySubControlMetrics(CC_Slider, widget, SC_SliderHandle,
data);
if ((controls & SC_SliderGroove) && groove.isValid()) {
- QColor grooveColor = cg.midlight();
+ TQColor grooveColor = cg.midlight();
if (!(flags & Style_Enabled))
grooveColor = cg.background();
- QBrush brush(grooveColor);
+ TQBrush brush(grooveColor);
drawLightBevel( p, groove, cg,
( ( flags | Style_Raised ) ^ Style_Raised ) |
( ( flags & Style_Enabled ) ? Style_Sunken :
@@ -1378,7 +1378,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
}
if ((controls & SC_SliderHandle) && handle.isValid()) {
- QColor sliderColor = cg.highlight();
+ TQColor sliderColor = cg.highlight();
if (!(flags & Style_Enabled))
sliderColor = cg.button();
@@ -1408,7 +1408,7 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
}
if (controls & SC_SliderTickmarks)
- QCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
SC_SliderTickmarks, active, data );
break;
}
@@ -1420,18 +1420,18 @@ void LightStyleV3::drawComplexControl( ComplexControl control,
break;
default:
- QCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
+ TQCommonStyle::drawComplexControl(control, p, widget, r, cg, flags,
controls, active, data);
break;
}
}
-QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
- const QWidget *widget,
+TQRect LightStyleV3::querySubControlMetrics( ComplexControl control,
+ const TQWidget *widget,
SubControl sc,
- const QStyleOption &data ) const
+ const TQStyleOption &data ) const
{
- QRect ret;
+ TQRect ret;
switch (control) {
case CC_ComboBox:
@@ -1460,7 +1460,7 @@ QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case CC_ScrollBar:
{
- const QScrollBar *scrollbar = (const QScrollBar *) widget;
+ const TQScrollBar *scrollbar = (const TQScrollBar *) widget;
int sliderstart = scrollbar->sliderStart();
int sbextent = pixelMetric(PM_ScrollBarExtent, widget);
int maxlen = ((scrollbar->orientation() == Qt::Horizontal) ?
@@ -1536,7 +1536,7 @@ QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
case CC_Slider:
{
- const QSlider *slider = (const QSlider *) widget;
+ const TQSlider *slider = (const TQSlider *) widget;
int tickOffset = pixelMetric( PM_SliderTickmarkOffset, widget );
int thickness = pixelMetric( PM_SliderControlThickness, widget );
@@ -1561,7 +1561,7 @@ QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
}
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, data);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, data);
break;
}
@@ -1569,20 +1569,20 @@ QRect LightStyleV3::querySubControlMetrics( ComplexControl control,
}
default:
- ret = QCommonStyle::querySubControlMetrics(control, widget, sc, data);
+ ret = TQCommonStyle::querySubControlMetrics(control, widget, sc, data);
break;
}
return ret;
}
-QStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
- const QWidget *widget,
- const QPoint &pos,
- const QStyleOption &data ) const
+TQStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
+ const TQWidget *widget,
+ const TQPoint &pos,
+ const TQStyleOption &data ) const
{
- QStyle::SubControl ret =
- QCommonStyle::querySubControl(control, widget, pos, data);
+ TQStyle::SubControl ret =
+ TQCommonStyle::querySubControl(control, widget, pos, data);
// this is an ugly hack, but i really don't care, it's the quickest way to
// enabled the third button
@@ -1594,7 +1594,7 @@ QStyle::SubControl LightStyleV3::querySubControl( ComplexControl control,
}
int LightStyleV3::pixelMetric( PixelMetric metric,
- const QWidget *widget ) const
+ const TQWidget *widget ) const
{
int ret;
@@ -1663,13 +1663,13 @@ int LightStyleV3::pixelMetric( PixelMetric metric,
case PM_SliderControlThickness:
{
- const QSlider * sl = (const QSlider *) widget;
+ const TQSlider * sl = (const TQSlider *) widget;
int space = (sl->orientation() == Horizontal) ? sl->height()
: sl->width();
int ticks = sl->tickmarks();
int n = 0;
- if ( ticks & QSlider::Above ) n++;
- if ( ticks & QSlider::Below ) n++;
+ if ( ticks & TQSlider::Above ) n++;
+ if ( ticks & TQSlider::Below ) n++;
if ( !n ) {
ret = space;
break;
@@ -1690,19 +1690,19 @@ int LightStyleV3::pixelMetric( PixelMetric metric,
break;
default:
- ret = QCommonStyle::pixelMetric(metric, widget);
+ ret = TQCommonStyle::pixelMetric(metric, widget);
break;
}
return ret;
}
-QSize LightStyleV3::sizeFromContents( ContentsType contents,
- const QWidget *widget,
- const QSize &contentsSize,
- const QStyleOption &data ) const
+TQSize LightStyleV3::sizeFromContents( ContentsType contents,
+ const TQWidget *widget,
+ const TQSize &contentsSize,
+ const TQStyleOption &data ) const
{
- QSize ret;
+ TQSize ret;
switch (contents) {
case CT_ComboBox:
@@ -1719,14 +1719,14 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
if ( h < 21 )
h = 21;
- ret = QSize( w, h );
+ ret = TQSize( w, h );
break;
}
case CT_PushButton:
{
- const QPushButton *button = (const QPushButton *) widget;
- ret = QCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
+ const TQPushButton *button = (const TQPushButton *) widget;
+ ret = TQCommonStyle::sizeFromContents( contents, widget, contentsSize, data );
int w = ret.width(), h = ret.height();
int dbi = pixelMetric( PM_ButtonDefaultIndicator, widget ) * 2;
int mw = 80 - dbi, mh = 25 - dbi;
@@ -1740,7 +1740,7 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
h = mh;
}
- ret = QSize( w, h );
+ ret = TQSize( w, h );
break;
}
@@ -1749,8 +1749,8 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
if (! widget || data.isDefault())
break;
- QMenuItem *mi = data.menuItem();
- const QPopupMenu *popupmenu = (const QPopupMenu *) widget;
+ TQMenuItem *mi = data.menuItem();
+ const TQPopupMenu *popupmenu = (const TQPopupMenu *) widget;
int maxpmw = data.maxIconWidth();
int w = contentsSize.width(), h = contentsSize.height();
@@ -1772,8 +1772,8 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
else if (! mi->text().isNull())
h = QMAX(h, popupmenu->fontMetrics().height() + 2);
if (mi->iconSet() != 0)
- h = QMAX(h, mi->iconSet()->pixmap(QIconSet::Small,
- QIconSet::Normal).height());
+ h = QMAX(h, mi->iconSet()->pixmap(TQIconSet::Small,
+ TQIconSet::Normal).height());
h += 2;
}
@@ -1786,22 +1786,22 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
if (! mi->text().isNull() && mi->text().find('\t') >= 0)
w += 8;
- ret = QSize(w, h);
+ ret = TQSize(w, h);
break;
}
case CT_ProgressBar:
{
- const QProgressBar* pb = static_cast<const QProgressBar*>(widget);
+ const TQProgressBar* pb = static_cast<const TQProgressBar*>(widget);
//If we have to display the indicator, and we do it on RHS, give some more room
//for it. This tries to match the logic and the spacing in SR_ProgressBarGroove/Contents
- //sizing in QCommonStyle.
+ //sizing in TQCommonStyle.
if (pb->percentageVisible() &&
(pb->indicatorFollowsStyle() || ! pb->centerIndicator()))
{
int addw = pb->fontMetrics().width("100%") + 6;
- return QSize(contentsSize.width() + addw, contentsSize.height());
+ return TQSize(contentsSize.width() + addw, contentsSize.height());
}
else
return contentsSize; //Otherwise leave unchanged
@@ -1810,7 +1810,7 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
}
default:
- ret = QCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
+ ret = TQCommonStyle::sizeFromContents(contents, widget, contentsSize, data);
break;
}
@@ -1818,8 +1818,8 @@ QSize LightStyleV3::sizeFromContents( ContentsType contents,
}
int LightStyleV3::styleHint( StyleHint stylehint,
- const QWidget *widget,
- const QStyleOption &option,
+ const TQWidget *widget,
+ const TQStyleOption &option,
QStyleHintReturn* returnData ) const
{
int ret;
@@ -1846,16 +1846,16 @@ int LightStyleV3::styleHint( StyleHint stylehint,
break;
default:
- ret = QCommonStyle::styleHint(stylehint, widget, option, returnData);
+ ret = TQCommonStyle::styleHint(stylehint, widget, option, returnData);
break;
}
return ret;
}
-QPixmap LightStyleV3::stylePixmap( StylePixmap stylepixmap,
- const QWidget *widget,
- const QStyleOption &data ) const
+TQPixmap LightStyleV3::stylePixmap( StylePixmap stylepixmap,
+ const TQWidget *widget,
+ const TQStyleOption &data ) const
{
return basestyle->stylePixmap( stylepixmap, widget, data );
}
diff --git a/kstyles/light/lightstyle-v3.h b/kstyles/light/lightstyle-v3.h
index b46010778..be8812b99 100644
--- a/kstyles/light/lightstyle-v3.h
+++ b/kstyles/light/lightstyle-v3.h
@@ -25,7 +25,7 @@
#ifndef QT_H
-#include <qcommonstyle.h>
+#include <tqcommonstyle.h>
#endif // QT_H
#include "kstyle.h"
@@ -40,49 +40,49 @@
class Q_EXPORT_STYLE_LIGHT_V3 LightStyleV3 : public KStyle
{
Q_OBJECT
- QStyle *basestyle;
+ TQStyle *basestyle;
public:
LightStyleV3();
virtual ~LightStyleV3();
- void polishPopupMenu( QPopupMenu * );
+ void polishPopupMenu( TQPopupMenu * );
- void drawPrimitive(PrimitiveElement, QPainter *, const QRect &, const QColorGroup &,
+ void drawPrimitive(PrimitiveElement, TQPainter *, const TQRect &, const TQColorGroup &,
SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
+ const TQStyleOption & = TQStyleOption::Default ) const;
- void drawControl(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default,
- const QStyleOption & = QStyleOption::Default ) const;
- void drawControlMask(ControlElement, QPainter *, const QWidget *, const QRect &,
- const QStyleOption & = QStyleOption::Default) const;
+ void drawControl(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default,
+ const TQStyleOption & = TQStyleOption::Default ) const;
+ void drawControlMask(ControlElement, TQPainter *, const TQWidget *, const TQRect &,
+ const TQStyleOption & = TQStyleOption::Default) const;
- QRect subRect(SubRect, const QWidget *) const;
+ TQRect subRect(SubRect, const TQWidget *) const;
- void drawComplexControl(ComplexControl, QPainter *, const QWidget *, const QRect &,
- const QColorGroup &, SFlags = Style_Default,
+ void drawComplexControl(ComplexControl, TQPainter *, const TQWidget *, const TQRect &,
+ const TQColorGroup &, SFlags = Style_Default,
SCFlags = SC_All, SCFlags = SC_None,
- const QStyleOption & = QStyleOption::Default ) const;
+ const TQStyleOption & = TQStyleOption::Default ) const;
- QRect querySubControlMetrics(ComplexControl, const QWidget *, SubControl,
- const QStyleOption & = QStyleOption::Default ) const;
+ TQRect querySubControlMetrics(ComplexControl, const TQWidget *, SubControl,
+ const TQStyleOption & = TQStyleOption::Default ) const;
- SubControl querySubControl(ComplexControl, const QWidget *, const QPoint &,
- const QStyleOption &data = QStyleOption::Default ) const;
+ SubControl querySubControl(ComplexControl, const TQWidget *, const TQPoint &,
+ const TQStyleOption &data = TQStyleOption::Default ) const;
- int pixelMetric(PixelMetric, const QWidget * = 0 ) const;
+ int pixelMetric(PixelMetric, const TQWidget * = 0 ) const;
- QSize sizeFromContents(ContentsType, const QWidget *, const QSize &,
- const QStyleOption & = QStyleOption::Default ) const;
+ TQSize sizeFromContents(ContentsType, const TQWidget *, const TQSize &,
+ const TQStyleOption & = TQStyleOption::Default ) const;
- int styleHint(StyleHint, const QWidget * = 0,
- const QStyleOption & = QStyleOption::Default,
+ int styleHint(StyleHint, const TQWidget * = 0,
+ const TQStyleOption & = TQStyleOption::Default,
QStyleHintReturn * = 0 ) const;
- QPixmap stylePixmap( StylePixmap stylepixmap,
- const QWidget* widget = 0,
- const QStyleOption& = QStyleOption::Default ) const;
+ TQPixmap stylePixmap( StylePixmap stylepixmap,
+ const TQWidget* widget = 0,
+ const TQStyleOption& = TQStyleOption::Default ) const;
};