You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ksplash-engine-moodin/src/effectwidget.h

71 lines
1.8 KiB

/***************************************************************************
* 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 <tqwidget.h>
#include <tqptrlist.h>
#include <tqpixmap.h>
#include <tqimage.h>
#include <kimageeffect.h>
class TQTimer;
class EffectWidget : public TQWidget
{
TQ_OBJECT
public:
EffectWidget(TQWidget *parent = 0,const char *name = 0);
static void setBackgroundImage(TQImage *image) { bgImage = image; }
void setImage(TQImage *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(TQPaintEvent *);
void resizeEvent(TQResizeEvent *);
void moveEvent(TQMoveEvent *);
void updateCache();
public slots:
void timerTick();
private:
static TQImage *bgImage;
TQTimer *timer;
TQImage *image;
TQImage background;
unsigned int delayMS;
unsigned int currentStep;
unsigned int totalSteps;
bool playing;
bool loop;
float
beginOpacity,
endOpacity;
};
#endif