2023-04-18 14:14:46 +08:00
|
|
|
#ifndef ELESCROLL_H
|
|
|
|
#define ELESCROLL_H
|
|
|
|
|
|
|
|
#include <QWidget>
|
|
|
|
class EleSplitScroll;
|
|
|
|
class EleScroll : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit EleScroll(QWidget *, QString, QJsonObject);
|
|
|
|
explicit EleScroll(QWidget *, QString, char effect = 0, double effDur = 0.0);
|
|
|
|
QPixmap img;
|
|
|
|
char effect = 0;
|
|
|
|
int interval = 0, timerId = 0, cur = 0, end = 0, curAdd = 1;
|
|
|
|
QList<EleSplitScroll*> splits;
|
|
|
|
void paint(QPaintDevice *);
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *) override;
|
|
|
|
void timerEvent(QTimerEvent *) override;
|
|
|
|
};
|
|
|
|
|
|
|
|
class EleSplitScroll : public QWidget {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
explicit EleSplitScroll(QWidget *parent, EleScroll *scroll) : QWidget{parent}, scroll(scroll) {};
|
|
|
|
|
|
|
|
protected:
|
|
|
|
void paintEvent(QPaintEvent *) override;
|
|
|
|
|
|
|
|
EleScroll *scroll;
|
|
|
|
};
|
|
|
|
#endif // ELESCROLL_H
|