diff options
Diffstat (limited to 'kwin/clients/web')
-rw-r--r-- | kwin/clients/web/Web.cpp | 56 | ||||
-rw-r--r-- | kwin/clients/web/Web.h | 14 | ||||
-rw-r--r-- | kwin/clients/web/WebButton.cpp | 30 | ||||
-rw-r--r-- | kwin/clients/web/WebButton.h | 12 |
4 files changed, 56 insertions, 56 deletions
diff --git a/kwin/clients/web/Web.cpp b/kwin/clients/web/Web.cpp index 7d63b7d72..43d1b9f42 100644 --- a/kwin/clients/web/Web.cpp +++ b/kwin/clients/web/Web.cpp @@ -20,7 +20,7 @@ Boston, MA 02110-1301, USA. */ -#include <qpainter.h> +#include <tqpainter.h> #include <kconfig.h> @@ -48,17 +48,17 @@ WebClient::~WebClient() // Empty. } -QString WebClient::visibleName() const +TQString WebClient::visibleName() const { return i18n("Web"); } -QString WebClient::defaultButtonsLeft() const +TQString WebClient::defaultButtonsLeft() const { return "S"; } -QString WebClient::defaultButtonsRight() const +TQString WebClient::defaultButtonsRight() const { return "HIAX"; } @@ -156,7 +156,7 @@ WebClient::init() { // title height const int textVMargin = 2; - QFontMetrics fm(options()->font(isActive(), isToolWindow())); + TQFontMetrics fm(options()->font(isActive(), isToolWindow())); // border size switch(options()->preferredBorderSize( factory())) { @@ -201,7 +201,7 @@ WebClient::reset( unsigned long changed ) // font has changed -- update title height // title height const int textVMargin = 2; - QFontMetrics fm(options()->font(isActive(), isToolWindow())); + TQFontMetrics fm(options()->font(isActive(), isToolWindow())); titleHeight_ = QMAX(QMAX(14, fm.height() + textVMargin * 2), borderSize_); if (0 != titleHeight_ % 2) titleHeight_ += 1; @@ -213,7 +213,7 @@ WebClient::reset( unsigned long changed ) } void -WebClient::paintEvent(QPaintEvent * pe) +WebClient::paintEvent(TQPaintEvent * pe) { int r_x, r_y, r_x2, r_y2; widget()->rect().coords(&r_x, &r_y, &r_x2, &r_y2); @@ -223,12 +223,12 @@ WebClient::paintEvent(QPaintEvent * pe) const int titleEdgeBottom = layoutMetric(LM_TitleEdgeBottom); const int ttlHeight = layoutMetric(LM_TitleHeight); const int titleEdgeBottomBottom = r_y+titleEdgeTop+ttlHeight+titleEdgeBottom-1; - QRect titleRect = QRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop, + TQRect titleRect = TQRect(r_x+titleEdgeLeft+buttonsLeftWidth(), r_y+titleEdgeTop, r_x2-titleEdgeRight-buttonsRightWidth()-(r_x+titleEdgeLeft+buttonsLeftWidth()), titleEdgeBottomBottom-(r_y+titleEdgeTop) ); titleRect.setTop(1); - QPainter p(widget()); + TQPainter p(widget()); p.setPen(Qt::black); p.setBrush(options()->colorGroup(ColorFrame, isActive()).background()); @@ -291,38 +291,38 @@ void WebClient::updateWindowShape() if (!shape_) return; - QRegion mask(0, 0, width(), height()); + TQRegion mask(0, 0, width(), height()); int r(width()); int b(height()); // Remove top-left corner. - mask -= QRegion(0, 0, 5, 1); - mask -= QRegion(0, 1, 3, 1); - mask -= QRegion(0, 2, 2, 1); - mask -= QRegion(0, 3, 1, 2); + mask -= TQRegion(0, 0, 5, 1); + mask -= TQRegion(0, 1, 3, 1); + mask -= TQRegion(0, 2, 2, 1); + mask -= TQRegion(0, 3, 1, 2); // Remove top-right corner. - mask -= QRegion(r - 5, 0, 5, 1); - mask -= QRegion(r - 3, 1, 3, 1); - mask -= QRegion(r - 2, 2, 2, 1); - mask -= QRegion(r - 1, 3, 1, 2); + 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); // Remove bottom-left corner. - mask -= QRegion(0, b - 5, 1, 3); - mask -= QRegion(0, b - 3, 2, 1); - mask -= QRegion(0, b - 2, 3, 1); - mask -= QRegion(0, b - 1, 5, 1); + 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); // Remove bottom-right corner. - mask -= QRegion(r - 5, b - 1, 5, 1); - mask -= QRegion(r - 3, b - 2, 3, 1); - mask -= QRegion(r - 2, b - 3, 2, 1); - mask -= QRegion(r - 1, b - 5, 1, 2); + 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); setMask(mask); } @@ -372,9 +372,9 @@ bool WebFactory::supports( Ability ability ) }; } -QValueList< WebFactory::BorderSize > WebFactory::borderSizes() const +TQValueList< WebFactory::BorderSize > WebFactory::borderSizes() const { // the list must be sorted - return QValueList< BorderSize >() << BorderNormal << BorderLarge << + return TQValueList< BorderSize >() << BorderNormal << BorderLarge << BorderVeryLarge << BorderHuge << BorderVeryHuge << BorderOversized; } diff --git a/kwin/clients/web/Web.h b/kwin/clients/web/Web.h index 183829e8d..7d7d53bfb 100644 --- a/kwin/clients/web/Web.h +++ b/kwin/clients/web/Web.h @@ -42,9 +42,9 @@ namespace Web WebClient(KDecorationBridge* bridge, KDecorationFactory* factory); ~WebClient(); - virtual QString visibleName() const; - virtual QString defaultButtonsLeft() const; - virtual QString defaultButtonsRight() const; + virtual TQString visibleName() const; + 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 KCommonDecorationButton *createButton(ButtonType type); @@ -56,7 +56,7 @@ namespace Web protected: virtual void reset( unsigned long changed ); - virtual void paintEvent(QPaintEvent *); + virtual void paintEvent(TQPaintEvent *); private: @@ -64,10 +64,10 @@ namespace Web bool shape_; - QBitmap _buttonBitmap(ButtonType t) const; + TQBitmap _buttonBitmap(ButtonType t) const; }; - class WebFactory : public QObject, public KDecorationFactory + class WebFactory : public TQObject, public KDecorationFactory { Q_OBJECT @@ -78,7 +78,7 @@ namespace Web virtual KDecoration* createDecoration( KDecorationBridge* ); virtual bool reset( unsigned long changed ); virtual bool supports( Ability ability ); - virtual QValueList< BorderSize > borderSizes() const; + virtual TQValueList< BorderSize > borderSizes() const; }; } diff --git a/kwin/clients/web/WebButton.cpp b/kwin/clients/web/WebButton.cpp index 66bedc19f..61811accc 100644 --- a/kwin/clients/web/WebButton.cpp +++ b/kwin/clients/web/WebButton.cpp @@ -19,7 +19,7 @@ Boston, MA 02110-1301, USA. */ -#include <qpainter.h> +#include <tqpainter.h> #include "WebButton.h" #include "Web.h" @@ -124,35 +124,35 @@ void WebButton::reset(unsigned long changed) } void -WebButton::enterEvent(QEvent * e) +WebButton::enterEvent(TQEvent * e) { mouseOver_ = true; repaint(); - QButton::enterEvent(e); + TQButton::enterEvent(e); } void -WebButton::leaveEvent(QEvent * e) +WebButton::leaveEvent(TQEvent * e) { mouseOver_ = false; repaint(); - QButton::leaveEvent(e); + TQButton::leaveEvent(e); } void -WebButton::drawButton(QPainter *p) +WebButton::drawButton(TQPainter *p) { - QPen highlightPen; + TQPen highlightPen; if (isDown() ) - highlightPen = QPen(colorGroup().light()); + highlightPen = TQPen(colorGroup().light()); else { if (mouseOver_) - highlightPen = QPen(colorGroup().highlight()); + highlightPen = TQPen(colorGroup().highlight()); else - highlightPen = QPen(NoPen); + highlightPen = TQPen(NoPen); } p->fillRect(rect(), colorGroup().background()); @@ -188,7 +188,7 @@ WebButton::drawButton(QPainter *p) p->setPen(highlightPen); if (shape_) - p->setClipRegion(QRegion(rect()) - QRect(0, 0, 6, 6)); + p->setClipRegion(TQRegion(rect()) - TQRect(0, 0, 6, 6)); p->drawRect(2, 2, width() - 4, height() - 4); if (shape_) @@ -224,7 +224,7 @@ WebButton::drawButton(QPainter *p) p->setPen(highlightPen); if (shape_) - p->setClipRegion(QRegion(rect()) - QRect(width() - 6, 0, 6, 6)); + p->setClipRegion(TQRegion(rect()) - TQRect(width() - 6, 0, 6, 6)); p->drawRect(2, 2, width() - 4, height() - 4); if (shape_) @@ -260,7 +260,7 @@ WebButton::drawButton(QPainter *p) // Draw icon. - QPoint center(rect().center()); + TQPoint center(rect().center()); int bwby2(bitmap_.width() / 2); // Bitmap Width BY 2 int bhby2(bitmap_.height() / 2); // Bitmap Height BY 2 @@ -275,9 +275,9 @@ WebButton::drawButton(QPainter *p) WebButton::setBitmap(const unsigned char *bitmap) { if (bitmap) - bitmap_ = QBitmap(8,8, bitmap, true); + bitmap_ = TQBitmap(8,8, bitmap, true); else - bitmap_ = QBitmap(8,8); + bitmap_ = TQBitmap(8,8); bitmap_.setMask(bitmap_); } diff --git a/kwin/clients/web/WebButton.h b/kwin/clients/web/WebButton.h index 6c1530f42..da94ea3f7 100644 --- a/kwin/clients/web/WebButton.h +++ b/kwin/clients/web/WebButton.h @@ -22,8 +22,8 @@ #ifndef KWIN_WEB_BUTTON_H #define KWIN_WEB_BUTTON_H -#include <qwidget.h> -#include <qbitmap.h> +#include <tqwidget.h> +#include <tqbitmap.h> #include <klocale.h> #include "../../lib/kcommondecoration.h" @@ -50,12 +50,12 @@ namespace Web protected: void setBitmap(const unsigned char *bitmap); - void enterEvent(QEvent *); - void leaveEvent(QEvent *); - void drawButton(QPainter *p); + void enterEvent(TQEvent *); + void leaveEvent(TQEvent *); + void drawButton(TQPainter *p); private: - QBitmap bitmap_; + TQBitmap bitmap_; bool mouseOver_; |