From 7fdc8b30e85418cca031b45ad02f723373b73433 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sl=C3=A1vek=20Banko?= Date: Sun, 10 Apr 2016 10:42:00 +0200 Subject: Initial TQt conversion MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Slávek Banko --- src/tastybutton.cpp | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) (limited to 'src/tastybutton.cpp') 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 -#include -#include -#include +#include +#include +#include +#include #include -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 ); } -- cgit v1.2.1