#ifndef PLAYWIN_H #define PLAYWIN_H #include "elebase.h" #include "ttimer.h" #include #include #include class Page : public QWidget { public: explicit Page(QWidget *parent = nullptr); QString name; QString dirPre; int timeSpan = 0; QVector eles; }; class TimerValue{ public: TimerValue(QWidget *ele = nullptr, bool visible = false): ele(ele), visible(visible){} QWidget* ele; bool visible; }; class PlayWin : public QWidget{ Q_OBJECT public: SyncTimer* timer = nullptr; int cur = 0; QMap timerMap; PlayWin(QString dir, int x, int y, int width, int height, const QJsonObject &prog, QWidget *parent = nullptr); public slots: void sltNext(); void sltSetVisible(QWidget *wgt, bool visible){ wgt->setVisible(visible); } signals: void sigSetVisible(QWidget *, bool); protected: void paintEvent(QPaintEvent *) override; void timerEvent(QTimerEvent *) override; }; #endif // PLAYWIN_H