2022-08-25 18:37:24 +08:00
|
|
|
#ifndef EGIF_H
|
|
|
|
#define EGIF_H
|
|
|
|
#include "ebase.h"
|
|
|
|
#include "pagelistitem.h"
|
|
|
|
#include "synctimer.h"
|
|
|
|
|
|
|
|
class EGif : public EBase {
|
|
|
|
Q_OBJECT
|
|
|
|
public:
|
|
|
|
static QString filters() { return "Gif(*.gif)"; }
|
|
|
|
static EGif *create(const QString &file, PageListItem *pageItem, EBase *multiWin = nullptr);
|
2023-10-23 14:58:29 +08:00
|
|
|
static EGif *create(const JObj &, PageListItem *pageItem, EBase *multiWin = nullptr);
|
2022-08-25 18:37:24 +08:00
|
|
|
|
|
|
|
explicit EGif(QMovie*, const QString &dir, const QString &name, PageListItem *pageItem, EBase *multiWin = nullptr);
|
|
|
|
~EGif();
|
|
|
|
virtual int type() const override { return EBase::Gif; }
|
|
|
|
void paint(QPainter*, const QStyleOptionGraphicsItem *, QWidget *) override;
|
|
|
|
QWidget* attrWgt() override;
|
|
|
|
bool save(const QString &pRoot) override;
|
2023-10-23 14:58:29 +08:00
|
|
|
JObj attrJson() const override;
|
2022-08-25 18:37:24 +08:00
|
|
|
void loadFiles() override;
|
|
|
|
void freeFiles() override;
|
|
|
|
|
|
|
|
QMovie *mMovie;
|
|
|
|
QString mDir;
|
|
|
|
QString mName;
|
|
|
|
public slots:
|
|
|
|
void sltNext();
|
|
|
|
|
|
|
|
protected:
|
|
|
|
PageListItem *mPageItem;
|
2024-02-21 18:08:50 +08:00
|
|
|
SyncTimer* timer = 0;
|
2022-08-25 18:37:24 +08:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif // EGIF_H
|