qt/LedOK/wProgramManager/mconverter.h
2022-08-25 18:37:24 +08:00

33 lines
991 B
C++

#ifndef MCONVERTER_H
#define MCONVERTER_H
#include <QThread>
class mConverter : public QThread {
Q_OBJECT
public:
explicit mConverter(const QString &prog_name, const QString &zip_file, const QString &password, QObject *parent = nullptr);
protected:
virtual void run() override;
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);
signals:
void sProgress(QString, int, bool = false);
private:
QString prog_name, dstDir, srcPageDir;
QString zip_file, password;
int res_id = 0;
};
#endif // MCONVERTER_H