diff options
Diffstat (limited to 'src/tastybutton.cpp')
-rw-r--r-- | src/tastybutton.cpp | 32 |
1 files changed, 16 insertions, 16 deletions
diff --git a/src/tastybutton.cpp b/src/tastybutton.cpp index 9f89c05..fb4eb9a 100644 --- a/src/tastybutton.cpp +++ b/src/tastybutton.cpp @@ -19,14 +19,14 @@ ***************************************************************************/ #include "tastybutton.h" -#include <qimage.h> -#include <qpainter.h> -#include <qpalette.h> -#include <qcolor.h> +#include <tqimage.h> +#include <tqpainter.h> +#include <tqpalette.h> +#include <tqcolor.h> #include <kimageeffect.h> -TastyButton::TastyButton(QWidget *parent) - : QToolButton(parent) +TastyButton::TastyButton(TQWidget *parent) + : TQToolButton(parent) { iconEffect = new KIconEffect(); iconEffect->init(); @@ -37,17 +37,17 @@ TastyButton::~TastyButton() { } -void TastyButton::drawButton( QPainter * p ) +void TastyButton::drawButton( TQPainter * p ) { //background image or pseudo transparency if( parentWidget()->erasePixmap() ) { - const QPixmap erasePix(size()); - QPainter buffPainter(&erasePix); - buffPainter.drawPixmap(QPoint(0, 0), *parentWidget()->erasePixmap(), geometry()); + const TQPixmap erasePix(size()); + TQPainter buffPainter(&erasePix); + buffPainter.drawPixmap(TQPoint(0, 0), *parentWidget()->erasePixmap(), geometry()); buffPainter.end(); - QImage eraseImg = erasePix.convertToImage(); + TQImage eraseImg = erasePix.convertToImage(); if( isDown() ) { KImageEffect::fade(eraseImg, 0.25, black); @@ -73,7 +73,7 @@ void TastyButton::drawButton( QPainter * p ) x=++y; //deciding the text color to use int h,s,v; - QColor(eraseImg.pixel(x,y)).getHsv( h, s, v ); + TQColor(eraseImg.pixel(x,y)).getHsv( h, s, v ); // is purely empirical :) if( v > 140) lightScore++; else lightScore--; @@ -103,14 +103,14 @@ void TastyButton::drawButton( QPainter * p ) drawButtonLabel(p); } -void TastyButton::setIconSet( QIconSet is ) +void TastyButton::setIconSet( TQIconSet is ) { is.setPixmap(iconEffect->apply(is.pixmap(), (int)KIcon::Panel, (int)KIcon::ActiveState), - QIconSet::Automatic, - QIconSet::Active); + TQIconSet::Automatic, + TQIconSet::Active); - QToolButton::setIconSet( is ); + TQToolButton::setIconSet( is ); } |