25 lines
608 B
C
25 lines
608 B
C
|
#ifndef ELEMULTIPNG_H
|
||
|
#define ELEMULTIPNG_H
|
||
|
|
||
|
#include <QWidget>
|
||
|
#include <QRandomGenerator>
|
||
|
|
||
|
class EleMultiPng : public QWidget {
|
||
|
Q_OBJECT
|
||
|
public:
|
||
|
explicit EleMultiPng(QString, QJsonArray, QWidget *parent = nullptr);
|
||
|
void startMove();
|
||
|
|
||
|
QVector<QPixmap> imgs;
|
||
|
int timerId = 0, moveTimerId = 0;
|
||
|
int picDur = 0, EffDur = 0, moveInter = 0, movePx = 0, imgc = 0, imgx = 0, imgy = 0;
|
||
|
QChar effType = 0;
|
||
|
QRandomGenerator rand;
|
||
|
bool needRand = false;
|
||
|
protected:
|
||
|
void paintEvent(QPaintEvent *) override;
|
||
|
void timerEvent(QTimerEvent *) override;
|
||
|
};
|
||
|
|
||
|
#endif // ELEMULTIPNG_H
|