summaryrefslogtreecommitdiffstats
path: root/src/effectwidget.cpp
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 06:50:25 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2011-07-01 06:50:25 +0000
commita7dcba0bccd505f672310722d7205c60f57c9c17 (patch)
treeb78db5f5c2c96cad7a2c18feb8aebdf4c44fa879 /src/effectwidget.cpp
parent63dc78a1d3758ddb8a4d1f7fa947969141fe6a15 (diff)
downloadksplash-engine-moodin-a7dcba0bccd505f672310722d7205c60f57c9c17.tar.gz
ksplash-engine-moodin-a7dcba0bccd505f672310722d7205c60f57c9c17.zip
TQt4 port ksplash-engine-moodin
This enables compilation under both Qt3 and Qt4 git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ksplash-engine-moodin@1238987 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/effectwidget.cpp')
-rw-r--r--src/effectwidget.cpp36
1 files changed, 18 insertions, 18 deletions
diff --git a/src/effectwidget.cpp b/src/effectwidget.cpp
index 1a2804a..6132437 100644
--- a/src/effectwidget.cpp
+++ b/src/effectwidget.cpp
@@ -10,18 +10,18 @@
* *
***************************************************************************/
-#include <qwidget.h>
-#include <qstyle.h>
-#include <qtimer.h>
-#include <qpainter.h>
-#include <qimage.h>
+#include <tqwidget.h>
+#include <tqstyle.h>
+#include <tqtimer.h>
+#include <tqpainter.h>
+#include <tqimage.h>
#include "effectwidget.h"
-QImage* EffectWidget::bgImage = 0;
+TQImage* EffectWidget::bgImage = 0;
-EffectWidget::EffectWidget(QWidget* parent, const char* name)
- :QWidget(parent, name)
+EffectWidget::EffectWidget(TQWidget* tqparent, const char* name)
+ :TQWidget(tqparent, name)
{
timer = 0;
delayMS = 20;
@@ -32,12 +32,12 @@ EffectWidget::EffectWidget(QWidget* parent, const char* name)
beginOpacity = 20.0;
endOpacity = 80.0;
setBackgroundMode(NoBackground);
- setBackgroundOrigin(QWidget::ParentOrigin);
+ setBackgroundOrigin(TQWidget::ParentOrigin);
updateCache();
}
-void EffectWidget::setImage(QImage *i)
+void EffectWidget::setImage(TQImage *i)
{
image = i;
}
@@ -71,8 +71,8 @@ void EffectWidget::start()
if (!timer)
{
- timer = new QTimer(this);
- connect(timer,SIGNAL(timeout()),this,SLOT(timerTick()));
+ timer = new TQTimer(this);
+ connect(timer,TQT_SIGNAL(timeout()),this,TQT_SLOT(timerTick()));
}
playing = true;
@@ -128,13 +128,13 @@ void EffectWidget::timerTick()
}
-void EffectWidget::moveEvent(QMoveEvent *)
+void EffectWidget::moveEvent(TQMoveEvent *)
{
updateCache();
}
-void EffectWidget::resizeEvent(QResizeEvent *)
+void EffectWidget::resizeEvent(TQResizeEvent *)
{
updateCache();
}
@@ -145,18 +145,18 @@ void EffectWidget::updateCache()
if (!bgImage)
return;
- QPoint pos(mapToParent(QPoint(0, 0)));
+ TQPoint pos(mapToParent(TQPoint(0, 0)));
background = bgImage->copy(pos.x(), pos.y(), width(), height());
bitBlt(this, 0, 0, &background);
}
-void EffectWidget::paintEvent(QPaintEvent *)
+void EffectWidget::paintEvent(TQPaintEvent *)
{
if (background.isNull())
return;
- QImage upper = image->copy();
- QImage lower = background.copy();
+ TQImage upper = image->copy();
+ TQImage lower = background.copy();
KImageEffect::blendOnLower(upper, lower, KImageEffect::Centered, (currentStep + 1 == totalSteps) ? 1.0 : endOpacity / float(totalSteps) * float(currentStep) + beginOpacity);
bitBlt(this, 0, 0, &lower);