From 8155225c9be993acc0512956416d195edfef4eb9 Mon Sep 17 00:00:00 2001 From: tpearson Date: Wed, 19 Jan 2011 01:42:14 +0000 Subject: Enable compilation with TQt for Qt4 3.4.0 TP2 This should not break compatibility with TQt for Qt3; if it does please fix it ASAP! git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdebase@1215552 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kwin/clients/b2/b2client.cpp | 110 +++++++++++++------------- kwin/clients/b2/b2client.h | 10 +-- kwin/clients/b2/config/config.h | 2 +- kwin/clients/default/config/config.h | 2 +- kwin/clients/default/kdedefault.cpp | 28 +++---- kwin/clients/keramik/config/keramikconfig.ui | 10 +-- kwin/clients/keramik/embedtool.cpp | 20 ++--- kwin/clients/keramik/keramik.cpp | 112 +++++++++++++-------------- kwin/clients/keramik/keramik.h | 8 +- kwin/clients/kwmtheme/cli_installer/main.cpp | 16 ++-- kwin/clients/kwmtheme/kwmthemeclient.cpp | 28 +++---- kwin/clients/kwmtheme/kwmthemeclient.h | 4 +- kwin/clients/laptop/laptopclient.cpp | 26 +++---- kwin/clients/modernsystem/config/config.cpp | 10 +-- kwin/clients/modernsystem/config/config.h | 18 ++--- kwin/clients/modernsystem/modernsys.cpp | 20 ++--- kwin/clients/plastik/config/config.h | 2 +- kwin/clients/plastik/config/configdialog.ui | 18 ++--- kwin/clients/plastik/misc.cpp | 10 +-- kwin/clients/plastik/plastik.cpp | 2 +- kwin/clients/plastik/plastik.h | 4 +- kwin/clients/plastik/plastikbutton.cpp | 6 +- kwin/clients/plastik/plastikclient.cpp | 30 +++---- kwin/clients/quartz/config/config.h | 2 +- kwin/clients/quartz/quartz.cpp | 36 ++++----- kwin/clients/redmond/redmond.cpp | 24 +++--- kwin/clients/test/test.cpp | 24 +++--- kwin/clients/test/test.h | 2 +- kwin/clients/web/Web.cpp | 34 ++++---- kwin/clients/web/Web.h | 2 +- kwin/clients/web/WebButton.cpp | 26 +++---- kwin/clients/web/WebButton.h | 4 +- 32 files changed, 325 insertions(+), 325 deletions(-) (limited to 'kwin/clients') diff --git a/kwin/clients/b2/b2client.cpp b/kwin/clients/b2/b2client.cpp index 97d049ffb..ae010e830 100644 --- a/kwin/clients/b2/b2client.cpp +++ b/kwin/clients/b2/b2client.cpp @@ -146,7 +146,7 @@ static void drawB2Rect(KPixmap *pix, const TQColor &primary, bool down) TQColor hColor = primary.light(150); TQColor lColor = primary.dark(150); - if (down) qSwap(hColor, lColor); + if (down) tqSwap(hColor, lColor); if (TQPixmap::defaultDepth() > 8) { KPixmapEffect::gradient(*pix, hColor, lColor, @@ -355,7 +355,7 @@ void B2Client::init() // Check this early, otherwise the preview will be rendered badly. resizable = isResizable(); - createMainWidget(WResizeNoErase | WRepaintNoErase); + createMainWidget((WFlags)(WResizeNoErase | WRepaintNoErase)); widget()->installEventFilter(this); widget()->setBackgroundMode(NoBackground); @@ -418,7 +418,7 @@ void B2Client::init() titleLayout->addSpacing(3); - TQColor c = options()->colorGroup(KDecoration::ColorTitleBar, isActive()). + TQColor c = options()->tqcolorGroup(KDecoration::ColorTitleBar, isActive()). color(TQColorGroup::Button); for (int i = 0; i < BtnCount; i++) { @@ -443,7 +443,7 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], case 'M': // Menu button if (!button[BtnMenu]) { button[BtnMenu] = new B2Button(this, tb, tips[BtnMenu], - LeftButton | RightButton); + Qt::LeftButton | Qt::RightButton); button[BtnMenu]->setPixmaps(P_MENU); button[BtnMenu]->setUseMiniIcon(); connect(button[BtnMenu], TQT_SIGNAL(pressed()), @@ -483,7 +483,7 @@ void B2Client::addButtons(const TQString& s, const TQString tips[], case 'A': // Maximize button if (isMaximizable() && (!button[BtnMax])) { button[BtnMax] = new B2Button(this, tb, tips[BtnMax], - LeftButton | MidButton | RightButton); + Qt::LeftButton | Qt::MidButton | Qt::RightButton); button[BtnMax]->setPixmaps(maximizeMode() == MaximizeFull ? P_NORMALIZE : P_MAX); connect(button[BtnMax], TQT_SIGNAL(clicked()), @@ -537,7 +537,7 @@ bool B2Client::mustDrawHandle() const void B2Client::iconChange() { if (button[BtnMenu]) - button[BtnMenu]->repaint(false); + button[BtnMenu]->tqrepaint(false); } // Gallium: New button show/hide magic for customizable @@ -586,7 +586,7 @@ void B2Client::resizeEvent(TQResizeEvent * /*e*/) titleMoveAbs(bar_x_ofs); doShape(); - widget()->repaint(); // the frame is misrendered without this + widget()->tqrepaint(); // the frame is misrendered without this } void B2Client::captionChange() @@ -595,7 +595,7 @@ void B2Client::captionChange() titleMoveAbs(bar_x_ofs); doShape(); titlebar->recalcBuffer(); - titlebar->repaint(false); + titlebar->tqrepaint(false); } void B2Client::paintEvent(TQPaintEvent* e) @@ -614,7 +614,7 @@ void B2Client::paintEvent(TQPaintEvent* e) int bb = mustDrawHandle() ? 4 : 0; int bDepth = thickness + bb; - TQColorGroup fillColor = options()->colorGroup(frameColorGroup, isActive()); + TQColorGroup fillColor = options()->tqcolorGroup(frameColorGroup, isActive()); TQBrush fillBrush(options()->color(frameColorGroup, isActive())); // outer frame rect @@ -689,7 +689,7 @@ void B2Client::paintEvent(TQPaintEvent* e) visibilitinotify events until its state changes, so we just try */ if (titlebar->isFullyObscured()) { - /* We first see, if our repaint contained the titlebar area */ + /* We first see, if our tqrepaint contained the titlebar area */ TQRegion reg(TQRect(0, 0, width(), buttonSize + 4)); reg = reg.intersect(e->region()); if (!reg.isEmpty()) @@ -794,8 +794,8 @@ void B2Client::titleMoveAbs(int new_ofs) bar_x_ofs = new_ofs; positionButtons(); doShape(); - widget()->repaint(0, 0, width(), buttonSize + 4, false); - titlebar->repaint(false); + widget()->tqrepaint(0, 0, width(), buttonSize + 4, false); + titlebar->tqrepaint(false); } } @@ -820,7 +820,7 @@ void B2Client::maximizeChange() bool m = maximizeMode() == MaximizeFull; if (button[BtnMax]) { button[BtnMax]->setPixmaps(m ? P_NORMALIZE : P_MAX); - button[BtnMax]->repaint(); + button[BtnMax]->tqrepaint(); TQToolTip::remove(button[BtnMax]); TQToolTip::add(button[BtnMax], m ? i18n("Restore") : i18n("Maximize")); @@ -830,21 +830,21 @@ void B2Client::maximizeChange() g->activate(); doShape(); - widget()->repaint(false); + widget()->tqrepaint(false); } void B2Client::activeChange() { - widget()->repaint(false); - titlebar->repaint(false); + widget()->tqrepaint(false); + titlebar->tqrepaint(false); - TQColor c = options()->colorGroup( + TQColor c = options()->tqcolorGroup( KDecoration::ColorTitleBar, isActive()).color(TQColorGroup::Button); for (int i = 0; i < BtnCount; i++) if (button[i]) { button[i]->setBg(c); - button[i]->repaint(false); + button[i]->tqrepaint(false); } } @@ -860,7 +860,7 @@ void B2Client::shadeChange() } } -TQSize B2Client::minimumSize() const +TQSize B2Client::tqminimumSize() const { int left, right, top, bottom; borders(left, right, top, bottom); @@ -939,8 +939,8 @@ void B2Client::unobscureTitlebar() static void redraw_pixmaps() { int i; - TQColorGroup aGrp = options()->colorGroup(KDecoration::ColorButtonBg, true); - TQColorGroup iGrp = options()->colorGroup(KDecoration::ColorButtonBg, false); + TQColorGroup aGrp = options()->tqcolorGroup(KDecoration::ColorButtonBg, true); + TQColorGroup iGrp = options()->tqcolorGroup(KDecoration::ColorButtonBg, false); // close drawB2Rect(PIXMAP_A(P_CLOSE), aGrp.button(), false); @@ -961,8 +961,8 @@ static void redraw_pixmaps() TQColor color = is_act ? aGrp.button() : iGrp.button(); drawB2Rect(&thinBox, color, is_down); pix->fill(Qt::black); - bitBlt(pix, 0, 0, &thinBox, - 0, 0, thinBox.width(), thinBox.height(), Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&thinBox), + 0, 0, thinBox.width(), thinBox.height(), TQt::CopyROP, true); } // maximize @@ -984,12 +984,12 @@ static void redraw_pixmaps() drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down); drawB2Rect(&largeBox, is_act ? aGrp.button() : iGrp.button(), is_down); pix->fill(options()->color(KDecoration::ColorTitleBar, is_act)); - bitBlt(pix, pix->width() - 12, pix->width() - 12, &largeBox, - 0, 0, 12, 12, Qt::CopyROP, true); - bitBlt(pix, 0, 0, &smallBox, 0, 0, 10, 10, Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(pix), pix->width() - 12, pix->width() - 12, TQT_TQPAINTDEVICE(&largeBox), + 0, 0, 12, 12, TQt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(pix), 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); - bitBlt(pixmap[P_ICONIFY * NumStates + i], 0, 0, - &smallBox, 0, 0, 10, 10, Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(pixmap[P_ICONIFY * NumStates + i]), 0, 0, + TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); } // resize @@ -999,8 +999,8 @@ static void redraw_pixmaps() *pixmap[P_RESIZE * NumStates + i] = *pixmap[P_CLOSE * NumStates + i]; pixmap[P_RESIZE * NumStates + i]->detach(); drawB2Rect(&smallBox, is_act ? aGrp.button() : iGrp.button(), is_down); - bitBlt(pixmap[P_RESIZE * NumStates + i], - 0, 0, &smallBox, 0, 0, 10, 10, Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(pixmap[P_RESIZE * NumStates + i]), + 0, 0, TQT_TQPAINTDEVICE(&smallBox), 0, 0, 10, 10, TQt::CopyROP, true); } @@ -1107,7 +1107,7 @@ void B2Client::positionButtons() // Transparent bound stuff. static TQRect *visible_bound; -static TQPointArray bound_shape; +static TQPointArray bound_tqshape; bool B2Client::drawbound(const TQRect& geom, bool clear) { @@ -1132,7 +1132,7 @@ bool B2Client::drawbound(const TQRect& geom, bool clear) barLeft += 2; barRight -= 2; - bound_shape.putPoints(0, 8, + bound_tqshape.putPoints(0, 8, g.left(), frameTop, barLeft, frameTop, barLeft, g.top(), @@ -1146,8 +1146,8 @@ bool B2Client::drawbound(const TQRect& geom, bool clear) } TQPainter p(workspaceWidget()); p.setPen(TQPen(Qt::white, 5)); - p.setRasterOp(Qt::XorROP); - p.drawPolygon(bound_shape); + p.setRasterOp(TQt::XorROP); + p.drawPolygon(bound_tqshape); if (clear) { delete visible_bound; @@ -1158,26 +1158,26 @@ bool B2Client::drawbound(const TQRect& geom, bool clear) bool B2Client::eventFilter(TQObject *o, TQEvent *e) { - if (o != widget()) + if (TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget())) return false; switch (e->type()) { case TQEvent::Resize: - resizeEvent(static_cast< TQResizeEvent* >(e)); + resizeEvent(TQT_TQRESIZEEVENT(e)); return true; case TQEvent::Paint: - paintEvent(static_cast< TQPaintEvent* >(e)); + paintEvent(TQT_TQPAINTEVENT(e)); return true; case TQEvent::MouseButtonDblClick: - titlebar->mouseDoubleClickEvent(static_cast< TQMouseEvent* >(e)); + titlebar->mouseDoubleClickEvent(TQT_TQMOUSEEVENT(e)); return true; case TQEvent::Wheel: - titlebar->wheelEvent(static_cast< TQWheelEvent* >(e)); + titlebar->wheelEvent(TQT_TQWHEELEVENT(e)); return true; case TQEvent::MouseButtonPress: - processMousePressEvent(static_cast< TQMouseEvent* >(e)); + processMousePressEvent(TQT_TQMOUSEEVENT(e)); return true; case TQEvent::Show: - showEvent(static_cast< TQShowEvent* >(e)); + showEvent(TQT_TQSHOWEVENT(e)); return true; default: break; @@ -1192,7 +1192,7 @@ B2Button::B2Button(B2Client *_client, TQWidget *parent, : TQButton(parent, 0), hover(false) { setBackgroundMode(NoBackground); - setCursor(arrowCursor); + setCursor(tqarrowCursor); realizeButtons = realizeBtns; client = _client; useMiniIcon = false; @@ -1201,7 +1201,7 @@ B2Button::B2Button(B2Client *_client, TQWidget *parent, } -TQSize B2Button::sizeHint() const +TQSize B2Button::tqsizeHint() const { return TQSize(buttonSize, buttonSize); } @@ -1252,14 +1252,14 @@ void B2Button::setPixmaps(int button_id) for (int i = 0; i < NumStates; i++) { icon[i] = B2::pixmap[button_id + i]; } - repaint(false); + tqrepaint(false); } void B2Button::mousePressEvent(TQMouseEvent * e) { last_button = e->button(); TQMouseEvent me(e->type(), e->pos(), e->globalPos(), - (e->button() & realizeButtons) ? LeftButton : NoButton, + (e->button() & realizeButtons) ? Qt::LeftButton : Qt::NoButton, e->state()); TQButton::mousePressEvent(&me); } @@ -1268,7 +1268,7 @@ void B2Button::mouseReleaseEvent(TQMouseEvent * e) { last_button = e->button(); TQMouseEvent me(e->type(), e->pos(), e->globalPos(), - (e->button() & realizeButtons) ? LeftButton : NoButton, + (e->button() & realizeButtons) ? Qt::LeftButton : Qt::NoButton, e->state()); TQButton::mouseReleaseEvent(&me); } @@ -1276,21 +1276,21 @@ void B2Button::mouseReleaseEvent(TQMouseEvent * e) void B2Button::enterEvent(TQEvent *e) { hover = true; - repaint(false); + tqrepaint(false); TQButton::enterEvent(e); } void B2Button::leaveEvent(TQEvent *e) { hover = false; - repaint(false); + tqrepaint(false); TQButton::leaveEvent(e); } // ===================================== B2Titlebar::B2Titlebar(B2Client *parent) - : TQWidget(parent->widget(), 0, WStyle_Customize | WRepaintNoErase), + : TQWidget(parent->widget(), 0, (WFlags)(WStyle_Customize | WRepaintNoErase)), client(parent), set_x11mask(false), isfullyobscured(false), shift_move(false) { @@ -1342,7 +1342,7 @@ void B2Titlebar::drawTitlebar(TQPainter &p, bool state) // titlebar fill const TQColorGroup cg = - options()->colorGroup(KDecoration::ColorTitleBar, state); + options()->tqcolorGroup(KDecoration::ColorTitleBar, state); TQBrush brush(cg.background()); if (gradient) brush.setPixmap(*gradient); qDrawShadeRect(&p, 1, 1, t.right() - 1, t.height() - 1, @@ -1367,15 +1367,15 @@ void B2Titlebar::recalcBuffer() void B2Titlebar::resizeEvent(TQResizeEvent *) { recalcBuffer(); - repaint(false); + tqrepaint(false); } void B2Titlebar::paintEvent(TQPaintEvent *) { if(client->isActive()) - bitBlt(this, 0, 0, &titleBuffer, 0, 0, titleBuffer.width(), - titleBuffer.height(), Qt::CopyROP, true); + bitBlt(TQT_TQPAINTDEVICE(this), 0, 0, TQT_TQPAINTDEVICE(&titleBuffer), 0, 0, titleBuffer.width(), + titleBuffer.height(), TQt::CopyROP, true); else { TQPainter p(this); drawTitlebar(p, false); @@ -1384,14 +1384,14 @@ void B2Titlebar::paintEvent(TQPaintEvent *) void B2Titlebar::mouseDoubleClickEvent(TQMouseEvent *e) { - if (e->button() == LeftButton && e->y() < height()) { + if (e->button() == Qt::LeftButton && e->y() < height()) { client->titlebarDblClickOperation(); } } void B2Titlebar::wheelEvent(TQWheelEvent *e) { - if (client->isSetShade() || rect().contains(e->pos())) + if (client->isSetShade() || TQT_TQRECT_OBJECT(rect()).tqcontains(e->pos())) client->titlebarMouseWheelOperation( e->delta()); } diff --git a/kwin/clients/b2/b2client.h b/kwin/clients/b2/b2client.h index 198dfbb9b..e7616157c 100644 --- a/kwin/clients/b2/b2client.h +++ b/kwin/clients/b2/b2client.h @@ -25,10 +25,10 @@ namespace B2 { class B2Client; -class B2Button : public QButton +class B2Button : public TQButton { public: - B2Button(B2Client *_client=0, TQWidget *parent=0, const TQString& tip=NULL, const int realizeBtns = LeftButton); + B2Button(B2Client *_client=0, TQWidget *parent=0, const TQString& tip=NULL, const int realizeBtns = Qt::LeftButton); ~B2Button() {}; void setBg(const TQColor &c){bg = c;} @@ -38,7 +38,7 @@ public: void setToggle(){setToggleType(Toggle);} void setActive(bool on){setOn(on);} void setUseMiniIcon(){useMiniIcon = true;} - TQSize sizeHint() const; + TQSize tqsizeHint() const; TQSizePolicy sizePolicy() const; protected: virtual void drawButton(TQPainter *p); @@ -61,7 +61,7 @@ public: bool hover; }; -class B2Titlebar : public QWidget +class B2Titlebar : public TQWidget { friend class B2Client; public: @@ -119,7 +119,7 @@ protected: Position mousePosition( const TQPoint& p ) const; void resize(const TQSize&); void borders(int &, int &, int &, int &) const; - TQSize minimumSize() const; + TQSize tqminimumSize() const; bool eventFilter(TQObject *, TQEvent *); private slots: void menuButtonPressed(); diff --git a/kwin/clients/b2/config/config.h b/kwin/clients/b2/config/config.h index 92c255ae6..99d664ad1 100644 --- a/kwin/clients/b2/config/config.h +++ b/kwin/clients/b2/config/config.h @@ -16,7 +16,7 @@ #include #include -class B2Config: public QObject +class B2Config: public TQObject { Q_OBJECT diff --git a/kwin/clients/default/config/config.h b/kwin/clients/default/config/config.h index 5857910b1..733b96141 100644 --- a/kwin/clients/default/config/config.h +++ b/kwin/clients/default/config/config.h @@ -17,7 +17,7 @@ #include #include -class KDEDefaultConfig: public QObject +class KDEDefaultConfig: public TQObject { Q_OBJECT diff --git a/kwin/clients/default/kdedefault.cpp b/kwin/clients/default/kdedefault.cpp index d91ccf56b..f3b8fa2ba 100644 --- a/kwin/clients/default/kdedefault.cpp +++ b/kwin/clients/default/kdedefault.cpp @@ -240,7 +240,7 @@ unsigned long KDEDefaultHandler::readConfig( bool update ) || new_useGradients != useGradients || new_titleHeight != normalTitleHeight || new_toolTitleHeight != toolTitleHeight ) - changed |= SettingColors; // just recreate the pixmaps and repaint + changed |= SettingColors; // just recreate the pixmaps and tqrepaint } showGrabBar = new_showGrabBar; @@ -328,7 +328,7 @@ void KDEDefaultHandler::createPixmaps() TQPainter p; // Active pins - g = options()->colorGroup( ColorButtonBg, true ); + g = options()->tqcolorGroup( ColorButtonBg, true ); pinUpPix = new KPixmap(); pinUpPix->resize(16, 16); p.begin( pinUpPix ); @@ -346,7 +346,7 @@ void KDEDefaultHandler::createPixmaps() pinDownPix->setMask( TQBitmap(16, 16, pindown_mask_bits, true) ); // Inactive pins - g = options()->colorGroup( ColorButtonBg, false ); + g = options()->tqcolorGroup( ColorButtonBg, false ); ipinUpPix = new KPixmap(); ipinUpPix->resize(16, 16); p.begin( ipinUpPix ); @@ -404,25 +404,25 @@ void KDEDefaultHandler::createPixmaps() irightBtnDownPix[false]->resize(toolTitleHeight, toolTitleHeight); // Draw the button state pixmaps - g = options()->colorGroup( ColorTitleBar, true ); + g = options()->tqcolorGroup( ColorTitleBar, true ); drawButtonBackground( leftBtnUpPix[true], g, false ); drawButtonBackground( leftBtnDownPix[true], g, true ); drawButtonBackground( leftBtnUpPix[false], g, false ); drawButtonBackground( leftBtnDownPix[false], g, true ); - g = options()->colorGroup( ColorButtonBg, true ); + g = options()->tqcolorGroup( ColorButtonBg, true ); drawButtonBackground( rightBtnUpPix[true], g, false ); drawButtonBackground( rightBtnDownPix[true], g, true ); drawButtonBackground( rightBtnUpPix[false], g, false ); drawButtonBackground( rightBtnDownPix[false], g, true ); - g = options()->colorGroup( ColorTitleBar, false ); + g = options()->tqcolorGroup( ColorTitleBar, false ); drawButtonBackground( ileftBtnUpPix[true], g, false ); drawButtonBackground( ileftBtnDownPix[true], g, true ); drawButtonBackground( ileftBtnUpPix[false], g, false ); drawButtonBackground( ileftBtnDownPix[false], g, true ); - g = options()->colorGroup( ColorButtonBg, false ); + g = options()->tqcolorGroup( ColorButtonBg, false ); drawButtonBackground( irightBtnUpPix[true], g, false ); drawButtonBackground( irightBtnDownPix[true], g, true ); drawButtonBackground( irightBtnUpPix[false], g, false ); @@ -676,7 +676,7 @@ void KDEDefaultButton::drawButton(TQPainter *p) // otherwise we paint a menu button (with mini icon), or a sticky button. if( deco ) { // Select the appropriate button decoration color - bool darkDeco = qGray( KDecoration::options()->color( + bool darkDeco = tqGray( KDecoration::options()->color( isLeft() ? KDecoration::ColorTitleBar : KDecoration::ColorButtonBg, active).rgb() ) > 127; @@ -708,7 +708,7 @@ void KDEDefaultButton::drawButton(TQPainter *p) // Smooth scale the pixmap for small titlebars // This is slow, but we assume this isn't done too often if ( width() < 16 ) { - btnpix.convertFromImage(btnpix.convertToImage().smoothScale(12, 12)); + btnpix.convertFromImage(TQImage(btnpix.convertToImage()).smoothScale(12, 12)); p->drawPixmap( 0, 0, btnpix ); } else @@ -720,7 +720,7 @@ void KDEDefaultButton::drawButton(TQPainter *p) void KDEDefaultButton::enterEvent(TQEvent *e) { isMouseOver=true; - repaint(false); + tqrepaint(false); TQButton::enterEvent(e); } @@ -728,7 +728,7 @@ void KDEDefaultButton::enterEvent(TQEvent *e) void KDEDefaultButton::leaveEvent(TQEvent *e) { isMouseOver=false; - repaint(false); + tqrepaint(false); TQButton::leaveEvent(e); } @@ -856,7 +856,7 @@ void KDEDefaultClient::init() void KDEDefaultClient::reset( unsigned long changed) { - widget()->repaint(); + widget()->tqrepaint(); KCommonDecoration::reset(changed); } @@ -909,7 +909,7 @@ void KDEDefaultClient::paintEvent( TQPaintEvent* ) p.drawRect(x,y,w,h); // Draw part of the frame that is the titlebar color - g = options()->colorGroup(ColorTitleBar, isActive()); + g = options()->tqcolorGroup(ColorTitleBar, isActive()); p.setPen(g.light()); p.drawLine(x+1, y+1, rightOffset-1, y+1); p.drawLine(x+1, y+1, x+1, leftFrameStart+borderWidth-4); @@ -929,7 +929,7 @@ void KDEDefaultClient::paintEvent( TQPaintEvent* ) p.drawLine(x+borderWidth-2, y+titleHeight+3, x+borderWidth-2, leftFrameStart-2); // Fill out the border edges - g = options()->colorGroup(ColorFrame, isActive()); + g = options()->tqcolorGroup(ColorFrame, isActive()); p.setPen(g.light()); p.drawLine(rightOffset, y+1, x2-1, y+1); p.drawLine(x+1, leftFrameStart+borderWidth-3, x+1, y2-1); diff --git a/kwin/clients/keramik/config/keramikconfig.ui b/kwin/clients/keramik/config/keramikconfig.ui index f074a00b8..f24d15952 100644 --- a/kwin/clients/keramik/config/keramikconfig.ui +++ b/kwin/clients/keramik/config/keramikconfig.ui @@ -1,6 +1,6 @@ KeramikConfigUI - + KeramikConfigUI @@ -22,7 +22,7 @@ unnamed - + showAppIcons @@ -33,7 +33,7 @@ Check this option if you want the window icon to be displayed in the caption bubble next to the titlebar text. - + smallCaptions @@ -44,7 +44,7 @@ Check this option if you want the caption bubble to have the same size on active windows that it has on inactive ones. This option is useful for laptops or low resolution displays where you want maximize the amount of space available to the window contents. - + largeGrabBars @@ -55,7 +55,7 @@ Check this option if you want a grab bar to be drawn below windows. When this option is not selected only a thin border will be drawn in its place. - + useShadowedText diff --git a/kwin/clients/keramik/embedtool.cpp b/kwin/clients/keramik/embedtool.cpp index 4f5135a3f..415862842 100644 --- a/kwin/clients/keramik/embedtool.cpp +++ b/kwin/clients/keramik/embedtool.cpp @@ -1,7 +1,7 @@ /* * Keramik KWin embed tool (version 1.0) * - * Copyright (C) 2002 Fredrik Höglund + * Copyright (C) 2002 Fredrik H�glund * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -60,13 +60,13 @@ private: KeramikEmbedder::KeramikEmbedder() { - TQDateTime date( TQDateTime::currentDateTime() ); + TQDateTime date( TQDateTime::tqcurrentDateTime() ); TQString datestring( date.toString() ); file = new TQFile( "tiles.h" ); file->open( IO_WriteOnly | IO_Truncate ); - stream.setDevice( file ); + stream.setDevice( TQT_TQIODEVICE(file) ); stream << "/*\n"; stream << " * Generated by embedtool 1.0 on " << datestring << endl; @@ -100,19 +100,19 @@ void KeramikEmbedder::embed( const char *name ) TQString codename( basename ); TQImage image( name ); - codename = codename.replace( TQRegExp("[^a-zA-Z0-9]"), "_" ); + codename = codename.tqreplace( TQRegExp("[^a-zA-Z0-9]"), "_" ); stream << "\tstatic const QRgb " << codename << "_data[] = {" << endl << "\t\t"; stream.setf( TQTextStream::hex | TQTextStream::right ); stream.fill( '0' ); int pixels = image.width() * image.height(); - Q_UINT32 *data = reinterpret_cast( image.bits() ); + TQ_UINT32 *data = reinterpret_cast( image.bits() ); bool hasAlpha = false; for ( int i = 0, j = 0; i < pixels; i++ ) { - if ( qAlpha( *data ) && qAlpha( *data ) != 0xff ) + if ( tqAlpha( *data ) && tqAlpha( *data ) != 0xff ) hasAlpha = true; stream << "0x" << qSetW(8) << *(data++); @@ -174,12 +174,12 @@ void KeramikEmbedder::writeIndex() stream << "\tclass KeramikImageDb {\n"; stream << "\tprivate:\n"; stream << "\t\tstatic KeramikImageDb *m_inst;\n"; - stream << "\t\tQDict *db;\n\n"; + stream << "\t\tTQDict *db;\n\n"; stream << "\t\tKeramikImageDb() {\n"; stream << "\t\t\tdb = new TQDict( " << prime << " );\n"; stream << "\t\t\tdb->setAutoDelete( true );\n\n"; stream << "\t\t\tfor ( int i = 0; i < " << index->count() << "; i++ ) {\n"; - stream << "\t\t\t\tQImage *img = new TQImage( (uchar*)image_db[i].data,\n"; + stream << "\t\t\t\tTQImage *img = new TQImage( (uchar*)image_db[i].data,\n"; stream << "\t\t\t\t\t\timage_db[i].width, image_db[i].height,\n"; stream << "\t\t\t\t\t\t32, NULL, 0, TQImage::LittleEndian );\n\n"; stream << "\t\t\t\tif ( image_db[i].alpha )\n"; @@ -199,8 +199,8 @@ void KeramikEmbedder::writeIndex() stream << "\t\t\tif ( m_inst ) delete m_inst;\n"; stream << "\t\t\tm_inst = NULL;\n"; stream << "\t\t}\n\n"; - stream << "\t\tQImage *image( const TQString &name ) const {\n"; - stream << "\t\t\treturn db->find( name );\n"; + stream << "\t\tTQImage *image( const TQString &name ) const {\n"; + stream << "\t\t\treturn db->tqfind( name );\n"; stream << "\t\t}\n\n"; stream << "\t}; // class KeramikImageDb\n\n"; stream << "\tKeramikImageDb *KeramikImageDb::m_inst = NULL;\n\n"; diff --git a/kwin/clients/keramik/keramik.cpp b/kwin/clients/keramik/keramik.cpp index 48a187098..2d5f111c8 100644 --- a/kwin/clients/keramik/keramik.cpp +++ b/kwin/clients/keramik/keramik.cpp @@ -585,39 +585,39 @@ TQPixmap *KeramikHandler::composite( TQImage *over, TQImage *under ) int width = over->width(), height = over->height(); // Clear the destination image - Q_UINT32 *data = reinterpret_cast( dest.bits() ); + TQ_UINT32 *data = reinterpret_cast( dest.bits() ); for (int i = 0; i < width * height; i++) *(data++) = 0; // Copy the under image (bottom aligned) to the destination image for (int y1 = height - under->height(), y2 = 0; y1 < height; y1++, y2++ ) { - register Q_UINT32 *dst = reinterpret_cast( dest.scanLine(y1) ); - register Q_UINT32 *src = reinterpret_cast( under->scanLine(y2) ); + register TQ_UINT32 *dst = reinterpret_cast( dest.scanLine(y1) ); + register TQ_UINT32 *src = reinterpret_cast( under->scanLine(y2) ); for ( int x = 0; x < width; x++ ) *(dst++) = *(src++); } // Blend the over image onto the destination - register Q_UINT32 *dst = reinterpret_cast( dest.bits() ); - register Q_UINT32 *src = reinterpret_cast( over->bits() ); + register TQ_UINT32 *dst = reinterpret_cast( dest.bits() ); + register TQ_UINT32 *src = reinterpret_cast( over->bits() ); for ( int i = 0; i < width * height; i++ ) { - int r1 = qRed( *dst ), g1 = qGreen( *dst ), b1 = qBlue( *dst ); - int r2 = qRed( *src ), g2 = qGreen( *src ), b2 = qBlue( *src ); - int a = qAlpha( *src ); + int r1 = tqRed( *dst ), g1 = tqGreen( *dst ), b1 = tqBlue( *dst ); + int r2 = tqRed( *src ), g2 = tqGreen( *src ), b2 = tqBlue( *src ); + int a = tqAlpha( *src ); if ( a == 0xff ) *dst = *src; else if ( a != 0x00 ) - *dst = qRgba( Q_UINT8( r1 + (((r2 - r1) * a) >> 8) ), - Q_UINT8( g1 + (((g2 - g1) * a) >> 8) ), - Q_UINT8( b1 + (((b2 - b1) * a) >> 8) ), + *dst = tqRgba( TQ_UINT8( r1 + (((r2 - r1) * a) >> 8) ), + TQ_UINT8( g1 + (((g2 - g1) * a) >> 8) ), + TQ_UINT8( b1 + (((b2 - b1) * a) >> 8) ), 0xff ); - else if ( qAlpha(*dst) == 0x00 ) + else if ( tqAlpha(*dst) == 0x00 ) *dst = 0; src++; dst++; @@ -758,13 +758,13 @@ TQValueList< KeramikHandler::BorderSize > KeramikHandler::borderSizes() const KeramikButton::KeramikButton( KeramikClient* c, const char *name, Button btn, const TQString &tip, const int realizeBtns ) : TQButton( c->widget(), name ), - client( c ), button( btn ), hover( false ), lastbutton( NoButton ) + client( c ), button( btn ), hover( false ), lastbutton( Qt::NoButton ) { realizeButtons = realizeBtns; TQToolTip::add( this, tip ); // FRAME setBackgroundMode( NoBackground ); - setCursor( arrowCursor ); + setCursor( tqarrowCursor ); int size = clientHandler->roundButton()->height(); setFixedSize( size, size ); @@ -783,7 +783,7 @@ void KeramikButton::enterEvent( TQEvent *e ) TQButton::enterEvent( e ); hover = true; - repaint( false ); + tqrepaint( false ); } @@ -792,14 +792,14 @@ void KeramikButton::leaveEvent( TQEvent *e ) TQButton::leaveEvent( e ); hover = false; - repaint( false ); + tqrepaint( false ); } void KeramikButton::mousePressEvent( TQMouseEvent *e ) { lastbutton = e->button(); - TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?LeftButton:NoButton, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state() ); TQButton::mousePressEvent( &me ); } @@ -807,7 +807,7 @@ void KeramikButton::mousePressEvent( TQMouseEvent *e ) void KeramikButton::mouseReleaseEvent( TQMouseEvent *e ) { lastbutton = e->button(); - TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?LeftButton:NoButton, e->state() ); + TQMouseEvent me( e->type(), e->pos(), e->globalPos(), (e->button()&realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state() ); TQButton::mouseReleaseEvent( &me ); } @@ -831,14 +831,14 @@ void KeramikButton::drawButton( TQPainter *p ) if ( isDown() ) { // Pressed - p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(2*size, 0, size, size), pix->rect() ) ); + p->drawPixmap( TQPoint(), *pix, TQStyle::tqvisualRect( TQRect(2*size, 0, size, size), pix->rect() ) ); p->translate( TQApplication::reverseLayout() ? -1 : 1, 1 ); } else if ( hover ) // Mouse over - p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(size, 0, size, size), pix->rect() ) ); + p->drawPixmap( TQPoint(), *pix, TQStyle::tqvisualRect( TQRect(size, 0, size, size), pix->rect() ) ); else // Normal - p->drawPixmap( TQPoint(), *pix, TQStyle::visualRect( TQRect(0, 0, size, size), pix->rect() ) ); + p->drawPixmap( TQPoint(), *pix, TQStyle::tqvisualRect( TQRect(0, 0, size, size), pix->rect() ) ); // Draw the button deco on the bevel @@ -909,7 +909,7 @@ void KeramikClient::init() connect( this, TQT_SIGNAL( keepAboveChanged( bool )), TQT_SLOT( keepAboveChange( bool ))); connect( this, TQT_SIGNAL( keepBelowChanged( bool )), TQT_SLOT( keepBelowChange( bool ))); - createMainWidget( WStaticContents | WResizeNoErase | WRepaintNoErase ); + createMainWidget( (WFlags)(WStaticContents | WResizeNoErase | WRepaintNoErase) ); widget()->installEventFilter( this ); // Minimize flicker @@ -1013,13 +1013,13 @@ void KeramikClient::reset( unsigned long ) captionBufferDirty = maskDirty = true; - // Only repaint the window if it's visible + // Only tqrepaint the window if it's visible // (i.e. not minimized and on the current desktop) if ( widget()->isVisible() ) { - widget()->repaint( false ); + widget()->tqrepaint( false ); for ( int i = 0; i < NumButtons; i++ ) - if ( button[i] ) button[i]->repaint( false ); + if ( button[i] ) button[i]->tqrepaint( false ); } } @@ -1033,7 +1033,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) // Menu button case 'M' : if ( !button[MenuButton] ) { - button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), LeftButton|RightButton ); + button[MenuButton] = new KeramikButton( this, "menu", MenuButton, i18n("Menu"), Qt::LeftButton|Qt::RightButton ); connect( button[MenuButton], TQT_SIGNAL( pressed() ), TQT_SLOT( menuButtonPressed() ) ); layout->addWidget( button[MenuButton] ); } @@ -1072,7 +1072,7 @@ void KeramikClient::addButtons( TQBoxLayout *layout, const TQString &s ) // Maximize button case 'A' : if ( !button[MaxButton] && isMaximizable() ) { - button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), LeftButton|MidButton|RightButton ); + button[MaxButton] = new KeramikButton( this, "maximize", MaxButton, i18n("Maximize"), Qt::LeftButton|Qt::MidButton|Qt::RightButton ); connect( button[MaxButton], TQT_SIGNAL( clicked() ), TQT_SLOT( slotMaximize() ) ); layout->addWidget( button[MaxButton] ); } @@ -1260,7 +1260,7 @@ void KeramikClient::updateCaptionBuffer() ( clientHandler->showAppIcons() ? 16 + iconSpacing : 0 ); int xpos = QMAX( (captionRect.width() - tw) / 3, 8 ); - TQRect tr = TQStyle::visualRect( TQRect(xpos, 1, captionRect.width() - xpos - 10, + TQRect tr = TQStyle::tqvisualRect( TQRect(xpos, 1, captionRect.width() - xpos - 10, captionRect.height() - 4), captionBuffer.rect() ); //p.setPen( Qt::red ); // debug @@ -1269,7 +1269,7 @@ void KeramikClient::updateCaptionBuffer() // Application icon if ( clientHandler->showAppIcons() ) { - TQRect iconRect = TQStyle::visualRect( TQRect(tr.x(), + TQRect iconRect = TQStyle::tqvisualRect( TQRect(tr.x(), 1 + (captionRect.height() - 4 - 16) / 2, 16, 16), tr ); TQRect r( icon->rect() ); r.moveCenter( iconRect.center() ); @@ -1304,7 +1304,7 @@ void KeramikClient::updateCaptionBuffer() { p.translate( TQApplication::reverseLayout() ? -1 : 1, 1 ); //p.setPen( options()->color(ColorTitleBar, active).dark() ); - if (qGray(options()->color(ColorFont, active).rgb()) < 100) + if (tqGray(options()->color(ColorFont, active).rgb()) < 100) p.setPen( TQColor(200,200,200) ); else p.setPen( black ); @@ -1329,7 +1329,7 @@ void KeramikClient::calculateCaptionRect() cw += 16 + 4; // icon width + space cw = QMIN( cw, titlebar->geometry().width() ); - captionRect = TQStyle::visualRect( TQRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY), + captionRect = TQStyle::tqvisualRect( TQRect(titlebar->geometry().x(), (largeCaption ? 0 : titleBaseY), cw, clientHandler->titleBarHeight(largeCaption) ), titlebar->geometry() ); } @@ -1345,7 +1345,7 @@ void KeramikClient::captionChange() captionBufferDirty = true; - widget()->repaint( r | captionRect, false ); + widget()->tqrepaint( r | captionRect, false ); } @@ -1361,7 +1361,7 @@ void KeramikClient::iconChange() activeIcon = inactiveIcon = NULL; captionBufferDirty = true; - widget()->repaint( captionRect, false ); + widget()->tqrepaint( captionRect, false ); } } @@ -1380,10 +1380,10 @@ void KeramikClient::activeChange() captionBufferDirty = true; - widget()->repaint( false ); + widget()->tqrepaint( false ); for ( int i=0; i < NumButtons; i++ ) - if ( button[i] ) button[i]->repaint( false ); + if ( button[i] ) button[i]->tqrepaint( false ); } @@ -1400,7 +1400,7 @@ void KeramikClient::maximizeChange() captionBufferDirty = maskDirty = true; widget()->layout()->activate(); - widget()->repaint( false ); + widget()->tqrepaint( false ); } else if (( maximizeMode() & MaximizeVertical ) == 0 && !largeTitlebar ) { // We've been restored - enlarge the titlebar by 3 pixels topSpacer->changeSize( 10, 4, TQSizePolicy::Expanding, TQSizePolicy::Minimum ); @@ -1410,14 +1410,14 @@ void KeramikClient::maximizeChange() captionBufferDirty = maskDirty = true; widget()->layout()->activate(); - widget()->repaint( false ); + widget()->tqrepaint( false ); } } if ( button[ MaxButton ] ) { TQToolTip::remove( button[ MaxButton ] ); TQToolTip::add( button[ MaxButton ], maximizeMode() == MaximizeFull ? i18n("Restore") : i18n("Maximize") ); - button[ MaxButton ]->repaint(); + button[ MaxButton ]->tqrepaint(); } } @@ -1426,7 +1426,7 @@ void KeramikClient::desktopChange() { if ( button[ OnAllDesktopsButton ] ) { - button[ OnAllDesktopsButton ]->repaint( true ); + button[ OnAllDesktopsButton ]->tqrepaint( true ); TQToolTip::remove( button[ OnAllDesktopsButton ] ); TQToolTip::add( button[ OnAllDesktopsButton ], isOnAllDesktops() ? i18n("Not on all desktops") : i18n("On all desktops") ); } @@ -1437,7 +1437,7 @@ void KeramikClient::shadeChange() { if ( button[ ShadeButton ] ) { - button[ ShadeButton ]->repaint( true ); + button[ ShadeButton ]->tqrepaint( true ); TQToolTip::remove( button[ ShadeButton ] ); TQToolTip::add( button[ ShadeButton ], isSetShade() ? i18n("Unshade") : i18n("Shade") ); } @@ -1447,14 +1447,14 @@ void KeramikClient::shadeChange() void KeramikClient::keepAboveChange( bool ) { if ( button[ AboveButton ] ) - button[ AboveButton ]->repaint( true ); + button[ AboveButton ]->tqrepaint( true ); } void KeramikClient::keepBelowChange( bool ) { if ( button[ BelowButton ] ) - button[ BelowButton ]->repaint( true ); + button[ BelowButton ]->tqrepaint( true ); } @@ -1482,21 +1482,21 @@ void KeramikClient::slotMaximize() void KeramikClient::slotAbove() { setKeepAbove( !keepAbove()); - button[ AboveButton ]->repaint( true ); + button[ AboveButton ]->tqrepaint( true ); } void KeramikClient::slotBelow() { setKeepBelow( !keepBelow()); - button[ BelowButton ]->repaint( true ); + button[ BelowButton ]->tqrepaint( true ); } void KeramikClient::slotShade() { setShade( !isSetShade()); - button[ ShadeButton ]->repaint( true ); + button[ ShadeButton ]->tqrepaint( true ); } @@ -1656,15 +1656,15 @@ void KeramikClient::resizeEvent( TQResizeEvent *e ) void KeramikClient::mouseDoubleClickEvent( TQMouseEvent *e ) { - if ( e->button() == LeftButton - && TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) ) + if ( e->button() == Qt::LeftButton + && TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).tqcontains( e->pos() ) ) titlebarDblClickOperation(); } void KeramikClient::wheelEvent( TQWheelEvent *e ) { if (isSetShade() - || TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).contains( e->pos() ) ) + || TQRect( 0, 0, width(), clientHandler->titleBarHeight( largeTitlebar ) ).tqcontains( e->pos() ) ) titlebarMouseWheelOperation( e->delta()); } @@ -1774,37 +1774,37 @@ void KeramikClient::borders( int& left, int& right, int& top, int& bottom ) cons } -TQSize KeramikClient::minimumSize() const +TQSize KeramikClient::tqminimumSize() const { - return widget()->minimumSize(); + return widget()->tqminimumSize(); } bool KeramikClient::eventFilter( TQObject* o, TQEvent* e ) { - if ( o != widget() ) + if ( TQT_BASE_OBJECT(o) != TQT_BASE_OBJECT(widget()) ) return false; switch ( e->type() ) { case TQEvent::Resize: - resizeEvent( static_cast< TQResizeEvent* >( e ) ); + resizeEvent( TQT_TQRESIZEEVENT( e ) ); return true; case TQEvent::Paint: - paintEvent( static_cast< TQPaintEvent* >( e ) ); + paintEvent( TQT_TQPAINTEVENT( e ) ); return true; case TQEvent::MouseButtonDblClick: - mouseDoubleClickEvent( static_cast< TQMouseEvent* >( e ) ); + mouseDoubleClickEvent( TQT_TQMOUSEEVENT( e ) ); return true; case TQEvent::MouseButtonPress: - processMousePressEvent( static_cast< TQMouseEvent* >( e ) ); + processMousePressEvent( TQT_TQMOUSEEVENT( e ) ); return true; case TQEvent::Wheel: - wheelEvent( static_cast< TQWheelEvent* >( e )); + wheelEvent( TQT_TQWHEELEVENT( e )); return true; default: diff --git a/kwin/clients/keramik/keramik.h b/kwin/clients/keramik/keramik.h index c90d3509f..e4b1df5f5 100644 --- a/kwin/clients/keramik/keramik.h +++ b/kwin/clients/keramik/keramik.h @@ -2,7 +2,7 @@ * * Keramik KWin client (version 0.8) * - * Copyright (C) 2002 Fredrik Höglund + * Copyright (C) 2002 Fredrik H�glund * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -111,10 +111,10 @@ namespace Keramik { }; // class KeramikHandler class KeramikClient; - class KeramikButton : public QButton + class KeramikButton : public TQButton { public: - KeramikButton( KeramikClient *, const char *, Button, const TQString &, const int realizeBtns = LeftButton ); + KeramikButton( KeramikClient *, const char *, Button, const TQString &, const int realizeBtns = Qt::LeftButton ); ~KeramikButton(); ButtonState lastButton() const { return lastbutton; } @@ -148,7 +148,7 @@ namespace Keramik { virtual Position mousePosition( const TQPoint& p ) const; virtual void borders( int& left, int& right, int& top, int& bottom ) const; virtual void resize( const TQSize& s ); - virtual TQSize minimumSize() const; + virtual TQSize tqminimumSize() const; virtual bool eventFilter( TQObject* o, TQEvent* e ); virtual void activeChange(); virtual void captionChange(); diff --git a/kwin/clients/kwmtheme/cli_installer/main.cpp b/kwin/clients/kwmtheme/cli_installer/main.cpp index abf2bad3d..56de8c9fe 100644 --- a/kwin/clients/kwmtheme/cli_installer/main.cpp +++ b/kwin/clients/kwmtheme/cli_installer/main.cpp @@ -73,36 +73,36 @@ int main(int argc, char **argv) input.setGroup("Window Border"); output->setGroup("General"); - tmpStr = input.readEntry("shapePixmapTop"); + tmpStr = input.readEntry("tqshapePixmapTop"); if(!tmpStr.isEmpty()){ copy(srcStr+tmpStr, localDirStr+tmpStr); } output->writeEntry("wm_top", tmpStr, true, true); - tmpStr = input.readEntry("shapePixmapBottom"); + tmpStr = input.readEntry("tqshapePixmapBottom"); if(!tmpStr.isEmpty()) copy(srcStr+tmpStr, localDirStr+tmpStr); output->writeEntry("wm_bottom", tmpStr, true, true); - tmpStr = input.readEntry("shapePixmapLeft"); + tmpStr = input.readEntry("tqshapePixmapLeft"); if(!tmpStr.isEmpty()) copy(srcStr+tmpStr, localDirStr+tmpStr); output->writeEntry("wm_left", tmpStr, true, true); - tmpStr = input.readEntry("shapePixmapRight"); + tmpStr = input.readEntry("tqshapePixmapRight"); if(!tmpStr.isEmpty()) copy(srcStr+tmpStr, localDirStr+tmpStr); output->writeEntry("wm_right", tmpStr, true, true); - tmpStr = input.readEntry("shapePixmapTopLeft"); + tmpStr = input.readEntry("tqshapePixmapTopLeft"); if(!tmpStr.isEmpty()) copy(srcStr+tmpStr, localDirStr+tmpStr); output->writeEntry("wm_topleft", tmpStr, true, true); - tmpStr = input.readEntry("shapePixmapTopRight"); + tmpStr = input.readEntry("tqshapePixmapTopRight"); if(!tmpStr.isEmpty()) copy(srcStr+tmpStr, localDirStr+tmpStr); output->writeEntry("wm_topright", tmpStr, true, true); - tmpStr = input.readEntry("shapePixmapBottomLeft"); + tmpStr = input.readEntry("tqshapePixmapBottomLeft"); if(!tmpStr.isEmpty()) copy(srcStr+tmpStr, localDirStr+tmpStr); output->writeEntry("wm_bottomleft", tmpStr, true, true); - tmpStr = input.readEntry("shapePixmapBottomRight"); + tmpStr = input.readEntry("tqshapePixmapBottomRight"); if(!tmpStr.isEmpty()) copy(srcStr+tmpStr, localDirStr+tmpStr); output->writeEntry("wm_bottomright", tmpStr, true, true); diff --git a/kwin/clients/kwmtheme/kwmthemeclient.cpp b/kwin/clients/kwmtheme/kwmthemeclient.cpp index 89dc6a564..0293d47c4 100644 --- a/kwin/clients/kwmtheme/kwmthemeclient.cpp +++ b/kwin/clients/kwmtheme/kwmthemeclient.cpp @@ -231,7 +231,7 @@ void MyButton::drawButtonLabel(TQPainter *p) int offset = (isDown() && ((pixmap()->width() >= width()) || (pixmap()->height() >= height()))) ? 1 : 0; style().drawItem(p, TQRect( offset, offset, width(), height() ), - AlignCenter, colorGroup(), + AlignCenter, tqcolorGroup(), true, pixmap(), TQString::null); } } @@ -364,7 +364,7 @@ void KWMThemeClient::drawTitle(TQPainter &dest) p.begin(&buffer); if(titleSunken){ - qDrawShadeRect(&p, r, options()->colorGroup(KDecorationOptions::ColorFrame, isActive()), + qDrawShadeRect(&p, r, options()->tqcolorGroup(KDecorationOptions::ColorFrame, isActive()), true, 1, 0); r.setRect(r.x()+1, r.y()+1, r.width()-2, r.height()-2); } @@ -384,7 +384,7 @@ void KWMThemeClient::drawTitle(TQPainter &dest) p.drawTiledPixmap(r, *fill); } else{ - p.fillRect(r, options()->colorGroup(KDecorationOptions::ColorTitleBar, isActive()). + p.fillRect(r, options()->tqcolorGroup(KDecorationOptions::ColorTitleBar, isActive()). brush(TQColorGroup::Button)); } p.setFont(options()->font(isActive())); @@ -402,12 +402,12 @@ void KWMThemeClient::drawTitle(TQPainter &dest) void KWMThemeClient::resizeEvent( TQResizeEvent* ) { doShape(); - widget()->repaint(); + widget()->tqrepaint(); } void KWMThemeClient::captionChange() { - widget()->repaint( titlebar->geometry(), false ); + widget()->tqrepaint( titlebar->geometry(), false ); } void KWMThemeClient::paintEvent( TQPaintEvent *) @@ -557,7 +557,7 @@ void KWMThemeClient::paintEvent( TQPaintEvent *) } drawTitle(p); - TQColor c = widget()->colorGroup().background(); + TQColor c = widget()->tqcolorGroup().background(); // KWM evidently had a 1 pixel border around the client window. We // emulate it here, but should be removed at some point in order to @@ -576,10 +576,10 @@ void KWMThemeClient::paintEvent( TQPaintEvent *) void KWMThemeClient::doShape() { - TQBitmap shapemask(width(), height()); - shapemask.fill(color0); + TQBitmap tqshapemask(width(), height()); + tqshapemask.fill(color0); TQPainter p; - p.begin(&shapemask); + p.begin(&tqshapemask); p.setBrush(color1); p.setPen(color1); int x,y; @@ -740,19 +740,19 @@ void KWMThemeClient::doShape() } } p.fillRect(maxExtent-1, maxExtent-1, width()-2*maxExtent+2, height()-2*maxExtent+2, color1); - setMask(shapemask); + setMask(tqshapemask); } void KWMThemeClient::showEvent(TQShowEvent *) { doShape(); - widget()->repaint(false); + widget()->tqrepaint(false); } void KWMThemeClient::mouseDoubleClickEvent( TQMouseEvent * e ) { - if (e->button() == LeftButton && titlebar->geometry().contains( e->pos() ) ) + if (e->button() == LeftButton && titlebar->geometry().tqcontains( e->pos() ) ) titlebarDblClickOperation(); } @@ -868,9 +868,9 @@ bool KWMThemeClient::eventFilter( TQObject* o, TQEvent* e ) } } -TQSize KWMThemeClient::minimumSize() const +TQSize KWMThemeClient::tqminimumSize() const { - return widget()->minimumSize().expandedTo( TQSize( 100, 50 )); + return widget()->tqminimumSize().expandedTo( TQSize( 100, 50 )); } void KWMThemeClient::resize( const TQSize& s ) diff --git a/kwin/clients/kwmtheme/kwmthemeclient.h b/kwin/clients/kwmtheme/kwmthemeclient.h index 13914b2f6..e51bfe6d1 100644 --- a/kwin/clients/kwmtheme/kwmthemeclient.h +++ b/kwin/clients/kwmtheme/kwmthemeclient.h @@ -13,7 +13,7 @@ class TQGridLayout; namespace KWMTheme { -class MyButton : public QToolButton +class MyButton : public TQToolButton { public: MyButton(TQWidget *parent=0, const char *name=0) @@ -30,7 +30,7 @@ public: ~KWMThemeClient(){;} void init(); void resize( const TQSize& s ); - TQSize minimumSize() const; + TQSize tqminimumSize() const; void borders( int& left, int& right, int& top, int& bottom ) const; protected: void doShape(); diff --git a/kwin/clients/laptop/laptopclient.cpp b/kwin/clients/laptop/laptopclient.cpp index db91cf15d..db37feae6 100644 --- a/kwin/clients/laptop/laptopclient.cpp +++ b/kwin/clients/laptop/laptopclient.cpp @@ -157,7 +157,7 @@ static void create_pixmaps() KPixmapEffect::VerticalGradient); } // buttons (active/inactive, sunken/unsunken, 2 sizes each) - TQColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, true); + TQColorGroup g = options()->tqcolorGroup(KDecoration::ColorButtonBg, true); TQColor c = g.background(); btnPix1 = new KPixmap; btnPix1->resize(btnWidth1, titleHeight); @@ -184,7 +184,7 @@ static void create_pixmaps() KPixmapEffect::DiagonalGradient); KPixmapEffect::gradient(*btnDownPix2, c.dark(130), c.light(120), KPixmapEffect::DiagonalGradient); - g = options()->colorGroup(KDecoration::ColorButtonBg, false); + g = options()->tqcolorGroup(KDecoration::ColorButtonBg, false); c = g.background(); KPixmapEffect::gradient(*iBtnPix1, c.light(120), c.dark(130), KPixmapEffect::DiagonalGradient); @@ -200,27 +200,27 @@ static void create_pixmaps() btnDownPix1->fill(c.rgb()); btnPix2->fill(c.rgb()); btnDownPix2->fill(c.rgb()); - g = options()->colorGroup(KDecoration::ColorButtonBg, false); + g = options()->tqcolorGroup(KDecoration::ColorButtonBg, false); c = g.background(); iBtnPix1->fill(c.rgb()); iBtnDownPix1->fill(c.rgb()); iBtnPix2->fill(c.rgb()); iBtnDownPix2->fill(c.rgb()); } - g = options()->colorGroup(KDecoration::ColorButtonBg, true); + g = options()->tqcolorGroup(KDecoration::ColorButtonBg, true); c = g.background(); drawButtonFrame(btnPix1, g, false); drawButtonFrame(btnDownPix1, g, true); drawButtonFrame(btnPix2, g, false); drawButtonFrame(btnDownPix2, g, true); - g = options()->colorGroup(KDecoration::ColorButtonBg, false); + g = options()->tqcolorGroup(KDecoration::ColorButtonBg, false); c = g.background(); drawButtonFrame(iBtnPix1, g, false); drawButtonFrame(iBtnDownPix1, g, true); drawButtonFrame(iBtnPix2, g, false); drawButtonFrame(iBtnDownPix2, g, true); - if(qGray(options()->color(KDecoration::ColorButtonBg, true).rgb()) > 128) + if(tqGray(options()->color(KDecoration::ColorButtonBg, true).rgb()) > 128) btnForeground = Qt::black; else btnForeground = Qt::white; @@ -293,7 +293,7 @@ void LaptopButton::setBitmap(const unsigned char *bitmap) deco.fill(Qt::color0); } deco.setMask(deco); - repaint(); + tqrepaint(); } void LaptopButton::drawButton(TQPainter *p) @@ -314,7 +314,7 @@ void LaptopButton::drawButton(TQPainter *p) } } else{ - TQColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, decoration()->isActive()); + TQColorGroup g = options()->tqcolorGroup(KDecoration::ColorButtonBg, decoration()->isActive()); int w = width(); int h = height(); p->fillRect(1, 1, w-2, h-2, isDown() ? g.mid() : g.button()); @@ -469,7 +469,7 @@ void LaptopClient::captionChange() void LaptopClient::paintEvent( TQPaintEvent* ) { TQPainter p(widget()); - TQColorGroup g = options()->colorGroup(KDecoration::ColorFrame, isActive()); + TQColorGroup g = options()->tqcolorGroup(KDecoration::ColorFrame, isActive()); TQRect r(widget()->rect()); p.setPen(Qt::black); @@ -546,7 +546,7 @@ void LaptopClient::paintEvent( TQPaintEvent* ) p.setFont(options()->font(false, isToolWindow() )); TQFontMetrics fm(options()->font(false)); - g = options()->colorGroup(KDecoration::ColorTitleBar, false); + g = options()->tqcolorGroup(KDecoration::ColorTitleBar, false); if(iUpperGradient) p.drawTiledPixmap(r.x()+((r.width()-fm.width(caption()))/2)-4, r.y(), fm.width(caption())+8, r.height()-1, @@ -564,7 +564,7 @@ void LaptopClient::paintEvent( TQPaintEvent* ) p.setPen(options()->color(KDecoration::ColorFont, false)); p.drawText(r.x(), r.y(), r.width(), r.height()-1, AlignCenter, caption() ); - g = options()->colorGroup(KDecoration::ColorFrame, true); + g = options()->tqcolorGroup(KDecoration::ColorFrame, true); p.setPen(g.background()); p.drawPoint(r.x(), r.y()); p.drawPoint(r.right(), r.y()); @@ -629,7 +629,7 @@ void LaptopClient::updateActiveBuffer( ) p.setFont(options()->font(true, isToolWindow() )); TQFontMetrics fm(options()->font(true)); - TQColorGroup g = options()->colorGroup(KDecoration::ColorTitleBar, true); + TQColorGroup g = options()->tqcolorGroup(KDecoration::ColorTitleBar, true); if(aUpperGradient) p.drawTiledPixmap(r.x()+((r.width()-fm.width(caption()))/2)-4, r.y(), fm.width(caption())+8, r.height()-1, @@ -647,7 +647,7 @@ void LaptopClient::updateActiveBuffer( ) p.setPen(options()->color(KDecoration::ColorFont, true)); p.drawText(r.x(), r.y(), r.width(), r.height()-1, AlignCenter, caption() ); - g = options()->colorGroup(KDecoration::ColorFrame, true); + g = options()->tqcolorGroup(KDecoration::ColorFrame, true); p.setPen(g.background()); p.drawPoint(r.x(), r.y()); p.drawPoint(r.right(), r.y()); diff --git a/kwin/clients/modernsystem/config/config.cpp b/kwin/clients/modernsystem/config/config.cpp index 8a94c1748..f5260ba7d 100644 --- a/kwin/clients/modernsystem/config/config.cpp +++ b/kwin/clients/modernsystem/config/config.cpp @@ -47,7 +47,7 @@ ModernSysConfig::ModernSysConfig(KConfig* conf, TQWidget* parent) : TQObject(par connect(cbShowHandle, TQT_SIGNAL(clicked()), this, TQT_SLOT(slotSelectionChanged())); sliderBox = new TQVBox(handleBox); - handleSizeSlider = new TQSlider(0, 4, 1, 0, TQSlider::Horizontal, sliderBox); + handleSizeSlider = new TQSlider(0, 4, 1, 0, Qt::Horizontal, sliderBox); TQWhatsThis::add(handleSizeSlider, i18n("Here you can change the size of the resize handle.")); handleSizeSlider->setTickInterval(1); @@ -59,11 +59,11 @@ ModernSysConfig::ModernSysConfig(KConfig* conf, TQWidget* parent) : TQObject(par bool rtl = kapp->reverseLayout(); label1 = new TQLabel(i18n("Small"), hbox); - label1->setAlignment(rtl ? AlignRight : AlignLeft); + label1->tqsetAlignment(rtl ? AlignRight : AlignLeft); label2 = new TQLabel(i18n("Medium"), hbox); - label2->setAlignment(AlignHCenter); + label2->tqsetAlignment(AlignHCenter); label3 = new TQLabel(i18n("Large"), hbox); - label3->setAlignment(rtl ? AlignLeft : AlignRight); + label3->tqsetAlignment(rtl ? AlignLeft : AlignRight); vbox->addWidget(handleBox); vbox->addStretch(1); @@ -104,7 +104,7 @@ void ModernSysConfig::load(KConfig* /*conf*/) handleSizeSlider->setEnabled(i); handleWidth = clientrc->readUnsignedNumEntry("HandleWidth", 6); handleSize = clientrc->readUnsignedNumEntry("HandleSize", 30); - handleSizeSlider->setValue(QMIN((handleWidth - 6) / 2, 4)); + handleSizeSlider->setValue(TQMIN((handleWidth - 6) / 2, 4)); } diff --git a/kwin/clients/modernsystem/config/config.h b/kwin/clients/modernsystem/config/config.h index dcf4a588f..3a04573cf 100644 --- a/kwin/clients/modernsystem/config/config.h +++ b/kwin/clients/modernsystem/config/config.h @@ -8,7 +8,7 @@ #include #include -class ModernSysConfig : public QObject +class ModernSysConfig : public TQObject { Q_OBJECT @@ -30,16 +30,16 @@ class ModernSysConfig : public QObject private: KConfig *clientrc; - QWidget *mainw; - QVBoxLayout *vbox; + TQWidget *mainw; + TQVBoxLayout *vbox; TQWidget *handleBox; TQCheckBox *cbShowHandle; - QVBox *sliderBox; - QSlider *handleSizeSlider; - QHBox *hbox; - QLabel *label1; - QLabel *label2; - QLabel *label3; + TQVBox *sliderBox; + TQSlider *handleSizeSlider; + TQHBox *hbox; + TQLabel *label1; + TQLabel *label2; + TQLabel *label3; unsigned handleWidth; unsigned handleSize; diff --git a/kwin/clients/modernsystem/modernsys.cpp b/kwin/clients/modernsystem/modernsys.cpp index ce7545cdf..30344d75c 100644 --- a/kwin/clients/modernsystem/modernsys.cpp +++ b/kwin/clients/modernsystem/modernsys.cpp @@ -171,20 +171,20 @@ static void create_pixmaps() KPixmapEffect::VerticalGradient); } // buttons - TQColorGroup btnColor(options()->colorGroup(KDecoration::ColorButtonBg, true)); + TQColorGroup btnColor(options()->tqcolorGroup(KDecoration::ColorButtonBg, true)); buttonPix = new TQPixmap(14, 15); make_button_fx(btnColor, buttonPix); buttonPixDown = new TQPixmap(14, 15); make_button_fx(btnColor, buttonPixDown, true); - btnColor = options()->colorGroup(KDecoration::ColorButtonBg, false); + btnColor = options()->tqcolorGroup(KDecoration::ColorButtonBg, false); iButtonPix = new TQPixmap(14, 15); make_button_fx(btnColor, iButtonPix); iButtonPixDown = new TQPixmap(14, 15); make_button_fx(btnColor, iButtonPixDown, true); - if(qGray(btnColor.background().rgb()) < 150) + if(tqGray(btnColor.background().rgb()) < 150) buttonFg = new TQColor(Qt::white); else buttonFg = new TQColor(Qt::black); @@ -515,7 +515,7 @@ void ModernSys::recalcTitleBuffer() p.drawTiledPixmap(0, 0, width(), title_height+2, *aUpperGradient); else p.fillRect(0, 0, width(), title_height+2, - options()->colorGroup(ColorTitleBar, true). + options()->tqcolorGroup(ColorTitleBar, true). brush(TQColorGroup::Button)); TQRect t = titleRect(); // titlebar->geometry(); @@ -554,7 +554,7 @@ void ModernSys::updateCaption() void ModernSys::drawRoundFrame(TQPainter &p, int x, int y, int w, int h) { kDrawRoundButton(&p, x, y, w, h, - options()->colorGroup(ColorFrame, isActive()), false); + options()->tqcolorGroup(ColorFrame, isActive()), false); } @@ -570,9 +570,9 @@ void ModernSys::paintEvent( TQPaintEvent* ) TQPainter p( widget() ); TQRect t = titleRect(); // titlebar->geometry(); - TQBrush fillBrush(widget()->colorGroup().brush(TQColorGroup::Background).pixmap() ? - widget()->colorGroup().brush(TQColorGroup::Background) : - options()->colorGroup(ColorFrame, isActive()). + TQBrush fillBrush(widget()->tqcolorGroup().tqbrush(TQColorGroup::Background).pixmap() ? + widget()->tqcolorGroup().brush(TQColorGroup::Background) : + options()->tqcolorGroup(ColorFrame, isActive()). brush(TQColorGroup::Button)); p.fillRect(1, title_height+3, width()-2, height()-(title_height+3), fillBrush); @@ -586,7 +586,7 @@ void ModernSys::paintEvent( TQPaintEvent* ) int h = height() - hw; // titlebar - TQColorGroup g = options()->colorGroup(ColorTitleBar, isActive()); + TQColorGroup g = options()->tqcolorGroup(ColorTitleBar, isActive()); if(isActive()){ p.drawPixmap(1, 1, titleBuffer, 0, 0, w-2, title_height+2); } @@ -609,7 +609,7 @@ void ModernSys::paintEvent( TQPaintEvent* ) p.drawLine(0, title_height+2, w-2, title_height+2); // frame - g = options()->colorGroup(ColorFrame, isActive()); + g = options()->tqcolorGroup(ColorFrame, isActive()); p.setPen(g.light()); p.drawLine(1, title_height+3, 1, h-2); p.setPen(g.dark()); diff --git a/kwin/clients/plastik/config/config.h b/kwin/clients/plastik/config/config.h index f288c58ea..d06bd30b8 100644 --- a/kwin/clients/plastik/config/config.h +++ b/kwin/clients/plastik/config/config.h @@ -30,7 +30,7 @@ class TQGroupBox; class KConfig; class ConfigDialog; -class PlastikConfig : public QObject +class PlastikConfig : public TQObject { Q_OBJECT public: diff --git a/kwin/clients/plastik/config/configdialog.ui b/kwin/clients/plastik/config/configdialog.ui index 642891b31..f751d8024 100644 --- a/kwin/clients/plastik/config/configdialog.ui +++ b/kwin/clients/plastik/config/configdialog.ui @@ -1,6 +1,6 @@ ConfigDialog - + ConfigDialog @@ -22,7 +22,7 @@ 0 - + titleAlign @@ -33,7 +33,7 @@ unnamed - + AlignLeft @@ -41,7 +41,7 @@ Left - + AlignHCenter @@ -49,7 +49,7 @@ Center - + AlignRight @@ -59,7 +59,7 @@ - + coloredBorder @@ -73,7 +73,7 @@ Check this option if the window border should be painted in the titlebar color. Otherwise it will be painted in the background color. - + titleShadow @@ -84,7 +84,7 @@ Check this option if you want the titlebar text to have a 3D look with a shadow behind it. - + animateButtons @@ -95,7 +95,7 @@ Check this option if you want the buttons to fade in when the mouse pointer hovers over them and fade out again when it moves away. - + menuClose diff --git a/kwin/clients/plastik/misc.cpp b/kwin/clients/plastik/misc.cpp index 43786fe46..1b259d383 100644 --- a/kwin/clients/plastik/misc.cpp +++ b/kwin/clients/plastik/misc.cpp @@ -61,9 +61,9 @@ TQColor alphaBlendColors(const TQColor &bgColor, const TQColor &fgColor, const i if(alpha<0) alpha = 0; int inv_alpha = 255 - alpha; - TQColor result = TQColor( qRgb(qRed(rgb_b)*inv_alpha/255 + qRed(rgb)*alpha/255, - qGreen(rgb_b)*inv_alpha/255 + qGreen(rgb)*alpha/255, - qBlue(rgb_b)*inv_alpha/255 + qBlue(rgb)*alpha/255) ); + TQColor result = TQColor( tqRgb(tqRed(rgb_b)*inv_alpha/255 + tqRed(rgb)*alpha/255, + tqGreen(rgb_b)*inv_alpha/255 + tqGreen(rgb)*alpha/255, + tqBlue(rgb_b)*inv_alpha/255 + tqBlue(rgb)*alpha/255) ); return result; } @@ -73,10 +73,10 @@ TQImage recolorImage(TQImage *img, TQColor color) { destImg.setAlphaBuffer(true); for (int x = 0; x < img->width(); x++) { for (int y = 0; y < img->height(); y++) { - if(img->pixel(x,y) == qRgb(0,0,255) ) { + if(img->pixel(x,y) == tqRgb(0,0,255) ) { destImg.setPixel(x,y,color.rgb() ); // set to the new color } else { - destImg.setPixel(x,y,qRgba(0,0,0,0) ); // set transparent... + destImg.setPixel(x,y,tqRgba(0,0,0,0) ); // set transparent... } } } diff --git a/kwin/clients/plastik/plastik.cpp b/kwin/clients/plastik/plastik.cpp index a6313cd1c..3f0ceab85 100644 --- a/kwin/clients/plastik/plastik.cpp +++ b/kwin/clients/plastik/plastik.cpp @@ -290,7 +290,7 @@ const TQPixmap &PlastikHandler::pixmap(Pixmaps type, bool active, bool toolWindo } else { pm = new TQPixmap(1, titleBarTileHeight); painter.begin(pm); - painter.drawPixmap(0, 0, gradient, 0,2); + painter.tqdrawPixmap(0, 0, gradient, 0,2); if (m_coloredBorder) { painter.setPen(getColor(TitleGradient3, active).dark(110) ); } else { diff --git a/kwin/clients/plastik/plastik.h b/kwin/clients/plastik/plastik.h index 974df622b..a4c1bc5b7 100644 --- a/kwin/clients/plastik/plastik.h +++ b/kwin/clients/plastik/plastik.h @@ -93,7 +93,7 @@ public: int borderSize() { return m_borderSize; } bool animateButtons() { return m_animateButtons; } bool menuClose() { return m_menuClose; } - Qt::AlignmentFlags titleAlign() { return m_titleAlign; } + TQ_Alignment titleAlign() { return m_titleAlign; } bool reverseLayout() { return m_reverse; } TQColor getColor(KWinPlastik::ColorType type, const bool active = true); @@ -113,7 +113,7 @@ private: int m_titleHeightTool; TQFont m_titleFont; TQFont m_titleFontTool; - Qt::AlignmentFlags m_titleAlign; + TQ_Alignment m_titleAlign; // pixmap cache TQPixmap *m_pixmaps[2][2][NumPixmaps]; // button pixmaps have normal+pressed state... diff --git a/kwin/clients/plastik/plastikbutton.cpp b/kwin/clients/plastik/plastikbutton.cpp index 27a3eb127..795a384d2 100644 --- a/kwin/clients/plastik/plastikbutton.cpp +++ b/kwin/clients/plastik/plastikbutton.cpp @@ -140,7 +140,7 @@ void PlastikButton::animate() } } - repaint(false); + tqrepaint(false); } void PlastikButton::enterEvent(TQEvent *e) @@ -253,7 +253,7 @@ void PlastikButton::drawButton(TQPainter *painter) { TQPixmap menuIcon(m_client->icon().pixmap( TQIconSet::Small, TQIconSet::Normal)); if (width() < menuIcon.width() || height() < menuIcon.height() ) { - menuIcon.convertFromImage( menuIcon.convertToImage().smoothScale(width(), height())); + menuIcon.convertFromImage( TQImage(menuIcon.convertToImage()).smoothScale(width(), height())); } bP.drawPixmap((width()-menuIcon.width())/2, (height()-menuIcon.height())/2, menuIcon); } @@ -269,7 +269,7 @@ void PlastikButton::drawButton(TQPainter *painter) if(!isDown() && Handler()->titleShadow() ) { TQColor shadowColor; - if (qGray(Handler()->getColor(TitleFont,active).rgb()) < 100) + if (tqGray(Handler()->getColor(TitleFont,active).rgb()) < 100) shadowColor = TQColor(255, 255, 255); else shadowColor = TQColor(0,0,0); diff --git a/kwin/clients/plastik/plastikclient.cpp b/kwin/clients/plastik/plastikclient.cpp index 604c66641..61dfdaba7 100644 --- a/kwin/clients/plastik/plastikclient.cpp +++ b/kwin/clients/plastik/plastikclient.cpp @@ -280,7 +280,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(titleEdgeTop > 0) { tempRect.setRect(r_x+2, r_y, r_w-2*2, titleEdgeTop ); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTileTop, active, toolWindow) ); } } @@ -291,7 +291,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(titleEdgeLeft > 0) { tempRect.setRect(r_x, r_y, borderLeft, titleEdgeTop+titleHeight+titleEdgeBottom); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarLeft, active, toolWindow) ); titleMarginLeft = borderLeft; } @@ -301,7 +301,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(titleEdgeRight > 0) { tempRect.setRect(borderRightLeft, r_y, borderRight, titleEdgeTop+titleHeight+titleEdgeBottom); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarRight, active, toolWindow) ); titleMarginRight = borderRight; } @@ -312,7 +312,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(Rtitle.width() > 0) { m_captionRect = captionRect(); // also update m_captionRect! - if (m_captionRect.isValid() && region.contains(m_captionRect) ) + if (m_captionRect.isValid() && region.tqcontains(m_captionRect) ) { painter.drawTiledPixmap(m_captionRect, caption); } @@ -320,14 +320,14 @@ void PlastikClient::paintEvent(TQPaintEvent *e) // left to the title tempRect.setRect(r_x+titleMarginLeft, m_captionRect.top(), m_captionRect.left() - (r_x+titleMarginLeft), m_captionRect.height() ); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTile, active, toolWindow) ); } // right to the title tempRect.setRect(m_captionRect.right()+1, m_captionRect.top(), (r_x2-titleMarginRight) - m_captionRect.right(), m_captionRect.height() ); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(TitleBarTile, active, toolWindow) ); } @@ -337,7 +337,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(borderLeft > 0 && sideHeight > 0) { tempRect.setCoords(r_x, titleEdgeBottomBottom+1, borderLeftRight, borderBottomTop-1); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderLeftTile, active, toolWindow) ); } } @@ -346,7 +346,7 @@ void PlastikClient::paintEvent(TQPaintEvent *e) if(borderRight > 0 && sideHeight > 0) { tempRect.setCoords(borderRightLeft, titleEdgeBottomBottom+1, r_x2, borderBottomTop-1); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderRightTile, active, toolWindow) ); } } @@ -358,19 +358,19 @@ void PlastikClient::paintEvent(TQPaintEvent *e) int r = r_x2; tempRect.setRect(r_x, borderBottomTop, borderLeft, borderBottom); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomLeft, active, toolWindow) ); l = tempRect.right()+1; } tempRect.setRect(borderRightLeft, borderBottomTop, borderLeft, borderBottom); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomRight, active, toolWindow) ); r = tempRect.left()-1; } tempRect.setCoords(l, borderBottomTop, r, r_y2); - if (tempRect.isValid() && region.contains(tempRect) ) { + if (tempRect.isValid() && region.tqcontains(tempRect) ) { painter.drawTiledPixmap(tempRect, handler->pixmap(BorderBottomTile, active, toolWindow) ); } } @@ -394,7 +394,7 @@ TQRect PlastikClient::captionRect() const buttonsLeftWidth() - buttonsRightWidth() - marginLeft - marginRight; - Qt::AlignmentFlags a = Handler()->titleAlign(); + TQ_Alignment a = Handler()->titleAlign(); int tX, tW; // position/width of the title buffer if (caption.width() > titleWidth) { @@ -435,7 +435,7 @@ void PlastikClient::reset( unsigned long changed ) { if (changed & SettingColors) { - // repaint the whole thing + // tqrepaint the whole thing clearCaptionPixmaps(); widget()->update(); updateButtons(); @@ -445,7 +445,7 @@ void PlastikClient::reset( unsigned long changed ) updateLayout(); - // then repaint + // then tqrepaint clearCaptionPixmaps(); widget()->update(); } @@ -496,7 +496,7 @@ const TQPixmap &PlastikClient::captionPixmap() const if(Handler()->titleShadow()) { TQColor shadowColor; - if (qGray(Handler()->getColor(TitleFont,active).rgb()) < 100) + if (tqGray(Handler()->getColor(TitleFont,active).rgb()) < 100) shadowColor = TQColor(255, 255, 255); else shadowColor = TQColor(0,0,0); diff --git a/kwin/clients/quartz/config/config.h b/kwin/clients/quartz/config/config.h index 0a952c4e9..6bd1ba384 100644 --- a/kwin/clients/quartz/config/config.h +++ b/kwin/clients/quartz/config/config.h @@ -14,7 +14,7 @@ #include #include -class QuartzConfig: public QObject +class QuartzConfig: public TQObject { Q_OBJECT diff --git a/kwin/clients/quartz/quartz.cpp b/kwin/clients/quartz/quartz.cpp index 82caabb45..4c4a883b6 100644 --- a/kwin/clients/quartz/quartz.cpp +++ b/kwin/clients/quartz/quartz.cpp @@ -207,7 +207,7 @@ void QuartzHandler::readConfig() extraSlim = conf.readBoolEntry( "UseQuartzExtraSlim", false ); // A small hack to make the on all desktops button look nicer - onAllDesktopsButtonOnLeft = KDecoration::options()->titleButtonsLeft().contains( 'S' ); + onAllDesktopsButtonOnLeft = KDecoration::options()->titleButtonsLeft().tqcontains( 'S' ); if ( TQApplication::reverseLayout() ) onAllDesktopsButtonOnLeft = !onAllDesktopsButtonOnLeft; switch(options()->preferredBorderSize(this)) { @@ -291,18 +291,18 @@ void QuartzHandler::drawBlocks( KPixmap *pi, KPixmap &p, const TQColor &c1, cons void QuartzHandler::createPixmaps() { // Obtain titlebar blend colours, and create the block stuff on pixmaps. - TQColorGroup g2 = options()->colorGroup(ColorTitleBlend, true); + TQColorGroup g2 = options()->tqcolorGroup(ColorTitleBlend, true); TQColor c2 = g2.background(); - g2 = options()->colorGroup(ColorTitleBar, true ); + g2 = options()->tqcolorGroup(ColorTitleBar, true ); TQColor c = g2.background().light(130); titleBlocks = new KPixmap(); titleBlocks->resize( normalTitleHeight*25/18, normalTitleHeight ); drawBlocks( titleBlocks, *titleBlocks, c, c2 ); - g2 = options()->colorGroup(ColorTitleBlend, false); + g2 = options()->tqcolorGroup(ColorTitleBlend, false); c2 = g2.background(); - g2 = options()->colorGroup(ColorTitleBar, false ); + g2 = options()->tqcolorGroup(ColorTitleBar, false ); c = g2.background().light(130); ititleBlocks = new KPixmap(); @@ -313,9 +313,9 @@ void QuartzHandler::createPixmaps() TQColorGroup g; TQPainter p; - g = options()->colorGroup( onAllDesktopsButtonOnLeft ? ColorTitleBar : ColorTitleBlend, true ); - c = onAllDesktopsButtonOnLeft ? g.background().light(130) : g.background(); - g2 = options()->colorGroup( ColorButtonBg, true ); + g = options()->tqcolorGroup( onAllDesktopsButtonOnLeft ? ColorTitleBar : ColorTitleBlend, true ); + c = onAllDesktopsButtonOnLeft ? TQColor(g.background().light(130)) : g.background(); + g2 = options()->tqcolorGroup( ColorButtonBg, true ); pinUpPix = new KPixmap(); pinUpPix->resize(16, 16); @@ -335,9 +335,9 @@ void QuartzHandler::createPixmaps() // Inactive pins - g = options()->colorGroup( onAllDesktopsButtonOnLeft ? ColorTitleBar : ColorTitleBlend, false ); - c = onAllDesktopsButtonOnLeft ? g.background().light(130) : g.background(); - g2 = options()->colorGroup( ColorButtonBg, false ); + g = options()->tqcolorGroup( onAllDesktopsButtonOnLeft ? ColorTitleBar : ColorTitleBlend, false ); + c = onAllDesktopsButtonOnLeft ? TQColor(g.background().light(130)) : g.background(); + g2 = options()->tqcolorGroup( ColorButtonBg, false ); ipinUpPix = new KPixmap(); ipinUpPix->resize(16, 16); @@ -437,7 +437,7 @@ void QuartzButton::setBitmap(const unsigned char *bitmap) if (bitmap) { deco = new TQBitmap(10, 10, bitmap, true); deco->setMask( *deco ); - repaint( false ); + tqrepaint( false ); } } @@ -492,7 +492,7 @@ void QuartzButton::drawButton(TQPainter *p) TQPixmap tmpPix; // Smooth scale the image - tmpPix.convertFromImage( btnpix.convertToImage().smoothScale(height(), height())); + tmpPix.convertFromImage( TQImage(btnpix.convertToImage()).smoothScale(height(), height())); p->drawPixmap( 0, 0, tmpPix ); } else { Offset += (height() - 16)/2; @@ -643,8 +643,8 @@ void QuartzClient::reset( unsigned long changed ) { if (changed & SettingColors || changed & SettingFont) { - // repaint the whole thing - widget()->repaint(false); + // tqrepaint the whole thing + widget()->tqrepaint(false); } KCommonDecoration::reset(changed); @@ -675,9 +675,9 @@ void QuartzClient::paintEvent( TQPaintEvent* ) // Draw part of the frame that is the title color if( coloredFrame ) - g = options()->colorGroup(ColorTitleBar, isActive()); + g = options()->tqcolorGroup(ColorTitleBar, isActive()); else - g = options()->colorGroup(ColorFrame, isActive()); + g = options()->tqcolorGroup(ColorFrame, isActive()); // Draw outer highlights and lowlights p.setPen( g.light().light(120) ); @@ -723,7 +723,7 @@ void QuartzClient::paintEvent( TQPaintEvent* ) // Draw the title bar. // =================== int r_x, r_y, r_x2, r_y2; - widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2); + TQT_TQRECT_OBJECT(widget()->rect()).coords(&r_x, &r_y, &r_x2, &r_y2); const int titleEdgeLeft = layoutMetric(LM_TitleEdgeLeft); const int titleEdgeTop = layoutMetric(LM_TitleEdgeTop); const int titleEdgeRight = layoutMetric(LM_TitleEdgeRight); diff --git a/kwin/clients/redmond/redmond.cpp b/kwin/clients/redmond/redmond.cpp index 7f74479ed..b6161d9ce 100644 --- a/kwin/clients/redmond/redmond.cpp +++ b/kwin/clients/redmond/redmond.cpp @@ -108,7 +108,7 @@ static void drawButtonFrame( KPixmap *pix, const TQColorGroup &g, bool sunken ) p.begin(pix); // titlebar button frame - p.setPen( sunken ? g.dark().dark(155) : g.light()); + p.setPen( sunken ? TQColor(g.dark().dark(155)) : g.light()); p.drawLine(0, 0, x2-1, 0); p.drawLine(0, 0, 0, y2-1); @@ -119,11 +119,11 @@ static void drawButtonFrame( KPixmap *pix, const TQColorGroup &g, bool sunken ) p.drawLine(1, 1, 1, y2-2); } - p.setPen( sunken ? g.light() : g.mid().dark(135)); + p.setPen( sunken ? g.light() : TQColor(g.mid().dark(135))); p.drawLine(1, y2-1, x2-1, y2-1); p.drawLine(x2-1, 1, x2-1, y2-1); - p.setPen( sunken ? g.light() : g.dark().dark(155)); + p.setPen( sunken ? g.light() : TQColor(g.dark().dark(155))); p.drawLine(0, y2, x2, y2); p.drawLine(x2, 0, x2, y2); } @@ -149,7 +149,7 @@ static void create_pixmaps () defaultMenuPix = new TQPixmap(kdelogo); // buttons (active/inactive, sunken/unsunken) - TQColorGroup g = options()->colorGroup(KDecoration::ColorButtonBg, true); + TQColorGroup g = options()->tqcolorGroup(KDecoration::ColorButtonBg, true); TQColor c = g.background(); btnPix1->resize(normalTitleHeight, normalTitleHeight-2); btnDownPix1->resize(normalTitleHeight, normalTitleHeight-2); @@ -172,7 +172,7 @@ static void create_pixmaps () KPixmapEffect::gradient(*miniBtnDownPix1, c.dark(130), c.light(130), KPixmapEffect::VerticalGradient); - g = options()->colorGroup(KDecoration::ColorButtonBg, false); + g = options()->tqcolorGroup(KDecoration::ColorButtonBg, false); c = g.background(); KPixmapEffect::gradient(*iBtnPix1, c.light(130), c.dark(130), KPixmapEffect::VerticalGradient); @@ -188,7 +188,7 @@ static void create_pixmaps () miniBtnPix1->fill(c.rgb()); miniBtnDownPix1->fill(c.rgb()); - g = options()->colorGroup(KDecoration::ColorButtonBg, false); + g = options()->tqcolorGroup(KDecoration::ColorButtonBg, false); c = g.background(); iBtnPix1->fill(c.rgb()); iBtnDownPix1->fill(c.rgb()); @@ -196,20 +196,20 @@ static void create_pixmaps () iMiniBtnDownPix1->fill(c.rgb()); } - g = options()->colorGroup(KDecoration::ColorButtonBg, true); + g = options()->tqcolorGroup(KDecoration::ColorButtonBg, true); drawButtonFrame(btnPix1, g, false); drawButtonFrame(btnDownPix1, g, true); drawButtonFrame(miniBtnPix1, g, false); drawButtonFrame(miniBtnDownPix1, g, true); - g = options()->colorGroup(KDecoration::ColorButtonBg, false); + g = options()->tqcolorGroup(KDecoration::ColorButtonBg, false); drawButtonFrame(iBtnPix1, g, false); drawButtonFrame(iBtnDownPix1, g, true); drawButtonFrame(iMiniBtnPix1, g, false); drawButtonFrame(iMiniBtnDownPix1, g, true); // Make sure button pixmaps contrast with the current colour scheme. - if (qGray(options()->color(KDecoration::ColorButtonBg, true).rgb()) > 127) + if (tqGray(options()->color(KDecoration::ColorButtonBg, true).rgb()) > 127) btnForeground = new TQColor(Qt::black); else btnForeground = new TQColor(Qt::white); @@ -294,7 +294,7 @@ void RedmondButton::setPixmap( const TQPixmap &p ) deco.resize(0, 0); pix = p; - repaint(false); + tqrepaint(false); } @@ -331,7 +331,7 @@ void RedmondButton::drawButton(TQPainter *p) // Smooth scale the menu button pixmap tmpPix.convertFromImage( - pix.convertToImage().smoothScale(height(), height() )); + TQImage(pix.convertToImage()).smoothScale(height(), height() )); p->drawPixmap( 0, 0, tmpPix ); } else { @@ -485,7 +485,7 @@ void RedmondDeco::paintEvent( TQPaintEvent* ) // Draw part of the frame that is the frame color // ============================================== - TQColorGroup g = options()->colorGroup(KDecoration::ColorFrame, isActive()); + TQColorGroup g = options()->tqcolorGroup(KDecoration::ColorFrame, isActive()); p.setPen( g.background() ); p.drawLine( x, y, x2-1, y ); p.drawLine( x, y, x, y2-1 ); diff --git a/kwin/clients/test/test.cpp b/kwin/clients/test/test.cpp index a04437067..02fd5b1d3 100644 --- a/kwin/clients/test/test.cpp +++ b/kwin/clients/test/test.cpp @@ -22,7 +22,7 @@ void Decoration::init() { button = new TQPushButton( widget()); button->show(); - button->setCursor( arrowCursor ); + button->setCursor( tqarrowCursor ); button->move( 0, 0 ); connect( button, TQT_SIGNAL( clicked()), TQT_SLOT( closeWindow())); TQToolTip::add( button, "Zelva Mana" ); @@ -93,20 +93,20 @@ void Decoration::resize( const TQSize& s ) widget()->resize( s ); } -TQSize Decoration::minimumSize() const +TQSize Decoration::tqminimumSize() const { return TQSize( 100, 50 ); } bool Decoration::eventFilter( TQObject* o, TQEvent* e ) { - if( o == widget()) + if( TQT_BASE_OBJECT(o) == TQT_BASE_OBJECT(widget())) { switch( e->type()) { case TQEvent::MouseButtonPress: { // FRAME - processMousePressEvent( static_cast< TQMouseEvent* >( e )); + processMousePressEvent( TQT_TQMOUSEEVENT( e )); return true; } case TQEvent::Show: @@ -144,7 +144,7 @@ bool Decoration::animateMinimize(bool iconify) // Go away quick. helperShowHide( false ); - qApp->syncX(); + tqApp->syncX(); TQRect r = iconGeometry(); @@ -179,7 +179,7 @@ bool Decoration::animateMinimize(bool iconify) double delta = finalAngle / steps; TQPainter p( workspaceWidget()); - p.setRasterOp(Qt::NotROP); + p.setRasterOp(TQt::NotROP); for (double angle = 0; ; angle += delta) { @@ -213,7 +213,7 @@ bool Decoration::animateMinimize(bool iconify) ungrabXServer(); -// FRAME qApp->processEvents(); // FRAME ??? +// FRAME tqApp->processEvents(); // FRAME ??? cx += xstep; cy += ystep; @@ -236,7 +236,7 @@ bool Decoration::animateMinimize(bool iconify) // Go away quick. helperShowHide( false ); - qApp->syncX(); + tqApp->syncX(); int stepCount = 12; @@ -246,7 +246,7 @@ bool Decoration::animateMinimize(bool iconify) int dy = r.height() / (stepCount * 2); TQPainter p( workspaceWidget()); - p.setRasterOp(Qt::NotROP); + p.setRasterOp(TQt::NotROP); for (int step = 0; step < stepCount; step++) { @@ -263,7 +263,7 @@ bool Decoration::animateMinimize(bool iconify) ungrabXServer(); -// FRAME qApp->processEvents(); +// FRAME tqApp->processEvents(); } } break; @@ -280,7 +280,7 @@ bool Decoration::animateMinimize(bool iconify) TQPainter p( workspaceWidget()); - p.setRasterOp(Qt::NotROP); + p.setRasterOp(TQt::NotROP); #if 0 if (iconify) @@ -298,7 +298,7 @@ bool Decoration::animateMinimize(bool iconify) p.flush(); - qApp->syncX(); + tqApp->syncX(); usleep(30000); diff --git a/kwin/clients/test/test.h b/kwin/clients/test/test.h index bfe36fa7c..e1d3d51a6 100644 --- a/kwin/clients/test/test.h +++ b/kwin/clients/test/test.h @@ -22,7 +22,7 @@ class Decoration virtual MousePosition mousePosition( const TQPoint& p ) const; virtual void borders( int& left, int& right, int& top, int& bottom ) const; virtual void resize( const TQSize& s ); - virtual TQSize minimumSize() const; + virtual TQSize tqminimumSize() const; virtual void activeChange() {}; virtual void captionChange() {}; virtual void maximizeChange() {}; diff --git a/kwin/clients/web/Web.cpp b/kwin/clients/web/Web.cpp index 43d1b9f42..9b5e434da 100644 --- a/kwin/clients/web/Web.cpp +++ b/kwin/clients/web/Web.cpp @@ -120,31 +120,31 @@ KCommonDecorationButton *WebClient::createButton(ButtonType type) { switch (type) { case MenuButton: - return new WebButton(MenuButton, this, "menu", shape_); + return new WebButton(MenuButton, this, "menu", tqshape_); case OnAllDesktopsButton: - return new WebButton(OnAllDesktopsButton, this, "on_all_desktops", shape_); + return new WebButton(OnAllDesktopsButton, this, "on_all_desktops", tqshape_); case HelpButton: - return new WebButton(HelpButton, this, "help", shape_); + return new WebButton(HelpButton, this, "help", tqshape_); case MinButton: - return new WebButton(MinButton, this, "minimize", shape_); + return new WebButton(MinButton, this, "minimize", tqshape_); case MaxButton: - return new WebButton(MaxButton, this, "maximize", shape_); + return new WebButton(MaxButton, this, "maximize", tqshape_); case CloseButton: - return new WebButton(CloseButton, this, "close", shape_); + return new WebButton(CloseButton, this, "close", tqshape_); case AboveButton: - return new WebButton(AboveButton, this, "above", shape_); + return new WebButton(AboveButton, this, "above", tqshape_); case BelowButton: - return new WebButton(BelowButton, this, "below", shape_); + return new WebButton(BelowButton, this, "below", tqshape_); case ShadeButton: - return new WebButton(ShadeButton, this, "shade", shape_); + return new WebButton(ShadeButton, this, "shade", tqshape_); default: return 0; @@ -185,7 +185,7 @@ WebClient::init() KConfig c("kwinwebrc"); c.setGroup("General"); - shape_ = c.readBoolEntry("Shape", true); + tqshape_ = c.readBoolEntry("Shape", true); KCommonDecoration::init(); } @@ -195,8 +195,8 @@ WebClient::reset( unsigned long changed ) { if (changed & SettingColors) { - // repaint the whole thing - widget()->repaint(false); + // tqrepaint the whole thing + widget()->tqrepaint(false); } else if (changed & SettingFont) { // font has changed -- update title height // title height @@ -206,7 +206,7 @@ WebClient::reset( unsigned long changed ) if (0 != titleHeight_ % 2) titleHeight_ += 1; - widget()->repaint(false); + widget()->tqrepaint(false); } KCommonDecoration::reset(changed); @@ -216,7 +216,7 @@ WebClient::reset( unsigned long changed ) WebClient::paintEvent(TQPaintEvent * pe) { int r_x, r_y, r_x2, r_y2; - widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2); + TQT_TQRECT_OBJECT(widget()->rect()).coords(&r_x, &r_y, &r_x2, &r_y2); const int titleEdgeLeft = layoutMetric(LM_TitleEdgeLeft); const int titleEdgeTop = layoutMetric(LM_TitleEdgeTop); const int titleEdgeRight = layoutMetric(LM_TitleEdgeRight); @@ -231,7 +231,7 @@ WebClient::paintEvent(TQPaintEvent * pe) TQPainter p(widget()); p.setPen(Qt::black); - p.setBrush(options()->colorGroup(ColorFrame, isActive()).background()); + p.setBrush(options()->tqcolorGroup(ColorFrame, isActive()).background()); p.setClipRegion(pe->region() - titleRect); @@ -241,7 +241,7 @@ WebClient::paintEvent(TQPaintEvent * pe) p.fillRect(titleRect, options()->color(ColorTitleBar, isActive())); - if (shape_) + if (tqshape_) { int r(width()); int b(height()); @@ -288,7 +288,7 @@ WebClient::paintEvent(TQPaintEvent * pe) void WebClient::updateWindowShape() { - if (!shape_) + if (!tqshape_) return; TQRegion mask(0, 0, width(), height()); diff --git a/kwin/clients/web/Web.h b/kwin/clients/web/Web.h index c8a8fa2db..565fe8125 100644 --- a/kwin/clients/web/Web.h +++ b/kwin/clients/web/Web.h @@ -62,7 +62,7 @@ namespace Web int titleHeight_, borderSize_; - bool shape_; + bool tqshape_; TQBitmap _buttonBitmap(ButtonType t) const; }; diff --git a/kwin/clients/web/WebButton.cpp b/kwin/clients/web/WebButton.cpp index 61811accc..c58a7e75d 100644 --- a/kwin/clients/web/WebButton.cpp +++ b/kwin/clients/web/WebButton.cpp @@ -69,10 +69,10 @@ namespace Web { 0xff, 0x81, 0x81, 0xff, 0x81, 0xff, 0x81, 0xff }; -WebButton::WebButton(ButtonType type, WebClient *parent, const char *name, bool shape) +WebButton::WebButton(ButtonType type, WebClient *parent, const char *name, bool tqshape) : KCommonDecorationButton (type, parent, name), mouseOver_ (false), - shape_ (shape), + tqshape_ (tqshape), deco_ (parent) { setBackgroundMode(NoBackground); @@ -127,7 +127,7 @@ void WebButton::reset(unsigned long changed) WebButton::enterEvent(TQEvent * e) { mouseOver_ = true; - repaint(); + tqrepaint(); TQButton::enterEvent(e); } @@ -135,7 +135,7 @@ WebButton::enterEvent(TQEvent * e) WebButton::leaveEvent(TQEvent * e) { mouseOver_ = false; - repaint(); + tqrepaint(); TQButton::leaveEvent(e); } @@ -145,17 +145,17 @@ WebButton::drawButton(TQPainter *p) TQPen highlightPen; if (isDown() ) - highlightPen = TQPen(colorGroup().light()); + highlightPen = TQPen(tqcolorGroup().light()); else { if (mouseOver_) - highlightPen = TQPen(colorGroup().highlight()); + highlightPen = TQPen(tqcolorGroup().highlight()); else highlightPen = TQPen(NoPen); } - p->fillRect(rect(), colorGroup().background()); + p->fillRect(rect(), tqcolorGroup().background()); Position position_; if (0 == mapToParent(rect().topLeft() ).x() ) @@ -174,7 +174,7 @@ WebButton::drawButton(TQPainter *p) p->drawLine(0, 0, width(), 0); p->drawLine(0, 1, 0, height() - 1); - if (shape_) + if (tqshape_) { p->drawPoint(3, 1); p->drawPoint(4, 1); @@ -187,11 +187,11 @@ WebButton::drawButton(TQPainter *p) p->setBrush(NoBrush); p->setPen(highlightPen); - if (shape_) + if (tqshape_) p->setClipRegion(TQRegion(rect()) - TQRect(0, 0, 6, 6)); p->drawRect(2, 2, width() - 4, height() - 4); - if (shape_) + if (tqshape_) { p->setClipRect(rect()); p->drawPoint(4, 3); @@ -210,7 +210,7 @@ WebButton::drawButton(TQPainter *p) p->setPen(Qt::black); p->drawLine(0, 0, width(), 0); p->drawLine(width() - 1, 1, width() - 1, height() - 1); - if (shape_) + if (tqshape_) { p->drawPoint(width() - 5, 1); p->drawPoint(width() - 4, 1); @@ -223,11 +223,11 @@ WebButton::drawButton(TQPainter *p) p->setBrush(NoBrush); p->setPen(highlightPen); - if (shape_) + if (tqshape_) p->setClipRegion(TQRegion(rect()) - TQRect(width() - 6, 0, 6, 6)); p->drawRect(2, 2, width() - 4, height() - 4); - if (shape_) + if (tqshape_) { p->setClipRect(rect()); p->drawPoint(width() - 5, 3); diff --git a/kwin/clients/web/WebButton.h b/kwin/clients/web/WebButton.h index da94ea3f7..b24136868 100644 --- a/kwin/clients/web/WebButton.h +++ b/kwin/clients/web/WebButton.h @@ -41,7 +41,7 @@ namespace Web Left, Mid, Right }; - WebButton(ButtonType type, WebClient *parent, const char *name, bool shape); + WebButton(ButtonType type, WebClient *parent, const char *name, bool tqshape); virtual ~WebButton(); @@ -59,7 +59,7 @@ namespace Web bool mouseOver_; - bool shape_; + bool tqshape_; WebClient* deco_; }; } -- cgit v1.2.3