qt/LedOK/program/copydirthread.h

25 lines
537 B
C
Raw Normal View History

2023-04-18 14:14:46 +08:00
#ifndef COPYDIRTHREAD_H
#define COPYDIRTHREAD_H
#include <QThread>
2025-05-06 18:28:05 +08:00
using PathPairList = QList<std::pair<QString, QString>>;
2023-04-18 14:14:46 +08:00
class CopyDirThread : public QThread {
Q_OBJECT
public:
CopyDirThread();
2025-05-06 18:28:05 +08:00
PathPairList paths;
2023-04-18 14:14:46 +08:00
void run();
2024-02-21 18:08:50 +08:00
void move();
protected:
2023-04-18 14:14:46 +08:00
bool copyDir(const QString &fromDir, const QString &toDir, bool coverFileIfExist);
2024-02-21 18:08:50 +08:00
bool moveDir(const QString &fromDir, const QString &toDir);
2023-04-18 14:14:46 +08:00
2025-05-06 18:28:05 +08:00
int i = 0;
2023-04-18 14:14:46 +08:00
int copiedSize = 0;
signals:
void sigProgress(int, int);
};
#endif // COPYDIRTHREAD_H