summaryrefslogtreecommitdiffstats
path: root/src/kbfxspinxtoolbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/kbfxspinxtoolbutton.cpp')
-rw-r--r--src/kbfxspinxtoolbutton.cpp50
1 files changed, 25 insertions, 25 deletions
diff --git a/src/kbfxspinxtoolbutton.cpp b/src/kbfxspinxtoolbutton.cpp
index 3230e14..ec69685 100644
--- a/src/kbfxspinxtoolbutton.cpp
+++ b/src/kbfxspinxtoolbutton.cpp
@@ -21,14 +21,14 @@
#include "kbfxspinxtoolbutton.h"
-KbfxSpinxToolButton::KbfxSpinxToolButton ( QWidget * parent , const char * name ) :QLabel ( parent,name,Qt::WStaticContents | Qt::WNoAutoErase |Qt::WPaintDesktop )
+KbfxSpinxToolButton::KbfxSpinxToolButton ( TQWidget * tqparent , const char * name ) :TQLabel ( tqparent,name,TQt::WStaticContents | TQt::WNoAutoErase |TQt::WPaintDesktop )
{
m_dataSource = 0;
m_dataGroup = 0;
m_fadeTime = ConfigInit().m_fadeTime;
- fade_timer = new QTimer ( this,"Fade Timer" );
- connect ( fade_timer,SIGNAL ( timeout() ),this,SLOT ( fade() ) );
+ fade_timer = new TQTimer ( this,"Fade Timer" );
+ connect ( fade_timer,TQT_SIGNAL ( timeout() ),this,TQT_SLOT ( fade() ) );
}
@@ -43,8 +43,8 @@ void KbfxSpinxToolButton::fade ( )
}
else
{
- QImage _final = m_fadePix.convertToImage ();
- QImage _current = m_current.convertToImage ();
+ TQImage _final = m_fadePix.convertToImage ();
+ TQImage _current = m_current.convertToImage ();
if ( !fade_timer->isActive ())
{
@@ -56,43 +56,43 @@ void KbfxSpinxToolButton::fade ( )
m_opacity += 0.1;
KImageEffect::blend ( _final, _current, m_opacity);
- m_current = QPixmap ( _current );
+ m_current = TQPixmap ( _current );
}
this->resize ( m_current.size() );
this->update();
}
void
-KbfxSpinxToolButton::enterEvent ( QEvent * e )
+KbfxSpinxToolButton::enterEvent ( TQEvent * e )
{
e = e;
m_fadePix = m_hover;
fade();
- this->setCursor ( QCursor ( Qt::PointingHandCursor ) );
+ this->setCursor ( TQCursor ( TQt::PointingHandCursor ) );
}
void
-KbfxSpinxToolButton::leaveEvent ( QEvent * e )
+KbfxSpinxToolButton::leaveEvent ( TQEvent * e )
{
e = e;
m_fadePix = m_normal;
fade();
- this->setCursor ( QCursor ( Qt::ArrowCursor ) );
+ this->setCursor ( TQCursor ( TQt::ArrowCursor ) );
}
void
-KbfxSpinxToolButton::setPixmaps ( QPixmap normal, QPixmap hover )
+KbfxSpinxToolButton::setPixmaps ( TQPixmap normal, TQPixmap hover )
{
- QSize _sizeNormal = normal.size();
- QImage _tmpHover = hover.convertToImage ();
- _tmpHover = _tmpHover.smoothScale ( _sizeNormal, QImage::ScaleFree );
+ TQSize _sizeNormal = normal.size();
+ TQImage _tmpHover = hover.convertToImage ();
+ _tmpHover = _tmpHover.smoothScale ( _sizeNormal, TQ_ScaleFree );
m_normal = normal;
- m_hover = QPixmap ( _tmpHover );
+ m_hover = TQPixmap ( _tmpHover );
m_current = m_normal;
resize ( m_current.size () );
- this->repaint();
+ this->tqrepaint();
this->update();
}
@@ -106,26 +106,26 @@ KbfxSpinxToolButton::setDataSource ( KbfxDataSource * src )
m_dataSource = new KbfxDataSource();
*m_dataSource = *src; // copy
KIconLoader *iconload = KGlobal::iconLoader ();
- QString m_iconPath = iconload->iconPath ( m_icon, KIcon::Desktop, false );
- m_iconPixmap = QPixmap ( m_iconPath );
+ TQString m_iconPath = iconload->iconPath ( m_icon, KIcon::Desktop, false );
+ m_iconPixmap = TQPixmap ( m_iconPath );
}
void
-KbfxSpinxToolButton::paintEvent ( QPaintEvent * e )
+KbfxSpinxToolButton::paintEvent ( TQPaintEvent * e )
{
- QRect r = e->rect();
- QPainter p;
- QPixmap buffer ( m_current.size() );
+ TQRect r = e->rect();
+ TQPainter p;
+ TQPixmap buffer ( m_current.size() );
buffer.fill();
p.begin ( this );
- p.setPen ( QColor ( 255,255,255 ) );
- p.drawPixmap ( QRect ( 0, 0, m_current.width(), m_current.height() ), m_current );
+ p.setPen ( TQColor ( 255,255,255 ) );
+ p.drawPixmap ( TQRect ( 0, 0, m_current.width(), m_current.height() ), m_current );
p.end();
}
void
-KbfxSpinxToolButton::mouseReleaseEvent ( QMouseEvent * me )
+KbfxSpinxToolButton::mouseReleaseEvent ( TQMouseEvent * me )
{
me = me;
if ( m_dataSource == 0 )