diff options
Diffstat (limited to 'src/kwin/iaorabutton.cpp')
-rw-r--r-- | src/kwin/iaorabutton.cpp | 58 |
1 files changed, 29 insertions, 29 deletions
diff --git a/src/kwin/iaorabutton.cpp b/src/kwin/iaorabutton.cpp index fe9c3a6..508f6af 100644 --- a/src/kwin/iaorabutton.cpp +++ b/src/kwin/iaorabutton.cpp @@ -22,12 +22,12 @@ Boston, MA 02110-1301, USA. */ -#include <qbitmap.h> -#include <qpainter.h> -#include <qpixmap.h> +#include <tqbitmap.h> +#include <tqpainter.h> +#include <tqpixmap.h> #include <kpixmap.h> #include <kpixmapeffect.h> -#include <qtimer.h> +#include <tqtimer.h> #include "iaorabutton.h" #include "iaorabutton.moc" @@ -110,38 +110,38 @@ void IaOraButton::reset(unsigned long changed) } -void IaOraButton::enterEvent(QEvent *e) +void IaOraButton::enterEvent(TQEvent *e) { - QButton::enterEvent(e); + TQButton::enterEvent(e); hover = true; repaint(false); } -void IaOraButton::leaveEvent(QEvent *e) +void IaOraButton::leaveEvent(TQEvent *e) { - QButton::leaveEvent(e); + TQButton::leaveEvent(e); hover = false; repaint(false); } -void IaOraButton::drawButton(QPainter *painter) +void IaOraButton::drawButton(TQPainter *painter) { - QRect r(0,0,width(),height()); + TQRect r(0,0,width(),height()); bool active = m_client->isActive(); KPixmap tempKPixmap; - QPixmap buffer; + TQPixmap buffer; buffer.resize(width(), height()); - QPainter bP(&buffer); + TQPainter bP(&buffer); // fake the titlebar background bP.drawTiledPixmap(0, 0, width(), width(), /*define color*/m_client->getTitleBarTile(active) ); if (type() == MenuButton) { - QPixmap menuIcon(m_client->icon().pixmap( QIconSet::Small, QIconSet::Normal)); + TQPixmap menuIcon(m_client->icon().pixmap( TQIconSet::Small, TQIconSet::Normal)); if (width() < menuIcon.width() || height() < menuIcon.height() ) { menuIcon.convertFromImage( menuIcon.convertToImage().smoothScale(width(), height())); } @@ -150,7 +150,7 @@ void IaOraButton::drawButton(QPainter *painter) else { int dX,dY; - const QBitmap &icon = Handler()->buttonBitmap(m_iconType, size(), decoration()->isToolWindow() ); + const TQBitmap &icon = Handler()->buttonBitmap(m_iconType, size(), decoration()->isToolWindow() ); dX = r.x()+(r.width()-icon.width())/2; dY = r.y()+(r.height()-icon.height())/2; if (isDown() ) { @@ -158,36 +158,36 @@ void IaOraButton::drawButton(QPainter *painter) } #if 0 if(!isDown() && Handler()->titleShadow() ) { - QColor shadowColor; - if (qGray(Handler()->getColor(TitleFont,active).rgb()) < 100) - shadowColor = QColor(255, 255, 255); + TQColor shadowColor; + if (tqGray(Handler()->getColor(TitleFont,active).rgb()) < 100) + shadowColor = TQColor(255, 255, 255); else - shadowColor = QColor(0,0,0); + shadowColor = TQColor(0,0,0); //bP.setPen(alphaBlendColors(sourfaceTop, shadowColor, 180) ); bP.drawPixmap(dX+1, dY+1, icon); } #endif bP.setPen(Handler()->getColor(TitleFont,hover ? false : active) ); bP.drawPixmap(dX, dY, icon,0,0,icon.width(),icon.height()/2); - bP.setPen(QColor("#CFD7DF") ); + bP.setPen(TQColor("#CFD7DF") ); bP.drawPixmap(dX, dY+icon.height()/2, icon,0,icon.height()/2,icon.width(),icon.height()); } bP.end(); painter->drawPixmap(0, 0, buffer); } -QBitmap IconEngine::icon(ButtonIcon icon, int size) +TQBitmap IconEngine::icon(ButtonIcon icon, int size) { if (size%2 == 0) --size; - QBitmap bitmap(size,size); - bitmap.fill(Qt::color0); - QPainter p(&bitmap); + TQBitmap bitmap(size,size); + bitmap.fill(TQt::color0); + TQPainter p(&bitmap); - p.setPen(Qt::color1); + p.setPen(TQt::color1); - QRect r = bitmap.rect(); + TQRect r = bitmap.rect(); // line widths int lwTitleBar = 1; @@ -203,8 +203,8 @@ QBitmap IconEngine::icon(ButtonIcon icon, int size) lwArrow = 2; } - //QColor col1( "#FFFFFF" ); - //QColor col2( "#CFD7DF" ); + //TQColor col1( "#FFFFFF" ); + //TQColor col2( "#CFD7DF" ); switch(icon) { case CloseIcon: @@ -430,7 +430,7 @@ QBitmap IconEngine::icon(ButtonIcon icon, int size) lw2 = 1; } - int h = QMAX( (r.width()/2), (lw1+2*lw2) ); + int h = TQMAX( (r.width()/2), (lw1+2*lw2) ); // horizontal bars drawObject(p, HorizontalLine, r.x(), r.y(), r.width(), lw1); @@ -453,7 +453,7 @@ QBitmap IconEngine::icon(ButtonIcon icon, int size) return bitmap; } -void IconEngine::drawObject(QPainter &p, Object object, int x, int y, int length, int lineWidth) +void IconEngine::drawObject(TQPainter &p, Object object, int x, int y, int length, int lineWidth) { switch(object) { case DiagonalLine: |