2023-04-18 14:14:46 +08:00
|
|
|
#ifndef ELESCROLL_H
|
|
|
|
#define ELESCROLL_H
|
|
|
|
|
2023-10-23 14:58:29 +08:00
|
|
|
#include "gutil/qjson.h"
|
2023-04-18 14:14:46 +08:00
|
|
|
#include <QWidget>
|
2023-10-23 14:58:29 +08:00
|
|
|
|
2023-04-18 14:14:46 +08:00
|
|
|
class EleScroll : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
2024-02-21 18:08:50 +08:00
|
|
|
explicit EleScroll(QWidget *, QString, const JValue &, int, int);
|
2023-04-18 14:14:46 +08:00
|
|
|
explicit EleScroll(QWidget *, QString, char effect = 0, double effDur = 0.0);
|
2024-02-21 18:08:50 +08:00
|
|
|
int w = 0, h = 0;
|
2023-04-18 14:14:46 +08:00
|
|
|
QPixmap img;
|
|
|
|
char effect = 0;
|
2024-02-21 18:08:50 +08:00
|
|
|
int interval = 0, freshCnt = 0, cur = 0, end = 0, step = 1;
|
|
|
|
bool noUpdate = false;
|
|
|
|
void doFrame();
|
2023-04-18 14:14:46 +08:00
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // ELESCROLL_H
|