summaryrefslogtreecommitdiffstats
path: root/src/effectwidget.h
diff options
context:
space:
mode:
authortpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 19:13:25 +0000
committertpearson <tpearson@283d02a7-25f6-0310-bc7c-ecb5cbfe19da>2010-02-22 19:13:25 +0000
commit7d8a8bdafccd66e70f313ee233cff920eac9d830 (patch)
treec0877b2799255f52ea6bfdfb60e5eb2f60926b6b /src/effectwidget.h
downloadksplash-engine-moodin-7d8a8bdafccd66e70f313ee233cff920eac9d830.tar.gz
ksplash-engine-moodin-7d8a8bdafccd66e70f313ee233cff920eac9d830.zip
Added KDE3 moodin engine
git-svn-id: svn://anonsvn.kde.org/home/kde/branches/trinity/applications/ksplash-engine-moodin@1094437 283d02a7-25f6-0310-bc7c-ecb5cbfe19da
Diffstat (limited to 'src/effectwidget.h')
-rw-r--r--src/effectwidget.h69
1 files changed, 69 insertions, 0 deletions
diff --git a/src/effectwidget.h b/src/effectwidget.h
new file mode 100644
index 0000000..57df6bf
--- /dev/null
+++ b/src/effectwidget.h
@@ -0,0 +1,69 @@
+/***************************************************************************
+ * Copyright Sean Meiners 2004 <Sean.Meiners@LinspireInc.com> *
+ * Copyright (C) by *
+ * - 2005: Christian Leh <moodwrod@web.de> *
+ * *
+ * This program is free software; you can redistribute it and/or modify *
+ * it under the terms of the GNU General Public License (version 2) as *
+ * published by the Free Software Foundation. (The original KSplash/ML *
+ * codebase (upto version 0.95.3) is BSD-licensed.) *
+ * *
+ ***************************************************************************/
+
+#ifndef FADEWIDGET_H
+#define FADEWIDGET_H
+
+#include <qwidget.h>
+#include <qptrlist.h>
+#include <qpixmap.h>
+#include <qimage.h>
+
+#include <kimageeffect.h>
+
+class QTimer;
+
+class EffectWidget : public QWidget
+{
+ Q_OBJECT
+
+ public:
+ EffectWidget(QWidget *parent = 0,const char *name = 0);
+
+ static void setBackgroundImage(QImage *image) { bgImage = image; }
+
+ void setImage(QImage *i);
+ void setDelay(int delayInMS);
+ void setLoop(bool loop);
+ void setSteps(int steps);
+ void setStart(float begin, float end = 1.0, bool reverse = false);
+
+ void start();
+ void stop();
+ void rewind();
+
+ void paintEvent(QPaintEvent *);
+ void resizeEvent(QResizeEvent *);
+ void moveEvent(QMoveEvent *);
+
+ void updateCache();
+
+ public slots:
+ void timerTick();
+
+ private:
+ static QImage *bgImage;
+
+ QTimer *timer;
+ QImage *image;
+ QImage background;
+ unsigned int delayMS;
+ unsigned int currentStep;
+ unsigned int totalSteps;
+ bool playing;
+ bool loop;
+ float
+ beginOpacity,
+ endOpacity;
+};
+
+#endif