From 1d077caf68127ab1a5518df84cc5592a1b47a965 Mon Sep 17 00:00:00 2001 From: tpearson Date: Sun, 14 Aug 2011 05:14:51 +0000 Subject: TQt4 port kdeartwork This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/kdeartwork@1246991 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- kwin-styles/glow/glowbutton.cpp | 52 ++++++++++++++++++++--------------------- 1 file changed, 26 insertions(+), 26 deletions(-) (limited to 'kwin-styles/glow/glowbutton.cpp') diff --git a/kwin-styles/glow/glowbutton.cpp b/kwin-styles/glow/glowbutton.cpp index 25bae19c..87079c2e 100644 --- a/kwin-styles/glow/glowbutton.cpp +++ b/kwin-styles/glow/glowbutton.cpp @@ -87,12 +87,12 @@ GlowButton::GlowButton(TQWidget *parent, const char *name, _steps = 0; m_updateTime = 50; - m_pixmapName = TQString::null; + m_pixmapName = TQString(); m_timer = new TQTimer(this); connect(m_timer, TQT_SIGNAL(timeout()), this, TQT_SLOT(slotTimeout())); m_pos = 0; - m_timerStatus = Stop; + m_timertqStatus = Stop; setTipText (tip); setCursor(arrowCursor); @@ -116,7 +116,7 @@ TQString GlowButton::getPixmapName() const return m_pixmapName; } -Qt::ButtonState GlowButton::lastButton() const +TQt::ButtonState GlowButton::lastButton() const { return _last_button; } @@ -132,7 +132,7 @@ void GlowButton::setPixmapName(const TQString& pixmapName) // set steps _steps = pixmap->height()/pixmap->width() - 1; - repaint(false); + tqrepaint(false); } void GlowButton::paintEvent( TQPaintEvent *e ) @@ -160,7 +160,7 @@ void GlowButton::enterEvent( TQEvent *e ) { if( m_pos<0 ) m_pos=-m_pos; - m_timerStatus = Run; + m_timertqStatus = Run; if( ! m_timer->isActive() ) m_timer->start(m_updateTime); TQButton::enterEvent(e); @@ -168,7 +168,7 @@ void GlowButton::enterEvent( TQEvent *e ) void GlowButton::leaveEvent( TQEvent *e ) { - m_timerStatus = Stop; + m_timertqStatus = Stop; if( ! m_timer->isActive() ) m_timer->start(m_updateTime); TQButton::leaveEvent(e); @@ -180,11 +180,11 @@ void GlowButton::mousePressEvent( TQMouseEvent *e ) if( m_timer->isActive() ) m_timer->stop(); m_pos = _steps; - repaint(false); + tqrepaint(false); // without pretending LeftButton, clicking on the button with MidButton // or RightButton would cause unwanted titlebar action TQMouseEvent me (e->type(), e->pos(), e->globalPos(), - (e->button()&m_realizeButtons)?LeftButton:NoButton, e->state()); + (e->button()&m_realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state()); TQButton::mousePressEvent(&me); } @@ -195,22 +195,22 @@ void GlowButton::mouseReleaseEvent( TQMouseEvent *e ) if( ! m_timer->isActive() ) { m_timer->start(m_updateTime); } - if( ! geometry().contains(p) ) { - m_timerStatus = Stop; + if( ! tqgeometry().contains(p) ) { + m_timertqStatus = Stop; } TQMouseEvent me (e->type(), e->pos(), e->globalPos(), - (e->button()&m_realizeButtons)?LeftButton:NoButton, e->state()); + (e->button()&m_realizeButtons)?Qt::LeftButton:Qt::NoButton, e->state()); TQButton::mouseReleaseEvent(&me); } void GlowButton::slotTimeout() { - repaint(false); + tqrepaint(false); if( m_pos>=_steps-1 ) { m_pos = -m_pos; } - if( m_timerStatus==Stop ) { + if( m_timertqStatus==Stop ) { if( m_pos==0 ) { m_timer->stop(); return; @@ -268,29 +268,29 @@ TQPixmap * GlowButtonFactory::createGlowButtonPixmap( uint * src2_line = (uint*) fg_image.scanLine (y); uint * dst_line = (uint*) image.scanLine (i*h+y); for (int x=0; x