36 lines
633 B
C
36 lines
633 B
C
![]() |
#ifndef FILEOPERATION_H
|
||
|
#define FILEOPERATION_H
|
||
|
|
||
|
#include <iostream>
|
||
|
|
||
|
#include <QDir>
|
||
|
#include <QFileInfo>
|
||
|
|
||
|
class FileOperation:public QObject
|
||
|
{
|
||
|
Q_OBJECT
|
||
|
|
||
|
public:
|
||
|
FileOperation();
|
||
|
|
||
|
bool copyFileToPath(QString sourceDir ,QString toDir, bool coverFileIfExist);
|
||
|
QStringList getSubfolders(QDir parentFolder);
|
||
|
|
||
|
QString getFlashDrivePath();
|
||
|
QDir getSourcePath();
|
||
|
|
||
|
private:
|
||
|
//0:等待拷贝数据中;1:正在拷贝;2:没有数据可拷贝;3:请插入u盘;
|
||
|
int m_copyFileStatus;
|
||
|
|
||
|
|
||
|
public slots:
|
||
|
void copyFile();
|
||
|
void deleteFile();
|
||
|
|
||
|
signals:
|
||
|
void copyFileStatus(int);
|
||
|
};
|
||
|
|
||
|
#endif // FILEOPERATION_H
|