qt/LedOK/program/gentmpthread.h

35 lines
917 B
C
Raw Normal View History

2022-10-27 15:07:45 +08:00
#ifndef GENTMPTHREAD_H
#define GENTMPTHREAD_H
2022-01-04 18:11:48 +08:00
#include <QThread>
2023-10-23 14:58:29 +08:00
#include "gutil/qjson.h"
2022-10-27 15:07:45 +08:00
class ProgItem;
class GenTmpThread : public QThread {
2022-01-04 18:11:48 +08:00
Q_OBJECT
public:
2023-05-11 11:47:00 +08:00
explicit GenTmpThread(ProgItem *progItem, const QString &prog_name, const QString &zip_file, const QString &password);
2022-01-04 18:11:48 +08:00
2022-10-27 15:07:45 +08:00
ProgItem *mProgItem;
2022-01-04 18:11:48 +08:00
protected:
2022-08-25 18:37:24 +08:00
virtual void run() override;
2022-01-04 18:11:48 +08:00
2024-02-21 18:08:50 +08:00
JObj cvtPage(const JObj &);
2024-06-20 10:44:08 +08:00
JArray genSources(QString type, const JArray &eles);
2024-02-21 18:08:50 +08:00
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);
2022-01-04 18:11:48 +08:00
signals:
2023-04-18 14:14:46 +08:00
void onErr(QString);
2022-01-04 18:11:48 +08:00
private:
2022-08-25 18:37:24 +08:00
QString prog_name, dstDir, srcPageDir;
QString zip_file, password;
int res_id = 0;
2022-01-04 18:11:48 +08:00
};
2022-10-27 15:07:45 +08:00
#endif // GENTMPTHREAD_H