summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrEffectHandler.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrEffectHandler.cpp')
-rw-r--r--kpresenter/KPrEffectHandler.cpp302
1 files changed, 151 insertions, 151 deletions
diff --git a/kpresenter/KPrEffectHandler.cpp b/kpresenter/KPrEffectHandler.cpp
index 79853dd7..ddc96d91 100644
--- a/kpresenter/KPrEffectHandler.cpp
+++ b/kpresenter/KPrEffectHandler.cpp
@@ -28,21 +28,21 @@
#include <KoZoomHandler.h>
#include <kapplication.h>
-#include <qpainter.h>
-#include <qpaintdevice.h>
+#include <tqpainter.h>
+#include <tqpaintdevice.h>
#include <unistd.h>
-KPrEffectHandler::KPrEffectHandler( PresStep step, bool back, QPaintDevice *dst, QPixmap *src,
- const QPtrList<KPrObject> &objects, KPrView *view, int _presSpeed )
+KPrEffectHandler::KPrEffectHandler( PresStep step, bool back, TQPaintDevice *dst, TQPixmap *src,
+ const TQPtrList<KPrObject> &objects, KPrView *view, int _presSpeed )
: m_effectStep(0), m_step(step), m_back(back), m_dst(dst),
- m_paint(*src), m_objects(objects), m_view(view), m_soundEffect(QString::null),
+ m_paint(*src), m_objects(objects), m_view(view), m_soundEffect(TQString()),
m_objectTimer(1)
{
- m_src = new QPixmap( *src );
+ m_src = new TQPixmap( *src );
- QPtrListIterator<KPrObject> it( m_objects );
+ TQPtrListIterator<KPrObject> it( m_objects );
for ( ; it.current(); ++it )
{
KPrObject *object = it.current();
@@ -107,10 +107,10 @@ bool KPrEffectHandler::doEffect()
}
if ( !m_appearEffectObjects.isEmpty() || !m_disappearEffectObjects.isEmpty() )
{
- QPtrList<QRect> m_removeRects;
+ TQPtrList<TQRect> m_removeRects;
KPrObject *appearObject = m_appearEffectObjects.first();
KPrObject *disappearObject = m_disappearEffectObjects.first();
- QPtrListIterator<KPrObject> it( m_objects );
+ TQPtrListIterator<KPrObject> it( m_objects );
KPrObject *object;
while ( ( object = it.current() ) != 0 )
@@ -129,7 +129,7 @@ bool KPrEffectHandler::doEffect()
if ( doAppearEffectStep( object ) )
{
- m_removeRects.append( m_repaintRects.getLast() );
+ m_removeRects.append( m_tqrepaintRects.getLast() );
if ( appearObject != m_appearEffectObjects.getLast() )
{
next = false;
@@ -170,31 +170,31 @@ bool KPrEffectHandler::doEffect()
}
++m_effectStep;
- QRect *r;
+ TQRect *r;
#if 0 // used for debugging effects
- QPtrListIterator<QRect> it_debug(m_repaintRects);
+ TQPtrListIterator<TQRect> it_debug(m_tqrepaintRects);
while( ( r = it_debug.current() ) != 0 )
{
++it_debug;
- QPainter p( &m_paint );
- QPen pen = QPen( Qt::red, 1, Qt::DashLine );
+ TQPainter p( &m_paint );
+ TQPen pen = TQPen( TQt::red, 1, TQt::DashLine );
p.setPen( pen );
p.drawRect( *r );
}
- QPtrListIterator<QRect> it_debug2(m_lastRepaintRects);
+ TQPtrListIterator<TQRect> it_debug2(m_lastRepaintRects);
while( ( r = it_debug2.current() ) != 0 )
{
++it_debug2;
- QPainter p( &m_paint );
- QPen pen = QPen( Qt::green, 1, Qt::DashLine );
+ TQPainter p( &m_paint );
+ TQPen pen = TQPen( TQt::green, 1, TQt::DashLine );
p.setPen( pen );
p.drawRect( *r );
}
sleep( 1 );
#endif
- QPtrListIterator<QRect> it_r(m_repaintRects);
+ TQPtrListIterator<TQRect> it_r(m_tqrepaintRects);
#if 1
while( ( r = it_r.current() ) != 0 )
{
@@ -202,7 +202,7 @@ bool KPrEffectHandler::doEffect()
//bitBlt( m_dst, r->x(), r->y(), &m_paint, r->x(), r->y(), r->width(), r->height() );
bitBlt( m_dst, r->x() - 5, r->y() - 5, &m_paint, r->x() - 5, r->y() - 5, r->width() + 10, r->height() + 10 );
}
- QPtrListIterator<QRect> it2(m_lastRepaintRects);
+ TQPtrListIterator<TQRect> it2(m_lastRepaintRects);
while( ( r = it2.current() ) != 0 )
{
++it2;
@@ -213,15 +213,15 @@ bool KPrEffectHandler::doEffect()
bitBlt( m_dst, 0, 0, &m_paint);
#endif
- m_lastRepaintRects = m_repaintRects;
- QPtrListIterator<QRect> it3(m_removeRects);
+ m_lastRepaintRects = m_tqrepaintRects;
+ TQPtrListIterator<TQRect> it3(m_removeRects);
while( ( r = it3.current() ) != 0 )
{
++it3;
m_lastRepaintRects.remove( r );
}
- m_repaintRects.clear();
+ m_tqrepaintRects.clear();
m_paint = *m_src;
@@ -240,7 +240,7 @@ void KPrEffectHandler::finish()
{
KPrObject *appearObject = m_appearEffectObjects.first();
KPrObject *disappearObject = m_disappearEffectObjects.first();
- QPtrListIterator<KPrObject> it( m_objects );
+ TQPtrListIterator<KPrObject> it( m_objects );
KPrObject *object;
while ( ( object = it.current() ) != 0 )
@@ -250,8 +250,8 @@ void KPrEffectHandler::finish()
{
bool next = true;
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- m_repaintRects.append( new QRect( objectRect ) );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ m_tqrepaintRects.append( new TQRect( objectRect ) );
if ( appearObject != m_appearEffectObjects.getLast() )
{
@@ -396,8 +396,8 @@ bool KPrEffectHandler::doDisappearEffectStep( KPrObject *object )
bool KPrEffectHandler::appearNone( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- m_repaintRects.append( new QRect( objectRect ) );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ m_tqrepaintRects.append( new TQRect( objectRect ) );
drawObject( object, 0, 0, &m_paint );
return true;
}
@@ -405,10 +405,10 @@ bool KPrEffectHandler::appearNone( KPrObject *object )
bool KPrEffectHandler::appearComeLeft( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
- int xdiff = repaintRect.x() - ox;
+ int xdiff = tqrepaintRect.x() - ox;
bool positionReached = false;
int x = m_effectStep * m_stepWidth - objectRect.width();
@@ -417,8 +417,8 @@ bool KPrEffectHandler::appearComeLeft( KPrObject *object )
x = ox;
positionReached = true;
}
- repaintRect.moveLeft( x + xdiff );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveLeft( x + xdiff );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler appearComeLeft x = " << x << " " << positionReached << endl;
drawObject( object, x - ox, 0, &m_paint );
@@ -429,10 +429,10 @@ bool KPrEffectHandler::appearComeLeft( KPrObject *object )
bool KPrEffectHandler::appearComeTop( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int oy = objectRect.y();
- int ydiff = repaintRect.y() - oy;
+ int ydiff = tqrepaintRect.y() - oy;
bool positionReached = false;
int y = m_effectStep * m_stepHeight - objectRect.height();
@@ -441,8 +441,8 @@ bool KPrEffectHandler::appearComeTop( KPrObject *object )
y = oy;
positionReached = true;
}
- repaintRect.moveTop( y + ydiff );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveTop( y + ydiff );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler appearComeTop y = " << y << " " << positionReached << endl;
drawObject( object, 0, y - oy, &m_paint );
@@ -453,10 +453,10 @@ bool KPrEffectHandler::appearComeTop( KPrObject *object )
bool KPrEffectHandler::appearComeRight( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
- int xdiff = repaintRect.x() - ox;
+ int xdiff = tqrepaintRect.x() - ox;
bool positionReached = false;
int x = m_src->width() - m_effectStep * m_stepWidth;
@@ -465,8 +465,8 @@ bool KPrEffectHandler::appearComeRight( KPrObject *object )
x = ox;
positionReached = true;
}
- repaintRect.moveLeft( x + xdiff );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveLeft( x + xdiff );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler appearComeRight x = " << x << " " << positionReached << endl;
drawObject( object, x - ox, 0, &m_paint );
@@ -477,10 +477,10 @@ bool KPrEffectHandler::appearComeRight( KPrObject *object )
bool KPrEffectHandler::appearComeBottom( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int oy = objectRect.y();
- int ydiff = repaintRect.y() - oy;
+ int ydiff = tqrepaintRect.y() - oy;
bool positionReached = false;
int y = m_src->height() - m_effectStep * m_stepHeight;
@@ -489,8 +489,8 @@ bool KPrEffectHandler::appearComeBottom( KPrObject *object )
y = oy;
positionReached = true;
}
- repaintRect.moveTop( y + ydiff );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveTop( y + ydiff );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler appearComeBottom y = " << y << " " << positionReached << endl;
drawObject( object, 0, y - oy, &m_paint );
@@ -501,12 +501,12 @@ bool KPrEffectHandler::appearComeBottom( KPrObject *object )
bool KPrEffectHandler::appearComeLeftTop( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
int oy = objectRect.y();
- int xdiff = repaintRect.x() - ox;
- int ydiff = repaintRect.y() - oy;
+ int xdiff = tqrepaintRect.x() - ox;
+ int ydiff = tqrepaintRect.y() - oy;
bool positionReached = false;
int x = m_effectStep * m_stepWidth - objectRect.width();
@@ -521,9 +521,9 @@ bool KPrEffectHandler::appearComeLeftTop( KPrObject *object )
if ( x == ox && y == oy )
positionReached = true;
- repaintRect.moveLeft( x + xdiff );
- repaintRect.moveTop( y + ydiff );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveLeft( x + xdiff );
+ tqrepaintRect.moveTop( y + ydiff );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler appearComeLeftTop x = " << x << ",y = " << y << " " << positionReached << endl;
drawObject( object, x - ox, y - oy, &m_paint );
@@ -534,12 +534,12 @@ bool KPrEffectHandler::appearComeLeftTop( KPrObject *object )
bool KPrEffectHandler::appearComeLeftBottom( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
int oy = objectRect.y();
- int xdiff = repaintRect.x() - ox;
- int ydiff = repaintRect.y() - oy;
+ int xdiff = tqrepaintRect.x() - ox;
+ int ydiff = tqrepaintRect.y() - oy;
bool positionReached = false;
int x = m_effectStep * m_stepWidth - objectRect.width();
@@ -554,9 +554,9 @@ bool KPrEffectHandler::appearComeLeftBottom( KPrObject *object )
if ( x == ox && y == oy )
positionReached = true;
- repaintRect.moveLeft( x + xdiff );
- repaintRect.moveTop( y + ydiff );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveLeft( x + xdiff );
+ tqrepaintRect.moveTop( y + ydiff );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler appearComeLeftBottom x = " << x << ",y = " << y << " " << positionReached << endl;
drawObject( object, x - ox, y - oy, &m_paint );
@@ -567,12 +567,12 @@ bool KPrEffectHandler::appearComeLeftBottom( KPrObject *object )
bool KPrEffectHandler::appearComeRightTop( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
int oy = objectRect.y();
- int xdiff = repaintRect.x() - ox;
- int ydiff = repaintRect.y() - oy;
+ int xdiff = tqrepaintRect.x() - ox;
+ int ydiff = tqrepaintRect.y() - oy;
bool positionReached = false;
int x = m_src->width() - m_effectStep * m_stepWidth;
@@ -587,9 +587,9 @@ bool KPrEffectHandler::appearComeRightTop( KPrObject *object )
if ( x == ox && y == oy )
positionReached = true;
- repaintRect.moveLeft( x + xdiff );
- repaintRect.moveTop( y + ydiff );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveLeft( x + xdiff );
+ tqrepaintRect.moveTop( y + ydiff );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler appearComeRightTop x = " << x << ",y = " << y << " " << positionReached << endl;
drawObject( object, x - ox, y - oy, &m_paint );
@@ -600,12 +600,12 @@ bool KPrEffectHandler::appearComeRightTop( KPrObject *object )
bool KPrEffectHandler::appearComeRightBottom( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
int oy = objectRect.y();
- int xdiff = repaintRect.x() - ox;
- int ydiff = repaintRect.y() - oy;
+ int xdiff = tqrepaintRect.x() - ox;
+ int ydiff = tqrepaintRect.y() - oy;
bool positionReached = false;
int x = m_src->width() - m_effectStep * m_stepWidth;
@@ -620,9 +620,9 @@ bool KPrEffectHandler::appearComeRightBottom( KPrObject *object )
if ( x == ox && y == oy )
positionReached = true;
- repaintRect.moveLeft( x + xdiff );
- repaintRect.moveTop( y + ydiff );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveLeft( x + xdiff );
+ tqrepaintRect.moveTop( y + ydiff );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler appearComeRightBottom x = " << x << ",y = " << y << " " << positionReached << endl;
drawObject( object, x - ox, y - oy, &m_paint );
@@ -633,8 +633,8 @@ bool KPrEffectHandler::appearComeRightBottom( KPrObject *object )
bool KPrEffectHandler::appearWipeLeft( KPrObject *object )
{
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
- int ow = repaintRect.width();
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ int ow = tqrepaintRect.width();
bool positionReached = false;
int w = m_effectStep * m_stepWidth;
@@ -644,17 +644,17 @@ bool KPrEffectHandler::appearWipeLeft( KPrObject *object )
positionReached = true;
}
- repaintRect.setWidth( w );
- m_repaintRects.append( new QRect( repaintRect ) );
- drawObject( object, 0, 0, &m_paint, &repaintRect );
+ tqrepaintRect.setWidth( w );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
+ drawObject( object, 0, 0, &m_paint, &tqrepaintRect );
//kdDebug(33001) << "KPrEffectHandler appearWipeLeft w = " << w << positionReached << endl;
return positionReached;
}
bool KPrEffectHandler::appearWipeRight( KPrObject *object )
{
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
- int ow = repaintRect.width();
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ int ow = tqrepaintRect.width();
bool positionReached = false;
int w = m_effectStep * m_stepWidth;
@@ -664,9 +664,9 @@ bool KPrEffectHandler::appearWipeRight( KPrObject *object )
positionReached = true;
}
- repaintRect.setLeft( repaintRect.right() - w );
- m_repaintRects.append( new QRect( repaintRect ) );
- drawObject( object, 0, 0, &m_paint, &repaintRect );
+ tqrepaintRect.setLeft( tqrepaintRect.right() - w );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
+ drawObject( object, 0, 0, &m_paint, &tqrepaintRect );
//kdDebug(33001) << "KPrEffectHandler appearWipeLeft w = " << w << positionReached << endl;
return positionReached;
}
@@ -674,8 +674,8 @@ bool KPrEffectHandler::appearWipeRight( KPrObject *object )
bool KPrEffectHandler::appearWipeTop( KPrObject *object )
{
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
- int oh = repaintRect.height();
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ int oh = tqrepaintRect.height();
bool positionReached = false;
int h = m_effectStep * m_stepHeight;
@@ -685,9 +685,9 @@ bool KPrEffectHandler::appearWipeTop( KPrObject *object )
positionReached = true;
}
- repaintRect.setHeight( h );
- m_repaintRects.append( new QRect( repaintRect ) );
- drawObject( object, 0, 0, &m_paint, &repaintRect );
+ tqrepaintRect.setHeight( h );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
+ drawObject( object, 0, 0, &m_paint, &tqrepaintRect );
//kdDebug(33001) << "KPrEffectHandler appearWipeLeft h = " << h << positionReached << endl;
return positionReached;
}
@@ -695,8 +695,8 @@ bool KPrEffectHandler::appearWipeTop( KPrObject *object )
bool KPrEffectHandler::appearWipeBottom( KPrObject *object )
{
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
- int oh = repaintRect.height();
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ int oh = tqrepaintRect.height();
bool positionReached = false;
int h = m_effectStep * m_stepHeight;
@@ -706,9 +706,9 @@ bool KPrEffectHandler::appearWipeBottom( KPrObject *object )
positionReached = true;
}
- repaintRect.setTop( repaintRect.bottom() - h );
- m_repaintRects.append( new QRect( repaintRect ) );
- drawObject( object, 0, 0, &m_paint, &repaintRect );
+ tqrepaintRect.setTop( tqrepaintRect.bottom() - h );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
+ drawObject( object, 0, 0, &m_paint, &tqrepaintRect );
//kdDebug(33001) << "KPrEffectHandler appearWipeLeft h = " << h << positionReached << endl;
return positionReached;
}
@@ -716,8 +716,8 @@ bool KPrEffectHandler::appearWipeBottom( KPrObject *object )
bool KPrEffectHandler::disappearGoLeft( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
bool positionReached = false;
@@ -728,8 +728,8 @@ bool KPrEffectHandler::disappearGoLeft( KPrObject *object )
}
else
{
- repaintRect.moveBy( -x, 0 );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveBy( -x, 0 );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler disappearGoLeft x = " << -x + ox << " " << positionReached << endl;
drawObject( object, -x, 0, &m_paint );
}
@@ -740,8 +740,8 @@ bool KPrEffectHandler::disappearGoLeft( KPrObject *object )
bool KPrEffectHandler::disappearGoTop( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int oy = objectRect.y();
bool positionReached = false;
@@ -752,8 +752,8 @@ bool KPrEffectHandler::disappearGoTop( KPrObject *object )
}
else
{
- repaintRect.moveBy( 0, -y );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveBy( 0, -y );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler disappearGoTop y = " << -y + oy << " " << positionReached << endl;
drawObject( object, 0, -y, &m_paint );
}
@@ -765,7 +765,7 @@ bool KPrEffectHandler::disappearGoTop( KPrObject *object )
bool KPrEffectHandler::disappearGoRight( KPrObject *object )
{
int ox = m_view->zoomHandler()->zoomItX( object->getRealRect().x() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
bool positionReached = false;
int x = m_effectStep * m_stepWidth;
@@ -775,8 +775,8 @@ bool KPrEffectHandler::disappearGoRight( KPrObject *object )
}
else
{
- repaintRect.moveBy( x, 0 );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveBy( x, 0 );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler disappearGoRight x = " << x + ox << " " << positionReached << endl;
drawObject( object, x, 0, &m_paint );
}
@@ -788,7 +788,7 @@ bool KPrEffectHandler::disappearGoRight( KPrObject *object )
bool KPrEffectHandler::disappearGoBottom( KPrObject *object )
{
int oy = m_view->zoomHandler()->zoomItY( object->getRealRect().y() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
bool positionReached = false;
int y = m_effectStep * m_stepHeight;
@@ -798,8 +798,8 @@ bool KPrEffectHandler::disappearGoBottom( KPrObject *object )
}
else
{
- repaintRect.moveBy( 0, y );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveBy( 0, y );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler disappearGoBottom y = " << y + oy << " " << positionReached << endl;
drawObject( object, 0, y, &m_paint );
}
@@ -810,8 +810,8 @@ bool KPrEffectHandler::disappearGoBottom( KPrObject *object )
bool KPrEffectHandler::disappearGoLeftTop( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
int oy = objectRect.y();
@@ -824,8 +824,8 @@ bool KPrEffectHandler::disappearGoLeftTop( KPrObject *object )
}
else
{
- repaintRect.moveBy( -x, -y );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveBy( -x, -y );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler disappearGoLeftTop x = " << -x + ox << ", y = " << -y + oy << positionReached << endl;
drawObject( object, -x, -y, &m_paint );
}
@@ -836,8 +836,8 @@ bool KPrEffectHandler::disappearGoLeftTop( KPrObject *object )
bool KPrEffectHandler::disappearGoLeftBottom( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
int oy = objectRect.y();
@@ -850,8 +850,8 @@ bool KPrEffectHandler::disappearGoLeftBottom( KPrObject *object )
}
else
{
- repaintRect.moveBy( -x, y );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveBy( -x, y );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler disappearGoLeftTop x = " << -x + ox << ", y = " << y + oy << positionReached << endl;
drawObject( object, -x, y, &m_paint );
}
@@ -862,8 +862,8 @@ bool KPrEffectHandler::disappearGoLeftBottom( KPrObject *object )
bool KPrEffectHandler::disappearGoRightTop( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
int oy = objectRect.y();
@@ -876,8 +876,8 @@ bool KPrEffectHandler::disappearGoRightTop( KPrObject *object )
}
else
{
- repaintRect.moveBy( x, -y );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveBy( x, -y );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler disappearGoLeftTop x = " << x + ox << ", y = " << -y + oy << positionReached << endl;
drawObject( object, x, -y, &m_paint );
}
@@ -888,8 +888,8 @@ bool KPrEffectHandler::disappearGoRightTop( KPrObject *object )
bool KPrEffectHandler::disappearGoRightBottom( KPrObject *object )
{
- QRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ TQRect objectRect = m_view->zoomHandler()->zoomRect( object->getRealRect() );
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
int ox = objectRect.x();
int oy = objectRect.y();
@@ -902,8 +902,8 @@ bool KPrEffectHandler::disappearGoRightBottom( KPrObject *object )
}
else
{
- repaintRect.moveBy( x, y );
- m_repaintRects.append( new QRect( repaintRect ) );
+ tqrepaintRect.moveBy( x, y );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
//kdDebug(33001) << "KPrEffectHandler disappearGoLeftTop x = " << x + ox << ", y = " << y + oy << positionReached << endl;
drawObject( object, x, y, &m_paint );
}
@@ -914,8 +914,8 @@ bool KPrEffectHandler::disappearGoRightBottom( KPrObject *object )
bool KPrEffectHandler::disappearWipeLeft( KPrObject *object )
{
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
- int ow = repaintRect.width();
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ int ow = tqrepaintRect.width();
bool positionReached = false;
int w = ow - m_effectStep * m_stepWidth;
@@ -925,9 +925,9 @@ bool KPrEffectHandler::disappearWipeLeft( KPrObject *object )
}
else
{
- repaintRect.setWidth( w );
- m_repaintRects.append( new QRect( repaintRect ) );
- drawObject( object, 0, 0, &m_paint, &repaintRect );
+ tqrepaintRect.setWidth( w );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
+ drawObject( object, 0, 0, &m_paint, &tqrepaintRect );
//kdDebug(33001) << "KPrEffectHandler appearWipeLeft w = " << w << positionReached << endl;
}
return positionReached;
@@ -936,8 +936,8 @@ bool KPrEffectHandler::disappearWipeLeft( KPrObject *object )
bool KPrEffectHandler::disappearWipeRight( KPrObject *object )
{
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
- int ow = repaintRect.width();
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ int ow = tqrepaintRect.width();
bool positionReached = false;
int w = ow - m_effectStep * m_stepWidth;
@@ -947,9 +947,9 @@ bool KPrEffectHandler::disappearWipeRight( KPrObject *object )
}
else
{
- repaintRect.setLeft( repaintRect.right() - w );
- m_repaintRects.append( new QRect( repaintRect ) );
- drawObject( object, 0, 0, &m_paint, &repaintRect );
+ tqrepaintRect.setLeft( tqrepaintRect.right() - w );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
+ drawObject( object, 0, 0, &m_paint, &tqrepaintRect );
//kdDebug(33001) << "KPrEffectHandler appearWipeLeft w = " << w << positionReached << endl;
}
return positionReached;
@@ -958,8 +958,8 @@ bool KPrEffectHandler::disappearWipeRight( KPrObject *object )
bool KPrEffectHandler::disappearWipeTop( KPrObject *object )
{
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
- int oh = repaintRect.height();
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ int oh = tqrepaintRect.height();
bool positionReached = false;
int h = oh - m_effectStep * m_stepHeight;
@@ -969,9 +969,9 @@ bool KPrEffectHandler::disappearWipeTop( KPrObject *object )
}
else
{
- repaintRect.setHeight( h );
- m_repaintRects.append( new QRect( repaintRect ) );
- drawObject( object, 0, 0, &m_paint, &repaintRect );
+ tqrepaintRect.setHeight( h );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
+ drawObject( object, 0, 0, &m_paint, &tqrepaintRect );
//kdDebug(33001) << "KPrEffectHandler appearWipeLeft h = " << h << positionReached << endl;
}
return positionReached;
@@ -980,8 +980,8 @@ bool KPrEffectHandler::disappearWipeTop( KPrObject *object )
bool KPrEffectHandler::disappearWipeBottom( KPrObject *object )
{
- QRect repaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
- int oh = repaintRect.height();
+ TQRect tqrepaintRect = m_view->zoomHandler()->zoomRect( object->getRepaintRect() );
+ int oh = tqrepaintRect.height();
bool positionReached = false;
int h = oh - m_effectStep * m_stepHeight;
@@ -991,22 +991,22 @@ bool KPrEffectHandler::disappearWipeBottom( KPrObject *object )
}
else
{
- repaintRect.setTop( repaintRect.bottom() - h );
- m_repaintRects.append( new QRect( repaintRect ) );
- drawObject( object, 0, 0, &m_paint, &repaintRect );
+ tqrepaintRect.setTop( tqrepaintRect.bottom() - h );
+ m_tqrepaintRects.append( new TQRect( tqrepaintRect ) );
+ drawObject( object, 0, 0, &m_paint, &tqrepaintRect );
//kdDebug(33001) << "KPrEffectHandler appearWipeLeft h = " << h << positionReached << endl;
}
return positionReached;
}
-void KPrEffectHandler::drawObject( KPrObject *object, int x, int y, QPixmap *screen, QRect *clipRect )
+void KPrEffectHandler::drawObject( KPrObject *object, int x, int y, TQPixmap *screen, TQRect *clipRect )
{
- QPainter p;
+ TQPainter p;
p.begin( screen );
if ( clipRect )
{
- p.setClipRect( *clipRect, QPainter::CoordPainter );
+ p.setClipRect( *clipRect, TQPainter::CoordPainter );
}
p.translate( x, y );
@@ -1028,14 +1028,14 @@ void KPrEffectHandler::drawObject( KPrObject *object, int x, int y, QPixmap *scr
p.translate( -x, -y );
// redraw objects which lie above the currenty drawn
- m_objects.findRef( object );
+ m_objects.tqfindRef( object );
KPrObject *obj;
while ( ( obj = m_objects.next() ) != 0 )
{
if ( ( obj->getAppearStep() < m_step.m_step
- || obj->getAppearStep() == m_step.m_step && !m_appearEffectObjects.containsRef( obj ) )
+ || obj->getAppearStep() == m_step.m_step && !m_appearEffectObjects.tqcontainsRef( obj ) )
&& ( ( obj->getDisappear() && obj->getDisappearStep() > m_step.m_step ) || ! obj->getDisappear() )
- && m_view->zoomHandler()->zoomRect( obj->getRealRect()).intersects(*m_repaintRects.getLast()) )
+ && m_view->zoomHandler()->zoomRect( obj->getRealRect()).intersects(*m_tqrepaintRects.getLast()) )
{
if ( obj->getAppearStep() == m_step.m_step && ! m_back )
{