diff options
author | Slávek Banko <slavek.banko@axis.cz> | 2016-04-10 10:42:00 +0200 |
---|---|---|
committer | Slávek Banko <slavek.banko@axis.cz> | 2016-04-10 10:42:00 +0200 |
commit | 7fdc8b30e85418cca031b45ad02f723373b73433 (patch) | |
tree | 491150f68ddc476645599a00d04e27b194e9648c /src/tastybutton.cpp | |
parent | 3566ebfc3015ab32c4e0531defb41377c171fadb (diff) | |
download | tastymenu-7fdc8b30e85418cca031b45ad02f723373b73433.tar.gz tastymenu-7fdc8b30e85418cca031b45ad02f723373b73433.zip |
Initial TQt conversion
Signed-off-by: Slávek Banko <slavek.banko@axis.cz>
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 ); } |