qt/LedOK/wProgramManager/mconverter.h

33 lines
991 B
C
Raw Normal View History

2022-01-04 18:11:48 +08:00
#ifndef MCONVERTER_H
#define MCONVERTER_H
#include <QThread>
2022-08-25 18:37:24 +08:00
class mConverter : public QThread {
2022-01-04 18:11:48 +08:00
Q_OBJECT
public:
2022-08-25 18:37:24 +08:00
explicit mConverter(const QString &prog_name, const QString &zip_file, const QString &password, QObject *parent = nullptr);
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
2022-08-25 18:37:24 +08:00
QJsonObject cvtPage(const QJsonDocument &jProg);
QJsonObject cvtEle(const QString &type, const QJsonObject &json);
QJsonObject convertText(const QJsonObject &json);
QJsonObject convertPhoto(const QJsonObject &json);
QJsonObject convertGif(const QJsonObject &json);
QJsonObject convertDClock(const QJsonObject &json);
QJsonObject convertAClock(const QJsonObject &json);
QJsonObject convertWeb(const QJsonObject &json);
QJsonObject convertTimer(const QJsonObject &json);
2022-01-04 18:11:48 +08:00
signals:
void sProgress(QString, int, bool = false);
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
};
#endif // MCONVERTER_H