summaryrefslogtreecommitdiffstats
path: root/kpresenter/KPrPageEffects.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kpresenter/KPrPageEffects.cpp')
-rw-r--r--kpresenter/KPrPageEffects.cpp208
1 files changed, 104 insertions, 104 deletions
diff --git a/kpresenter/KPrPageEffects.cpp b/kpresenter/KPrPageEffects.cpp
index d98f5141..a8192edb 100644
--- a/kpresenter/KPrPageEffects.cpp
+++ b/kpresenter/KPrPageEffects.cpp
@@ -23,16 +23,16 @@
#include "KPrPageEffects.h"
-#include <qpixmap.h>
-#include <qwidget.h>
-#include <qwmatrix.h>
+#include <tqpixmap.h>
+#include <tqwidget.h>
+#include <tqwmatrix.h>
#include <kapplication.h>
#include <kdebug.h>
#include <krandomsequence.h>
-KPrPageEffects::KPrPageEffects( QPaintDevice *dst, const QPixmap &pageTo, PageEffect effect, EffectSpeed speed )
+KPrPageEffects::KPrPageEffects( TQPaintDevice *dst, const TQPixmap &pageTo, PageEffect effect, EffectSpeed speed )
: m_dst( dst ), m_pageTo( pageTo ), m_pageFrom(m_pageTo.width(),m_pageTo.height()), m_effect(effect), m_speed(speed), m_effectStep(0)
, m_width(m_pageTo.width()), m_height(m_pageTo.height()), m_finished(false)
{
@@ -436,15 +436,15 @@ bool KPrPageEffects::effectSurround1() const
int h = m_height / 10;
int w = m_width / 10;
- int repaint_h = h;
- int repaint_w = w;
+ int tqrepaint_h = h;
+ int tqrepaint_w = w;
bool finished = false;
- bool repaint= false;
+ bool tqrepaint= false;
int rh = 0;
int rw = 0;
- int repaint_rh = 0;
- int repaint_rw = 0;
+ int tqrepaint_rh = 0;
+ int tqrepaint_rw = 0;
// 1
if ( step < m_height )
@@ -454,11 +454,11 @@ bool KPrPageEffects::effectSurround1() const
h = stepSize;
if ( step + stepSize >= m_height )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - repaint_h;
- repaint_rw = step - m_height + repaint_w;
- repaint_w = stepSize;
+ tqrepaint_rh = m_height - tqrepaint_h;
+ tqrepaint_rw = step - m_height + tqrepaint_w;
+ tqrepaint_w = stepSize;
}
}
// 2
@@ -467,13 +467,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - h;
rw = step - m_height + w;
w = stepSize;
- if ( step + stepSize >= m_height + m_width - repaint_w )
+ if ( step + stepSize >= m_height + m_width - tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - ( step - m_height + repaint_h - m_width + repaint_w + stepSize );
- repaint_rw = m_width - repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = m_height - ( step - m_height + tqrepaint_h - m_width + tqrepaint_w + stepSize );
+ tqrepaint_rw = m_width - tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 3
@@ -482,13 +482,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - ( step - m_height + h - m_width + w + stepSize );
rw = m_width - w;
h = stepSize;
- if ( step + stepSize >= 2 * m_height - repaint_h + m_width - repaint_w )
+ if ( step + stepSize >= 2 * m_height - tqrepaint_h + m_width - tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = 0;
- repaint_rw = m_width - ( step - 2 * m_height + repaint_h - m_width + 2 * repaint_w + stepSize );
- repaint_w = stepSize;
+ tqrepaint_rh = 0;
+ tqrepaint_rw = m_width - ( step - 2 * m_height + tqrepaint_h - m_width + 2 * tqrepaint_w + stepSize );
+ tqrepaint_w = stepSize;
}
}
// 4
@@ -497,13 +497,13 @@ bool KPrPageEffects::effectSurround1() const
rh = 0;
rw = m_width - ( step - 2 * m_height + h - m_width + 2 * w + stepSize );
w = stepSize;
- if ( step + stepSize >= 2 * m_height - repaint_h + 2 * m_width - 3 * repaint_w )
+ if ( step + stepSize >= 2 * m_height - tqrepaint_h + 2 * m_width - 3 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = step - 2 * m_height + 2 * repaint_h - 2 * m_width + 3 * repaint_w;
- repaint_rw = repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = step - 2 * m_height + 2 * tqrepaint_h - 2 * m_width + 3 * tqrepaint_w;
+ tqrepaint_rw = tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 5
@@ -512,13 +512,13 @@ bool KPrPageEffects::effectSurround1() const
rh = step - 2 * m_height + 2 * h - 2 * m_width + 3 * w;
rw = w;
h = stepSize;
- if ( step + stepSize >= 3 * m_height - 3 * repaint_h + 2 * m_width - 3 * repaint_w )
+ if ( step + stepSize >= 3 * m_height - 3 * tqrepaint_h + 2 * m_width - 3 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - 2 * repaint_h;
- repaint_rw = step - 3 * m_height + 3 * repaint_h - 2 * m_width + 5 * repaint_w;
- repaint_w = stepSize;
+ tqrepaint_rh = m_height - 2 * tqrepaint_h;
+ tqrepaint_rw = step - 3 * m_height + 3 * tqrepaint_h - 2 * m_width + 5 * tqrepaint_w;
+ tqrepaint_w = stepSize;
}
}
// 6
@@ -527,13 +527,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - 2 * h;
rw = step - 3 * m_height + 3 * h - 2 * m_width + 5 * w;
w = stepSize;
- if ( step + stepSize >= 3 * m_height - 3 * repaint_h + 3 * m_width - 6 * repaint_w )
+ if ( step + stepSize >= 3 * m_height - 3 * tqrepaint_h + 3 * m_width - 6 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - ( step - 3 * m_height + 5 * repaint_h - 3 * m_width + 6 * repaint_w + stepSize );
- repaint_rw = m_width - 2 * repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = m_height - ( step - 3 * m_height + 5 * tqrepaint_h - 3 * m_width + 6 * tqrepaint_w + stepSize );
+ tqrepaint_rw = m_width - 2 * tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 7
@@ -542,13 +542,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - ( step - 3 * m_height + 5 * h - 3 * m_width + 6 * w + stepSize );
rw = m_width - 2 * w;
h = stepSize;
- if ( step + stepSize >= 4 * m_height - 6 * repaint_h + 3 * m_width - 6 * repaint_w )
+ if ( step + stepSize >= 4 * m_height - 6 * tqrepaint_h + 3 * m_width - 6 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = repaint_h;
- repaint_rw = m_width - ( step - 4 * m_height + 6 * repaint_h - 3 * m_width + 8 * repaint_w + stepSize );
- repaint_w = stepSize;
+ tqrepaint_rh = tqrepaint_h;
+ tqrepaint_rw = m_width - ( step - 4 * m_height + 6 * tqrepaint_h - 3 * m_width + 8 * tqrepaint_w + stepSize );
+ tqrepaint_w = stepSize;
}
}
// 8
@@ -557,13 +557,13 @@ bool KPrPageEffects::effectSurround1() const
rh = h;
rw = m_width - ( step - 4 * m_height + 6 * h - 3 * m_width + 8 * w + stepSize );
w = stepSize;
- if ( step + stepSize >= 4 * m_height - 6 * repaint_h + 4 * m_width - 10 * repaint_w )
+ if ( step + stepSize >= 4 * m_height - 6 * tqrepaint_h + 4 * m_width - 10 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = step - 4 * m_height + 8 * repaint_h - 4 * m_width + 10 * repaint_w;
- repaint_rw = 2 * repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = step - 4 * m_height + 8 * tqrepaint_h - 4 * m_width + 10 * tqrepaint_w;
+ tqrepaint_rw = 2 * tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 9
@@ -572,13 +572,13 @@ bool KPrPageEffects::effectSurround1() const
rh = step - 4 * m_height + 8 * h - 4 * m_width + 10 * w;
rw = 2 * w;
h = stepSize;
- if ( step + stepSize >= 5 * m_height - 10 * repaint_h + 4 * m_width - 10 * repaint_w )
+ if ( step + stepSize >= 5 * m_height - 10 * tqrepaint_h + 4 * m_width - 10 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - 3 * repaint_h;
- repaint_rw = step - 5 * m_height + 10 * repaint_h - 4 * m_width + 13 * repaint_w;
- repaint_w = stepSize;
+ tqrepaint_rh = m_height - 3 * tqrepaint_h;
+ tqrepaint_rw = step - 5 * m_height + 10 * tqrepaint_h - 4 * m_width + 13 * tqrepaint_w;
+ tqrepaint_w = stepSize;
}
}
// 10
@@ -587,13 +587,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - 3 * h;
rw = step - 5 * m_height + 10 * h - 4 * m_width + 13 * w;
w = stepSize;
- if ( step + stepSize >= 5 * m_height - 10 * repaint_h + 5 * m_width - 15 * repaint_w )
+ if ( step + stepSize >= 5 * m_height - 10 * tqrepaint_h + 5 * m_width - 15 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - ( step - 5 * m_height + 13 * repaint_h - 5 * m_width + 15 * repaint_w + stepSize );
- repaint_rw = m_width - 3 * repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = m_height - ( step - 5 * m_height + 13 * tqrepaint_h - 5 * m_width + 15 * tqrepaint_w + stepSize );
+ tqrepaint_rw = m_width - 3 * tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 11
@@ -602,13 +602,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - ( step - 5 * m_height + 13 * h - 5 * m_width + 15 * w + stepSize );
rw = m_width - 3 * w;
h = stepSize;
- if ( step + stepSize >= 6 * m_height - 15 * repaint_h + 5 * m_width - 15 * repaint_w )
+ if ( step + stepSize >= 6 * m_height - 15 * tqrepaint_h + 5 * m_width - 15 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = 2 * repaint_h;
- repaint_rw = m_width - ( step - 6 * m_height + 15 * repaint_h - 5 * m_width + 18 * repaint_w + stepSize );
- repaint_w = stepSize;
+ tqrepaint_rh = 2 * tqrepaint_h;
+ tqrepaint_rw = m_width - ( step - 6 * m_height + 15 * tqrepaint_h - 5 * m_width + 18 * tqrepaint_w + stepSize );
+ tqrepaint_w = stepSize;
}
}
// 12
@@ -617,13 +617,13 @@ bool KPrPageEffects::effectSurround1() const
rh = 2 * h;
rw = m_width - ( step - 6 * m_height + 15 * h - 5 * m_width + 18 * w + stepSize );
w = stepSize;
- if ( step + stepSize >= 6 * m_height - 15 * repaint_h + 6 * m_width - 21 * repaint_w )
+ if ( step + stepSize >= 6 * m_height - 15 * tqrepaint_h + 6 * m_width - 21 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = step - 6 * m_height + 18 * repaint_h - 6 * m_width + 21 * repaint_w;
- repaint_rw = 3 * repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = step - 6 * m_height + 18 * tqrepaint_h - 6 * m_width + 21 * tqrepaint_w;
+ tqrepaint_rw = 3 * tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 13
@@ -632,13 +632,13 @@ bool KPrPageEffects::effectSurround1() const
rh = step - 6 * m_height + 18 * h - 6 * m_width + 21 * w;
rw = 3 * w;
h = stepSize;
- if ( step + stepSize >= 7 * m_height - 21 * repaint_h + 6 * m_width - 21 * repaint_w )
+ if ( step + stepSize >= 7 * m_height - 21 * tqrepaint_h + 6 * m_width - 21 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - 4 * repaint_h;
- repaint_rw = step - 7 * m_height + 21 * repaint_h - 6 * m_width + 25 * repaint_w;
- repaint_w = stepSize;
+ tqrepaint_rh = m_height - 4 * tqrepaint_h;
+ tqrepaint_rw = step - 7 * m_height + 21 * tqrepaint_h - 6 * m_width + 25 * tqrepaint_w;
+ tqrepaint_w = stepSize;
}
}
// 14
@@ -647,13 +647,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - 4 * h;
rw = step - 7 * m_height + 21 * h - 6 * m_width + 25 * w;
w = stepSize;
- if ( step + stepSize >= 7 * m_height - 21 * repaint_h + 7 * m_width - 28 * repaint_w )
+ if ( step + stepSize >= 7 * m_height - 21 * tqrepaint_h + 7 * m_width - 28 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - ( step - 7 * m_height + 25 * repaint_h - 7 * m_width + 28 * repaint_w + stepSize );
- repaint_rw = m_width - 4 * repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = m_height - ( step - 7 * m_height + 25 * tqrepaint_h - 7 * m_width + 28 * tqrepaint_w + stepSize );
+ tqrepaint_rw = m_width - 4 * tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 15
@@ -662,13 +662,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - ( step - 7 * m_height + 25 * h - 7 * m_width + 28 * w + stepSize );
rw = m_width - 4 * w;
h = stepSize;
- if ( step + stepSize >= 8 * m_height - 28 * repaint_h + 7 * m_width - 28 * repaint_w )
+ if ( step + stepSize >= 8 * m_height - 28 * tqrepaint_h + 7 * m_width - 28 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = 3 * repaint_h;
- repaint_rw = m_width - ( step - 8 * m_height + 28 * repaint_h - 7 * m_width + 32 * repaint_w + stepSize );
- repaint_w = stepSize;
+ tqrepaint_rh = 3 * tqrepaint_h;
+ tqrepaint_rw = m_width - ( step - 8 * m_height + 28 * tqrepaint_h - 7 * m_width + 32 * tqrepaint_w + stepSize );
+ tqrepaint_w = stepSize;
}
}
// 16
@@ -677,13 +677,13 @@ bool KPrPageEffects::effectSurround1() const
rh = 3 * h;
rw = m_width - ( step - 8 * m_height + 28 * h - 7 * m_width + 32 * w + stepSize );
w = stepSize;
- if ( step + stepSize >= 8 * m_height - 28 * repaint_h + 8 * m_width - 36 * repaint_w )
+ if ( step + stepSize >= 8 * m_height - 28 * tqrepaint_h + 8 * m_width - 36 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = step - 8 * m_height + 32 * repaint_h - 8 * m_width + 36 * repaint_w;
- repaint_rw = 4 * repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = step - 8 * m_height + 32 * tqrepaint_h - 8 * m_width + 36 * tqrepaint_w;
+ tqrepaint_rw = 4 * tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 17
@@ -692,13 +692,13 @@ bool KPrPageEffects::effectSurround1() const
rh = step - 8 * m_height + 32 * h - 8 * m_width + 36 * w;
rw = 4 * w;
h = stepSize;
- if ( step + stepSize >= 9 * m_height - 36 * repaint_h + 8 * m_width - 36 * repaint_w )
+ if ( step + stepSize >= 9 * m_height - 36 * tqrepaint_h + 8 * m_width - 36 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - 5 * repaint_h;
- repaint_rw = step - 9 * m_height + 36 * repaint_h - 8 * m_width + 41 * repaint_w;
- repaint_w = stepSize;
+ tqrepaint_rh = m_height - 5 * tqrepaint_h;
+ tqrepaint_rw = step - 9 * m_height + 36 * tqrepaint_h - 8 * m_width + 41 * tqrepaint_w;
+ tqrepaint_w = stepSize;
}
}
// 18
@@ -707,13 +707,13 @@ bool KPrPageEffects::effectSurround1() const
rh = m_height - 5 * h;
rw = step - 9 * m_height + 36 * h - 8 * m_width + 41 * w;
w = stepSize;
- if ( step + stepSize >= 9 * m_height - 36 * repaint_h + 9 * m_width - 45 * repaint_w )
+ if ( step + stepSize >= 9 * m_height - 36 * tqrepaint_h + 9 * m_width - 45 * tqrepaint_w )
{
- repaint = true;
+ tqrepaint = true;
- repaint_rh = m_height - ( step - 9 * m_height + 41 * repaint_h - 9 * m_width + 45 * repaint_w + stepSize );
- repaint_rw = m_width - 5 * repaint_w;
- repaint_h = stepSize;
+ tqrepaint_rh = m_height - ( step - 9 * m_height + 41 * tqrepaint_h - 9 * m_width + 45 * tqrepaint_w + stepSize );
+ tqrepaint_rw = m_width - 5 * tqrepaint_w;
+ tqrepaint_h = stepSize;
}
}
// 19
@@ -737,9 +737,9 @@ bool KPrPageEffects::effectSurround1() const
bitBlt( m_dst, rw, rh, &m_pageTo, rw, rh, w, h );
- if ( repaint )
+ if ( tqrepaint )
{
- bitBlt( m_dst, repaint_rw, repaint_rh, &m_pageTo, repaint_rw, repaint_rh, repaint_w, repaint_h );
+ bitBlt( m_dst, tqrepaint_rw, tqrepaint_rh, &m_pageTo, tqrepaint_rw, tqrepaint_rh, tqrepaint_w, tqrepaint_h );
}
return finished;
@@ -764,9 +764,9 @@ bool KPrPageEffects::effectFlyAway1()
{
double dw = 1.0 - 83.0 / 100.0 * m_effectStep / (double)pSteps;
- QWMatrix m;
+ TQWMatrix m;
m.scale( dw, dw );
- QPixmap pix( m_pageFrom.xForm( m ) );
+ TQPixmap pix( m_pageFrom.xForm( m ) );
if ( m_effectStep == pSteps )
m_pageFrom = pix;
@@ -1421,7 +1421,7 @@ bool KPrPageEffects::effectDissolve()
--dissove;
int index = random.getLong( m_list.count() );
- QValueListIterator<int> it = m_list.at( index );
+ TQValueListIterator<int> it = m_list.at( index );
unsigned int x = ( *it % colno ) * blockSize;
unsigned int y = ( *it / colno ) * blockSize;
@@ -1558,7 +1558,7 @@ bool KPrPageEffects::effectMelting()
int w = ( m_width + count - 1 ) / count;
- QValueListIterator<int> it = m_list.begin();
+ TQValueListIterator<int> it = m_list.begin();
int finished = 32;
for ( int c = 0; c < count; c++ )