summaryrefslogtreecommitdiffstats
path: root/src/k3bwidgetshoweffect.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 19:21:21 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-05-27 19:21:21 +0000
commitd8cc8bdfa7fa624a526d5aa1626974e1444cb799 (patch)
treef295f1c545b319963d5357af79fe08991d8141d9 /src/k3bwidgetshoweffect.cpp
parent2a39a080579fb52a2599c02b2939795385b89093 (diff)
downloadk3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.tar.gz
k3b-d8cc8bdfa7fa624a526d5aa1626974e1444cb799.zip
TQt4 port k3b
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/k3b@1233803 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/k3bwidgetshoweffect.cpp')
-rw-r--r--src/k3bwidgetshoweffect.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/src/k3bwidgetshoweffect.cpp b/src/k3bwidgetshoweffect.cpp
index 1caa971..fb4dc62 100644
--- a/src/k3bwidgetshoweffect.cpp
+++ b/src/k3bwidgetshoweffect.cpp
@@ -21,12 +21,12 @@
#include "k3bwidgetshoweffect.h"
-#include <qpainter.h>
-#include <qwidget.h>
+#include <tqpainter.h>
+#include <tqwidget.h>
-K3bWidgetShowEffect::K3bWidgetShowEffect( QWidget* widget, Effect e )
- : QObject( widget ),
+K3bWidgetShowEffect::K3bWidgetShowEffect( TQWidget* widget, Effect e )
+ : TQObject( widget ),
m_effect( e ),
m_widget( widget ),
m_dissolveSize( 0 ),
@@ -63,14 +63,14 @@ void K3bWidgetShowEffect::show( bool effectOnly )
m_widget->polish();
if( m_effect == Dissolve ) {
- // necessary to create the mask
- m_mask.resize( m_widget->width(), m_widget->height() );
- // make the mask empty and hence will not show widget with show() called below
+ // necessary to create the tqmask
+ m_tqmask.resize( m_widget->width(), m_widget->height() );
+ // make the tqmask empty and hence will not show widget with show() called below
dissolveMask();
m_timerId = startTimer( 1000 / 30 );
}
else {
- m_widget->move( 0, m_widget->parentWidget()->height() );
+ m_widget->move( 0, m_widget->tqparentWidget()->height() );
m_timerId = startTimer( 6 );
}
@@ -79,7 +79,7 @@ void K3bWidgetShowEffect::show( bool effectOnly )
}
-void K3bWidgetShowEffect::timerEvent( QTimerEvent* )
+void K3bWidgetShowEffect::timerEvent( TQTimerEvent* )
{
switch( m_effect ) {
case Slide:
@@ -96,19 +96,19 @@ void K3bWidgetShowEffect::timerEvent( QTimerEvent* )
void K3bWidgetShowEffect::dissolveMask()
{
if( m_bShow ) {
- m_widget->repaint( false );
- QPainter maskPainter(&m_mask);
+ m_widget->tqrepaint( false );
+ TQPainter tqmaskPainter(&m_tqmask);
- m_mask.fill(Qt::black);
+ m_tqmask.fill(TQt::black);
- maskPainter.setBrush(Qt::white);
- maskPainter.setPen(Qt::white);
- maskPainter.drawRect( m_mask.rect() );
+ tqmaskPainter.setBrush(TQt::white);
+ tqmaskPainter.setPen(TQt::white);
+ tqmaskPainter.drawRect( m_tqmask.rect() );
m_dissolveSize += m_dissolveDelta;
if( m_dissolveSize > 0 ) {
- maskPainter.setRasterOp( Qt::EraseROP );
+ tqmaskPainter.setRasterOp( TQt::EraseROP );
int x, y, s;
const int size = 16;
@@ -121,7 +121,7 @@ void K3bWidgetShowEffect::dissolveMask()
if( s < 0 )
break;
- maskPainter.drawEllipse(x - s / 2, y - s / 2, s, s);
+ tqmaskPainter.drawEllipse(x - s / 2, y - s / 2, s, s);
}
}
}
@@ -135,7 +135,7 @@ void K3bWidgetShowEffect::dissolveMask()
deleteLater();
}
- m_widget->setMask( m_mask );
+ m_widget->setMask( m_tqmask );
}
else {
@@ -153,7 +153,7 @@ void K3bWidgetShowEffect::dissolveMask()
void K3bWidgetShowEffect::slideMask()
{
if( m_bShow ) {
- m_widget->move( 0, m_widget->parentWidget()->height() - m_offset );
+ m_widget->move( 0, m_widget->tqparentWidget()->height() - m_offset );
m_offset++;
if( m_offset > m_widget->height() ) {
@@ -167,7 +167,7 @@ void K3bWidgetShowEffect::slideMask()
}
else {
m_offset--;
- m_widget->move( 0, m_widget->parentWidget()->height() - m_offset );
+ m_widget->move( 0, m_widget->tqparentWidget()->height() - m_offset );
if( m_offset < 0 ) {
// finally hide the widget
@@ -183,7 +183,7 @@ void K3bWidgetShowEffect::slideMask()
-K3bWidgetShowEffect* K3bWidgetShowEffect::showWidget( QWidget* w, Effect m )
+K3bWidgetShowEffect* K3bWidgetShowEffect::showWidget( TQWidget* w, Effect m )
{
K3bWidgetShowEffect* e = new K3bWidgetShowEffect( w, m );
e->m_deleteSelf = true;
@@ -192,7 +192,7 @@ K3bWidgetShowEffect* K3bWidgetShowEffect::showWidget( QWidget* w, Effect m )
}
-K3bWidgetShowEffect* K3bWidgetShowEffect::hideWidget( QWidget* w, Effect m )
+K3bWidgetShowEffect* K3bWidgetShowEffect::hideWidget( TQWidget* w, Effect m )
{
K3bWidgetShowEffect* e = new K3bWidgetShowEffect( w, m );
e->m_deleteSelf = true;