qt/LedOK/program/gentmpthread.h
2024-02-21 18:08:50 +08:00

35 lines
933 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 &);
JArray genSources(QString type, const JArray &eles, const JValue &);
JObj genText(const JValue &json, JArray &);
JObj genImage(const JValue &json);
JObj convertGif(const JValue &json);
JObj convertDClock(const JValue &json);
JObj convertAClock(const JValue &json);
JObj convertWeb(const JValue &json);
JObj convertTimer(const JValue &json);
signals:
void onErr(QString);
private:
QString prog_name, dstDir, srcPageDir;
QString zip_file, password;
int res_id = 0;
};
#endif // GENTMPTHREAD_H