32 lines
626 B
C++
Executable File
32 lines
626 B
C++
Executable File
#ifndef RSYNCPATHTODIRPROCESS_H
|
|
#define RSYNCPATHTODIRPROCESS_H
|
|
|
|
#include <QProcess>
|
|
|
|
class RsyncPathToDirProcess : public QObject
|
|
{
|
|
Q_OBJECT
|
|
public:
|
|
RsyncPathToDirProcess(QObject *parent = nullptr);
|
|
~RsyncPathToDirProcess();
|
|
|
|
bool start(QStringList args, bool block = true);
|
|
|
|
signals:
|
|
// 结果信号
|
|
void finished(bool result);
|
|
// 进度百分比
|
|
void progress(int currentRate);
|
|
|
|
private slots:
|
|
// m_p执行结束
|
|
void processFinished(int exitCode, QProcess::ExitStatus);
|
|
|
|
private:
|
|
QProcess * m_p;
|
|
int m_currentRate;
|
|
bool m_bSuccess;
|
|
};
|
|
|
|
#endif // RSYNCPATHTODIRPROCESS_H
|