qt/LedOK/program/gentmpthread.h
2023-10-23 14:58:29 +08:00

35 lines
914 B
C++

#ifndef GENTMPTHREAD_H
#define GENTMPTHREAD_H
#include <QThread>
#include "gutil/qjson.h"
class ProgItem;
class GenTmpThread : public QThread {
Q_OBJECT
public:
explicit GenTmpThread(ProgItem *progItem, const QString &prog_name, const QString &zip_file, const QString &password);
ProgItem *mProgItem;
protected:
virtual void run() override;
JObj cvtPage(const JObj &, const JObj &);
JObj cvtEle(const QString &type, const JObj &json);
JObj convertText(const JObj &json);
JObj convertPhoto(const JObj &json);
JObj convertGif(const JObj &json);
JObj convertDClock(const JObj &json);
JObj convertAClock(const JObj &json);
JObj convertWeb(const JObj &json);
JObj convertTimer(const JObj &json);
signals:
void onErr(QString);
private:
QString prog_name, dstDir, srcPageDir;
QString zip_file, password;
int res_id = 0;
};
#endif // GENTMPTHREAD_H