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.
tdetoys/ktux/sprite.h

73 lines
1.3 KiB

//-----------------------------------------------------------------------------
//
// ksprite - TQCanvas based screensaver
//
// Copyright (c) Martin R. Jones 1996
//
#ifndef __SPRITE_H__
#define __SPRITE_H__
#include <tqtimer.h>
#include <tqpushbutton.h>
#include <tqptrlist.h>
#include <tqstrlist.h>
#include <tqcanvas.h>
#include <kscreensaver.h>
#include "spriteanim.h"
//-----------------------------------------------------------------------------
class KSpriteSaver : public KScreenSaver
{
Q_OBJECT
public:
KSpriteSaver( WId id );
virtual ~KSpriteSaver();
void setSpeed(int speed);
private:
void readSettings();
void initialise();
void blank();
protected slots:
void slotTimeout();
protected:
virtual void timerEvent(TQTimerEvent *);
protected:
QCanvas *mCanvas;
QCanvasView *mView;
QTimer mTimer;
int mSpeed;
TQPtrList<SpriteGroup> mGroups;
TQMemArray<int> mTimerIds;
};
class KSpriteSetup : public QDialog
{
Q_OBJECT
public:
KSpriteSetup( TQWidget *parent = NULL, const char *name = NULL );
~KSpriteSetup();
protected:
void readSettings();
private slots:
void slotSpeed(int s);
void slotOkPressed();
void slotAbout();
private:
int speed;
TQWidget *preview;
KSpriteSaver *saver;
};
#endif