qt/LedOK/wProgramManager/threadexportprogrampro.h

33 lines
934 B
C
Raw Normal View History

2022-01-04 18:11:48 +08:00
#ifndef THREADEXPORTPROGRAMPRO_H
#define THREADEXPORTPROGRAMPRO_H
#include <QThread>
#include <QDir>
class ThreadExportProgramPro:public QThread
{
Q_OBJECT
public:
ThreadExportProgramPro();
~ThreadExportProgramPro();
void run();
void SetSourceDirAndDestDir(QString strSource,QString strDest);
private:
bool copyFileToPath(QString sourceDir ,QString toDir, bool coverFileIfExist);
bool copyDirectoryFiles(const QString &fromDir, const QString &toDir, bool coverFileIfExist);
bool copyFile(const QString &fromFIleName, const QString &toFileName);
signals:
void sigSendExportProgressValue(int);
signals:
void sigCopyDirStation(float);
void sigCopyDirOver();
private:
QDir * m_createfile = Q_NULLPTR;
float m_total = 0;
float m_value = 0;
bool m_firstRead = true;
QString m_strSource;
QString m_strDest;
int totalCopySize = 0;
};
#endif // THREADEXPORTPROGRAMPRO_H