diff options
Diffstat (limited to 'kwin/clients/web')
-rw-r--r-- | kwin/clients/web/Web.cpp | 92 | ||||
-rw-r--r-- | kwin/clients/web/Web.h | 6 | ||||
-rw-r--r-- | kwin/clients/web/WebButton.cpp | 28 | ||||
-rw-r--r-- | kwin/clients/web/WebButton.h | 6 |
4 files changed, 66 insertions, 66 deletions
diff --git a/kwin/clients/web/Web.cpp b/kwin/clients/web/Web.cpp index 43d1b9f42..1954b960f 100644 --- a/kwin/clients/web/Web.cpp +++ b/kwin/clients/web/Web.cpp @@ -80,7 +80,7 @@ bool WebClient::decorationBehaviour(DecorationBehaviour behaviour) const } } -int WebClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const +int WebClient::tqlayoutMetric(LayoutMetric lm, bool respectWindowState, const KCommonDecorationButton *btn) const { // bool maximized = maximizeMode()==MaximizeFull && !options()->moveResizeMaximizedWindows(); @@ -112,7 +112,7 @@ int WebClient::layoutMetric(LayoutMetric lm, bool respectWindowState, const KCom return 0; default: - return KCommonDecoration::layoutMetric(lm, respectWindowState, btn); + return KCommonDecoration::tqlayoutMetric(lm, respectWindowState, btn); } } @@ -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); @@ -217,11 +217,11 @@ WebClient::paintEvent(TQPaintEvent * pe) { int r_x, r_y, r_x2, r_y2; 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); - const int titleEdgeBottom = layoutMetric(LM_TitleEdgeBottom); - const int ttlHeight = layoutMetric(LM_TitleHeight); + const int titleEdgeLeft = tqlayoutMetric(LM_TitleEdgeLeft); + const int titleEdgeTop = tqlayoutMetric(LM_TitleEdgeTop); + const int titleEdgeRight = tqlayoutMetric(LM_TitleEdgeRight); + const int titleEdgeBottom = tqlayoutMetric(LM_TitleEdgeBottom); + const int ttlHeight = tqlayoutMetric(LM_TitleHeight); const int titleEdgeBottomBottom = r_y+titleEdgeTop+ttlHeight+titleEdgeBottom-1; TQRect titleRect = TQRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop, r_x2-titleEdgeRight-buttonsRightWidth()-(r_x+titleEdgeLeft+buttonsLeftWidth()), @@ -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,12 +241,12 @@ WebClient::paintEvent(TQPaintEvent * pe) p.fillRect(titleRect, options()->color(ColorTitleBar, isActive())); - if (shape_) + if (tqshape_) { int r(width()); int b(height()); - // Draw edge of top-left corner inside the area removed by the mask. + // Draw edge of top-left corner inside the area removed by the tqmask. p.drawPoint(3, 1); p.drawPoint(4, 1); @@ -254,7 +254,7 @@ WebClient::paintEvent(TQPaintEvent * pe) p.drawPoint(1, 3); p.drawPoint(1, 4); - // Draw edge of top-right corner inside the area removed by the mask. + // Draw edge of top-right corner inside the area removed by the tqmask. p.drawPoint(r - 5, 1); p.drawPoint(r - 4, 1); @@ -262,7 +262,7 @@ WebClient::paintEvent(TQPaintEvent * pe) p.drawPoint(r - 2, 3); p.drawPoint(r - 2, 4); - // Draw edge of bottom-left corner inside the area removed by the mask. + // Draw edge of bottom-left corner inside the area removed by the tqmask. p.drawPoint(1, b - 5); p.drawPoint(1, b - 4); @@ -270,7 +270,7 @@ WebClient::paintEvent(TQPaintEvent * pe) p.drawPoint(3, b - 2); p.drawPoint(4, b - 2); - // Draw edge of bottom-right corner inside the area removed by the mask. + // Draw edge of bottom-right corner inside the area removed by the tqmask. p.drawPoint(r - 2, b - 5); p.drawPoint(r - 2, b - 4); @@ -288,43 +288,43 @@ WebClient::paintEvent(TQPaintEvent * pe) void WebClient::updateWindowShape() { - if (!shape_) + if (!tqshape_) return; - TQRegion mask(0, 0, width(), height()); + TQRegion tqmask(0, 0, width(), height()); int r(width()); int b(height()); // Remove top-left corner. - mask -= TQRegion(0, 0, 5, 1); - mask -= TQRegion(0, 1, 3, 1); - mask -= TQRegion(0, 2, 2, 1); - mask -= TQRegion(0, 3, 1, 2); + tqmask -= TQRegion(0, 0, 5, 1); + tqmask -= TQRegion(0, 1, 3, 1); + tqmask -= TQRegion(0, 2, 2, 1); + tqmask -= TQRegion(0, 3, 1, 2); // Remove top-right corner. - mask -= TQRegion(r - 5, 0, 5, 1); - mask -= TQRegion(r - 3, 1, 3, 1); - mask -= TQRegion(r - 2, 2, 2, 1); - mask -= TQRegion(r - 1, 3, 1, 2); + tqmask -= TQRegion(r - 5, 0, 5, 1); + tqmask -= TQRegion(r - 3, 1, 3, 1); + tqmask -= TQRegion(r - 2, 2, 2, 1); + tqmask -= TQRegion(r - 1, 3, 1, 2); // Remove bottom-left corner. - mask -= TQRegion(0, b - 5, 1, 3); - mask -= TQRegion(0, b - 3, 2, 1); - mask -= TQRegion(0, b - 2, 3, 1); - mask -= TQRegion(0, b - 1, 5, 1); + tqmask -= TQRegion(0, b - 5, 1, 3); + tqmask -= TQRegion(0, b - 3, 2, 1); + tqmask -= TQRegion(0, b - 2, 3, 1); + tqmask -= TQRegion(0, b - 1, 5, 1); // Remove bottom-right corner. - mask -= TQRegion(r - 5, b - 1, 5, 1); - mask -= TQRegion(r - 3, b - 2, 3, 1); - mask -= TQRegion(r - 2, b - 3, 2, 1); - mask -= TQRegion(r - 1, b - 5, 1, 2); + tqmask -= TQRegion(r - 5, b - 1, 5, 1); + tqmask -= TQRegion(r - 3, b - 2, 3, 1); + tqmask -= TQRegion(r - 2, b - 3, 2, 1); + tqmask -= TQRegion(r - 1, b - 5, 1, 2); - setMask(mask); + setMask(tqmask); } KDecoration* WebFactory::createDecoration( KDecorationBridge* b ) @@ -382,4 +382,4 @@ TQValueList< WebFactory::BorderSize > WebFactory::borderSizes() const #include "Web.moc" // vim:ts=2:sw=2:tw=78:set et: -// kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on; +// kate: indent-width 2; tqreplace-tabs on; tab-width 2; space-indent on; diff --git a/kwin/clients/web/Web.h b/kwin/clients/web/Web.h index c8a8fa2db..4b24d0da6 100644 --- a/kwin/clients/web/Web.h +++ b/kwin/clients/web/Web.h @@ -46,7 +46,7 @@ namespace Web virtual TQString defaultButtonsLeft() const; virtual TQString defaultButtonsRight() const; virtual bool decorationBehaviour(DecorationBehaviour behaviour) const; - virtual int layoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const; + virtual int tqlayoutMetric(LayoutMetric lm, bool respectWindowState = true, const KCommonDecorationButton * = 0) const; virtual KCommonDecorationButton *createButton(ButtonType type); virtual void updateWindowShape(); @@ -62,7 +62,7 @@ namespace Web int titleHeight_, borderSize_; - bool shape_; + bool tqshape_; TQBitmap _buttonBitmap(ButtonType t) const; }; @@ -84,4 +84,4 @@ namespace Web #endif // vim:ts=2:sw=2:tw=78:set et: -// kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on; +// kate: indent-width 2; tqreplace-tabs on; tab-width 2; space-indent on; diff --git a/kwin/clients/web/WebButton.cpp b/kwin/clients/web/WebButton.cpp index 61811accc..b12d7bd84 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); @@ -284,4 +284,4 @@ WebButton::setBitmap(const unsigned char *bitmap) } // vim:ts=2:sw=2:tw=78:set et: -// kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on; +// kate: indent-width 2; tqreplace-tabs on; tab-width 2; space-indent on; diff --git a/kwin/clients/web/WebButton.h b/kwin/clients/web/WebButton.h index da94ea3f7..2e6a54ef1 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_; }; } @@ -67,4 +67,4 @@ namespace Web #endif // vim:ts=2:sw=2:tw=78:set et: -// kate: indent-width 2; replace-tabs on; tab-width 2; space-indent on; +// kate: indent-width 2; tqreplace-tabs on; tab-width 2; space-indent on; |